This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62P-LP: MMC2 Initializing

Part Number: SK-AM62P-LP

Hi,

We are trying to initialize a SDIO wi-fi module on our board with the following configuration.

main_mmc2_pins_default: main-mmc2-default-pins {
		pinctrl-single,pins = <
			AM62PX_IOPAD(0x0120, PIN_INPUT, 0) /* (K24) MMC2_CMD */
			AM62PX_IOPAD(0x0118, PIN_OUTPUT, 0) /* (K21) MMC2_CLK */
			AM62PX_IOPAD(0x011C, PIN_INPUT, 0) /* () MMC2_CLKLB */
			AM62PX_IOPAD(0x0114, PIN_INPUT, 0) /* (K23) MMC2_DAT0 */
			AM62PX_IOPAD(0x0110, PIN_INPUT_PULLUP, 0) /* (K22) MMC2_DAT1 */
			AM62PX_IOPAD(0x010c, PIN_INPUT_PULLUP, 0) /* (L20) MMC2_DAT2 */
			AM62PX_IOPAD(0x0108, PIN_INPUT_PULLUP, 0) /* (L21) MMC2_DAT3 */
		>;
		bootph-all;
	};

main_wlirq_pins_default: main-wlirq-default-pins {
		pinctrl-single,pins = <
			AM62PX_IOPAD(0x0128, PIN_INPUT, 7) /* (K25) MMC2_SDWP.GPIO0_72 */
		>;
	};

wlan_en_pins_default: wlan-en-default-pins {
		pinctrl-single,pins = <
			AM62PX_IOPAD(0x0124, PIN_INPUT, 7) /* (J25) MMC2_SDCD.GPIO0_71 */
		>;
	};

&sdhci2 {
	status = "okay";
	vmmc-supply = <&wlan_en>;
	vqmmc-supply = <&vddshv_sdio>;
	pinctrl-names = "default";
	pinctrl-0 = <&main_mmc2_pins_default>;
	ti,driver-strength-ohm = <50>;
	disable-wp;
	bootph-all;

	cap-power-off-card;
	keep-power-in-suspend;
	//non-removable;
	//ti,fails-without-test-cd;
	//assigned-clocks = <&k3_clks 157 158>;
	//assigned-clock-parents = <&k3_clks 157 160>;

	#address-cells = <1>;
	#size-cells = <0>;
	mwifiex: mwifiex@1 {
		compatible = "marvell,sd8987";
		reg = <0>;
		interrupt-parent = <&main_gpio0>;
		interrupts = <72 IRQ_TYPE_EDGE_RISING>; //interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
		interrupt-names = "host-wake";
		//marvell,caldata_00_txpwrlimit_2g_cfg_set = /bits/ 8 <0x01 0x00 0x06 0x00 0x08 0x02 0x89 0x01>;
		marvell,wakeup-pin = <3>;
	};

};

	sdhci2: mmc@fa20000 {
		compatible = "ti,am62-sdhci";
		reg = <0x00 0x0fa20000 0x00 0x1000>, <0x00 0x0fa28000 0x00 0x400>;
		interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
		power-domains = <&k3_pds 184 TI_SCI_PD_EXCLUSIVE>;
		clocks = <&k3_clks 184 5>, <&k3_clks 184 6>;
		clock-names = "clk_ahb", "clk_xin";
		bus-width = <4>;
		ti,clkbuf-sel = <0x7>;
		ti,trm-icp = <0x8>;
		ti,otap-del-sel-legacy = <0x0>;
		ti,otap-del-sel-sd-hs = <0x0>;
		ti,otap-del-sel-sdr12 = <0xf>;
		ti,otap-del-sel-sdr25 = <0xf>;
		ti,otap-del-sel-sdr50 = <0xc>;
		ti,otap-del-sel-ddr50 = <0x9>;
		ti,otap-del-sel-sdr104 = <0x6>;
		ti,itap-del-sel-legacy = <0x0>;
		ti,itap-del-sel-sd-hs = <0x0>;
		ti,itap-del-sel-sdr12 = <0x0>;
		ti,itap-del-sel-sdr25 = <0x0>;
		status = "disabled";
	};

Comparing with MMC1 initialization  our MMC2 error is in this line on initialization.

[ 3.305718] mmc_send_io_op_cond mmc2 rocr
[ 3.306078] mmc2: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 3.306450] mmc2: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 3.306823] mmc2: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 3.307195] mmc2: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[ 3.307214] mmc_set_bus_mode mmc2
[ 3.307217] mmc2: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 7 width 1 timing 0
[ 3.307639] mmc2: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[ 3.307658] mmc_power_off mmc2


Please, does anyone knows how to fix this?

Thanks.

  • Doing a depper verification we found out that the first difference between MMC1 e MMC2 is on "req done (CMD8)"

    [ 3.226831] mmc_of_parse mmc2
    [ 3.226835] mmc_of_parse mmc2 bus-width 4
    [ 3.226842] mmc_of_parse mmc2 max-frequency 0
    [ 3.226850] mmc_of_parse mmc2 cd-inverted 0
    [ 3.226856] mmc_of_parse mmc2 cd-debounce-delay-ms 0
    [ 3.226862] mmc_of_parse mmc2 broken-cd 0
    [ 3.232023] mmc2: CQHCI version 5.10
    [ 3.232694] mmc_set_initial_state mmc2
    [ 3.232701] mmc2: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 7 width 1 timing 0
    [ 3.260815] mmc_power_up mmc2
    [ 3.260820] mmc2: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
    [ 3.283132] mmc2: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [ 3.284668] mmc2: SDHCI controller on fa20000.mmc [fa20000.mmc] using ADMA 64-bit
    [ 3.289269] mmc2: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    [ 3.299778] mmc2: req done (CMD52): -110: 00000000 00000000 00000000 00000000
    [ 3.299797] mmc_set_chip_select mmc2
    [ 3.299802] mmc2: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 7 width 1 timing 0
    [ 3.301264] mmc2: req done (CMD0): 0: 00000000 00000000 00000000 00000000
    [ 3.302542] mmc_set_chip_select mmc2
    [ 3.302546] mmc2: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 7 width 1 timing 0
    [ 3.304209] mmc2: req done (CMD8): -110: 00000000 00000000 00000000 00000000

  • Hi Sergio,

    Is this a continuation of this thread?

    e2e.ti.com/.../sk-am62p-lp-enable-wlan

  • yes, unfortunately we don't  have any TI WLAN module,

  • Hi Sergio,

    As stated here

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1344740/sk-am62p-lp-using-a-sdio-wifi-module/5123235#5123235

    we won't be able to provide much support for the wifi module you are using.

    From what I can see in the logs, the controller is getting enumerated but the module is not responding to the commands. This maybe specific to the module you are using. I would recommend looking around in the source code to find dts using similar module and see if there is any difference to the DTS configuration you have.

    For example, I found this: Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt in the Linux Kernel source. This may be of help.

    Regards,

    Prashant