This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TDA4VM: Questions about using PCIe on tda4

Part Number: TDA4VM

Tool/software: Code Composer Studio

Hi,

  I'm using TDA4 custom board.But when the kernel starts, it is found that the kernel does not print the message related to the PCIe

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
[    0.000000] Linux version 5.4.74-g9574bba32a (root@CSP-test2) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile0
[    0.000000] Machine model: Texas Instruments K3 J721E SoC
[    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
[    0.000000] printk: bootconsole [ns16550a0] enabled
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node r5f-dma-memory@a0000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB
[    0.000000] OF: reserved mem: initialized node r5f-memory@a0100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-dma-memory@a1000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 31 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-memory@a1100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a3000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node r5f-dma-memory@a3000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a3100000, size 31 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-memory@a3100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a5000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-dma-memory@a5000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a5100000, size 7 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-memory@a5100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a5800000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-dma-memory@a5800000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a5900000, size 7 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-memory@a5900000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a6000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node c66-dma-memory@a6000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a6100000, size 15 MiB
[    0.000000] OF: reserved mem: initialized node c66-memory@a6100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a7000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node c66-dma-memory@a7000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a7100000, size 15 MiB
[    0.000000] OF: reserved mem: initialized node c66-memory@a7100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a8000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node c71-dma-memory@a8000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000a8100000, size 15 MiB
[    0.000000] OF: reserved mem: initialized node c71-memory@a8100000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000ac000000, size 32 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-dma-memory@ac000000, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: initialized node vision_apps_shared-memories, compatible id dma-heap-carveout
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000ce000000, size 720 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-core-heap-memory@ce000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000fb000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-dma-memory@fb000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000fb100000, size 15 MiB
[    0.000000] OF: reserved mem: initialized node vision_apps-r5f-memory@fb100000, compatible id shared-dma-pool
[    0.000000] cma: Failed to reserve 512 MiB
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 2 pages/cpu s48408 r8192 d74472 u131072
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: EL2 vector hardening
[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 35779
[    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=47040000.spi.0:512k(ot
[    0.000000] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x9a800000-0x9e800000] (64MB)
[    0.000000] Memory: 2584000K/2293760K available (9598K kernel code, 788K rwdata, 3840K rodata, 1664K init, 683K bss, 18446)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=2.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 960 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: no VLPI support, no direct LPI support
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001900000
[    0.000000] ITS [mem 0x01820000-0x0182ffff]
[    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
[    0.000000] ITS@0x0000000001820000: allocated 1048576 Devices @8c0800000 (flat, esz 8, psz 64K, shr 0)
[    0.000000] ITS: using cache flushing for cmd queue
[    0.000000] GICv3: using LPI property table @0x00000008c00c0000
[    0.000000] GIC: using cache flushing for LPI property table
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000008c00d0000
[    0.000000] random: get_random_bytes called from start_kernel+0x2b8/0x43c with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[    0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[    0.008374] Console: colour dummy device 80x25
[    0.012939] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[    0.023607] pid_max: default: 32768 minimum: 301
[    0.028360] LSM: Security Framework initializing
[    0.033114] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[    0.040685] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[    0.049939] ASID allocator initialised with 32768 entries
[    0.055532] rcu: Hierarchical SRCU implementation.
[    0.060603] Platform MSI: gic-its@1820000 domain created
[    0.066279] PCI/MSI: /bus@100000/interrupt-controller@1800000/gic-its@1820000 domain created
[    0.075135] smp: Bringing up secondary CPUs ...
[    0.081233] Detected PIPT I-cache on CPU1
[    0.081257] GICv3: CPU1: found redistributor 1 region 0:0x0000000001920000
[    0.081268] GICv3: CPU1: using allocated LPI pending table @0x00000008c00e0000
[    0.081296] CPU1: Booted secondary processor 0x0000000001 [0x411fd080]
[    0.081361] smp: Brought up 1 node, 2 CPUs
[    0.110708] SMP: Total of 2 processors activated.
[    0.115512] CPU features: detected: 32-bit EL0 Support
[    0.120765] CPU features: detected: CRC32 instructions
[    0.132650] CPU: All CPU(s) started at EL2
[    0.136844] alternatives: patching kernel code
[    0.142070] devtmpfs: initialized
[    0.150611] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.160581] futex hash table entries: 512 (order: -1, 32768 bytes, linear)
[    0.168016] pinctrl core: initialized pinctrl subsystem
[    0.173884] NET: Registered protocol family 16
[    0.178644] DMA: preallocated 256 KiB pool for atomic allocations
[    0.185162] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.201033] HugeTLB registered 16.0 GiB page size, pre-allocated 0 pages
[    0.207889] HugeTLB registered 512 MiB page size, pre-allocated 0 pages
[    0.214650] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.222847] cryptd: max_cpu_qlen set to 1000
[    0.229413] vsys_3v3: supplied by evm_12v0
[    0.233709] vsys_5v0: supplied by evm_12v0
[    0.238330] iommu: Default domain type: Translated
[    0.243502] SCSI subsystem initialized
[    0.247617] mc: Linux media interface: v0.10
[    0.251987] videodev: Linux video capture interface: v2.00
[    0.257598] pps_core: LinuxPPS API ver. 1 registered
[    0.262667] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.272003] PTP clock support registered
[    0.276013] EDAC MC: Ver: 3.0.0
[    0.279753] FPGA manager framework
[    0.283260] Advanced Linux Sound Architecture Driver Initialized.
[    0.289930] clocksource: Switched to clocksource arch_sys_counter
[    0.296252] VFS: Disk quotas dquot_6.6.0
[    0.300302] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[    0.309981] Carveout Heap: Exported 512 MiB at 0x00000000ae000000
[    0.316211] thermal_sys: Registered thermal governor 'step_wise'
[    0.316213] thermal_sys: Registered thermal governor 'power_allocator'
[    0.322669] NET: Registered protocol family 2
[    0.334078] tcp_listen_portaddr_hash hash table entries: 4096 (order: 0, 65536 bytes, linear)
[    0.342841] TCP established hash table entries: 32768 (order: 2, 262144 bytes, linear)
[    0.351038] TCP bind hash table entries: 32768 (order: 3, 524288 bytes, linear)
[    0.358868] TCP: Hash tables configured (established 32768 bind 32768)
[    0.365613] UDP hash table entries: 2048 (order: 0, 65536 bytes, linear)
[    0.372505] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes, linear)
[    0.379910] NET: Registered protocol family 1
[    0.384694] RPC: Registered named UNIX socket transport module.
[    0.390746] RPC: Registered udp transport module.
[    0.395549] RPC: Registered tcp transport module.
[    0.400351] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.406935] PCI: CLS 0 bytes, default 64
[    0.411310] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    0.421493] Initialise system trusted keyrings
[    0.426122] workingset: timestamp_bits=46 max_order=16 bucket_order=0
[    0.434868] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.441093] NFS: Registering the id_resolver key type
[    0.446266] Key type id_resolver registered
[    0.450537] Key type id_legacy registered
[    0.454632] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.461601] 9p: Installing v9fs 9p2000 file system support
[    0.474072] Key type asymmetric registered
[    0.478260] Asymmetric key parser 'x509' registered
[    0.483265] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    0.490823] io scheduler mq-deadline registered
[    0.495449] io scheduler kyber registered
[    0.500739] pinctrl-single 4301c000.pinmux: 94 pins, size 376
[    0.506834] pinctrl-single 11c000.pinmux: 173 pins, size 692
[    0.515061] k3-ringacc 2b800000.ringacc: Failed to get MSI domain
[    0.521336] k3-ringacc 3c000000.ringacc: Failed to get MSI domain
[    0.527682] ti-pat 31010000.pat: Found PAT Rev 1.0 with 16384 pages
[    0.534095] debugfs: Directory '31010000.pat' with parent 'regmap' already present!
[    0.542092] ti-pat 31011000.pat: Found PAT Rev 1.0 with 16384 pages
[    0.548508] debugfs: Directory '31011000.pat' with parent 'regmap' already present!
[    0.556441] ti-pat 31012000.pat: Found PAT Rev 1.0 with 16384 pages
[    0.562853] debugfs: Directory '31012000.pat' with parent 'regmap' already present!
[    0.570779] ti-pat 31013000.pat: Found PAT Rev 1.0 with 2048 pages
[    0.577104] debugfs: Directory '31013000.pat' with parent 'regmap' already present!
[    0.585026] ti-pat 31014000.pat: Found PAT Rev 1.0 with 2048 pages
[    0.591349] debugfs: Directory '31014000.pat' with parent 'regmap' already present!
[    0.600722] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[    0.612806] brd: module loaded
[    0.619252] loop: module loaded
[    0.622900] sysfs: cannot create duplicate filename '/devices/platform/dma_buf_phys'
[    0.630826] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.74-g9574bba32a #1
[    0.637936] Hardware name: Texas Instruments K3 J721E SoC (DT)
[    0.643890] Call trace:
[    0.646388]  dump_backtrace+0x0/0x140
[    0.650122]  show_stack+0x14/0x20
[    0.653504]  dump_stack+0xb4/0x114
[    0.656982]  sysfs_warn_dup+0x5c/0x78
[    0.660717]  sysfs_create_dir_ns+0xd8/0xf0
[    0.664899]  kobject_add_internal+0x94/0x280
[    0.669255]  kobject_add+0x90/0xf8
[    0.672728]  device_add+0xdc/0x600
[    0.676196]  platform_device_add+0xfc/0x228
[    0.680463]  platform_device_register_full+0xc8/0x140
[    0.685623]  dma_buf_phys_init+0x68/0x94
[    0.689624]  do_one_initcall+0x50/0x1a8
[    0.693537]  kernel_init_freeable+0x194/0x23c
[    0.697984]  kernel_init+0x10/0xfc
[    0.701451]  ret_from_fork+0x10/0x1c
[    0.705113] kobject_add_internal failed for dma_buf_phys with -EEXIST, don't try to register things with the same name in .
[    0.719261] libphy: Fixed MDIO Bus: probed
[    0.723673] tun: Universal TUN/TAP device driver, 1.6
[    0.729095] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[    0.737098] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    0.743162] sky2: driver version 1.30
[    0.747450] VFIO - User Level meta-driver version: 0.3
[    0.753095] i2c /dev entries driver
[    0.757161] sdhci: Secure Digital Host Controller Interface driver
[    0.763476] sdhci: Copyright(c) Pierre Ossman
[    0.768145] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.774393] ledtrig-cpu: registered to indicate activity on CPUs
[    0.781177] optee: probing for conduit method from DT.
[    0.786445] optee: revision 3.8 (199fca17)
[    0.786780] optee: initialized driver
[    0.795613] NET: Registered protocol family 17
[    0.800266] 9pnet: Installing 9P2000 support
[    0.804665] Key type dns_resolver registered
[    0.809194] registered taskstats version 1
[    0.813381] Loading compiled-in X.509 certificates
[    0.822082] k3-ringacc 2b800000.ringacc: Failed to get MSI domain
[    0.828397] k3-ringacc 3c000000.ringacc: Failed to get MSI domain
[    0.836718] ti-sci 44083000.dmsc: ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
[    0.983934] random: fast init done
[    1.178003] davinci-mcasp 2ba0000.mcasp: IRQ common not found
[    1.189170] omap_i2c 40b00000.i2c: bus 0 rev0.12 at 100 kHz
[    1.195685] omap_i2c 40b10000.i2c: bus 1 rev0.12 at 100 kHz
[    1.202278] omap_i2c 42120000.i2c: bus 2 rev0.12 at 100 kHz
[    1.208839] pca953x 3-0020: 3-0020 supply vcc not found, using dummy regulator
[    1.216259] pca953x 3-0020: using no AI
[    1.241954] pca953x 3-0020: failed writing register
[    1.246997] pca953x: probe of 3-0020 failed with error -121
[    1.252795] pca953x 3-0022: 3-0022 supply vcc not found, using dummy regulator
[    1.260196] pca953x 3-0022: using AI
[    1.263894] pca953x 3-0022: failed writing register
[    1.268902] pca953x: probe of 3-0022 failed with error -121
[    1.274629] omap_i2c 2000000.i2c: bus 3 rev0.12 at 400 kHz
[    1.281019] omap_i2c 2020000.i2c: bus 4 rev0.12 at 100 kHz
[    1.287402] pca953x 5-0020: 5-0020 supply vcc not found, using dummy regulator
[    1.294807] pca953x 5-0020: using no AI
[    1.321956] pca953x 5-0020: failed writing register
[    1.326978] pca953x: probe of 5-0020 failed with error -121
[    1.332769] omap_i2c 2030000.i2c: bus 5 rev0.12 at 400 kHz
[    1.339112] omap_i2c 2040000.i2c: bus 6 rev0.12 at 100 kHz
[    1.345423] omap_i2c 2050000.i2c: bus 7 rev0.12 at 100 kHz
[    1.352145] ti-sci-intr bus@100000:bus@28380000:interrupt-controller2: Interrupt Router 137 domain created
[    1.362640] ti-sci-intr bus@100000:interrupt-controller0: Interrupt Router 131 domain created
[    1.371880] ti-sci-intr bus@100000:navss@30000000:interrupt-controller1: Interrupt Router 213 domain created
[    1.383035] ti-sci-inta 33d00000.interrupt-controller: Interrupt Aggregator domain 209 created




