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.

Linux/DRA77P: Changes required for mmc3 in kernel version 4.14

Part Number: DRA77P


Tool/software: Linux

Hi,

Previously I was bringing up the mmc3 interface (for wifi module) in dra77x with kernel version 4.4  processor sdk linux automotive v5_00_00_01 and was successful in it.

On porting to v4.14, I find some trouble in bringing it up on applying the previous changes of device tree file here.

On inserting the driver the following messages comes up,

wlan: Loading MWLAN driver
[   48.754770] vendor=0x02DF device=0x9135 class="0" function=1
[   48.755562] SDIO: max_segs=128 max_seg_size=65536
[   48.755569] rx_work=1 cpu_num=2
[   48.759056] wlan: Enable TX SG mode
[   48.759062] wlan: Enable RX SG mode
[   48.772731] Request firmware: mrvl/sduart8887_combo_a2.bin
[   49.911609] mmc2: Timeout waiting for hardware interrupt.
[   49.911616] mmc2: sdhci: ============ SDHCI REGISTER DUMP ===========
[   49.911624] mmc2: sdhci: Sys addr:  0xae0e0010 | Version:  0x00003302
[   49.911631] mmc2: sdhci: Blk size:  0x00000100 | Blk cnt:  0x00000001
[   49.911637] mmc2: sdhci: Argument:  0x92000100 | Trn mode: 0x00000003
[   49.911643] mmc2: sdhci: Present:   0x01f00506 | Host ctl: 0x00000002
[   49.911649] mmc2: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
[   49.911655] mmc2: sdhci: Wake-up:   0x00000000 | Clock:    0x00000c07
[   49.911660] mmc2: sdhci: Timeout:   0x00000007 | Int stat: 0x00000000
[   49.911666] mmc2: sdhci: Int enab:  0x027f010b | Sig enab: 0x027f010b
[   49.911672] mmc2: sdhci: AC12 err:  0x00000000 | Slot int: 0x00000000
[   49.911677] mmc2: sdhci: Caps:      0x25e10080 | Caps_1:   0x00000f77
[   49.911683] mmc2: sdhci: Cmd:       0x0000353a | Max curr: 0x00000000
[   49.911688] mmc2: sdhci: Resp[0]:   0x00002000 | Resp[1]:  0x00000000
[   49.911694] mmc2: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[   49.911699] mmc2: sdhci: Host ctl2: 0x00000000
[   49.911703] mmc2: sdhci: ============================================
[   49.911803] cmd53 write error=-110
[   49.911973] WLAN: FW download, write iomem (0) failed @ 0
[   49.912263] wlan_dnld_fw fail ret=0xffffffff
[   49.912270] WLAN: Fail download FW with nowwait: 0
[   49.915065] SDIO Func0 (0x0-0x9): 43 03 02 02 03 00 00 02 03 00 
[   49.917225] SDIO Func1 (0x10-0x17): 00 00 00 00 00 00 00 00 
[   49.920754] SDIO Func1: (0x8) 00 (0x58) 00 (0x5c) 0d (0x5d) 00 (0x60) 01 (0x61) 00 (0x62) 00 (0x64) 10 (0x65) 01 (0x66) 00 (0x68) 00 (0x69) 00 (0x6a) 00 
[   49.923840] SDIO Func1 (0x90-0x9a): 00 00 00 00 00 00 00 00 00 00 00 
[   50.026560] SDIO Func1 (0x90-0x9a): 00 00 00 00 00 00 00 00 00 00 00 
[   50.026626] woal_request_fw failed
[   50.026629] Firmware Init Failed
[   50.031862] woal_add_card failed
[   50.032403] wlan_sdio: probe of mmc2:0001:1 failed with error -1
[   50.033512] wlan: Driver loaded successfully

What changes might be required in this version of kernel ?

I tried applying the exact changes from dra7.dtsi, dra76-evm.dts and dra76x-mmc-iodelay.dtsi from prev. version to the latest version, but still couldnt find any hope.

Regards,

