i.MX93-evk usdhc2 SDIO support

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX93-evk usdhc2 SDIO support

3,087 Views
pradeep2481
Contributor II

Hi,

How can I enable SDIO support for usdhc2?

I tried the following change in the dts file but it did not work.

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 13e9e844d8fe..203fec7d2b5f 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -741,8 +741,8 @@ &usdhc2 {
vmmc-supply = <&reg_usdhc2_vmmc>;
bus-width = <4>;
status = "okay";
- no-sdio;
no-mmc;
+ cap-sdio-irq;
};

 

Thanks in advance.

 

Best regards,

Pradeep

Labels (1)
0 Kudos
Reply
10 Replies

2,998 Views
pradeep2481
Contributor II

Hi,

Thanks for your message. 

I did not get exactly what you mean soc@0. I did not find it under /sys/kernel/debug. 

My understanding is that mmc0 used for internal flash memory, mmc2 is the M.2 SDIO and mmc1 is MicroSD. I checked M.2 SDIO and it is working fine. Issue is with the MicroSD interface for SDIO.

Please find the mmc1 (usdhc2) information as below.

root@imx93evk:~# cat /sys/kernel/debug/mmc1/
caps caps2 clock ios
root@imx93evk:~# cat /sys/kernel/debug/mmc1/caps
0x501f180f
root@imx93evk:~# cat /sys/kernel/debug/mmc1/caps2
0x005a8020
root@imx93evk:~# cat /sys/kernel/debug/mmc1/clock
0
root@imx93evk:~# cat /sys/kernel/debug/mmc1/ios
clock: 0 Hz
vdd: 0 (invalid)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 0 (off)
bus width: 0 (1 bits)
timing spec: 0 (legacy)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)

 

root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/
driver/ of_node/ supplier:platform:44450000.clock-controller/
driver_override power/ supplier:platform:regulator-usdhc2/
leds/ subsystem/ supplier:regulator:regulator.2/
mmc_host/ supplier:platform:43820080.gpio/ uevent
modalias supplier:platform:443c0000.pinctrl/
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:443c0000.pinctrl/
auto_remove_on consumer/ runtime_pm status subsystem/ supplier/ sync_state_only uevent
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:443c0000.pinctrl/status
active
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:44450000.clock-controller/
auto_remove_on consumer/ runtime_pm status subsystem/ supplier/ sync_state_only uevent
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:44450000.clock-controller/status
active
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:regulator-usdhc2/s
status subsystem/ supplier/ sync_state_only
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:regulator-usdhc2/
auto_remove_on consumer/ runtime_pm status subsystem/ supplier/ sync_state_only uevent
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:platform\:regulator-usdhc2/status
active
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:regulator\:regulator.2/
auto_remove_on consumer/ runtime_pm status subsystem/ supplier/ sync_state_only uevent
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/supplier\:regulator\:regulator.2/status
not tracked
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/power/
autosuspend_delay_ms control runtime_active_time runtime_status runtime_suspended_time
root@imx93evk:~# cat /sys/class/mmc_host/mmc1/device/power/control
auto
root@imx93evk:~#

 

Best regards,

Pradeep

0 Kudos
Reply

2,930 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Sorry for the late reply,

I haven't had a board to try that with for some time and I cannot provide you the exact path but hang on a little, I am trying to verify in linux that the patch was applied correctly, you can maybe based on the PDF attached Modify Linux Device Tree at U-Boot Runtime.pdf see if the property was enabled or not.

But most likely it is and you need to modify the kernel support for the module, check AN5414 Enabling SDIO Wi-Fi on LS1012ARDB.

Regards

0 Kudos
Reply

2,862 Views
pradeep2481
Contributor II

Hi,

Thanks for your reply.

I am working on a module based on NXP chipset AW611.

I have already tried after changing  the device tree like below , but the sdio is still not getting enabled.

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 13e9e844d8fe..76dd13e5da37 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -737,12 +737,9 @@ &usdhc2 {
pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
pinctrl-1 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
pinctrl-2 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
- cd-gpios = <&gpio3 00 GPIO_ACTIVE_LOW>;
vmmc-supply = <&reg_usdhc2_vmmc>;
bus-width = <4>;
status = "okay";
- no-sdio;
- no-mmc;
};

&usdhc3 {
@@ -880,7 +877,7 @@ MX93_PAD_SD2_RESET_B__GPIO3_IO07 0x31e

pinctrl_usdhc2_gpio: usdhc2gpiogrp {
fsl,pins = <
- MX93_PAD_SD2_CD_B__GPIO3_IO00 0x31e
+ MX93_PAD_SD2_CD_B__USDHC2_CD_B 0x31e
>;
};

Does sdio is disabled for usdhc2 from an hardware point of view? 

Where can I find the  i.mx93 evk Schematics?

Best regards,

Pradeep

0 Kudos
Reply

2,734 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

I have sent a private mail.

Also have a reference here.

Thank you.

0 Kudos
Reply

1,511 Views
rtwheato
Contributor II

I'm having a similar issue.  Were you ever able to find the correct dts settings?

I was told in another support channel the following example for i.MX8MM can be used for reference. https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mm-evk-usd-wifi...

but i'm unsure if that means to use the same hex values, different prefixes, or use the same thing with just MX93_ as the prefix...

or, is it just a matter of setting:

&usdhc2 {
keep-power-in-suspend;
no-1-8-v;
non-removable;
wakeup-source;
fsl,sdio-async-interrupt-enabled;
};

0 Kudos
Reply

1,388 Views
pradeep2481
Contributor II

Hi,

NXP confirmed that i.MX93-evk doesn't support SDIO using usdhc2.

 

Best regards,

Pradeep

0 Kudos
Reply

3,035 Views
pradeep2481
Contributor II

Hi,

It is not a custom board. It is the i.MX 93 EVK (for 11x11mm sample) from NXP ( https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-93-evaluat...). 

I am able to use SD card with usdhc2 and it works fine. But the SDIO is not getting detected and there is no debug message.

From the device tree I have seen sdo is disabled for usdhc2 (the line "no-sdio;"). So I have tried with the patch mentioned in the post but it didn't work.

Does sdio is disabled for usdhc2 from an hardware point of view? Or just it can be enabled by changing the device tree?

 

Best regards,

Pradeep

0 Kudos
Reply

3,046 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

Are you working on a custom board? Have you double check that pins don't conflict?

What do debug messages log?

You can have a start with this document that brings up from start.

Regards

0 Kudos
Reply

3,033 Views
pradeep2481
Contributor II

Hi,

Thanks for your reply.

It is not a custom board. It is the i.MX 93 EVK (for 11x11mm sample) from NXP

I am able to use SD card with usdhc2 and it works fine. But the SDIO is not getting detected and there is no debug message.

From the device tree I have seen sdo is disabled for usdhc2 (the line "no-sdio;"). So I have tried with the patch mentioned in the post but it didn't work.

Does sdio is disabled for usdhc2 from an hardware point of view? Or just it can be enabled by changing the device tree?

 

Best regards,

Pradeep

0 Kudos
Reply

3,015 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Please provide the

cat /sys/kernel/debug/soc@0/path-to-mmc/

To see if there is the property was disabled or not.

Regards

0 Kudos
Reply