[    1.430043] k3-ringacc 2b800000.ringacc: Ring Accelerator probed rings:286, gp-rings[96,20] sci-dev-id:235
[    1.439935] k3-ringacc 2b800000.ringacc: dma-ring-reset-quirk: disabled
[    1.446697] k3-ringacc 2b800000.ringacc: RA Proxy rev. 66346100, num_proxies:64
[    1.456210] k3-ringacc 3c000000.ringacc: Ring Accelerator probed rings:1024, gp-rings[440,150] sci-dev-id:211
[    1.466365] k3-ringacc 3c000000.ringacc: dma-ring-reset-quirk: disabled
[    1.473124] k3-ringacc 3c000000.ringacc: RA Proxy rev. 66346100, num_proxies:64


[    1.481491] 40a00000.serial: ttyS1 at MMIO 0x40a00000 (irq = 7, base_baud = 6000000) is a 8250
[    1.491123] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 22, base_baud = 3000000) is a 8250



[    1.499861] printk: console [ttyS2] enabled
[    1.499861] printk: console [ttyS2] enabled
[    1.508297] printk: bootconsole [ns16550a0] disabled
[    1.508297] printk: bootconsole [ns16550a0] disabled

After that, there was no response to input lspci in Linux.So we made a comparative observation on EVM board.