Padmesh

  • Hi Padmesh,

    The MMC controller driver switched from omap_hsmmc (Kernel 4.4) to sdhci-omap (Kernel 4.14) driver.
    What changes did you do to dts files in Kernel 4.4? 

    Regards,
    Vishal

  • Hi Vishal,

    I have implemented a dummy vmmc_aux-supply regulator (wlan_regulator) as supply and added pinmux details and other setup in mmc3 node,

    wlan_regulator: fixedregulator-wlan_regulator {
    		compatible = "regulator-fixed";
    		regulator-name = "wlan_regulator";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		regulator-always-on;
    		regulator-boot-on;
    		/*gpio = <&gpio3 29 GPIO_ACTIVE_HIGH>;
    		enable-active-high;*/
    
    	};
    
    &dra7_pmx_core {	
    		
    	mmc3_pins_default: mmc3_pins_default {
    		pinctrl-single,pins = <
    			DRA7XX_CORE_IOPAD(0x377c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0))
    			DRA7XX_CORE_IOPAD(0x3780, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0))
    			DRA7XX_CORE_IOPAD(0x3784, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0))
    			DRA7XX_CORE_IOPAD(0x3788, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0))
    			DRA7XX_CORE_IOPAD(0x378c, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0))
    			DRA7XX_CORE_IOPAD(0x3790, (PIN_INPUT_PULLUP | MODE_SELECT | MUX_MODE0))
    		>;
    	};
    	
    };
     
    
    &mmc3{	
    	status = "okay";
    	vmmc-supply = <&vio_3v3>;
    	vmmc_aux-supply = <&wlan_regulator>; 
    	bus-width = <4>;
    	ti,non-removable;
    	max-frequency = <50000000>;
    	/*cap-sdio-irq;*/
    	cap-power-off-card;
    	keep-power-in-suspend;
    	/*enable-sdio-wakeup;*/
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc3_pins_default &mmc3_iodelay_manual1_conf>;
    
    };
    

    With this configuration for mmc3 node I get the log as,

    [  545.000344] mlan: module license 'Marvell Proprietary' taints kernel.
    [  545.000353] Disabling lock debugging due to kernel taint
    [  548.655718] wlan: Loading MWLAN driver
    [  548.758316] vendor=0x02DF device=0x9135 class=0 function=1
    [  548.758746] SDIO: max_segs=128 max_seg_size=524288
    [  548.758751] rx_work=1 cpu_num=2
    [  548.760629] wlan: Enable TX SG mode
    [  548.760634] wlan: Enable RX SG mode
    [  548.786045] Request firmware: mrvl/sduart8887_combo_a2.bin
    [  549.927780] Wlan: FW download over, firmwarelen=615340 downloaded 615340
    [  550.430070] WLAN FW is active
    [  555.445035] Driver version = SD8887-0.0.0.p0-C4X15C620-GPL-(FP44) 
    [  555.445042] main_state = 1
    [  555.445047] ioctl_pending = 0
    [  555.445051] tx_pending = 0
    [  555.445056] rx_pending = 0
    [  555.445061] lock_count = 28
    [  555.445066] malloc_count = 35
    [  555.445070] mbufalloc_count = 0
    [  555.445074] hs_skip_count = 0
    [  555.445079] hs_force_count = 0
    [  555.445198] woal_request_fw failed
    [  555.445203] Firmware Init Failed

    After which there would no response in the console.

    From ssh of console I find,

    root@dra7xx-evm:~# cat /sys/kernel/debug/mmc2/ios 
    clock:		48000000 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:	0 (legacy)
    signal voltage:	0 (3.30 V)
    driver type:	0 (driver type B)
    root@dra7xx-evm:~# 

    I have attached the entire boot log.5556.bootlog.txt

    Regards,

    Padmesh

  • Hi Padmesh,

    Would you know what these lines mean, was this seen with Kernel 4.4 also?
    These are not from MMC driver.

    [ 555.445198] woal_request_fw failed
    [ 555.445203] Firmware Init Failed


    Regards,
    Vishal

  • Hi Vishal,

    This issue hasn't occurred in kernel version 4.4

  • Could you check with WLAN module vendor for Kernel 4.14 support of this module?

  • Hi Vishal,

    Does the attached log mean anythingwifilog.txt

    Can usage of sdhci driver (in kernel ver 4.14) affect the working of the wlan card. Previous version 4.4 with hsmmc workerd fine.

    No difference can be inferred from the logs, as to why the firmware is not initialized.

    Regards,

    Padmesh

  • Hi Padmesh,

    Did you have a look a the device tree documentation and check to see what dt fields have been updated for 4.14? Can you check?

    regards,

    Praveen

  • Hi Padmesh,

    SDHCI driver should be functional for SDIO cards also.

    The log you attached does not show any errors from SDHCI driver. The log talks about particular command timeout, could you check with the WLAN vendor about these logs? that would help in understanding what operations were complete and what operation timed out.


    Regards,
    Vishal

  • Hi Vishal,

    When inserting and removing the cfg80211 module i used to find some logs in prev kernel version. Here no such messages occur.

    Can that be the issue here ?

    The firmware we have is the updated version.

    Regards,
    Padmesh

  • Could be, I don't see an issue with MMC driver.
    Please check with module vendor for support for Kernel 4.14.