Cypress WIFI Bringup on TX2 Custom Board

We are designing a carrier board with TX2-4GB module with baseline R32.4.3. Here we have connected AW-CM235NF WIFI/BT combo module on sdmmc3 with SDIO interface.

So i have defined the dtsi entry like this.

sdhci@3440000 {     /*added AW-CM235NF wifi support on SDMMC3*/
    #address-cells = <1>;
    #size-cells = <0>;
    uhs-mask = <0x8>;
    only-1-8-v;
    status = "okay";
    brcmfmac: brcmfmac@0 {
        reg = <0>;
        compatible = "brcm,bcm4329-fmac";
    };
};

and i am getting this error in the kernel logs
[ 4.438676] mmc1: error -110 whilst initialising SDIO card

Is this due to hardware issue or any dtsi configuration ?

Please compare your dts configuration with official brcm4354 case.

Hi Wayne,

Actually i took reference of this thread https://community.cypress.com/thread/58531. Can you specify more on the official case means where i can look into for this.

By default, jetson TX2 has brcm4354 enabled on sdio.
You can compare your code with this part in dts.

Hi wayne,

Is this the entry you are talking about ?

bcm4354: bcmdhd_wlan {                                                                                                                                         
    compatible = "android,bcmdhd_wlan";
    interrupt-parent = <&tegra_aon_gpio>;
    interrupts = <TEGRA_AON_GPIO(FF, 3) 0x14>;
    wlan-pwr-gpio = <&tegra_main_gpio TEGRA_MAIN_GPIO(N, 0) 0>;
    fw_path = "/vendor/firmware/fw_bcmdhd_4354.bin";
    nv_path = "/vendor/firmware/nvram_quill_4354.txt";
    sdhci-host = <&sdmmc3>;
    pwr-retry-cnt = <5>;
    status = "okay";
};

Hi Wayne,

there is one pin WIFI_BT_WL_REG_ON which needs to be high so i pulled it up from hardware as per our design after that i am facing below errors:

root@localhost:/home/ubuntu# dmesg | grep mmc
[ 0.000000] Kernel command line: console=ttyS0,115200 androidboot.presilicon=true firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw rootwait rootfstype=M
[ 0.448485] GPIO line 445 (sdmmc-wake-support-input) hogged as input
[ 0.448531] GPIO line 446 (sdmmc-wake-support-output) hogged as output/low
[ 0.525550] vddio-sdmmc1: 1800 <–> 3300 mV at 3300 mV
[ 5.414531] mmc0: SDHCI controller on 3460000.sdhci [3460000.sdhci] using ADMA 64-bit with 64 bit addr
[ 5.426511] mmc1: SDHCI controller on 3440000.sdhci [3440000.sdhci] using ADMA 64-bit with 64 bit addr
[ 5.442510] mmc2: SDHCI controller on 3400000.sdhci [3400000.sdhci] using ADMA 64-bit with 64 bit addr
[ 5.456222] mmc0: mmc_decode_ext_csd: CMDQ supported: depth: 31, cmdq_support: 1
[ 5.470048] mmc0: periodic cache flush enabled
[ 5.470054] mmc0: new HS400 Enhanced strobe MMC card at address 0001
[ 5.470380] mmcblk0: mmc0:0001 DG4016 14.7 GiB
[ 5.474511] mmcblk0boot0: mmc0:0001 DG4016 partition 1 4.00 MiB
[ 5.478623] mmcblk0boot1: mmc0:0001 DG4016 partition 2 4.00 MiB
[ 5.482764] mmcblk0rpmb: mmc0:0001 DG4016 partition 3 4.00 MiB
[ 5.486519] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32
[ 5.661574] mmc1: tuning execution failed: -5
[ 5.661581] mmc1: error -5 whilst initialising SDIO card
[ 5.973171] mmc1: tuning execution failed: -5
[ 5.973175] mmc1: error -5 whilst initialising SDIO card
[ 6.388527] mmc1: tuning execution failed: -5
[ 6.388534] mmc1: error -5 whilst initialising SDIO card
[ 6.619255] mmcblk mmc0:0001: Card claimed for testing.
[ 6.784663] Root device found: mmcblk0p1
[ 6.789449] Found dev node: /dev/mmcblk0p1
[ 6.916199] EXT4-fs (mmcblk0p1): 3 orphan inodes deleted
[ 6.921544] EXT4-fs (mmcblk0p1): recovery complete
[ 6.931207] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[ 6.939975] Rootfs mounted over mmcblk0p1
[ 7.014865] mmc1: tuning execution failed: -5
[ 7.019243] mmc1: error -5 whilst initialising SDIO card
[ 7.469536] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)

Please suggest to proceed further on this.

Any suggestion will be appreciated .

Please share your full dmesg and board schematic.

Hi Wayne,

attaching the full logssdmmc_wifi_4gb.txt (66.2 KB)

And your board schematic?

Attaching the schematic.

Please suggest on this.

Hi,

Let’s try if non-tunable modes work. Add following property in the dtsi.

uhs-mask = <0xFF>;

If it works, let’s try SDR50 mode

uhs-mask = <0x18>;

I have tried with uhs-mask 0xff and now the init errors are not coming and now facing CRC errors as below