So I made a comparative observation on EVM board, and found that I can correctly observe the printing information related to PCI during kernel startup, and I can also observe the information of PCI by inputting lspci in Linux

[    3.070044] j721e-pcie 2900000.pcie: host bridge /bus@100000/pcie@2900000 ranges:
[    3.077756] j721e-pcie 2900000.pcie:    IO 0x10001000..0x10010fff -> 0x10001000
[    3.085245] j721e-pcie 2900000.pcie:   MEM 0x10011000..0x17ffffff -> 0x10011000
[    3.092800] j721e-pcie 2900000.pcie: PCI host bridge to bus 0000:00
[    3.099208] pci_bus 0000:00: root bus resource [bus 00-0f]
[    3.104812] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x10001000-0x10010fff])
[    3.114502] pci_bus 0000:00: root bus resource [mem 0x10011000-0x17ffffff]
[    3.121545] pci 0000:00:00.0: [104c:b00d] type 01 class 0x060400
[    3.127694] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    3.137564] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    3.147450] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0xe8 may corrupt adjacent RW1C bis
[    3.157409] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bis
[    3.167374] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x92 may corrupt adjacent RW1C bis
[    3.177337] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0xb2 may corrupt adjacent RW1C bis
[    3.187321] pci 0000:00:00.0: supports D1
[    3.191414] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    3.197286] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x84 may corrupt adjacent RW1C bis
[    3.209042] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.217233] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bis
[    3.227192] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bis
[    3.237150] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bis
[    3.248580] pci_bus 0000:01: busn_res: [bus 01-0f] end is updated to 01
[    3.255350] pci 0000:00:00.0: PCI bridge to [bus 01]
[    3.260631] pcieport 0000:00:00.0: PME: Signaling with IRQ 37
[    3.266672] pcieport 0000:00:00.0: AER: enabled with IRQ 37


