Part Number:AM4378
Tool/software: Linux
Hello,
I have a custom board based on the AM437x EVM, and I am using TI-SDK version 4.3.0.5. I am trying to get WiFi up and running on my board, and I am using the WL1831 WiFi/BT combo module. The WiFi pins are hooked up to MMC2 on the AM4378.
Initially in my dts file I had an mmc2 node because I am using MMC2 but it wasn't working, and I noticed the EVM also uses MMC2 to hook up the WiFi chip, but it has the node labeled mmc3 in the dts file. I also remembered for mmc0 I had to label it mmc1 in the dts file.
So I changed the node to be labeled mmc3 in my dts file, but now the boot hangs during U-Boot when it tries doing something with MMC. Here is the boot log:
U-Boot SPL 2018.01-00558-g8617e02-dirty (Apr 19 2019 - 09:32:41)
Trying to boot from MMC1
SPL: Please implement spl_start_uboot() for your board
SPL: Direct Linux boot not active!
U-Boot 2018.01-00558-g8617e02-dirty (Apr 19 2019 - 09:32:41 -0500)
CPU : AM437X-GP rev 1.2
Model: TI AM437x UTI BOARD
DRAM: 512 MiB
PMIC: NONE
NAND: 0 MiB
MMC:
I looked at the code in CCS and saw that it fails in the function omap_hsmmc_init_setup(), at the line writel(readl(&mmc_base->sysconfig) | MMC_SOFTRESET, &mmc_base->sysconfig);
Any ideas on what could be going wrong? Here are the relevant sections of my device tree:
wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
/* WLAN_EN GPIO for this board - Bank0, pin31 */
gpio = <&gpio0 31 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
mmc3_pins_default: mmc3_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3) /* (A12) gpmc_clk.mmc2_clk */
AM4372_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3) /* (B12) gpmc_csn3.mmc2_cmd */
AM4372_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE3) /* (C5) gpmc_a1.mmc2_dat0 */
AM4372_IOPAD(0x848, PIN_INPUT_PULLUP | MUX_MODE3) /* (C6) gpmc_a2.mmc2_dat1 */
AM4372_IOPAD(0x84c, PIN_INPUT_PULLUP | MUX_MODE3) /* (A4) gpmc_a3.mmc2_dat2 */
AM4372_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE3) /* (A3) gpmc_be1n.mmc2_dat3 */
>;
};
/* Optional sleep pin settings. Must manually enter values in the below skeleton. */
mmc3_pins_sleep: mmc3_pins_sleep {
pinctrl-single,pins = <
AM4372_IOPAD(0x88c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (A12) gpmc_clk.mmc2_clk */
AM4372_IOPAD(0x888, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (B12) gpmc_csn3.mmc2_cmd */
AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (C5) gpmc_a1.mmc2_dat0 */
AM4372_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (C6) gpmc_a2.mmc2_dat1 */
AM4372_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (A4) gpmc_a3.mmc2_dat2 */
AM4372_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (A3) gpmc_be1n.mmc2_dat3 */
>;
};
wlan_pins_default: wlan_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN | WAKEUP_ENABLE | MUX_MODE7) /* (F6) gpmc_a7.gpio1[23] WLAN_IRQ*/
AM4372_IOPAD(0x870, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (A2) gpmc_wait0.gpio0[30] BT_ENABLE */
AM4372_IOPAD(0x874, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (B3) gpmc_wpn.gpio0[31] WLAN_ENABLE */
>;
};
wlan_pins_sleep: wlan_pins_sleep {
pinctrl-single,pins = <
AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN | WAKEUP_ENABLE | MUX_MODE7) /* (F6) gpmc_a7.gpio1[23] WLAN_IRQ*/
AM4372_IOPAD(0x870, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (A2) gpmc_wait0.gpio0[30] BT_ENABLE */
AM4372_IOPAD(0x874, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (B3) gpmc_wpn.gpio0[31] WLAN_ENABLE */
>;
};
/* WiFi/Bluetooth Module */
&mmc3 {
status = "disabled";
/* these are on the crossbar and are outlined in the
xbar-event-map element */
dmas = <&edma 30 0 2>,
<&edma 31 0 3>;
dma-names = "tx", "rx";
vmmc-supply = <&wlan_en_reg>;
bus-width = <4>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc3_pins_default>;
pinctrl-1 = <&mmc3_pins_sleep>;
ti,non-removable;
cap-power-off-card;
keep-power-in-suspend;
#address-cells = <1>;
#size-cells = <0>;
wlcore: wlcore@0 {
compatible = "ti,wl1835";
reg = <2>;
interrupt-parent = <&gpio1>;
interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
};
};