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.

AM625: MMC2 not detecting sdio-card

Part Number: AM625
Other Parts Discussed in Thread: CC3301, CC3351

Tool/software:

I'm trying to use a wifi-m.2-card on the mmc2 with the AM625, but when I boot the board (custom board) the mmc2 interface shows, but no card is detected.

What I get:

mmc2: CQHCI version 5.10
mmc2: SDHCI controller on fa20000.mmc [fa20000.mmc] using ADMA 64-bit

What I expect further:

mmc2: new ultra high speed SDR104 SDIO card at address 0001

I also tried it with the AM62X-EVM, which also doesn't detect the card.

This is the dt in use:

main_mmc2_pins_default: main-mmc2-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x0120, PIN_INPUT, 0) /* (C24) MMC2_CMD */
AM62X_IOPAD(0x0118, PIN_OUTPUT, 0) /* (D25) MMC2_CLK */
AM62X_IOPAD(0x011C, PIN_INPUT, 0) /* () MMC2_CLKLB */
AM62X_IOPAD(0x0114, PIN_INPUT, 0) /* (B24) MMC2_DAT0 */
AM62X_IOPAD(0x0110, PIN_INPUT, 0) /* (C25) MMC2_DAT1 */
AM62X_IOPAD(0x010c, PIN_INPUT, 0) /* (E23) MMC2_DAT2 */
AM62X_IOPAD(0x0108, PIN_INPUT, 0) /* (D24) MMC2_DAT3 */
>;
};
&sdhci2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_mmc2_pins_default>;
bus-width = <4>;
non-removable;
ti,driver-strength-ohm = <50>;
assigned-clocks = <&k3_clks 157 158>;
assigned-clock-parents = <&k3_clks 157 160>;
};
PS: the M.2 card features a 88W9098 module by NXP, I managed to compile the drivers, but they are no use if the card isn't detected. The card is working on other ARM64-Boards
  • Hi, the dtso is not applicable to our board, the VMMC-supply is directly supplied by the PMIC and not enabled by the MMC2_SDCD pin. And it seems, the DTSO you provided is nearly similar to the am625-sk.dts, which also doesn't work. (I tested it on the AM62X-EVM)

  • assigning to an expert

  • Hi @AB, any news on this topic?

  • Hi ,

    Were you able make it work, we are using the same system in which vmmc is always supplied but we are facing same issue where we are not able to detect the sd card connected to mmc2?

    Anything we can try ?

  • Hi, I'm still waiting for the "assigned expert"

  • Hi Dominik,

    You are missing some more information in the devicetree. The devicetree snippet you shared does not have 'vmmc-supply' so the device is not getting enabled. This would explain why you are not detecting the card. 

    Please follow the example provided here as mentioned earlier in the thread, I understand it is DTSO but you can still use this as example for your DTS:

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am625-sk-m2-cc3301.dtso?h=10.00.07&id=6de6e418c80edfbe08f4a5f851c721bd60c0123b 

  • When I add the vmmc-supply, in our case its the buck2_reg from the PMIC, the driver isn't even probed. And as I mentioned earlier, the SDIO detect also is not working on the AM625-SK, where the vmmc is present in the device tree

  • Hi Dominik,

    The vmmc-supply should not be the buck regulator. Instead it should be the nRST pin to the CC3301. Do you have this nRST pin connected to AM62x host? 

  • The reset pin of the Wifi module is not connected to the AM62x directly, our hardware design uses the PORz_OUT for the SDIO reset, but on our board the reset is not connected. But regardless of our design, on the evalkit provided by TI it's not working either.

    As there is no GPIO, the regulator now looks as follows:

    wlan_en: regulator-7 {
        compatible = "regulator-fixed";
        regulator-name = "wlan_en";
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
    };
    Now I get an error "mmc2: error -22 whilst initialising SDIO card".
    The wifi module does not need any reset signal, as it's working on the same baseboard using a different SoM (SDIO_D0-3, CLK, CMD connected, nothing more)
  • Hi Dominik,

    Do you have pin 23 or 56 connected from the M.2 CC3351 card to your host platform? 
    If you do not, then driver bringup will not be possible. 

  • Hi Sabeeh,

    our M.2 features a 88W9098, not a CC3351, but the pins should be the same on the connector. As stated in my previous response, pin 23 (SDIO_RESET#) is not connected, but it's not necessary for the M.2 module. Pin 56 is also not connected, but as it has an internal pullup it is not necessary either for the module.

    But on the other hand, the SK-AM62X has these pins connected, and the M.2 module is also not detected. Thats why I suspect that the missing detection is not caused by our hardware design of the base board.

  • Hi Dominik,

    Is the card detected on the SK-AM62X? You may have to consult NXP for how the card is detected. Do you have matching devicetree and pin settings?

  • Hi Sabeeh, 

    no, the card is not detected, as stated in my previous post:

    But on the other hand, the SK-AM62X has these pins connected, and the M.2 module is also not detected

    The module should be detected with just the Data, CLK and CMD pins connected

    The wifi module does not need any reset signal, as it's working on the same baseboard using a different SoM (SDIO_D0-3, CLK, CMD connected, nothing more)

    That is what I get on the same baseboard, with a different CPU:

    mmc2: new ultra high speed SDR104 SDIO card at address 0001

    And that's what I expect from the SK-AM62X as well when just booting the board with the module inserted, before loading any driver for it. This should be done by a kernel module later.

  • Hi Dominik,

    It seems like you need to enable the kernel modules for the 88W9098, I'm not sure if they are enabled by default. Have you already enabled these?

  • Hi Sabeeh,

    The kernel modules for the 88W9098 are enabled, and can be loaded, but as long as the SDIO card isn't even detected, they cannot use it

  • Hi Dominik,

    Do you have example devicetree for when 88W9098 is working on non-TI platform?

  • Hi Sabeeh,

    this is our configuration on an i.MX8M Mini based board (the reset gpio is available on the SoM, but not connected on the board):

    &usdhc1 {
    compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
    reg = <0x30b40000 0x10000>;
    interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
    <&clk IMX8MM_CLK_NAND_USDHC_BUS>,
    <&clk IMX8MM_CLK_USDHC1_ROOT>;
    clock-names = "ipg", "ahb", "per";
    fsl,tuning-start-tap = <20>;
    fsl,tuning-step = <2>;
    pinctrl-names = "default", "state_100mhz", "state_200mhz";
    pinctrl-0 = <&pinctrl_usdhc1>, <&pinctrl_usdhc1_gpio>;
    pinctrl-1 = <&pinctrl_usdhc1_100mhz>, <&pinctrl_usdhc1_gpio>;
    pinctrl-2 = <&pinctrl_usdhc1_200mhz>, <&pinctrl_usdhc1_gpio>;
    bus-width = <8>;
    vmmc-supply = <&reg_sd1_vmmc>;
    pm-ignore-notify;
    keep-power-in-suspend;
    non-removable;
    status = "okay";
    bus-width = <4>;
    };

    pinctrl_usdhc1_gpio: usdhc1grpgpio {
    fsl,pins = <
    MX8MM_IOMUXC_SD1_RESET_B_GPIO2_IO10 0x41
    >;
    };

    pinctrl_usdhc1: usdhc1grp {
    fsl,pins = <
    MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190
    MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0
    MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0
    MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0
    MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0
    MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0
    >;
    };

    The module itself is not mentioned, as there is no driver available directly in the kernel. But the card itself is detected.

  • Hi Dominik,
    The major difference I see is that your am62x DTS does not have vmmc-supply. It seems your card is not getting enabled. If the card is not enabled or powered, then the detection will fail.