Xavier NX external micro SD card is not working well

Hello,
I think I’m facing very similar problem to one in thread too

I would appreciate it if you could check my situation and give me a solution.

I want to use Xavier and Nano’s external sd cards on our board. Everything works fine on Nano, but hot plug doesn’t work on Xavier.

I built in the environment of L4T 32.7.2

Our board used GPIO 9 for sd enable and GPIO 12 for cd-gpios .

I will attach the dts and xaviernx’s dmesg that I wrote accordingly.

Please see the attached dts and give me some advice. There are two additional questions.

  1. In Nano, cd-gpios must be active low, but in NX, it must be active high. I want to know why.
  2. What does mmc-orr-mask mean in dts?

I’d appreciate your help.

tegra210-p3448-0002-p3449-0000-b00.dts (4.4 KB)
tegra194-p3668-all-p3509-0000.dts (1.8 KB)
dmesg_nx.txt (64.0 KB)

hello hyunoh1,

did you mean it’s working properly if the SD card inserted before booting-up?

please check whether this changed when you hot-plug the card?
could you please also check GPIO state… # cat /sys/kernel/debug/gpio | grep -i cd

and… mmc-ocr-mask it specify OCR register masking details. it’s check this value to select power-up voltage depending on board capabilities.

Hi,

  1. In Nano, cd-gpios must be active low, but in NX, it must be active high. I want to know why.

This does not really matter… could be pinmux issue or your board design problem. If it can work, then it is okay…
Or try to remove “cd-inverted” and see if that makes any difference.

Hello Jerry Chang, Thank you for your answer.

I mean it’s working properly if the SD card inserted before booting-up However, the SD card is still recognized even when it is removed after the boot is completed. Also, if you don’t insert it before booting, but after booting is complete, it won’t recognize it.

As a result of checking the GPIO state with the command you told me, Nano changes well :
Nano Message
If SD card is inserted
gpio-194 (GPIO12 | cd) in hi IRQ

and SD card is removed
gpio-194 (GPIO12 | cd )in lo IRQ

But In the case of XavierNX, the message is consistent.
XavierNX Message
gpio-268 (GPIO12 | cd )in lo

What is the problem in this case?

Many thanks

Hi Wayne, Thank you for your answer.

Now I think Active Low is right
However, I still use the same GPIO pin on the same board as Nano, so I don’t know why Xavier NX doesn’t detect Low signal. In this case, I would appreciate it if you could tell me in detail which part of pimmux and board design should be checked.
Even if I remove cd-inverted, it doesn’t work properly like the reply I wrote above
Many thanks

hello hyunoh1,

could you please refer to Jetson Xavier NX Product Design Guide, you may see-also [Figure 10-1.SD Card Connection Example] to review your hardware connections.

besides…
as you can see in the device tree. there’s PWM fan that’s using GPIO12.
since you’re having your product design, please review your hardware connections.

        pwm_fan_shared_data: pfsd {
                ...
                pwm_gpio = <&tegra_aon_gpio TEGRA194_AON_GPIO(CC, 4) GPIO_ACTIVE_LOW>;

Hello Jerry Chang, Thank you for your answer again.

First of all, pfsd had written my dts in consideration.

since you’re having your product design, please review your hardware connections.

...
        pfsd {
                pwm_gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) GPIO_ACTIVE_LOW>;
...

I’ll refer to the design guide you posted!
Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.