如何在设备树使能PCIE3(pcie@14140000)
我在设备树文件 nvidia/t23x/nv-public/tegra234-p3768-0000.dtsi中添加:
pcie@14140000 {
status = "okay";
vddio-pex-ctl-supply = <&vdd_1v8_ao>;
phys = <&p2u_hsio_2>;
phy-names = "p2u-0";
};
其中phys我随便找了没有用到的来填写。
烧录过程中,有打印出内核trace信息:
[ 4.380575] **************************************
[ 4.380584] ------------[ cut here ]------------
[ 4.380585] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:608 tegra234_cbb_isr+0x144/0x190
[ 4.380588] Modules linked in: pcie_tegra194(+) phy_tegra194_p2u r8168(O)
[ 4.380591] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 5.15.148-tegra #1
[ 4.380593] Hardware name: NVIDIA NVIDIA Jetson Orin NX Engineering Reference Developer Kit/Jetson, BIOS 36.4.3-gcid-38968081 01/08/2025
[ 4.380594] pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 4.380596] pc : tegra234_cbb_isr+0x144/0x190
[ 4.380598] lr : tegra234_cbb_isr+0x11c/0x190
[ 4.380600] sp : ffff800008003b90
[ 4.380601] x29: ffff800008003b90 x28: ffffa82853aa2ec0 x27: 0000000000000001
[ 4.380604] x26: 00000000000000c0 x25: ffffa82853144ad0 x24: ffffa82853eed558
[ 4.380605] x23: ffffa8285348b008 x22: 00000000000000b3 x21: ffffa82853d7f730
[ 4.380608] x20: 0000000000000000 x19: ffffa82853d7f7f0 x18: ffffffffffffffff
[ 4.380609] x17: ffff57db7ce8d000 x16: ffff800008000000 x15: ffffa82853ea3bdf
[ 4.380611] x14: 0000000000000001 x13: 2a2a2a2a2a2a2a2a x12: 2a2a2a2a2a2a2a2a
[ 4.380613] x11: 2a2a2a2a2a2a2a2a x10: 2a2a2a2a2a2a2a2a x9 : 2a2a2a2a2a2a2a2a
[ 4.380615] x8 : 2a2a2a2a2a2a2a2a x7 : 2a2a2a2a2a2a2a2a x6 : 2a2a2a2a2a2a2a09
[ 4.380617] x5 : 000000000000000c x4 : 00000000fffff247 x3 : 0000000000000000
[ 4.380619] x2 : ffffa82851661db8 x1 : ffffa82853aa2ec0 x0 : 0000000000010101
[ 4.380621] Call trace:
[ 4.380622] tegra234_cbb_isr+0x144/0x190
[ 4.380625] __handle_irq_event_percpu+0x68/0x260
[ 4.380626] handle_irq_event+0x70/0x100
[ 4.380627] handle_fasteoi_irq+0xb0/0x1b0
[ 4.380630] handle_domain_irq+0x74/0xb0
[ 4.380631] gic_handle_irq+0x68/0x150
[ 4.380633] do_interrupt_handler+0x44/0x80
[ 4.380635] el1_interrupt+0x30/0x80
[ 4.380637] el1h_64_irq_handler+0x18/0x30
[ 4.380639] el1h_64_irq+0x7c/0x80
[ 4.380641] __do_softirq+0xb4/0x3b0
[ 4.380642] irq_exit+0xc8/0xf0
[ 4.380645] handle_domain_irq+0x78/0xb0
[ 4.380647] gic_handle_irq+0x68/0x150
[ 4.380648] call_on_irq_stack+0x20/0x50
[ 4.380650] do_interrupt_handler+0x70/0x80
[ 4.380652] el1_interrupt+0x30/0x80
[ 4.380654] el1h_64_irq_handler+0x18/0x30
[ 4.380657] el1h_64_irq+0x7c/0x80
[ 4.380658] cpuidle_enter_state+0xbc/0x3f0
[ 4.380660] cpuidle_enter+0x44/0x60
[ 4.380661] do_idle+0x220/0x2b0
[ 4.380663] cpu_startup_entry+0x34/0x70
[ 4.380665] rest_init+0xf0/0x100
[ 4.380667] arch_call_rest_init+0x1c/0x28
[ 4.380669] start_kernel+0x6d0/0x710
[ 4.380671] __primary_switched+0xbc/0xc4
[ 4.380672] —[ end trace 22ad26c373044f30 ]—
[ 4.380743] tegra194-pcie 14140000.pcie: Versions don’t match (3536322a != ffffffff)
[ 4.380756] tegra194-pcie 14140000.pcie: iATU unroll: enabled
[ 4.380758] tegra194-pcie 14140000.pcie: Detected iATU regions: 0 outbound, 0 inbound
[ 4.380795] tegra194-pcie 14140000.pcie: Resources exceed number of ATU entries (0)
[ 4.380804] tegra194-pcie 14140000.pcie: Link up
[ 4.380847] tegra194-pcie 14140000.pcie: PCI host bridge to bus 0003:00
[ 4.380850] pci_bus 0003:00: root bus resource [io 0x100000-0x1fffff] (bus address [0x34100000-0x341fffff])
[ 4.380853] pci_bus 0003:00: root bus resource [mem 0x2128000000-0x212fffffff] (bus address [0x40000000-0x47ffffff])
[ 4.380855] pci_bus 0003:00: root bus resource [bus 00-ff]
[ 4.380857] pci_bus 0003:00: root bus resource [mem 0x2100000000-0x2127ffffff pref]
[ 4.383476] tegra194-pcie 14160000.pcie: Adding to iommu group 5
[ 4.682133] CPU:0, Error: cbb-fabric@0x13a00000, irq=179
[ 4.682135] **************************************
[ 4.682135] CPU:0, Error:cbb-fabric, Errmon:2
[ 4.682140] Error Code : TIMEOUT_ERR
[ 4.682141] Overflow : Multiple TIMEOUT_ERR
[ 4.682149] Error Code : TIMEOUT_ERR
[ 4.682149] MASTER_ID : CCPLEX
[ 4.682150] Address : 0x340808f8
[ 4.682150] Cache : 0x0 – Device Non-Bufferable
[ 4.682151] Protection : 0x2 – Unprivileged, Non-Secure, Data Access
[ 4.682152] Access_Type : Read
[ 4.682153] Access_ID : 0x10
[ 4.682153] Fabric : cbb-fabric
[ 4.682154] Slave_Id : 0x9
[ 4.682155] Burst_length : 0x0
[ 4.682155] Burst_type : 0x1
[ 4.682156] Beat_size : 0x2
[ 4.682156] VQC : 0x0
[ 4.682157] GRPSEC : 0x7e
[ 4.682158] FALCONSEC : 0x0
[ 4.682160] PCIE_C3_SLV_TIMEOUT_STATUS : 0x1
然后:
▒▒ERROR: Exception reason=0 syndrome=0xbe000011
ERROR: **************************************
ERROR: RAS Uncorrectable Error in IOB, base=0xe010000:
ERROR: Status = 0xec000612
ERROR: SERR = Error response from slave: 0x12
ERROR: IERR = CBB Interface Error: 0x6
ERROR: Overflow (there may be more errors) - Uncorrectable
ERROR: MISC0 = 0xc4460040
ERROR: MISC1 = 0x27cc8e0000000000
ERROR: MISC2 = 0x0
ERROR: MISC3 = 0x0
ERROR: ADDR = 0x8000000003e300c0
ERROR: **************************************
ERROR: sdei_dispatch_event returned -1
ERROR: **************************************
ERROR: RAS Uncorrectable Error in ACI, base=0xe01b000:
ERROR: Status = 0xe8000904
ERROR: SERR = Assertion failure: 0x4
ERROR: IERR = FillWrite Error: 0x9
ERROR: Overflow (there may be more errors) - Uncorrectable
ERROR: ADDR = 0x8000000003e300c0
ERROR: **************************************
ERROR: sdei_dispatch_event returned -1
ERROR: Powering off core