[    4.274461] j721e-pcie 2910000.pcie: host bridge /bus@100000/pcie@2910000 ranges:
[    4.282142] j721e-pcie 2910000.pcie:    IO 0x18001000..0x18010fff -> 0x18001000
[    4.289619] j721e-pcie 2910000.pcie:   MEM 0x18011000..0x1fffffff -> 0x18011000
[    4.297160] j721e-pcie 2910000.pcie: PCI host bridge to bus 0001:00
[    4.303567] pci_bus 0001:00: root bus resource [bus 00-0f]
[    4.309172] pci_bus 0001:00: root bus resource [io  0x10000-0x1ffff] (bus address [0x18001000-0x18010fff])
[    4.319039] pci_bus 0001:00: root bus resource [mem 0x18011000-0x1fffffff]
[    4.326076] pci 0001:00:00.0: [104c:b00d] type 01 class 0x060400
[    4.332280] pci 0001:00:00.0: supports D1
[    4.336374] pci 0001:00:00.0: PME# supported from D0 D1 D3hot
[    4.343851] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.353489] pci_bus 0001:01: busn_res: [bus 01-0f] end is updated to 01
[    4.360256] pci 0001:00:00.0: PCI bridge to [bus 01]
[    4.365533] pcieport 0001:00:00.0: PME: Signaling with IRQ 40
[    4.371546] pcieport 0001:00:00.0: AER: enabled with IRQ 40


