Reply To: Help with Board

Forums General Help with Board Reply To: Help with Board

#6372
Dave Mcospan
Participant

    I got the kernel booted and the WIFI is working! I had to figure out some things that were a little tricky and if anyone else is working on getting WIFI up and running on a custom board here are some notes:

     

    In the DTS you should add the following (Assuming you used the exact signals that were in the App Note)

    &am33xx_pinmux {
    ...
      sdio_wifi_pins: sdio_wifi_pins {
        pinctrl-single,pins = &<
          AM33XX_IOPAD(0x93C, PIN_INPUT | MUX_MODE6 ) /* (L15) gmii1_rxd1.mmc2_clk */
          AM33XX_IOPAD(0x914, PIN_INPUT | MUX_MODE6 ) /* (J16) gmii1_txen.mmc2_cmd */
          AM33XX_IOPAD(0x918, PIN_INPUT | MUX_MODE5 ) /* (J17) gmii1_rxdv.mmc2_dat0 */
          AM33XX_IOPAD(0x91C, PIN_INPUT | MUX_MODE5 ) /* (J18) gmii1_txd3.mmc2_dat1 */
          AM33XX_IOPAD(0x920, PIN_INPUT | MUX_MODE5 ) /* (K15) gmii1_txd2.mmc2_dat2 */
          AM33XX_IOPAD(0x908, PIN_INPUT | MUX_MODE5 ) /* (H16) gmii1_col.mmc2_dat3 */
        >;
      };
      wl18xx_pins: pinmux_wl18xx_pins {
        pinctrl-single,pins = <
          AM33XX_IOPAD(0x92C, PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) /* (K18) gmii1_txclk.gpio3[9] (WLAN EN) */
          AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN  | MUX_MODE7 ) /* (K16) gmii1_txd1.gpio0[21] (WIFI Int) */
          AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLUP   | MUX_MODE7)  /* (L18) gmii1_rxclk.gpio3[10] (LS_BUF_EN Not Connected but it doesn't matter) */
        >;
      };
      uart3_bluetooth_pins: uart3_bluetooth_pins {
        pinctrl-single,pins = <
          AM33XX_IOPAD(0x934, PIN_INPUT   | MUX_MODE1 )         /* (L17) gmii1_rxd3.uart3_rxd */
          AM33XX_IOPAD(0x938, PIN_OUTPUT  | MUX_MODE1 )         /* (L16) gmii1_rxd2.uart3_txd */
          AM33XX_IOPAD(0x948, PIN_INPUT   | MUX_MODE3 )         /* (M17) mdio_data.uart3_ctsn */
          AM33XX_IOPAD(0x94c, PIN_OUTPUT  | MUX_MODE3 )         /* (M18) mdio_clk.uart3_rtsn */
        >;
      };
      bt_pins: pinmux_bt_pins {
        pinctrl-single,pins = <
          AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP | MUX_MODE7 )    /* (K17) gmii1_txd0.gpio0[28] (BT_EN) */
        >;
      };
    ...
    };
    
    /****************************************************************************
    * WIFI/Bluetooth Control
    ****************************************************************************/
    &mmc3 {
      dmas = <&edma_xbar 12 0 1
              &edma_xbar 13 0 2>;
      dma-names = "tx", "rx";
      status = "okay";
      vmmc-supply = <&wlan_en_reg>;
      bus-width = <4>;
      non-removable;
      cap-power-off-card;
      ti,needs-special-hs-handling;
      keep-power-in-suspend;
      pinctrl-names = "default";
      pinctrl-0 = <&sdio_wifi_pins &wl18xx_pins>;
    
      #address-cells = <1>;
      #size-cells = <0>;
      wlcore: wlcore@2 {
        compatible = "ti,wl1835";
        reg = <2>;
        interrupt-parent = <&gpio0>;
        interrupts = <21 IRQ_TYPE_EDGE_RISING>;
      };
    };
    
    &uart3 {
      pinctrl-names = "default";
      pinctrl-0 = <&uart3_bluetooth_pins &bt_pins>;
      status = "okay";
    
      bluetooth {
        compatible = "ti,wl1835-st";
        enable-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
      };
    };
    
    &gpio3 {
      ls_buf_en {
        gpio-hog;
        gpios = <10 GPIO_ACTIVE_HIGH>;
        output-high;
        line-name = "LS_BUF_EN";
      };
    };
    
    

    I am not sure if this is needed for everyone but I ended up not using the dtbbuilder tool and just compiled the kernel from source, copied over the vmlinuz, System.map, dtbs kernel modules and kernel header files onto the SD card. Because of this when I first booted up I needed to run:

    sudo depmod

    once that was done I could use the instructions here:

    Setting up Beaglebone Black Wireless

    Specifically I ran the following:

    sudo connmanctl
    
    connmanctl> enable wifi
    connmanctl> scan wifi
    connmanctl> services
    
    SSID Name 1:Unique Connection String1
    SSID Name 2:Unique Connection String2
    etc...
    
    connmanctl> agent on
    connmanctl> connect Unique Connection String1
    Passphrase? xxxxxxxxxxx
    connmanctl> quit
    

    Dave

    • This reply was modified 6 years, 8 months ago by Dave Mcospan. Reason: Incorrect formatting
    • This reply was modified 6 years, 8 months ago by Dave Mcospan. Reason: Formatting
    • This reply was modified 6 years, 8 months ago by Dave Mcospan.
    chatsimple