首页 > 技术知识 > 正文

1. 前言

承接上篇调试记录 https://www.ebaina.com/articles/140000012656

2. 搭建sdkmanager

建立sd-blob.img for Jetson-210_Linux

dtc -I dtb -O dts tegra210-p3448-0000-p3449-0000-b00.dtb> output.txt

应该停止使用sd卡图像生成器现在

试着先使用sdkmanager中的纯jetpack 会下载一个准备好的Linux_For_Tegra文件夹 有了这个包,就可以专注于DP问题

hdmi显示在sor1下没有被禁用

hdmi-display { compatible = “hdmi,display”; status = “okay”;

在tegra210-porg-p3448 common.dtsi中禁用它

OEM配置工作 sdkmanager工作ok

[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.9.201-tegra (buildbrain@mobile-u64-5294-d8000) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Fri Feb 19 08:40:32 PST 2021 [ 0.000000] Boot CPU: AArch64 Processor [411fd071] [ 0.000000] OF: fdt:memory scan node memory@80000000, reg size 32, [ 0.000000] OF: fdt: – 80000000 , 7ee00000 [ 0.000000] OF: fdt: – 100000000 , 7f200000 [ 0.000000] earlycon: uart8250 at MMIO32 0x0000000070006000 (options ) [ 0.000000] bootconsole [uart8250] enabled [ 1.062360] tegradc tegradc.0: tegra_dc_parse_panel_ops: panel: /host1x/sor1/hdmi-display is not active [ 1.062395] tegradc tegradc.0: err:-19 parsing panel_ops [ 2.290100] tegra-vii2c 546c0000.i2c: — register dump for debugging —- [ 2.296986] tegra-vii2c 546c0000.i2c: I2C_CNFG – 0x22c00 [ 2.302306] tegra-vii2c 546c0000.i2c: I2C_PACKET_TRANSFER_STATUS – 0x10001 [ 2.309177] tegra-vii2c 546c0000.i2c: I2C_FIFO_CONTROL – 0xe0 [ 2.314920] tegra-vii2c 546c0000.i2c: I2C_FIFO_STATUS – 0x800070 [ 2.320923] tegra-vii2c 546c0000.i2c: I2C_INT_MASK – 0xac [ 2.326319] tegra-vii2c 546c0000.i2c: I2C_INT_STATUS – 0x0 [ 2.331801] tegra-vii2c 546c0000.i2c: msg->len – 3 [ 2.336587] tegra-vii2c 546c0000.i2c: is_msg_write – 1 [ 2.341721] tegra-vii2c 546c0000.i2c: buf_remaining – 0 [ 2.346947] tegra-vii2c 546c0000.i2c: i2c transfer timed out, addr 0x0040, data 0x00 [ 2.354745] ina3221x 6-0040: ina3221 reset failure status: 0xffffff92 [ 2.445514] r8168 0000:01:00.0 (unnamed net_device) (uninitialized): bad mac address at /chosen/nvidia,ethernet-mac: missing. [ 2.787626] cgroup: cgroup2: unknown option “nsdelegate” [ 3.851475] using random self ethernet address [ 3.856204] using random host ethernet address [ 4.197243] random: crng init done [ 4.200646] random: 7 urandom warning(s) missed due to ratelimiting [ 4.449864] using random self ethernet address [ 4.455903] using random host ethernet address [ 13.113038] Please complete system configuration setup on the serial port provided by Jetsons USB device mode connection. e.g. /dev/ttyACMx where x can 0, 1, 2 etc.
<

log看起来ok 没有panic

[ 13.113038] Please complete system configuration setup on the serial port provided by Jetson’s USB device mode connection. e.g. /dev/ttyACMx where x can 0, 1, 2 etc. is also good

已经设法关闭hdmi。 HDMI不得不在“tegra210-ers-hdmi-e2190-1100-a00.dtsi”禁用文件

不幸的是我还是不能在DP上看到图片

3. 查询hdmi & dts

dmesg

239.337503] IPv6: ADDRCONF(NETDEV_UP): rndis0: link is not ready [ 2239.342462] l4tbr0: port 2(usb0) entered blocking state [ 2239.342466] l4tbr0: port 2(usb0) entered disabled state [ 2239.342908] device usb0 entered promiscuous mode [ 2239.351988] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready [ 2239.443508] android_work: did not send uevent (0 0 (null)) [ 2239.480404] android_work: sent uevent USB_STATE=CONNECTED [ 2239.557994] configfs-gadget gadget: high-speed config #1: c [ 2239.558034] tegra-xudc-new 700d0000.xudc: ep 5 (type: 3, dir: in) enabled [ 2239.558053] tegra-xudc-new 700d0000.xudc: ep 3 (type: 2, dir: in) enabled [ 2239.558071] tegra-xudc-new 700d0000.xudc: ep 2 (type: 2, dir: out) enabled [ 2239.558187] tegra-xudc-new 700d0000.xudc: ep 9 (type: 3, dir: in) enabled [ 2239.558205] tegra-xudc-new 700d0000.xudc: ep 7 (type: 2, dir: in) enabled [ 2239.558219] tegra-xudc-new 700d0000.xudc: ep 4 (type: 2, dir: out) enabled [ 2239.558356] tegra-xudc-new 700d0000.xudc: ep 15 (type: 3, dir: in) enabled [ 2239.558392] IPv6: ADDRCONF(NETDEV_CHANGE): rndis0: link becomes ready [ 2239.558429] tegra-xudc-new 700d0000.xudc: ep 11 (type: 2, dir: in) enabled [ 2239.558447] tegra-xudc-new 700d0000.xudc: ep 6 (type: 2, dir: out) enabled [ 2239.558568] android_work: sent uevent USB_STATE=CONFIGURED [ 2242.073861] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 2242.073872] Bluetooth: BNEP socket layer initialized [ 2245.240423] l4tbr0: port 1(rndis0) entered blocking state [ 2245.240428] l4tbr0: port 1(rndis0) entered forwarding state [ 2245.240539] IPv6: ADDRCONF(NETDEV_UP): l4tbr0: link is not ready [ 2245.240554] IPv6: ADDRCONF(NETDEV_CHANGE): l4tbr0: link becomes ready gateway@gateway:/$
<

还有一个地方需要修改。 sor1中的“nvidia,active-panel”也必须更改为&sor1_dp_display。

现在DP的运行时间大约是20s?? 之后屏幕又变黑了…… Jetson Nano平台更改DP1上DisplayPort的设备树3

仍然有i2c问题

[ 159.608216] tegra-i2c 7000c700.i2c: — register dump for debugging —- [ 159.615204] tegra-i2c 7000c700.i2c: I2C_CNFG – 0x22c00 [ 159.620458] tegra-i2c 7000c700.i2c: I2C_PACKET_TRANSFER_STATUS – 0x10001 [ 159.627258] tegra-i2c 7000c700.i2c: I2C_FIFO_CONTROL – 0x1c [ 159.632910] tegra-i2c 7000c700.i2c: I2C_FIFO_STATUS – 0x800040 [ 159.638826] tegra-i2c 7000c700.i2c: I2C_INT_MASK – 0x6c [ 159.644131] tegra-i2c 7000c700.i2c: I2C_INT_STATUS – 0x2 [ 159.649578] tegra-i2c 7000c700.i2c: i2c transfer timed out addr: 0x50 [ 159.659956] tegradc tegradc.0: hdmi: edid read failed

不明白为什么hdmi还在。 转到设备上的/proc/device-tree并检查这些文件是否真的是dts中修改的文件

替换Linux_for_Tegra/kernel/dtb/下的dtb文件,然后发出以下命令更新dtb分区。

sudo ./flash.sh -r -k DTB your_board_name mmcblk0p1 4. 修改dts

更新了新的.dtb文件 Hdmi信息不再显示 屏幕仍然是黑色的,检查dtb文件 Dmesg:

[ 1.068632] tegradc tegradc.0: disp0 connected to head0->/host1x/sor1 [ 1.068782] tegradc tegradc.0: mandatory property disp-default-out not found [ 1.068815] tegradc tegradc.0: err:-19 parsing out_type

检查

hardware/nvidia/platform/t210/common/kernel-dts/t210-common-platforms/tegra210-dp.dtsi

并将那些缺失的添加到您的sor1 dp-display。

nvidia,out-parent-clk = “pll_d_out0” 修改为“pll_d2”

当前的dtb文件

hdmi-display { compatible = “hdmi,display”; status = “disabled”; generic-infoframe-type = <0x87>; linux,phandle = <0x119>; phandle = <0x119>; disp-default-out { nvidia,out-xres = <0x1000>; nvidia,out-yres = <0x870>; nvidia,out-type = <0x1>; nvidia,out-flags = <0x2>; nvidia,out-parent-clk = “pll_d2”; nvidia,out-align = <0x0>; nvidia,out-order = <0x0>; }; }; dp-display { compatible = “dp, display”; status = “okay”; nvidia,hpd-gpio = <0x5b 0xe1 0x1>; nvidia,is_ext_dp_panel = <0x1>; linux,phandle = <0x76>; phandle = <0x76>; disp-default-out { nvidia,out-type = <0x3>; nvidia,out-align = <0x0>; nvidia,out-order = <0x0>; nvidia,out-flags = <0x0>; nvidia,out-pins = <0x1 0x0 0x2 0x0 0x3 0x0 0x0 0x1>; nvidia,out-parent-clk = “pll_d2”; }; dp-lt-settings { lt-setting@0 { nvidia,drive-current = <0x0 0x0 0x0 0x0>; nvidia,lane-preemphasis = <0x0 0x0 0x0 0x0>; nvidia,post-cursor = <0x0 0x0 0x0 0x0>; nvidia,tx-pu = <0x0>; nvidia,load-adj = <0x3>; }; lt-setting@1 { nvidia,drive-current = <0x0 0x0 0x0 0x0>; nvidia,lane-preemphasis = <0x0 0x0 0x0 0x0>; nvidia,post-cursor = <0x0 0x0 0x0 0x0>; nvidia,tx-pu = <0x0>; nvidia,load-adj = <0x4>; }; lt-setting@2 { nvidia,drive-current = <0x0 0x0 0x0 0x0>; nvidia,lane-preemphasis = <0x1 0x1 0x1 0x1>; nvidia,post-cursor = <0x0 0x0 0x0 0x0>; nvidia,tx-pu = <0x0>; nvidia,load-adj = <0x6>; }; }; };
<

现在通过dmesg接收输出:

[ 1.061509] tegradc tegradc.0: disp0 connected to head0->/host1x/sor1 [ 1.061600] display board info: id 0x0, fab 0x0 [ 1.061683] tegradc tegradc.0: No lt-data, using default setting [ 1.061736] tegra_cec 70015000.tegra_cec: cec_add_sysfs ret=0 [ 1.061742] tegra_cec 70015000.tegra_cec: probed [ 1.061787] tegradc tegradc.0: DT parsed successfully [ 1.061838] tegradc tegradc.0: Display dc.ffffff800ab80000 registered with id=0 [ 1.569879] Host read timeout at address 540400c4 [ 1.571867] tegradc tegradc.0: probed [ 1.571876] tegra-apbdma 60020000.dma: Tegra20 APB DMA driver register 32 channels [ 1.572566] Console: switching to colour frame buffer device 80×30 [ 1.572599] tegradc tegradc.0: fb registered [ 1.575961] hpd: state 7 (Takeover from bootloader), hpd 0, pending_hpd_evt 1 [ 1.575970] hpd: switching from state 7 (Takeover from bootloader) to state 0 (Reset) [ 1.575979] hpd: state 0 (Reset), hpd 0, pending_hpd_evt 0 [ 1.575997] tegradc tegradc.0: blank – powerdown [ 1.576072] extcon-disp-state extcon:disp-state: cable 44 state 0 already set. [ 1.576078] Extcon DP: HPD disabled [ 1.576083] hpd: hpd_switch 0 [ 1.576087] hpd: switching from state 0 (Reset) to state 1 (Check Plug) [ 1.576098] hpd: state 1 (Check Plug), hpd 0, pending_hpd_evt 0 [ 1.576105] hpd: switching from state 1 (Check Plug) to state 3 (Disabled)

使用被动HDMI显示端口适配器 使用了一个本机DP监视器 dmesg log:

[ 1.066423] display board info: id 0x0, fab 0x0 [ 1.066528] tegradc tegradc.0: No lt-data, using default setting [ 1.066626] tegradc tegradc.0: DT parsed successfully [ 1.066668] tegradc tegradc.0: Display dc.ffffff800ab80000 registered with id=0 [ 1.073804] tegra-apbdma 60020000.dma: Tegra20 APB DMA driver register 32 channels [ 1.574598] Host read timeout at address 540400c4 [ 1.576676] tegradc tegradc.0: probed [ 1.577467] Console: switching to colour frame buffer device 80×30 [ 1.577505] tegradc tegradc.0: fb registered [ 1.580205] tegra-adma 702e2000.adma: Tegra210 ADMA driver registered 22 channels [ 1.581000] tegra-fuse-burn 7000f800.efuse:efuse-burn: shutdown limit check disabled [ 1.581007] tegra-fuse-burn 7000f800.efuse:efuse-burn: Fuse burn driver initialized [ 1.581263] hpd: state 7 (Takeover from bootloader), hpd 0, pending_hpd_evt 1 [ 1.581270] hpd: switching from state 7 (Takeover from bootloader) to state 0 (Reset) [ 1.581280] hpd: state 0 (Reset), hpd 0, pending_hpd_evt 0 [ 1.581294] tegradc tegradc.0: blank – powerdown [ 1.581315] kfuse 7000fc00.kfuse: initialized [ 1.581369] extcon-disp-state extcon:disp-state: cable 44 state 0 already set. [ 1.581375] Extcon DP: HPD disabled [ 1.581379] hpd: hpd_switch 0 [ 1.581384] hpd: switching from state 0 (Reset) to state 1 (Check Plug) [ 1.581394] hpd: state 1 (Check Plug), hpd 0, pending_hpd_evt 0 [ 1.581401] hpd: switching from state 1 (Check Plug) to state 3 (Disabled)
<

这就是问题所在

nvidia,hpd-gpio = <&gpio TEGRA_GPIO(CC, 1) 1>; /* PN7 */

用下面

hdmi_int_dp_hpd_pcc1 { nvidia,pins = “hdmi_int_dp_hpd_pcc1”; nvidia,function = “dp”; nvidia,pull = <TEGRA_PIN_PULL_NONE>; nvidia,tristate = <TEGRA_PIN_DISABLE>; nvidia,enable-input = <TEGRA_PIN_ENABLE>; nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>; };

在DP1_HPD上测量1.8V电平,当DisplayPort被联系。

5.热插拔测试

热插DP电缆,查询dmesg是否有新打印? dmesg.log没有变化

转到/proc/device-tree,比较sor和sor1部分。 由于sor仍然是旧的设置,只是被禁用了, 可以检查sor1是否缺少任何内容

(1)测试 DP1_HPD → nvidia,hpd-gpio = <&gpio TEGRA_GPIO(CC, 1) 1>; /PN/

root@linux:/sys/kernel/debug sudo -s cat tegra_gpi Name:Bank:Port CNF OE OUT IN INT_STA INT_ENB INT_LVL 拔了电缆 CC: 7:0 92 80 80 00 00 10 101000 插入电缆 CC: 7:0 92 80 80 02 00 10 101000

(2)热插拔测试

root@linux/sys/kernel/debug/tegradc.0 cat hotplug 拔了电缆 0 插入电缆 0

可能是因为文件tegra210-porg-gpio-p3448-0000-b00.dtsi

#include <dt-bindings/gpio/tegra-gpio.h> / { gpio: gpio@6000d000 { gpio-init-names = “default”; gpio-init-0 = <&gpio_default>; gpio_default: default { gpio-input = < TEGRA_GPIO(E, 6) TEGRA_GPIO(A, 5) TEGRA_GPIO(X, 4) TEGRA_GPIO(X, 5) TEGRA_GPIO(X, 6) TEGRA_GPIO(Y, 1) TEGRA_GPIO(Y, 2) TEGRA_GPIO(V, 0) TEGRA_GPIO(V, 1) TEGRA_GPIO(Z, 2) TEGRA_GPIO(G, 2) TEGRA_GPIO(G, 3) TEGRA_GPIO(H, 2) TEGRA_GPIO(H, 5) TEGRA_GPIO(H, 6) TEGRA_GPIO(I, 1) TEGRA_GPIO(I, 2) TEGRA_GPIO(CC, 4) >; gpio-output-low = < TEGRA_GPIO(Z, 3) TEGRA_GPIO(H, 0) TEGRA_GPIO(H, 3) TEGRA_GPIO(H, 4) TEGRA_GPIO(H, 7) TEGRA_GPIO(I, 0) >; gpio-output-high = < TEGRA_GPIO(BB, 0) TEGRA_GPIO(A, 6) TEGRA_GPIO(X, 3) TEGRA_GPIO(Z, 0) TEGRA_GPIO(CC, 7) >; }; }; };
<

猜你喜欢