WiFi bring up on custom carrier board

Hi,

I am facing issue in WiFi bring up on custom carrier board with Jetson Xavier NX module.
I am using BCM43455 module and using SDIO interface. I have defined dts like this,

   sdhci@3440000 { 
           #address-cells = <1>;
           #size-cells = <0>;
            compatible = "nvidia,tegra194-sdhci";
            reg = <0x0 0x3440000 0x0 0x00020000>;
            interrupts = < 0 TEGRA194_IRQ_SDMMC3 0x04>;
            iommus = <&smmu TEGRA_SID_SDMMC3A>;
            dma-coherent;
            max-clk-limit = <208000000>;
            bus-width = <4>;
            cap-mmc-highspeed;
            cap-sd-highspeed;
            sd-uhs-sdr104;
            sd-uhs-sdr50;
            sd-uhs-sdr25;
            sd-uhs-sdr12;
            mmc-ddr-1_8v;
            mmc-hs200-1_8v;
            cd-inverted;
            nvidia,min-tap-delay = <96>;
            nvidia,max-tap-delay = <139>;
            nvidia,vqmmc-always-on;
            pwrdet-support;
            pinctrl-names = "sdmmc_e_33v_enable", "sdmmc_e_33v_disable";
            pinctrl-0 = <&sdmmc3_e_33V_enable>;
            pinctrl-1 = <&sdmmc3_e_33V_disable>;
            ignore-pm-notify;
            resets = <&bpmp_resets TEGRA194_RESET_SDMMC3>;
            reset-names = "sdhci";
            pll_source = "pll_p", "pll_c4_muxed";
            nvidia,set-parent-clk;
            nvidia,parent_clk_list = "pll_p", "pll_p", "pll_p", "pll_p", "pll_p", "pll_c4_muxed", "pll_c4_muxed", "pll_c4_muxed", "pll_c4_muxed", "pll_c4_muxed", "NULL";
            clocks = <&bpmp_clks TEGRA194_CLK_SDMMC3>,
                    <&bpmp_clks TEGRA194_CLK_PLLP_OUT0>,
                    <&bpmp_clks TEGRA194_CLK_PLLC4_MUXED>,
                    <&bpmp_clks TEGRA194_CLK_SDMMC_LEGACY_TM>;
            clock-names = "sdmmc", "pll_p", "pll_c4_muxed", "sdmmc_legacy_tm";
            uhs-mask = <0x08>;
            nvidia,en-periodic-calib;
           status = "okay";
           brcmf: wifi@0 {
                   reg = <0>;
                   compatible = "brcm,bcm4329-fmac";
           };
   };

sdhci registered properly,
[ 5.285300] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful

but WiFi module probe itself not happening. did i miss anything in the dts?

@WayneWWW

Thanks,
Arun

Hi,

Do you have corresponding firmware and wifi driver installed?

@WayneWWW

yes, driver and firmware both are present.
~$ ls -l /lib/firmware/brcm/brcmfmac43455-sdio.bin
-rw-r–r-- 1 root root 488193 Mar 30 2017 /lib/firmware/brcm/brcmfmac43455-sdio.bin

I have made these changes to enable the driver,
CONFIG_CFG80211=y
CONFIG_BRCMUTIL=y
CONFIG_BRCMFMAC=y
CONFIG_BRCMFMAC_SDIO=y

Thanks,
Arun

Could you add debug print in probe function and see if it ever gets running?

@WayneWWW
tried adding prints, probe function itself not getting called

Hi arunkumar.d,

What is your result of /sys/bus/sdio/drivers?

@WayneWWW

$ ls -l /sys/bus/sdio/drivers
total 0
drwxr-xr-x 2 root root 0 Sep 24 14:04 brcmfmac

$ ls -l /sys/bus/sdio/devices
total 0

could you share the dmesg and result of sudo rfkill -list?

$sudo rfkill list is empty
attached dmesg logs,

dmesg.txt (56.6 KB)

I don’t think the SDIO is ever get enumerated. The problem is not fw or client driver.

This is the log of sdio wifi on TX2.

[ 1.461159] sdhci-tegra 3440000.sdhci: Client registration for eMC Successful
[ 1.506029] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 1.757516] mmc1: hw tuning done …
[ 1.761158] mmc1: new ultra high speed SDR104 SDIO card at address 0001

@WayneWWW
so what might be the issue. Is it hardware issue?Any idea How to debug it further. I did H/W probing and able to see sdio clock at bootup time

Could you try to add debug print in driver to see why tegra_sdhci_post_tuning is not being called?

@WayneWWW

Just saw this post, It is mentioned SDIO wifi is not supported in Xavier series

WiFi over SDIO not supported in Xavier NX?

Thanks,
Arun

What we talked in that topic is: our software does not verify any kind of wifi card over SDIO on Xavier series chip and we have no plan to do so.

Thus, you can still try, but we may not provide much experience because it is not verified on our side either.

Only TX1 and TX2 have such case.

@WayneWWW

Thanks for the clarification.
I am also trying WiFi over SDIO(sdhci@700b0400) with Jetson Nano SoM, facing similar issue with Nano also.
Attached dtb and dmesg logs. Any changes to be made in u-boot? let me know if i miss something in u-boot/kernel/dts

tegra210-p3448.dtb.txt (210.0 KB)
wifi_nano.txt (50.0 KB)

Could you paste a dts instead of dtb binary?

@WayneWWW

   sdhci@700b0400 { /* SDMMC3 for Wifi */
           #address-cells = <1>;
            #size-cells = <0>;
           force-non-removable-rescan;
           non-removable;
           status = "okay";

           brcmf: brcmf@0 {
                   reg = <0>;
                   compatible = "brcm,bcm4329-fmac";
           };
   };

This is the change

And board schematic please.

@WayneWWW

Attached schematics.

sometimes i am getting this error on mmc1,
[ 5.466191] mmc1: CMD CRC or end bit error, int mask 0xc0001
[ 5.466589] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.466987] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.467382] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.518085] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.518631] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.519179] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.519725] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.520265] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.574349] mmc1: CMD CRC or end bit error, int mask 0xc0001
[ 5.575032] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.575718] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.576403] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.577088] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.627118] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.628396] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.629674] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.630933] mmc1: CMD CRC or end bit error, int mask 0xc0000
[ 5.632193] mmc1: CMD CRC or end bit error, int mask 0xc0000

also, Please let me know the defconfig changes to enable SDIO wifi

Thanks,
Arun

Are you using a always-on power as the VIN for your wifi module?