SDIO communication issue

cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO communication issue

1,386 Views
sanketparekh
Contributor II

Hi

I have one custom board, that have IMX6DL dual core processor.

I have connect eMMC and Wi-Fi module(EMMY-W165-A) on SDIO interface.

eMMC configurations from linux kernel:

clock:          52000000 Hz
actual clock:   49500000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      3 (8 bits)
timing spec:    8 (mmc DDR52)
signal voltage: 0 (3.30 V)

Wi-FI configurations from linux kernel:

clock:          50000000 Hz
actual clock:   49500000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      2 (4 bits)
timing spec:    2 (sd high-speed)
signal voltage: 0 (3.30 V)

1. Wi-Fi:

I am facing some issues in SDIO burst mode communication:

Please find kernel logs here:

----------------------------------------------------------------------------------------------------------------------------------------------

mlan: module license 'Marvell Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
wlan: Loading MWLAN driver
start searching node in device tree
vendor=0x02DF device=0x9135 class=0 function=1
EXT4-fs (mmcblk0p3): recovery complete
EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:02, irq=65)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
SDIO: max_segs=128 max_seg_size=65535
rx_work=1 cpu_num=2
wlan: Enable TX SG mode
wlan: Enable RX SG mode
Request firmware: mrvl/sduart8887_combo_a2.bin
random: nonblocking pool is initialized
Wlan: FW download over, firmwarelen=605620 downloaded 605620
WLAN FW is active
fw_cap_info=0x879ff03, dev_cap_mask=0xffffffff
Load init_cfg success
wlan: version = SD8887-15.44.7.p161-C3X15C512-GPL-(FP68)
get_channel when AP is not started
wlan: Driver loaded successfully
get_channel when AP is not started
get_channel when AP is not started
get_channel when AP is not started
IPv6: ADDRCONF(NETDEV_UP): uap0: link is not ready
watchdog watchdog0: watchdog did not stop!
flexcan 2094000.flexcan can1: writing ctrl=0x03292005
IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
wlan: Starting AP
Get ht_cap from beacon ies: 0xc
wlan: AP started
Set AC=3, txop=47 cwmin=3, cwmax=7 aifs=1
IPv6: ADDRCONF(NETDEV_CHANGE): uap0: link becomes ready
Set AC=2, txop=94 cwmin=7, cwmax=15 aifs=1
Set AC=0, txop=0 cwmin=15, cwmax=63 aifs=3
Set AC=1, txop=0 cwmin=15, cwmax=1023 aifs=7
watchdog watchdog0: watchdog did not stop!
wlan: Stoping AP
Invalid assoc resp index for mgmt frame ie.
wlan: AP stopped
get_channel when AP is not started
get_channel when AP is not started
get_channel when AP is not started
get_channel when AP is not started
IPv6: ADDRCONF(NETDEV_UP): uap0: link is not ready
Bss type [1] is not STA/P2P, ignore
using random self ethernet address
using random host ethernet address
using host ethernet address: 00:19:b8:00:00:01
using self ethernet address: 00:19:b8:00:00:02
usb0: HOST MAC 00:19:b8:00:00:01
usb0: MAC 00:19:b8:00:00:02
using random self ethernet address
using random host ethernet address
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
IP changes not for us, ignore. ndev[a9025800]
changes on usb0
IP changes not for us, ignore. ndev[a9025800]
changes on usb0
IP changes not for us, ignore. ndev[a9025800]
changes on usb0
g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
wlan: Starting AP
Get ht_cap from beacon ies: 0xc
wlan: AP started
IPv6: ADDRCONF(NETDEV_CHANGE): uap0: link becomes ready
Set AC=3, txop=47 cwmin=3, cwmax=7 aifs=1
Set AC=2, txop=94 cwmin=7, cwmax=15 aifs=1
Set AC=0, txop=0 cwmin=15, cwmax=63 aifs=3
Set AC=1, txop=0 cwmin=15, cwmax=1023 aifs=7
cmd53 read error=-84
moal_read_data_sync: read registers failed
wlan: EVENT: MICRO_AP_STA_ASSOC d4:XX:XX:XX:f1:21
wlan: EVENT: MICRO_AP_STA_ASSOC 34:XX:XX:XX:9b:f7
wlan: EVENT: MICRO_AP_STA_DEAUTH d4:XX:XX:XX:f1:21
wlan: deauth station d4:XX:XX:XX:f1:21
CMD_RESP: cmd 0xb5 error, result=0x1
IOCTL failed: a9020800 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
wlan: EVENT: MICRO_AP_STA_DEAUTH 34:XX:XX:XX:9b:f7
wlan: EVENT: MICRO_AP_STA_ASSOC 34:XX:XX:XX:9b:f7
wlan: EVENT: MICRO_AP_STA_ASSOC d4:XX:XX:XX:f1:21
wlan: EVENT: MICRO_AP_STA_DEAUTH 34:XX:XX:XX:9b:f7
wlan: deauth station 34:XX:XX:XX:9b:f7
CMD_RESP: cmd 0xb5 error, result=0x1
IOCTL failed: a91e1000 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
wlan: EVENT: MICRO_AP_STA_ASSOC 34:XX:XX:XX:9b:f7
wlan: EVENT: MICRO_AP_STA_DEAUTH d4:XX:XX:XX:f1:21
wlan: deauth station d4:XX:XX:XX:f1:21
CMD_RESP: cmd 0xb5 error, result=0x1
IOCTL failed: a91e3800 id=0x20000, sub_id=0x2000d action=1, status_code=0x1
wlan: EVENT: MICRO_AP_STA_ASSOC d4:XX:XX:XX:f1:21

