Hi
-
1 BSP environment:
TX2 jetpack 4.6 L4T R32.6.1 kernel 4.9 aarch64
TX2 develop kit(p3310)
-
2 background:
Porting tlv audio card on the TX2 develop kit.
We connected audio card to TX2 via 40-pin expansion header or J21.
pin27 → codec SDL; pin28-> codec SCL; pin7-> codec MCLK
-
3 Problems:
use /opt/nvidia/jetson-io/jetson-io.py to config jetson 40pin header mannually.
jetson-io.py → “config jetson 40pin header” → “configuer header pins manully” → enable aud_mclk (7), enable i2s1 (12.35.38.40) → “export as device tree overlay” → the console shows that “configuration saved to file /boot/kernel_tegra186-quill-p3310-1000-c03-00-base-hdr40-user-custom.dtbo.”
But, after reboot the device, and run jetson-io.py again, it turns out that aud_mclk and i2s1 are still disabled. It seems that the dtbo file not be loaded. But, we decompiled the kernel_tegra186-quill-p3310-1000-c03-00-base-hdr40-user-custom.dtbo to dts, and found that both aud_mcl and i2s1 were set enabled.
according to this document, if a dtbo file is at /boot/ diretory, it should be loaded. But, how to verify a dtbo file has been loaded, could some logs be found on console or dmesg?
Regards
Henry
FYI
Decompile /boot/tegra186-quill-p3310-1000-c03-00-base-hdr40.dtbo to dts
tegra186-quill-p3310-1000-c03-00-base-hdr40.dts (4.4 KB)
hello Henry.Lou,
please setup the serial console and gather the bootloader logs for reference,
thanks
Hi @JerryChang
Thanks for your reply.
Could you give more detials or documents.
Regards
please refer to Serial Console - NVIDIA Jetson TX2 - JetsonHacks for setting up the serial console.
Hi @JerryChang
attachment is the serial console log, could you help to judge the tegra186-quill-p3310-1000-c03-00-base-hdr40.dtbo has been loaded or not.
There are so much information, and could you give us some key words?
Regards
Henry
FYI
2022-06-27_18_22_29.log (154.6 KB)
hello Henry.Lou,
it’ll still loading the default device tree blob.
for example,
[ 0.184574] DTS File Name: arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts
[ 0.184589] DTB Build time: Jun 27 2022 16:14:12
had you update the configuration file for booting Linux i.e. /boot/extlinux/extlinux.conf
to apply the device tree overlays for the header configurations?
Hi @JerryChang
We did not modify the extlinx.conf file. How to update it?
root@t-desktop:/boot/extlinux# cat extlinux.conf
TIMEOUT 30
DEFAULT primary
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
# sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot
# LABEL backup
# MENU LABEL backup kernel
# LINUX /boot/Image.backup
# INITRD /boot/initrd
# APPEND ${cbootargs}
Regards
hello Henry.Lou,
please adding FDT
entry into /boot/extlinux
and please sharing the results.
for example,
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT /boot/kernel_tegra186-quill-p3310-1000-c03-00-base-hdr40-user-custom.dtbo
Hi @JerryChang
Same response as previous.
t@t-desktop:~$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT /boot/kernel_tegra186-quill-p3310-1000-c03-00-base-hdr40-user-custom.dtbo
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
FYI
2022-06-28_10_36_37.log (155.0 KB)
hello Henry.Lou,
could you please try again after you configure the Jetson 40pin Header,
please follow the steps to [Save pin changes], and then select [Save and reboot to reconfigure pins] to check the behavior.
Hi @JerryChang
unfortunately, same response as previous.
FYI
4378_2022-06-28_11_29_06.log (155.0 KB)
Hi @JerryChang
We are confused there are lots of dtbo files, and why none of them be loaded?
We verified that CONFIG_OF_OVERLAY=y in kernel-4.9/,config
FYI
t@t-desktop:~$ ls /boot/
dtb
extlinux
grub
Image
Image.t19x
Image.t19x.sig
initrd
initrd.img
initrd.img-4.9.253
initrd.t19x
initrd.t19x.sig
kernel_tegra186-quill-p3310-1000-c03-00-base.dtb
kernel_tegra186-quill-p3310-1000-c03-00-base-user-custom.dtb
tegra186-p3636-0001-p3509-0000-a01-adafruit-sph0645lm4h.dtbo
tegra186-p3636-0001-p3509-0000-a01-adafruit-uda1334a.dtbo
tegra186-p3636-0001-p3509-0000-a01.dtb
tegra186-p3636-0001-p3509-0000-a01-fe-pi-audio.dtbo
tegra186-p3636-0001-p3509-0000-a01-m2ke.dtbo
tegra186-p3636-0001-p3509-0000-a01-respeaker-4-mic-array.dtbo
tegra186-p3636-0001-p3509-0000-a01-respeaker-4-mic-lin-array.dtbo
tegra186-quill-p3310-1000-a00-00-base.dtb
tegra186-quill-p3310-1000-as-0888.dtb
tegra186-quill-p3310-1000-c03-00-base-adafruit-sph0645lm4h.dtbo
tegra186-quill-p3310-1000-c03-00-base-adafruit-uda1334a.dtbo
tegra186-quill-p3310-1000-c03-00-base-csi.dtbo
tegra186-quill-p3310-1000-c03-00-base.dtb
tegra186-quill-p3310-1000-c03-00-base-fe-pi-audio.dtbo
tegra186-quill-p3310-1000-c03-00-base-hdr30.dtbo
tegra186-quill-p3310-1000-c03-00-base-hdr40.dtbo
tegra186-quill-p3310-1000-c03-00-base-m2ke.dtbo
tegra186-quill-p3310-1000-c03-00-base-respeaker-4-mic-array.dtbo
tegra186-quill-p3310-1000-c03-00-base-respeaker-4-mic-lin-array.dtbo
tegra186-quill-p3310-1000-c03-00-dsi-hdmi-dp.dtb
tegra186-quill-p3489-0888-a00-00-base.dtb
tegra186-quill-p3489-1000-a00-00-ucm1.dtb
tegra186-quill-p3489-1000-a00-00-ucm2.dtb
hello Henry.Lou,
it’s my mistake, you should have FDT
entry assign within LABEL JetsonIO
.
for example,
LABEL primary
MENU LABEL primary kernel
...
LABEL JetsonIO
MENU LABEL customization 40-pin header
LINUX /boot/Image
FDT /boot/kernel_tegra186-quill-p3310-1000-c03-00-base-user-custom.dtb
please also check the booting messages, you’ll see two boot options available after doing so.
then, during boot-up, you may check L4T boot options and select the one (i.e. customization 40-pin header) to load the settings.
BTW,
we’ve check this internally, confirmed it works with TX2/l4t-r32.7.2.
thanks
Hi @JerryChang
We did what you posted, but, got same response.
Our BSP is r32.6, did LABEL JetsonIO support it?
If it is difficult to make DT overlay work on TX2, could you help us to modify the tegra186-quill-p3310-1000-c03-00-base.dts to config aud_mclk and i2s1?
Regards
FYI
t@t-desktop:~$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT JetsonIO
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LABEL JetsonIO
MENU LABEL customization 40-pin header
LINUX /boot/Image
FDT /boot/kernel_tegra186-quill-p3310-1000-c03-00-base-hdr40-user-custom.dtbo
INITRD /boot/initrd
APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2
2022-06-28_14_22_34.log (154.9 KB)
hello Henry.Lou,
could you please update the u-boot for testing,
please download the attach u-boot binary, Topic218834_u-boot.bin (607.5 KB)
you should overwrite it with… $OUT/Linux_for_Tegra/bootloader/t186ref/p2771-0000/500/u-boot.bin
and using flash script to update kernel partition to update u-boot image.
for your reference, here’s command-line for you to flash kernel partition on TX2.
i.e. $ sudo ./flash.sh -r -k kernel jetson-tx2 mmcblk0p1
Hi @JerryChang
The Topic218834_u-boot.bin really worked.
But system halted after “customization 40-pin header” label was selected.
2022-06-28_17_26_14.log (46.6 KB)
Hi @JerryChang
How to recover the u-boot.bin back?
We use the previous u-boot.bin to cover Linux_for_Tegra/bootloader/t186ref/p2771-0000/500/u-boot.bin, and ./flash.sh -r -k kernel jetson-tx2 mmcblk0p1 again.
But, system still halted.
L4T boot options
1: primary kernel
2: customization 40-pin header
3: Custom Header Config: <HDR40 User Custom [2022-06-08-191530]>
Enter choice: 2
2: customization 40-pin header
Retrieving file: /boot/initrd
...
hello Henry.Lou,
will system still hang if you load primary kernel?
Hi @JerryChang
if select [primary kernel] or [customization 40-pin header] system halt.
but, select [custom header config] system bring up.
could you help to flash u-boot.bin back? so that, our project can continue debug.
Flashing U-Boot Only
To flash the full Jetson Linux Driver Package (L4T) image to the reference platform, see Flashing U-Boot Full Jetson Linux Driver Package Image, above.
To flash the new version of U-Boot
•Run the command:
$ sudo ./flash.sh -k LNX <platform> mmcblk0p1
Where <platform> is the SoC name or platform.
use ./flash.sh -k LNX jetson-tx2 mmcblk0p1
the command failed.
Regards
hello Henry.Lou,
that’s incorrect partition for TX2 series. please use -k kernel
for flashing TX2’s u-boot .
you may also check the u-boot logs, the timestamp should alter if you update the binary correctly.