[    5.379451] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
[    5.387132] j721e-pcie 2920000.pcie:    IO 0x4400001000..0x4400010fff -> 0x00001000
[    5.394964] j721e-pcie 2920000.pcie:   MEM 0x4400011000..0x4407ffffff -> 0x00011000
[    5.402860] j721e-pcie 2920000.pcie: PCI host bridge to bus 0002:00
[    5.409266] pci_bus 0002:00: root bus resource [bus 00-0f]
[    5.414870] pci_bus 0002:00: root bus resource [io  0x20000-0x2ffff] (bus address [0x1000-0x10fff])
[    5.424116] pci_bus 0002:00: root bus resource [mem 0x4400011000-0x4407ffffff] (bus address [0x00011000-0)
[    5.434885] pci 0002:00:00.0: [104c:b00d] type 01 class 0x060400
[    5.441092] pci 0002:00:00.0: supports D1
[    5.445185] pci 0002:00:00.0: PME# supported from D0 D1 D3hot
[    5.452674] pci 0002:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    5.462319] pci_bus 0002:01: busn_res: [bus 01-0f] end is updated to 01
[    5.469087] pci 0002:00:00.0: PCI bridge to [bus 01]
[    5.474343] pcieport 0002:00:00.0: PME: Signaling with IRQ 43
[    5.480366] pcieport 0002:00:00.0: AER: enabled with IRQ 43

Because I found that when configuring RC or EP, there is GPIO related information in DTS file.

