Jp 5.0.2 SD card enable on NX

Hi,

I have enabled the sd card on Jp4.6.2 on our carrier board

And I modified the same dts on Jp5.0.2 but not works

Even more, there’s no screen show up on monitor

I connect the uart debug port and notice that there’s some failed message may cause no screen

I can login in the system by minicom

But I have no idea how to fix it

I have check this gpio pin in Jp5.0.2 dts, and no one use

Attach is the dts I modified

And the uart logs and dmesg
debug .txt (92.3 KB)
dmesg.txt (87.7 KB)


I also tried to modified the default dtb flashing by sdkm

Using dtc tool and only change sdhci@3440000 status to okay

That will be fine for boot and the uart log will not show failed

In this case, only if I insert the sd card before boot, or it won’t be seen

And even if I can see the sdhci@3440000 in dmesg and I can see the sd card mount

I can’t normally hot plugging

If I eject the sd card, it didn’t disappear in system

And if I umount the sd card, the system will crash and uart shows

“end Kernel panic - not syncing: Oops - BUG: Fatal exception in interrupt”

Could you start from the pure dtb without any change and see if these gpio errors are still there?

[ 11.295862] requesting hog GPIO wifi-enable (chip tegra194-gpio, offset 39) failed, -517
[ 11.296024] gpiochip_add_data_with_key: GPIOs 305…473 (tegra194-gpio) failed to register, -517
[ 11.484549] tegra186-gpio c2f0000.gpio: Failed to set output direction: -517
[ 11.484954] tegra186-gpio c2f0000.gpio: Failed to set output direction: -517
[ 11.486742] tegra186-gpio 2200000.gpio: Failed to set output direction: -517
[ 11.486910] gpio gpiochip2: (tegra194-gpio): setup of own GPIO wifi-enable failed
[ 11.487057] requesting hog GPIO wifi-enable (chip tegra194-gpio, offset 39) failed, -517
[ 11.487213] gpiochip_add_data_with_key: GPIOs 305…473 (tegra194-gpio) failed to register, -517
[ 11.489689] tegra186-gpio c2f0000.gpio: Failed to set output direction: -517
[ 11.490515] tegra186-gpio c2f0000.gpio: Failed to set output direction: -517
[ 11.501649] tegra186-gpio 2200000.gpio: Failed to set output direction: -517

Also, please build the dtb from source code instead of dtc tool.

Hi

The default image flashed by sdkm shows no gpio error

I have check that modify the property belowed cause the error appears
cd-gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;

But it didn’t show error when I modify this property on J4.6.2 with the same board

Attach is the pure uart logs and dmesg
debug.txt (84.4 KB)
dmesg.txt (85.5 KB)

Just want to clarify, are you trying to put “<&tegra_main_gpio TEGRA194_MAIN_GPIO(Q, 2) 0>;” to the dts file that converts back from dtb with dtc tool?

No, I build the source code to add this property

and the source dts I add

Hi,

One weird try here. If you don’t configure Q2 here but other gpio, will the gpio error still there when boot up?

I check our board design and Q2 is the pin detect


I will try to set other unused gpio

Hi
I have tried the Y7 for unused gpio, but the error log still there

Attach files
debug_Y7.txt (93.3 KB)
dmesg_Y7.txt (86.7 KB)

The upper connector is just a level shift, this pin is not used

So if you removed “cd-gpios”, then that gpio error would be gone?

Yes, I have tried that before

Just to confirm, I am talking about these errors.

[ 12.607567] requesting hog GPIO wifi-enable (chip tegra194-gpio, offset 39) failed, -517
[ 12.607796] gpiochip_add_data_with_key: GPIOs 305…473 (tegra194-gpio) failed to register, -517
[ 12.661441] tegra186-gpio c2f0000.gpio: Failed to set output direction: -517
[ 12.664565] tegra186-gpio c2f0000.gpio: Failed to set output direction: -517
[ 12.682006] tegra186-gpio 2200000.gpio: Failed to set output direction: -517

Yes, I have tried add and not add “cd-gpios” property

The error log will be disappeared when I just not add that property

Could you upload your finalized dts file that converted back from dtb here?

Here are the dtb and dts

kernel_tegra194-p3668-0001-p3509-0000.dtb (247.4 KB)
kernel_tegra194-p3668-0001-p3509-0000.dts (304.9 KB)

Hi,

I mean the one with cd-gpios added. Seems not the one you shared.

Hi

Sorry for my misunderstanding

If you mean the dts converted from the dtb

I didn’t add cd-gpios to dts file that converted from the dtb

I just build the source dts and flash it to device by command
sudo ./flash.sh -k kernel-dtb jetson-xavier-nx-devkit-emmc mmcblk0p1

Here is the dts located at hardware/nvidia/platform/t19x/jakku/kernel-dts where I modified cd-gpios:
tegra194-p3668-all-p3509-0000.dts (1.2 KB)

If I still misunderstand what you mean, please feel free let me know

Yes, you are still misunderstanding…

What I am saying is, after you build the dts to dtb by building source dts, there would be a finalized dtb file…
Please convert that dtb file back to dts and directly attach it here.

Hi

For ease of reading, the tegra194-p3668-0001-p3509-0000.dtb simplify to X, kernel_tegra194-p3668-0001-p3509-0000.dtb simplify to Y

The Y I shared is from the L4T/bootloader and it is as same as the X from the L4T/kernel/dtb by the command

And there’s another X under L4T/bootloader different from the X under L4T/kernel/dtb

I’m understand you want the dtb is the X under L4T/kernel/dtb, because after I build the source dts, I copy the dtb to kernel/dtb

So, what I can share is the dtb above,or the different X I don’t know what it is under L4T/bootloader

list:
bootloader:
tegra194-p3668-0001-p3509-0000.dtb (268.4 KB)
tegra194-p3668-0001-p3509-0000.dts (305.0 KB)

kernel_tegra194-p3668-0001-p3509-0000.dtb (247.4 KB)
kernel_tegra194-p3668-0001-p3509-0000.dts (304.9 KB)

kernel/dtb
tegra194-p3668-0001-p3509-0000.dtb (247.4 KB)
tegra194-p3668-0001-p3509-0000.dts (304.9 KB)

Sorry for my comprehension

Please try to do full flash instead of only flashing kernel-dtb. This will align those two dtbs to the same.

Hi,

After doing full flash, those two dtbs under bootloader still not align

I have check it will align on Jp4.6.2 by doing full flash before, but it seems not work on Jp5.0.2

Attach files:
kernel_tegra194-p3668-0001-p3509-0000.dtb (247.4 KB)
kernel_tegra194-p3668-0001-p3509-0000.dts (304.9 KB)

tegra194-p3668-0001-p3509-0000.dtb (256.4 KB)
tegra194-p3668-0001-p3509-0000.dts (305.0 KB)