[ 5.508553] mmc1: Data CRC error
[ 5.508554] sdhci: =========== REGISTER DUMP (mmc1)===========
[ 5.508558] sdhci: Sys addr: 0x00000000 | Version: 0x00000404
[ 5.508561] sdhci: Blk size: 0x00007004 | Blk cnt: 0x00000000
[ 5.508565] sdhci: Argument: 0x15000004 | Trn mode: 0x00000013
[ 5.508567] sdhci: Present: 0x01fb0000 | Host ctl: 0x00000013
[ 5.508571] sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 5.508574] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 5.508576] sdhci: Timeout: 0x0000000b | Int stat: 0x00000000
[ 5.508579] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[ 5.508582] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 5.508585] sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18006f73
[ 5.508588] sdhci: Cmd: 0x0000353a | Max curr: 0x00000000
[ 5.508589] sdhci: Host ctl2: 0x00003008
[ 5.508593] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe410
[ 5.508612] sdhci: ===========================================
[ 5.510664] mmc1: Data CRC error
[ 5.510665] sdhci: =========== REGISTER DUMP (mmc1)===========
[ 5.510668] sdhci: Sys addr: 0x00000000 | Version: 0x00000404
[ 5.510671] sdhci: Blk size: 0x00007004 | Blk cnt: 0x00000000
[ 5.510674] sdhci: Argument: 0x15000004 | Trn mode: 0x00000013
[ 5.510677] sdhci: Present: 0x01fb0000 | Host ctl: 0x00000013
[ 5.510679] sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 5.510682] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 5.510685] sdhci: Timeout: 0x0000000b | Int stat: 0x00000000
[ 5.510688] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[ 5.510690] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 5.510693] sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18006f73
[ 5.510696] sdhci: Cmd: 0x0000353a | Max curr: 0x00000000
[ 5.510698] sdhci: Host ctl2: 0x00003008
[ 5.510701] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe410
[ 5.510719] sdhci: ===========================================
[ 5.512768] mmc1: Data CRC error
[ 5.512769] sdhci: =========== REGISTER DUMP (mmc1)===========
[ 5.512772] sdhci: Sys addr: 0x00000000 | Version: 0x00000404
[ 5.512775] sdhci: Blk size: 0x00007004 | Blk cnt: 0x00000000
[ 5.512778] sdhci: Argument: 0x15000004 | Trn mode: 0x00000013
[ 5.512781] sdhci: Present: 0x01fb0000 | Host ctl: 0x00000013
[ 5.512784] sdhci: Power: 0x00000001 | Blk gap: 0x00000000
[ 5.512786] sdhci: Wake-up: 0x00000000 | Clock: 0x00000007
[ 5.512789] sdhci: Timeout: 0x0000000b | Int stat: 0x00000000
[ 5.512792] sdhci: Int enab: 0x02ff100b | Sig enab: 0x02fc100b
[ 5.512794] sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000
[ 5.512797] sdhci: Caps: 0x3f6cd08c | Caps_1: 0x18006f73
[ 5.512800] sdhci: Cmd: 0x0000353a | Max curr: 0x00000000
[ 5.512802] sdhci: Host ctl2: 0x00003008
[ 5.512805] sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0x00000000ffefe410
[ 5.512824] sdhci: ===========================================
[ 5.512844] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1@0x08000, err: -84
[ 5.512847] brcmfmac: brcmf_chip_recognition: chip backplane type 15 is not supported
[ 5.512849] brcmfmac: brcmf_sdio_probe_attach: brcmf_chip_attach failed!
[ 5.512851] brcmfmac: brcmf_sdio_probe: brcmf_sdio_probe_attach failed
[ 5.512950] brcmfmac: brcmf_ops_sdio_probe: F2 error, probe failed -19…
[ 5.830465] tegra-se-nvhost 15840000.se: tegra_se_probe: complete
[ 5.836824] hidraw: raw HID events driver (C) Jiri Kosina
[ 5.843148] usbcore: registered new interface driver usbhid

wifi_sdio_logs.txt (67.8 KB)

with the uhs-mask 0x18 below logs are observed

[ 6.093209] mmc1: hw tuning done …
[ 6.100751] mmc1: new ultra high speed SDR50 SDIO card at address 0001
[ 6.107759] SDIO Vendor ID:02d0 and SDIO Device ID: 4354

Also attaching complete dmesg logs.wifi_sdio_uhs-mask-18.txt (66.5 KB)

Please share your feedback.

The latest dmesg seems indicate the problem is on cypress firmware. Could you check if you have any missing files?

Hi,

So now SDIO is no issue as its successfully detecting.

Right now i am using built-in cypress wifi/bt drivers. I will check for other files.

I also have a latest sdk cypress-backports-v5.4.18-2020_0925-module-src which needs to be integrated in tx2 SDK.

Can you please suggest how can i backport the same on tx2?

What is that sdk? What content is inside it?

I downloaded the latest cypress package from official website is “cypress-fmac-v5.4.18-2020_0925”
and its having content as :

cypress-backports-v5.4.18-2020_0925-module-src
cypress-devicetree-2020-09-25
cypress-firmware-v5.4.18-2020_0925
cypress-hostap_2_9-2020_0925
cypress-patch-v5.4.18-2020_0925

Looks like it includes the kernel modules, device tree, fw and userspace tool (hostap). Do you know what does that v5.4” mean?

5.4 is the kernel version support.

This package supports upto 5.4.18 kernel version.