So I would like to ask, where do I need to make changes? Is it related to DTS file?

  • Hao, 

    The PERST# signal on the PCIe slots are controlled by the IO Expander on the EVM, which I assume you directly used a GPIO on you hardware. You can change the GPIO pin in the device tree file in:

     board-support/linux-5.4.40+gitAUTOINC+66cf445b76-g66cf445b76/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts

    where you would see something like:

    &pcie1_rc {
    reset-gpios = <&exp1 2 GPIO_ACTIVE_HIGH>;
    phys = <&serdes1_pcie_link>;
    phy-names = "pcie_phy";
    num-lanes = <2>;

    You may refer other sections on how GPIO is used copy to the "reset-gpios" line. I recall there is a inverter somewhere in the driver so you may stay as ACTIVE_HIGH, though the actual signal is active low on the PCIe slot. 

    You may also probe the signal on the PCIe slot, which should be held LOW during reset then HIGH when PCIe is active. Also may need to make sure pinmux is configured correctly as GPO with initial internal pull-down, as we don't EP to get out of reset till clock and power are stable. 

    Let us know if further clarifications are needed. 

    jian

  • We connected it to the pin AB25 of TDA4.

    We connect two custom board, one is RC, the other is EP.

    First on th EP, we execute the command with using shell script:

    mkdir /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 -p
    echo 0x104c > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/vendorid
    echo 0xb00d > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/deviceid
    echo 2 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/msi_interrupts
    echo 2 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/msix_interrupts
    ln -s /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 /sys/kernel/config/pci_ep/controllers/2900000.pcie-ep/
    
    mkdir /sys/kernel/config/pci_ep/functions/pci_epf_test/func2
    echo 0x104c > /sys/kernel/config/pci_ep/functions/pci_epf_test/func2/vendorid
    echo 0xb00d > /sys/kernel/config/pci_ep/functions/pci_epf_test/func2/deviceid
    echo 2 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func2/msi_interrupts
    echo 2 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func2/msix_interrupts
    ln -s /sys/kernel/config/pci_ep/functions/pci_epf_test/func2 /sys/kernel/config/pci_ep/controllers/2900000.pcie-ep/
    
    
    mkdir /sys/kernel/config/pci_ep/functions/pci_epf_test/func3
    echo 0x104c > /sys/kernel/config/pci_ep/functions/pci_epf_test/func3/vendorid
    echo 0xb00d > /sys/kernel/config/pci_ep/functions/pci_epf_test/func3/deviceid
    echo 2 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func3/msi_interrupts
    echo 2 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func3/msix_interrupts
    ln -s /sys/kernel/config/pci_ep/functions/pci_epf_test/func3 /sys/kernel/config/pci_ep/controllers/2900000.pcie-ep/
    echo 1 > /sys/kernel/config/pci_ep/controllers/2900000.pcie-ep/start

    After that,we power on th RC.But after the kernel starts, it fails. Print as follows::

    [    1.969559] j721e-pcie 2900000.pcie: Link up
    [    1.973836] j721e-pcie 2900000.pcie: host bridge /bus@100000/pcie@2900000 ranges:
    [    1.981327] j721e-pcie 2900000.pcie:    IO 0x10001000..0x10010fff -> 0x10001000
    [    1.988627] j721e-pcie 2900000.pcie:   MEM 0x10011000..0x17ffffff -> 0x10011000
    [    1.996016] j721e-pcie 2900000.pcie: PCI host bridge to bus 0000:00
    [    2.002272] pci_bus 0000:00: root bus resource [bus 00-0f]
    [    2.007745] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x10001000-0x10010fff])
    [    2.017203] pci_bus 0000:00: root bus resource [mem 0x10011000-0x17ffffff]
    [    2.024078] pci 0000:00:00.0: [104c:b00d] type 01 class 0x060400
    [    2.030086] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
    [    2.039720] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
    [    2.049377] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0xe8 may corrupt adjacent RW1C bits
    [    2.059096] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
    [    2.059110] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x92 may corrupt adjacent RW1C bits
    [    2.074286] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0xb2 may corrupt adjacent RW1C bits
    [    2.089058] pci 0000:00:00.0: supports D1
    [    2.106378] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    [    2.116798] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x84 may corrupt adjacent RW1C bits
    [    2.131410] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
    [    2.145688] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
    [    2.160003] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
    [    2.174228] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
    
    
    [    2.191471] pci 0000:01:00.0: [104c:b00d] type 00 class 0xff0000
    [    2.208135] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000000ff]
    [    2.220047] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x000001ff]
    [    2.238527] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000003ff]
    [    2.251110] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x00003fff]
    [    2.263694] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x0001ffff]
    [    2.276278] pci 0000:01:00.0: reg 0x24: [mem 0x00000000-0x000fffff]
    [    2.289208] pci 0000:01:00.0: supports D1
    [    2.301521] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
    [    2.314181] pci 0000:01:00.0: reg 0x224: [mem 0x00000000-0x003fffff 64bit]
    [    2.326774] pci 0000:01:00.0: VF(n) BAR0 space: [mem 0x00000000-0x00ffffff 64bit] (contains BAR0 for 4 VFs)
    
    [    2.341795] pci 0000:01:00.1: [104c:b00d] type 00 class 0xff0000
    [    2.354173] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000000ff]
    [    2.368351] pci 0000:01:00.1: reg 0x14: [mem 0x00000000-0x000001ff]
    [    2.379979] pci 0000:01:00.1: reg 0x18: [mem 0x00000000-0x000003ff]
    [    2.392736] pci 0000:01:00.1: reg 0x1c: [mem 0x00000000-0x00003fff]
    [    2.408352] pci 0000:01:00.1: reg 0x20: [mem 0x00000000-0x0001ffff]
    [    2.421110] pci 0000:01:00.1: reg 0x24: [mem 0x00000000-0x000fffff]
    [    2.433474] pci 0000:01:00.1: supports D1
    [    2.531687] pci 0000:01:00.1: PME# supported from D0 D1 D3hot
    [    2.537482] pci 0000:01:00.1: reg 0x224: [mem 0x00000000-0x003fffff 64bit]
    [    2.544341] pci 0000:01:00.1: VF(n) BAR0 space: [mem 0x00000000-0x00ffffff 64bit] (contains BAR0 for 4 VFs)
    
    [    2.554320] pci 0000:01:00.2: [104c:b00d] type 00 class 0xff0000
    [    2.560373] pci 0000:01:00.2: reg 0x10: [mem 0x00000000-0x000000ff]
    [    2.566636] pci 0000:01:00.2: reg 0x14: [mem 0x00000000-0x000001ff]
    [    2.572897] pci 0000:01:00.2: reg 0x18: [mem 0x00000000-0x000003ff]
    [    2.579158] pci 0000:01:00.2: reg 0x1c: [mem 0x00000000-0x00003fff]
    [    2.585420] pci 0000:01:00.2: reg 0x20: [mem 0x00000000-0x0001ffff]
    [    2.591683] pci 0000:01:00.2: reg 0x24: [mem 0x00000000-0x000fffff]
    [    2.598138] pci 0000:01:00.2: supports D1
    [    2.602136] pci 0000:01:00.2: PME# supported from D0 D1 D3hot
    [    2.607929] pci 0000:01:00.2: reg 0x224: [mem 0x00000000-0x003fffff 64bit]
    [    2.614787] pci 0000:01:00.2: VF(n) BAR0 space: [mem 0x00000000-0x00ffffff 64bit] (contains BAR0 for 4 VFs)
    
    ERROR:   Unhandled External Abort received on 0x80000000 from S-EL1
    ERROR:   exception reason=0 syndrome=0xbf000000
    Unhandled Exception from EL1
    x0             = 0xffff800012620000
    x1             = 0x0000000000000000
    x2             = 0x000000000080000a
    x3             = 0x0000000000000003
    x4             = 0xffff800017900000
    x5             = 0xffff80001050e698
    x6             = 0xffff8000117ef8f4
    x7             = 0x000000000000ea60
    x8             = 0x0000000080b5111d
    x9             = 0x00000000b00d104c
    x10            = 0x7f7f7f7f7f7f7f7f
    x11            = 0x0101010101010101
    x12            = 0xffff000844199227
    x13            = 0xffff00084419991c
    x14            = 0xffffffffffffffff
    x15            = 0xffff000840372f28
    x16            = 0xffff8000129b0000
    x17            = 0x0000000000000001
    x18            = 0x0000000000000000
    x19            = 0xffff8000117ef834
    x20            = 0x0000000000000004
    x21            = 0x0000000000000000
    x22            = 0x0000000000000004
    x23            = 0xffff8000117ef834
    x24            = 0x0000000000000003
    x25            = 0xffff8000110ee210
    x26            = 0x0000000000000001
    x27            = 0x0000000000000000
    x28            = 0xffff000842167800
    x29            = 0xffff8000117ef780
    x30            = 0xffff8000104dd7a8
    scr_el3        = 0x000000000000073d
    sctlr_el3      = 0x0000000030cd183f
    cptr_el3       = 0x0000000000000000
    tcr_el3        = 0x0000000080803520
    daif           = 0x00000000000002c0
    mair_el3       = 0x00000000004404ff
    spsr_el3       = 0x0000000020000085
    elr_el3        = 0xffff8000104dd7c0
    ttbr0_el3      = 0x0000000070010b00
    esr_el3        = 0x00000000bf000000
    far_el3        = 0x0000000000000000
    spsr_el1       = 0x0000000060000005
    elr_el1        = 0xffff800010115b44
    spsr_abt       = 0x0000000000000000
    spsr_und       = 0x0000000000000000
    spsr_irq       = 0x0000000000000000
    spsr_fiq       = 0x0000000000000000
    sctlr_el1      = 0x0000000034d4d91d
    actlr_el1      = 0x0000000000000000
    cpacr_el1      = 0x0000000000300000
    csselr_el1     = 0x0000000000000000
    sp_el1         = 0xffff8000117ef780
    esr_el1        = 0x0000000000000000
    ttbr0_el1      = 0x0000000083090000
    ttbr1_el1      = 0x0000000082df0000
    mair_el1       = 0x0000bbff440c0400
    amair_el1      = 0x0000000000000000
    tcr_el1        = 0x00000034f5507510
    tpidr_el1      = 0xffff80086ebe0000
    tpidr_el0      = 0x0000000000000000
    tpidrro_el0    = 0x0000000000000000
    par_el1        = 0x0000000000000000
    mpidr_el1      = 0x0000000080000000
    afsr0_el1      = 0x0000000000000000
    afsr1_el1      = 0x0000000000000000
    contextidr_el1 = 0x0000000000000000
    vbar_el1       = 0xffff800010081800
    cntp_ctl_el0   = 0x0000000000000005
    cntp_cval_el0  = 0x0000000061960d78
    cntv_ctl_el0   = 0x0000000000000000
    cntv_cval_el0  = 0x0000000000000000
    cntkctl_el1    = 0x00000000000000e6
    sp_el0         = 0x000000007000a3d0
    isr_el1        = 0x0000000000000040
    dacr32_el2     = 0x0000000000000000
    ifsr32_el2     = 0x0000000000000000
    cpuectlr_el1   = 0x0000001b00000040
    cpumerrsr_el1  = 0x0000000000000000
    l2merrsr_el1   = 0x0000000000000000
    

    I sincerely want to ask for your advice.

  • Hao, 

    sorry for the delayed response. 

    could you confirm if the RC can boot without crash, if you don't execute the EP scripts?

    from where the kernel crashes, it appears to be that RC tried to configure EP's, and it run into incorrect address space. You mentioned this is a pair of customer hardware. if so, could you confirm:

    1. can the RC boot with a standard PCIe card, see an SSD or something known?

    2. what memory regions does EP expose to PCIe space?

    Regards

    Jian

  • could you confirm if the RC can boot without crash, if you don't execute the EP scripts?

    If I don't execute the EP scripts, the RC can boot without crash.

    can the RC boot with a standard PCIe card, see an SSD or something known?

    I am sorry that I do not have any standard PCIe card.

    My SSD connect the PCIE2 of the TDA4,but the RC can not see the SSD with the lspci command.

    The RC can only see the host bridge.

    what memory regions does EP expose to PCIe space?

    I haven't changed any code other than the reset-gpio you mentioned earlier and setting EP mode. So it should be the default using the sdk7.1 according to the example:

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/latest/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_End_Point.html

    But this instruction has the following differences after execution on EP

  • Hi

    Today we Buy a PCIE-to-RJ45(x1 plane) card, and install it to test on the RC board.

    I can see the card,so the RC works well.