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.

PROCESSOR-SDK-AM335X: PROCESSOR-SDK-AM335X

Part Number: PROCESSOR-SDK-AM335X


Hi,
    We are using BBB(am335x) based custom board with a Marvell's WIFI chip.

We are currently migrating from Kernel 4.4 to Kernel 5.10 and it seems like in 5.10 kernel, we have to define both interrupts-extended and cd-gpios for the MMC-DAT1 line to work. If either of them is removed Wi-FI driver does not seem to load correctly.

Not sure if we really require both or there is some configuration that is causing this. Below are the details of device tree and config file for the old (4.4) kernel and new (5.10) kernel.
Please let me know if we require both cd-gpios and interrupts-enabled.

Kernel 5.10 MMC configuration
-------------------------------------------------------------------

Device tree  - MMC configuration

&mmc1 {
	compatible = "ti,am33xx-hsmmc";
	vmmc-supply = <&vmmcsd_fixed>;
	bus-width = <4>;
	pinctrl-names = "default", "idle";
	pinctrl-0 = <&mmc1_pins_default>;
	pinctrl-1 = <&mmc1_pins_idle>;
	/* MMC-DAT1 line - GPIO2 Pin 28 is used as interrupt in idle mode.
	   The Interrupt Number is 64
	*/
	interrupts-extended = <&intc 64 &gpio2 28 GPIO_ACTIVE_LOW>;
	status = "okay";

};


Kernel 5.10 MMC configuration
-------------------------------

Kernel 5-10 Device tree - MMC configuration

&mmc1 {
compatible = "ti,am33xx-hsmmc";
ti,dual-volt;
ti,needs-special-hs-handling;
vmmc-supply = <&vmmcsd_fixed>;
bus-width = <4>;
pinctrl-names = "default", "idle";
pinctrl-0 = <&mmc1_pins_default>;
pinctrl-1 = <&mmc1_pins_idle>;
/* MMC-DAT1 line - GPIO2 Pin 28 is used as interrupt in idle mode.
*/
interrupts-extended = <&intc 64 &gpio2 28 GPIO_ACTIVE_LOW>;
cd-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
status = "okay";
};


Kernel 5.10 - MMC Config
--------------------------

CONFIG_MMC=y
# CONFIG_PWRSEQ_EMMC is not set
# CONFIG_PWRSEQ_SIMPLE is not set
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=23
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_SDHCI is not set
CONFIG_MMC_OMAP=y
CONFIG_MMC_OMAP_HS=y
# CONFIG_MMC_SPI is not set
# CONFIG_MMC_DW is not set
# CONFIG_MMC_USDHI6ROL0 is not set
# CONFIG_MMC_CQHCI is not set
# CONFIG_MMC_HSQ is not set
# CONFIG_MMC_MTK is not set
# CONFIG_MEMSTICK is not set


Thanks

  • Hi Shankar,

    Please try add DT property "non-removable;" and remove "cd-gpios".

  • HI Bin Liu,

    I have already tried that option and it does not seem to work. I get a infinite dmesg log of the below error. I dont see this error when cd-gpios property is added

    [2024-01-24 10:50:47] [   45.914119] cmd53 read error=-110
    [2024-01-24 10:50:47] [   45.914179] wlan: cmd53 read regs failed: -1 port=0 retry=0
    [2024-01-24 10:50:47] [   47.337424] cmd53 read error=-110
    [2024-01-24 10:50:47] [   47.337485] wlan: cmd53 read regs failed: -1 port=0 retry=1
    [2024-01-24 10:50:51] [   48.760810] cmd53 read error=-110
    [2024-01-24 10:50:51] [   48.760876] wlan: cmd53 read regs failed: -1 port=0 retry=2
    [2024-01-24 10:50:51] [   48.760940] wlan: Fail to read mp_regs
    [2024-01-24 10:50:51] [   50.194414] cmd53 read error=-110
    [2024-01-24 10:50:51] [   50.194483] wlan: cmd53 read regs failed: -1 port=0 retry=0
    [2024-01-24 10:50:51] [   51.617804] cmd53 read error=-110
    [2024-01-24 10:50:51] [   51.617870] wlan: cmd53 read regs failed: -1 port=0 retry=1

    Here is the updated DTS file with non-removable property

    &mmc1 {
            compatible = "ti,am33xx-hsmmc";
            ti,dual-volt;
            ti,needs-special-hs-handling;
            non-removable;
            vmmc-supply = <&vmmcsd_fixed>;
            bus-width = <4>;
            pinctrl-names = "default", "idle";
            pinctrl-0 = <&mmc1_pins_default>;
            pinctrl-1 = <&mmc1_pins_idle>;
            /* MMC-DAT1 line - GPIO2 Pin 28 is used as interrupt in idle mode.
            */
            interrupts-extended = <&intc 64 &gpio2 28 GPIO_ACTIVE_LOW>;
            status = "okay";
    
    };

  •     /* MMC-DAT1 line - GPIO2 Pin 28 is used as interrupt in idle mode.
           The Interrupt Number is 64
        */
        interrupts-extended = <&intc 64 &gpio2 28 GPIO_ACTIVE_LOW>;

    why MMC-DAT1 line has to be in gpio mode? who needs it?

  • We are using DAT1 line as GPIO in idle mode to use it for WIFI interrupt. This is as per the TI documentation in Kernel Docs as mentioned in the link below which is what I have used


    https://elixir.bootlin.com/linux/v5.10.100/source/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt

  • Thanks for the pointers. Let me review it and get back to you later next week.

  • Hi Bin Liu,

         Any update on this?

    Thanks
    Shankar

  • Hi Shankar,

    I reviewed the MMC related driver code between kernel 4.4 and 5.10, but I don't see any obvious reason which causes the setting difference which would require 'cd-gpios' setting in v5.10. You probably would have to debug into the kernel to understand how the gpio pin behavior differently on the two kernel versions.