-----------------------------------------------------------------------------------------------------------------------------------

Please give me some suggestions for above errors.

Regards,

Sanket Parekh

Labels (1)
0 Kudos
5 Replies

739 Views
sanketparekh
Contributor II

Hi igorpadykov,

I have check in "drivers/mmc/host/sdhci-esdhc-imx.c", errata ERR004536 for multi-block read command is implemented.

-------------------------------------------------------------------------------------------------------------------

/*
 * The IP has errata ERR004536
 * uSDHC: ADMA Length Mismatch Error occurs if the AHB read access is slow,
 * when reading data from the card
 */
#define ESDHC_FLAG_ERR004536            BIT(7)
/* The IP supports HS200 mode */
#define ESDHC_FLAG_HS200                BIT(8)
/* The IP supports HS400 mode */
#define ESDHC_FLAG_HS400                BIT(9)

static struct esdhc_soc_data usdhc_imx6sl_data = {
        .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_STD_TUNING
                        | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_ERR004536
                        | ESDHC_FLAG_HS200,
};

One another thing is, ESDHC_FLAG_ERR004536 is used in usdhc_imx6sl_data but in my custom board i have used usdhc_imx6q_data.

static struct esdhc_soc_data usdhc_imx6q_data = {
        .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING,
};

static struct esdhc_soc_data usdhc_imx6q_data = {
        .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING,

                            | ESDHC_FLAG_ERR004536,
};

I have add same in imx6q as well, but still i am facing errors like:

cmd53 read error=-84
moal_read_data_sync: read registers failed

--------------------------------------------------------------------------------------------------------------------

In past few months, I have attach same WIFI SOC chip with IMX6Q processor.

I have used same WIFI firmware image(i.e Request firmware: mrvl/sduart8887_combo_a2.bin) in IMX6Q processor and it was working fine.

Please share your thoughts for the same.

0 Kudos

739 Views
sanketparekh
Contributor II

Hi,

A gentle reminder for the above query.

Please share your thoughts for the above query.

Thank you.

0 Kudos

739 Views
igorpadykov
NXP TechSupport
NXP TechSupport

this also may be caused by noise (signal integrity issues) so one can try

to tweak drive strength from i.MX6Q side (with IOMUXC_SW_PAD_CTL_PAD_* registers)

and from SDIO side.

Best regards
igor

0 Kudos

739 Views
harshitshah
Contributor III

In the current configuration, the default drive strength is 90 ohms, modifying the drive strength to 50 Ohm with the below changes.


- MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
- MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
- MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
- MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
- MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
- MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17069
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10069
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17069
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17069
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17069
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17069

Still we are facing the same issue. 

Regards,

Harshit.

0 Kudos

739 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Sanket

one can check if errata ERR004536 for multi-block read command was implemented
linux-imx.git - i.MX Linux Kernel 

also check if firmware for Wi-Fi module (EMMY-W165-A) is suitable to used kernel.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos