Jetson Nano平台更改DP1上DisplayPort的设备树2

free-jdx 2021-06-17 15:14:12 6272
1.前言

承接上篇
https://www.ebaina.com/articles/140000012655

2. 调试记录

使用修改后的文件tegra210-porg-p3448-common.dtsi
然后得到以下消息:

然后关闭了i2c接口7000c700
然后得到以下消息:

tegra_dc_program_mode.
[    1.111073] tegradc tegradc.0: hdmi: tmds rate:25174K prod-setting:prod_c_hdmi_0m_54m
[    1.111570] tegradc tegradc.0: hdmi: get RGB quant from REG programmed by BL.
[    1.111583] tegradc tegradc.0: hdmi: BL set VIC 0
[    1.111587] tegradc tegradc.0: hdmi: get YCC quant from REG programmed by BL.
[    1.111846] Unable to handle kernel read from unreadable memory at virtual address 68000060e0
[    1.111847] Mem abort info:
[    1.111849]   ESR = 0x96000005
[    1.111853]   Exception class = DABT (current EL), IL = 32 bits
[    1.111855]   SET = 0, FnV = 0
[    1.111858]   EA = 0, S1PTW = 0
[    1.111859] Data abort info:
[    1.111861]   ISV = 0, ISS = 0x00000005
[    1.111863]   CM = 0, WnR = 0
[    1.111866] [00000068000060e0] user address but active_mm is swapper
[    1.111874] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    1.111883] Modules linked in:
[    1.111894] CPU: 0 PID: 553 Comm: kworker/u8:4 Not tainted 4.9.201-tegra #1
[    1.111898] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[    1.111934] Workqueue: events_unbound async_run_entry_fn
[    1.111937] task: ffffffc0f90ce200 task.stack: ffffffc0f914c000
[    1.111952] PC is at tegra_edid_get_monspecs+0x54/0xbd8
[    1.111956] LR is at tegra_edid_get_monspecs+0x28/0xbd8
[    1.111960] pc : [<ffffff80085f1914>] lr : [<ffffff80085f18e8>] pstate: 40400045
[    1.111962] sp : ffffffc0f914f8e0
[    1.111968] x29: ffffffc0f914f8e0 x28: ffffff800ab80000 
[    1.111974] x27: 0000000000000000 x26: 0000000001802329 
[    1.111979] x25: ffffff800a351000 x24: ffffffc0f7fc0000 
[    1.111984] x23: ffffff800a351088 x22: 0000000000000001 
[    1.111989] x21: ffffffc0f91a9218 x20: ffffffc0f9137800 
[    1.111993] x19: ffffffc0f91958f8 x18: 0000000000000000 
[    1.111997] x17: 00000000000f1e2c x16: 0000000000000000 
[    1.112001] x15: ffffffffffffffff x14: 34355f6d305f696d 
[    1.112005] x13: 64685f635f646f72 x12: ffffff8009e84000 
[    1.112009] x11: 0088000000000000 x10: 0140000000000000 
[    1.112014] x9 : 0000000000000000 x8 : ffffffc0f9126200 
[    1.112018] x7 : 0000000000000000 x6 : 0000000000000041 
[    1.112022] x5 : ffffff800a35a000 x4 : ffffff800953d000 
[    1.112026] x3 : 00000000024080c2 x2 : 0000000000000002 
[    1.112030] x1 : 0000006800006000 x0 : 0000006800000000 
[    1.112031] 
[    1.112035] Process kworker/u8:4 (pid: 553, stack limit = 0xffffffc0f914c000)
[    1.112039] Call trace:
[    1.112045] [<ffffff80085f1914>] tegra_edid_get_monspecs+0x54/0xbd8
[    1.112056] [<ffffff800863d188>] tegra_hdmi_controller_enable+0xc98/0xfb0
[    1.112060] [<ffffff800863d4e8>] tegra_dc_hdmi_enable+0x48/0xb8
[    1.112068] [<ffffff80085c38f0>] _tegra_dc_controller_enable+0x340/0x1ab8
[    1.112071] [<ffffff80085c50f8>] _tegra_dc_enable+0x90/0x110
[    1.112076] [<ffffff80085cba6c>] tegra_dc_probe+0x107c/0x16b8
[    1.112089] [<ffffff8008783868>] platform_drv_probe+0x60/0xc0
[    1.112096] [<ffffff8008780ee8>] driver_probe_device+0xd8/0x408
[    1.112101] [<ffffff80087812f4>] __driver_attach+0xdc/0x128
[    1.112105] [<ffffff800877e964>] bus_for_each_dev+0x5c/0xa8
[    1.112109] [<ffffff80087806e8>] driver_attach+0x30/0x40
[    1.112113] [<ffffff800877ef20>] driver_attach_async+0x20/0x60
[    1.112117] [<ffffff80080dee08>] async_run_entry_fn+0x48/0x158
[    1.112126] [<ffffff80080d40cc>] process_one_work+0x1e4/0x4b0
[    1.112129] [<ffffff80080d43e8>] worker_thread+0x50/0x4c8
[    1.112134] [<ffffff80080db074>] kthread+0xec/0xf0
[    1.112142] [<ffffff80080838a0>] ret_from_fork+0x10/0x30
[    1.112155] ---[ end trace 20d6734d350d7bce ]---
[    1.117198] Unable to handle kernel paging request at virtual address ffffffffffffffd8
[    1.117200] Mem abort info:
[    1.117202]   ESR = 0x96000005
[    1.117204]   Exception class = DABT (current EL), IL = 32 bits
[    1.117206]   SET = 0, FnV = 0
[    1.117208]   EA = 0, S1PTW = 0
[    1.117209] Data abort info:
[    1.117211]   ISV = 0, ISS = 0x00000005
[    1.117213]   CM = 0, WnR = 0
[    1.117218] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff800a1db000
[    1.117225] [ffffffffffffffd8] *pgd=0000000000000000, *pud=0000000000000000
[    1.117229] Internal error: Oops: 96000005 [#2] PREEMPT SMP
[    1.117232] Modules linked in:
[    1.117239] CPU: 0 PID: 553 Comm: kworker/u8:4 Tainted: G      D         4.9.201-tegra #1
[    1.117241] Hardware name: NVIDIA Jetson Nano Developer Kit (DT)
[    1.117256] task: ffffffc0f90ce200 task.stack: ffffffc0f914c000
[    1.117263] PC is at kthread_data+0x24/0x30
[    1.117267] LR is at wq_worker_sleeping+0x20/0xd0
[    1.117271] pc : [<ffffff80080dbc64>] lr : [<ffffff80080d5510>] pstate: 804000c5
[    1.117272] sp : ffffffc0f914f4e0
[    1.117278] x29: ffffffc0f914f4e0 x28: ffffffc0f90ce200 
[    1.117283] x27: ffffffc0fa6f0000 x26: 0000000000000000 
[    1.117288] x25: ffffff80080eaed4 x24: ffffffc0fefb4d40 
[    1.117292] x23: ffffffc0f90ce8b0 x22: ffffff8009826000 
[    1.117296] x21: ffffff8009e68000 x20: ffffff8009832000 
[    1.117301] x19: ffffffc0f90ce200 x18: 00000000fffffffc 
[    1.117305] x17: 0000000000000000 x16: 0000000000000000 
[    1.117309] x15: 0000000000000000 x14: 0000000000000001 
[    1.117313] x13: 0000000000000019 x12: 0000000000000033 
[    1.117317] x11: 000000000000004c x10: 0000000000000020 
[    1.117321] x9 : 0000000000000000 x8 : 0000000000000400 
[    1.117325] x7 : 0000000000000000 x6 : 0000000000000400 
[    1.117329] x5 : 0000000000008000 x4 : 0000000003201eb4 
[    1.117333] x3 : 0000000000000000 x2 : 000000009b47a71e 
[    1.117338] x1 : ffffffc0fefb4d40 x0 : 0000000000000000 
[    1.117339] 
[    1.117343] Process kworker/u8:4 (pid: 553, stack limit = 0xffffffc0f914c000)
[    1.117345] Call trace:
[    1.117350] [<ffffff80080dbc64>] kthread_data+0x24/0x30
[    1.117363] [<ffffff8008f60e80>] __schedule+0x418/0x780
[    1.117371] [<ffffff80080eaed4>] do_task_dead+0x74/0x78
[    1.117379] [<ffffff80080b8930>] do_exit+0x6f8/0xa50
[    1.117385] [<ffffff800808c15c>] die+0x194/0x198
[    1.117397] [<ffffff80080a21cc>] __do_kernel_fault+0x144/0x218
[    1.117400] [<ffffff80080a23d8>] do_page_fault+0x60/0x480
[    1.117404] [<ffffff80080a2864>] do_translation_fault+0x6c/0x80
[    1.117408] [<ffffff8008080954>] do_mem_abort+0x54/0xb0
[    1.117411] [<ffffff8008082904>] el1_da+0x24/0xbc
[    1.117418] [<ffffff800863d188>] tegra_hdmi_controller_enable+0xc98/0xfb0
[    1.117421] [<ffffff800863d4e8>] tegra_dc_hdmi_enable+0x48/0xb8
[    1.117426] [<ffffff80085c38f0>] _tegra_dc_controller_enable+0x340/0x1ab8
[    1.117430] [<ffffff80085c50f8>] _tegra_dc_enable+0x90/0x110
[    1.117434] [<ffffff80085cba6c>] tegra_dc_probe+0x107c/0x16b8
[    1.117439] [<ffffff8008783868>] platform_drv_probe+0x60/0xc0
[    1.117444] [<ffffff8008780ee8>] driver_probe_device+0xd8/0x408
[    1.117448] [<ffffff80087812f4>] __driver_attach+0xdc/0x128
[    1.117452] [<ffffff800877e964>] bus_for_each_dev+0x5c/0xa8
[    1.117455] [<ffffff80087806e8>] driver_attach+0x30/0x40
[    1.117459] [<ffffff800877ef20>] driver_attach_async+0x20/0x60
[    1.117464] [<ffffff80080dee08>] async_run_entry_fn+0x48/0x158
[    1.117468] [<ffffff80080d40cc>] process_one_work+0x1e4/0x4b0
[    1.117472] [<ffffff80080d43e8>] worker_thread+0x50/0x4c8
[    1.117476] [<ffffff80080db074>] kthread+0xec/0xf0
[    1.117480] [<ffffff80080838a0>] ret_from_fork+0x10/0x30
[    1.117483] ---[ end trace 20d6734d350d7bcf ]---
[    1.122969] Fixing recursive fault but reboot is needed!
[    1.941530] console [ttyS0] enabled
[    1.946437] 70006040.serial: ttyTHS1 at MMIO 0x70006040 (irq = 64, base_baud = 0) is a TEGRA_UART
[    1.955676] serial-tegra 70006200.serial: RX in PIO mode
[    1.961108] 70006200.serial: ttyTHS2 at MMIO 0x70006200 (irq = 65, base_baud = 0) is a TEGRA_UART

如果插入DisplayPort连接器,
以下是nvidea图片:

它看起来像tegradc.0现在作为hdmi显示
这和粘贴的DT不匹配

[ 1.111073] tegradc tegradc.0: hdmi: tmds rate:25174K prod-setting:prod_c_hdmi_0m_54m
[ 1.111570] tegradc tegradc.0: hdmi: get RGB quant from REG programmed by BL.
[ 1.111583] tegradc tegradc.0: hdmi: BL set VIC 0
[ 1.111587] tegradc tegradc.0: hdmi: get YCC quant from REG programmed by BL.
3. 梳理操作流程

做了以下工作:

(1)更改文件tegra210-porg-p3448-common.dtsi

(2)重建设备树映像:
cd <src_path>/kernel/kernel-4.9/
make ARCH=arm64 tegra_defconfig
make ARCH=arm64 dtbs

(3)然后我将更新后的设备树图像复制到L4T发布树:
arch/arm64/boot/dts/tegra210-p3448--p3449-0000-*.dtb 
→ path-to-L4T-release/kernel/dtb/

(4)create image
sudo ./jetson-disk-image-creator.sh -o sd-blob.img -b jetson-nano -r 300

(5)然后刷机,启动目标设备。

不启动oem-config模式:
→目标设备闪烁后第一次启动,没有发现显示设备时,以无头模式运行oem-config。
使用以下步骤重新配置目标设备。

Source:
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0DC0HA

使用oem-config重新配置Jetson设备?
Source: https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E0TJ0HA

(1)设备树的全名

/jetson-nano/Sources/Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-b00.dtb

(2)如果已经有Linux_for_Tegra,直接使用flash.sh来完成工作

tegra210-p3448-0000-p3449-0000-b00.dtb
将Linux_for_Tegra内核.dtb文件复制到Linux_for_Tegra内核

/jetson-nano/kernel/Jetson-210_Linux_R32.5.1_aarch64/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb

(3)对于oem-config,连接jetson micro usb端口到ubuntu主机

使用波特率为115200的minicom
在jetson nano的第一次启动时打开主机上的/dev/ttyACM0节点

4. 目前使用nano机型

5.在oem-config上工作

可以在设备启动后检查dtb。

没有显示原始设备配置。
但是Jetson Micro-USB接口可以工作

30234.707622] usb 3-6: new high-speed USB device number 5 using xhci_hcd
[30234.856278] usb 3-6: New USB device found, idVendor=0955, idProduct=7f21, bcdDevice= 1.02
[30234.856283] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[30234.856287] usb 3-6: Product: APX

sudo dmesg -c

30234.707622] usb 3-6: new high-speed USB device number 5 using xhci_hcd
[30234.856278] usb 3-6: New USB device found, idVendor=0955, idProduct=7f21, bcdDevice= 1.02
[30234.856283] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[30234.856287] usb 3-6: Product: APX
Manufacturer: NVIDIA Corp.

打开ttyACM0的命令如下:

sudo minicon -s
没有设置串行接口ttyACM0
/dev目录:

由于内核有一些panic log,不确定这是否会影响oem-config,
也许可以先将dtb文件转换回dts文件,然后将它附加到这里

可以使用dtc命令进行转换

dtc -I dts -O dtb _your_input_dtb > output.txt

还可以通过命令“lsmod”检查inux主机是否有cdc_acm驱动程序

声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
free-jdx
红包 93 5 评论 打赏
评论
0个
内容存在敏感词
手气红包
    易百纳技术社区暂无数据
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
free-jdx
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区