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.

AM5726: IODelayCalibration fails, imprecise external abort, Unable to handle kernel paging request.

Part Number: AM5726
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I am trying to boot a custom board with an AM5726 SoC. 
I'm told the design of the board has influences from the IDK, however the PMIC is not directly connected to the AM5726, as it has other roles on this board, and is managed by a separate uC.
There are two 4Gb 1866MHz memory chips and one 1Gb ECC, we since realise with errata i922 that ECC won't be realised with the AM572x, so I have removed this from the EMIF configuration.

I am using upstream U-Boot (2023.10), and upstream Linux (6.1.46). 

What I think I have done correct so far:
* a complete sysconfig/pinmux config, and have generated using the scripts the padconf and iodelay content.
* a complete EMIF and correct EMIF configuration
* I think the DTS files are workable for both U-Boot and Linux, but they are not finished.
* console on uart3 is working
* booting to u-boot secondary boot loader and then to u-boot third boot loader from SD card. (SD Card is working)

But I only get so far if I disable the recalibrate_iodelay in board.c (i'll circle back to this later).

in uboot I can test the memory, most of it passes the test.

lmb_dump_all:
 memory.cnt = 0x1 / max = 0x10
 memory[0]	[0x80000000-0xbfffffff], 0x40000000 bytes flags: 0
 reserved.cnt = 0x2 / max = 0x10
 reserved[0]	[0xbcf29000-0xbfffffff], 0x030d7000 bytes flags: 0
 reserved[1]	[0xbdf29b98-0xbfffffff], 0x020d6468 bytes flags: 0

=> ddr test 0x80000000 0xbd000000
Please wait ...
ddr memory test PASSED!
=> ddr test 0x80000000 0xbe000000
Please wait ...

This last test hangs.


Booting the Linux kernel:

U-Boot SPL 2023.10 (Nov 22 2023 - 17:38:43 +0000)
DRA752-GP ES2.0
Trying to boot from MMC1
no pinctrl state for default mode
unable to get I2C bus. ret -19
tps65903x: could not set LDO1 voltage.


U-Boot 2023.10 (Nov 22 2023 - 17:38:43 +0000)

CPU  : DRA752-GP ES2.0
Model: 6887 0650 (SCOM)
Board: 6887 0650
DRAM:  1 GiB
Core:  45 devices, 17 uclasses, devicetree: embed
MMC:   OMAP SD/MMC: 0
Loading Environment from nowhere... OK
Net:   error: phy_id read failed
error: phy_id read failed
Could not get PHY for ethernet@48484000: addr 0
eth2: ethernet@48484000
Hit any key to stop autoboot:  0 
23605760 bytes read in 3979 ms (5.7 MiB/s)
201109 bytes read in 38 ms (5 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x1683200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
Working FDT set to 88000000
   Loading Device Tree to bceeb000, end bcf1f194 ... OK
Working FDT set to bceeb000
ft_fixup_clocks failed for DSP voltage domain: <valid offset/length>

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.46 (andy@pixel.me.com) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205, GNU ld (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 2.39.0.20221210) #11 SMP PREEMPT Wed Nov 15 17:28:58 GMT 2023
[    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: 6887 0650 (SCOM)
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: UEFI not found.
[    0.000000] Ignoring RAM at 0xb0000000-0xc0000000
[    0.000000] Consider using a HIGHMEM enabled kernel.
[    0.000000] cma: Reserved 24 MiB at 0xae400000
[    0.000000] OMAP4: Map 0xafe00000 to (ptrval) for dram barrier
[    0.000000] Hit pending asynchronous external abort (FSR=0x00001406) during first unmask, this is most likely caused by a firmware/bootloader bug.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000afdfffff]
[    0.000000] DRA752 ES2.0
[    0.000000] percpu: Embedded 11 pages/cpu s15124 r8192 d21740 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 194372
[    0.000000] Kernel command line: console=ttyS2,115200n8
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 721004K/784384K available (8192K kernel code, 607K rwdata, 2192K rodata, 18432K init, 222K bss, 38804K reserved, 24576K cma-reserved)
[    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 event tracing is enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] OMAP clocksource: 32k_counter at 32768 Hz
[    0.000000] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[    0.000000] sched_clock: 32 bits at 33kHz, resolution 30517ns, wraps every 65535999984741ns
[    0.001342] TI gptimer clockevent: always-on 32786 Hz at /ocp/interconnect@4ae00000/segment@10000/target-module@8000
[    0.002777] TI gptimer percpu-dmtimer: 20000000 Hz at /ocp/interconnect@48800000/segment@0/target-module@2c000
[    0.002929] TI gptimer percpu-dmtimer: 20000000 Hz at /ocp/interconnect@48800000/segment@0/target-module@2e000
[    0.003723] Console: colour dummy device 80x30
[    0.003753] Calibrating delay loop... 1993.93 BogoMIPS (lpj=9969664)
[    0.061981] CPU: Testing write buffer coherency: ok
[    0.062011] CPU0: Spectre v2: using ICIALLU workaround
[    0.062011] CPU0: Spectre BHB: enabling loop workaround for all CPUs
[    0.062042] pid_max: default: 32768 minimum: 301
[    0.062164] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.062164] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.062988] /cpus/cpu@0 missing clock-frequency property
[    0.062988] /cpus/cpu@1 missing clock-frequency property
[    0.063018] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.063690] Setting up static identity map for 0x80100000 - 0x80100060
[    0.063781] rcu: Hierarchical SRCU implementation.
[    0.063781] rcu: 	Max phase no-delay instances is 1000.
[    0.063995] EFI services will not be available.
[    0.064544] smp: Bringing up secondary CPUs ...
[    0.124755] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.124786] CPU1: Spectre v2: using ICIALLU workaround
[    0.124877] smp: Brought up 1 node, 2 CPUs
[    0.124877] SMP: Total of 2 processors activated (3994.41 BogoMIPS).
[    0.124877] CPU: All CPU(s) started in HYP mode.
[    0.124877] CPU: Virtualization extensions available.
[    0.125305] devtmpfs: initialized
[    0.149414] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.149566] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.149597] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.150115] pinctrl core: initialized pinctrl subsystem
[    0.150329] DMI not present or invalid.
[    0.150665] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.151702] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.152465] thermal_sys: Registered thermal governor 'step_wise'
[    0.182586] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.182586] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.192077] clocksource: Switched to clocksource 32k_counter
[    0.199676] NET: Registered PF_INET protocol family
[    0.199890] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.200988] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.201019] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.201019] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.201080] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.201599] TCP: Hash tables configured (established 8192 bind 8192)
[    0.201690] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.201721] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.201843] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.202270] RPC: Registered named UNIX socket transport module.
[    0.202270] RPC: Registered udp transport module.
[    0.202270] RPC: Registered tcp transport module.
[    0.202270] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.202270] PCI: CLS 0 bytes, default 64
[    0.202697] armv7-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    0.212158] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[    0.212829] Initialise system trusted keyrings
[    0.213012] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.217193] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.217773] NFS: Registering the id_resolver key type
[    0.217834] Key type id_resolver registered
[    0.217834] Key type id_legacy registered
[    0.217895] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.217895] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.217926] ntfs: driver 2.1.32 [Flags: R/O].
[    0.218383] Key type asymmetric registered
[    0.218383] Asymmetric key parser 'x509' registered
[    0.218475] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.218505] io scheduler mq-deadline registered
[    0.218505] io scheduler kyber registered
[    0.267089] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[    0.276245] brd: module loaded
[    0.280883] loop: module loaded
[    0.282531] sdhci: Secure Digital Host Controller Interface driver
[    0.282531] sdhci: Copyright(c) Pierre Ossman
[    0.282806] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.283355] ledtrig-cpu: registered to indicate activity on CPUs
[    0.283935] NET: Registered PF_PACKET protocol family
[    0.284027] Key type dns_resolver registered
[    0.284057] Registering SWP/SWPB emulation handler
[    0.284057] omap_voltage_late_init: Voltage driver support not added
[    0.284088] Power Management for TI OMAP4+ devices.
[    0.284667] Loading compiled-in X.509 certificates
[    0.341949] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
[    0.355621] gpio gpiochip0: (gpio-0-31): not an immutable chip, please consider fixing it!
[    0.355865] OMAP GPIO hardware version 0.1
[    0.357818] ti-sysc: probe of 4ae18000.target-module failed with error -16
[    0.363159] printk: console [ttyS2] disabled
[    0.363311] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 100, base_baud = 3000000) is a 8250
[    1.130645] printk: console [ttyS2] enabled
[    1.139892] gpio gpiochip1: (gpio-32-63): not an immutable chip, please consider fixing it!
[    1.149658] gpio gpiochip2: (gpio-64-95): not an immutable chip, please consider fixing it!
[    1.159393] gpio gpiochip3: (gpio-96-127): not an immutable chip, please consider fixing it!
[    1.169189] gpio gpiochip4: (gpio-128-159): not an immutable chip, please consider fixing it!
[    1.179107] gpio gpiochip5: (gpio-160-191): not an immutable chip, please consider fixing it!
[    1.189086] gpio gpiochip6: (gpio-192-223): not an immutable chip, please consider fixing it!
[    1.199066] gpio gpiochip7: (gpio-224-255): not an immutable chip, please consider fixing it!
[    1.216461] omap_rng 48090000.rng: Random Number Generator ver. 20
[    1.223297] random: crng init done
[    1.245880] ti-sysc: probe of 4882c000.target-module failed with error -16
[    1.253265] ti-sysc: probe of 4882e000.target-module failed with error -16
[    1.262664] rtc-clkctrl:0024:0: failed to enable
[    1.267333] ti-sysc: probe of 48838074.target-module failed with error -16
[    1.286895] edma 43300000.dma: memcpy is disabled
[    1.294403] edma 43300000.dma: TI EDMA DMA engine driver
[    1.309173] gpu-clkctrl:0000:0: failed to enable
[    1.313842] ti-sysc: probe of 5600fe00.target-module failed with error -16
[    1.321655] 8<--- cut here ---
[    1.321685] 8<--- cut here ---
[    1.324737] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[    1.327819] Unable to handle kernel paging request at virtual address f880350c
[    1.334869] [00000000] *pgd=00000000
[    1.342132] [f880350c] *pgd=00000000
[    1.342132] 
[    1.342132] 
[    1.345733] Internal error: : 1406 [#1] PREEMPT SMP ARM
[    1.357543] Modules linked in:
[    1.360626] CPU: 1 PID: 32 Comm: kworker/u4:1 Not tainted 6.1.46 #11
[    1.367004] Hardware name: Generic DRA74X (Flattened Device Tree)
[    1.373138] Workqueue: events_unbound deferred_probe_work_func
[    1.378997] PC is at sysc_probe+0xdd4/0x149c
[    1.383300] LR is at 0x59000000
[    1.386474] pc : [<c04f95d0>]    lr : [<59000000>]    psr: 80000013
[    1.392761] sp : f0091c48  ip : 00000000  fp : c092c8ac
[    1.398010] r10: 00000001  r9 : 00000000  r8 : c011eef0
[    1.403259] r7 : c092cc6c  r6 : c2f81810  r5 : c1ec7ddc  r4 : c2fb4b40
[    1.409820] r3 : 00000000  r2 : 00000020  r1 : 4ae3c000  r0 : 00000000
[    1.416381] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    1.423553] Control: 10c5387d  Table: 8000406a  DAC: 00000051
[    1.429321] Register r0 information: NULL pointer
[    1.434082] Register r1 information: non-paged memory
[    1.439147] Register r2 information: non-paged memory
[    1.444213] Register r3 information: NULL pointer
[    1.448944] Register r4 information: slab kmalloc-256 start c2fb4b00 pointer offset 64 size 256
[    1.457733] Register r5 information: non-slab/vmalloc memory
[    1.463409] Register r6 information: slab kmalloc-1k start c2f81800 pointer offset 16 size 1024
[    1.472198] Register r7 information: non-slab/vmalloc memory
[    1.477874] Register r8 information: non-slab/vmalloc memory
[    1.483581] Register r9 information: NULL pointer
[    1.488311] Register r10 information: non-paged memory
[    1.493469] Register r11 information: non-slab/vmalloc memory
[    1.499237] Register r12 information: NULL pointer
[    1.504058] Process kworker/u4:1 (pid: 32, stack limit = 0x(ptrval))
[    1.510467] Stack: (0xf0091c48 to 0xf0092000)
[    1.514831] 1c40:                   00000001 00000000 c1e0bda0 c1ec7ddc c1ec7ddc c0a69ae4
[    1.523040] 1c60: c0a9c364 c2f81810 00000001 00000001 00000000 d423d531 00000000 00000000
[    1.531280] 1c80: c2f81810 c1e8166c 00000000 efddfd3c 00000000 c1e89fcc 00000000 c05aaaac
[    1.539489] 1ca0: c2f81810 00000000 c1e8166c c05a8678 c2f81810 c1e8166c c2f81810 000000a1
[    1.547698] 1cc0: efddfd3c c05a8924 60000013 00000000 c1eca2d8 c1e8166c c2f81810 000000a1
[    1.555938] 1ce0: efddfd3c c05a8a68 00000001 c1e8166c f0091d3c c2f81810 efddfd3c c05a9058
[    1.564147] 1d00: 00000000 f0091d3c c05a8fc4 c20bd010 efddfd3c c05a68b8 00000000 c206566c
[    1.572357] 1d20: c297a0b8 d423d531 c2f81810 00000001 c2f81854 c05a8d14 efddfd48 c2f81810
[    1.580596] 1d40: 00000001 d423d531 c2f81810 c2f81810 c1e8a548 c05a794c c2f81810 00000000
[    1.588806] 1d60: c1eca2a8 c05a4b00 00000000 00000000 00000000 00000000 00000000 d423d531
[    1.597015] 1d80: c2f81800 c1e0bda0 efddfd94 efddfd30 00000000 00000001 c1e0bda0 c0692934
[    1.605255] 1da0: efddfd30 c1e0bd04 00000000 00000000 c20bd010 c0692bf0 00000000 00000000
[    1.613464] 1dc0: c239fc48 00000001 00000000 59000020 59000023 ff90c4e4 00000200 00000000
[    1.621673] 1de0: 00000000 00000000 00000000 d423d531 00000000 efddfd30 efd875c8 00000000
[    1.629913] 1e00: c1e0bd04 c20bd010 00000001 c200800d c21ab900 c0692da8 00000001 00000000
[    1.638122] 1e20: 00000080 c20bd010 efd875c8 c1e0bd04 00000000 00000000 00000080 c04f6588
[    1.646331] 1e40: 00000000 c20bd010 c1e81588 c05aaaac c20bd010 00000000 c1e81588 c05a8678
[    1.654571] 1e60: c20bd010 c1e81588 c20bd010 00000001 00000000 c05a8924 60000013 00000080
[    1.662780] 1e80: c1eca2d8 c1e81588 c20bd010 00000001 00000000 c05a8a68 00000001 c1e81588
[    1.670989] 1ea0: f0091eec c20bd010 00000000 c05a9058 00000000 f0091eec c05a8fc4 00000000
[    1.679199] 1ec0: 00000000 c05a68b8 00000080 c206566c c216dfb8 d423d531 c20bd010 00000001
[    1.687438] 1ee0: c20bd054 c05a8d14 00000000 c20bd010 00000001 d423d531 c20bd010 c20bd010
[    1.695648] 1f00: c1e8a548 c05a794c c20bd010 c1e8a2b0 c1e8a2c4 c05a7d90 c1e8a2e8 c20cb600
[    1.703857] 1f20: c2006200 c2008000 00000000 c013be84 c1e03d40 efd78540 c2006200 c20cb600
[    1.712097] 1f40: c2006200 c20cb618 c200621c c1e03d40 c21ab900 00000088 c2006200 c013c28c
[    1.720306] 1f60: f002deb8 c1e03d40 f0091f7c c21ab900 c20ce4c0 c013c084 c20cb600 c23e9880
[    1.728515] 1f80: f002deb8 00000000 00000000 c01438a0 c20ce4c0 c01437b0 00000000 00000000
[    1.736755] 1fa0: 00000000 00000000 00000000 c0100148 00000000 00000000 00000000 00000000
[    1.744964] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.753173] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    1.761413]  sysc_probe from platform_probe+0x5c/0xb0
[    1.766510]  platform_probe from really_probe+0xc8/0x2ec
[    1.771850]  really_probe from __driver_probe_device+0x88/0x19c
[    1.777832]  __driver_probe_device from driver_probe_device+0x30/0x104
[    1.784393]  driver_probe_device from __device_attach_driver+0x94/0x108
[    1.791046]  __device_attach_driver from bus_for_each_drv+0x88/0xd4
[    1.797363]  bus_for_each_drv from __device_attach+0xa8/0x1bc
[    1.803161]  __device_attach from bus_probe_device+0x84/0x8c
[    1.808868]  bus_probe_device from device_add+0x394/0x7bc
[    1.814300]  device_add from of_platform_device_create_pdata+0x94/0xc0
[    1.820861]  of_platform_device_create_pdata from of_platform_bus_create+0x1b0/0x230
[    1.828674]  of_platform_bus_create from of_platform_populate+0x60/0xb8
[    1.835327]  of_platform_populate from simple_pm_bus_probe+0x90/0x94
[    1.841705]  simple_pm_bus_probe from platform_probe+0x5c/0xb0
[    1.847595]  platform_probe from really_probe+0xc8/0x2ec
[    1.852935]  really_probe from __driver_probe_device+0x88/0x19c
[    1.858917]  __driver_probe_device from driver_probe_device+0x30/0x104
[    1.865478]  driver_probe_device from __device_attach_driver+0x94/0x108
[    1.872131]  __device_attach_driver from bus_for_each_drv+0x88/0xd4
[    1.878448]  bus_for_each_drv from __device_attach+0xa8/0x1bc
[    1.884246]  __device_attach from bus_probe_device+0x84/0x8c
[    1.889953]  bus_probe_device from deferred_probe_work_func+0x78/0xa4
[    1.896423]  deferred_probe_work_func from process_one_work+0x1c4/0x3c4
[    1.903076]  process_one_work from worker_thread+0x208/0x504
[    1.908782]  worker_thread from kthread+0xf0/0x120
[    1.913604]  kthread from ret_from_fork+0x14/0x2c
[    1.918334] Exception stack(0xf0091fb0 to 0xf0091ff8)
[    1.923431] 1fa0:                                     00000000 00000000 00000000 00000000
[    1.931640] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.939849] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.946502] Code: e0833002 e5933000 e584305c e3a00000 (e59b1004) 
[    1.952636] ---[ end trace 0000000000000000 ]---
[    1.952636] Internal error: Oops: 5 [#2] PREEMPT SMP ARM
[    1.952636] Modules linked in:
[    1.957275] note: kworker/u4:1[32] exited with irqs disabled
[    1.962615] 
[    1.972839] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D            6.1.46 #11
[    1.980377] Hardware name: Generic DRA74X (Flattened Device Tree)
[    1.986480] PC is at l3_interrupt_handler+0x64/0x37c
[    1.991485] LR is at 0xf880350c
[    1.994659] pc : [<c04f5e0c>]    lr : [<f880350c>]    psr: 20000193
[    2.000946] sp : c1e01de8  ip : 00000003  fp : 00000000
[    2.006195] r10: 00000060  r9 : c1e07100  r8 : 00000060
[    2.011444] r7 : f8000000  r6 : c2d94040  r5 : c1e811c0  r4 : c2d93440
[    2.018005] r3 : 00000000  r2 : c1e80f4c  r1 : c2d94044  r0 : 0000000c
[    2.024566] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    2.031829] Control: 10c5387d  Table: 8000406a  DAC: 00000051
[    2.037597] Register r0 information: non-paged memory
[    2.042663] Register r1 information: slab kmalloc-128 start c2d94000 pointer offset 68 size 128
[    2.051452] Register r2 information: non-slab/vmalloc memory
[    2.057128] Register r3 information: NULL pointer
[    2.061859] Register r4 information: slab kmalloc-64 start c2d93440 pointer offset 0 size 64
[    2.070373] Register r5 information: non-slab/vmalloc memory
[    2.076080] Register r6 information: slab kmalloc-128 start c2d94000 pointer offset 64 size 128
[    2.084838] Register r7 information: 0-page vmalloc region starting at 0xf8000000 allocated at iotable_init+0x0/0xec
[    2.095428] Register r8 information: non-paged memory
[    2.100524] Register r9 information: non-slab/vmalloc memory
[    2.106201] Register r10 information: non-paged memory
[    2.111358] Register r11 information: NULL pointer
[    2.116180] Register r12 information: non-paged memory
[    2.121368] Process swapper/0 (pid: 0, stack limit = 0x(ptrval))
[    2.127380] Stack: (0xc1e01de8 to 0xc1e02000)
[    2.131774] 1de0:                   c2812880 4c865ecf 00000000 00000005 00000000 c0c44a70
[    2.139984] 1e00: c1e01e8c c0154898 00000000 00000000 efd700a0 fdeacdfe 00000000 c2812880
[    2.148223] 1e20: efd6ff00 00000001 c2812880 efd6ff00 00000001 00000009 00000001 c01591e8
[    2.156433] 1e40: c2812880 efd6ff00 00000000 efd6fec0 00000009 c0159560 efd6fec0 00000000
[    2.164642] 1e60: c1e01e74 efd6f500 65ec8780 fdeacdfe 00000000 c2d93440 c2b48e6c 00000000
[    2.172882] 1e80: 00000060 c2b48e00 c1e07100 c0c44a70 00000000 c017d020 efd6e680 00000000
[    2.181091] 1ea0: c2b48e00 c2b48e6c c2b48e6c fa21200c c1e01ee8 c017d16c c2b48e00 c2b48e6c
[    2.189300] 1ec0: c1e09378 c0181a4c c1e05164 fa212000 c1dea190 fa21200c c1e01ee8 c017c8c4
[    2.197509] 1ee0: c1e05164 c04f4694 c1deab20 c1e01f10 00000000 c1e01f44 00000017 c0821fc8
[    2.205749] 1f00: c010764c a0000013 ffffffff c0100ba8 00000005 00000000 000016b1 c0119a78
[    2.213958] 1f20: 00000000 c1e04cd0 c1e07100 c1e04d30 00000017 00000000 c0c44a70 00000000
[    2.222167] 1f40: fa82c03c c1e01f60 c0119764 c010764c a0000013 ffffffff 00000051 c0107648
[    2.230407] 1f60: 00000000 c082a0d4 00000000 c0162fe0 000000eb 00000002 10c0387d efdffa00
[    2.238616] 1f80: 00000017 c0163344 c1e0df8c c0822414 c1e98068 c1e04c80 10c0387d c0c00a98
[    2.246826] 1fa0: c1e98068 c0c010cc ffffffff ffffffff 00000000 c0c006ec c1e07100 00000000
[    2.255065] 1fc0: 00000000 c0c44a70 fdecccd0 00000000 00000000 c0c00420 00000051 10c0387d
[    2.263275] 1fe0: 00000000 bceeb000 412fc0f2 10c5387d 00000000 00000000 00000000 00000000
[    2.271484]  l3_interrupt_handler from __handle_irq_event_percpu+0x44/0x118
[    2.278503]  __handle_irq_event_percpu from handle_irq_event+0x38/0x80
[    2.285095]  handle_irq_event from handle_fasteoi_irq+0x9c/0x1f4
[    2.291137]  handle_fasteoi_irq from generic_handle_domain_irq+0x28/0x38
[    2.297882]  generic_handle_domain_irq from gic_handle_irq+0x64/0x78
[    2.304290]  gic_handle_irq from generic_handle_arch_irq+0x34/0x44
[    2.310516]  generic_handle_arch_irq from __irq_svc+0x88/0xc8
[    2.316314] Exception stack(0xc1e01f10 to 0xc1e01f58)
[    2.321380] 1f00:                                     00000005 00000000 000016b1 c0119a78
[    2.329589] 1f20: 00000000 c1e04cd0 c1e07100 c1e04d30 00000017 00000000 c0c44a70 00000000
[    2.337799] 1f40: fa82c03c c1e01f60 c0119764 c010764c a0000013 ffffffff
[    2.344451]  __irq_svc from arch_cpu_idle+0x20/0x3c
[    2.349365]  arch_cpu_idle from default_idle_call+0x24/0x34
[    2.354980]  default_idle_call from do_idle+0xa4/0x11c
[    2.360168]  do_idle from cpu_startup_entry+0x18/0x1c
[    2.365234]  cpu_startup_entry from rest_init+0xc8/0xcc
[    2.370513]  rest_init from arch_post_acpi_subsys_init+0x0/0x8
[    2.376403] Code: e5b17004 e595e000 e080e00e e087e00e (e59e4000) 
[    2.382507] ---[ end trace 0000000000000000 ]---
[    2.387145] Kernel panic - not syncing: Fatal exception in interrupt
[    2.393554] CPU1: stopping
[    2.396270] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D            6.1.46 #11
[    2.403778] Hardware name: Generic DRA74X (Flattened Device Tree)
[    2.409912]  unwind_backtrace from show_stack+0x10/0x14
[    2.415161]  show_stack from dump_stack_lvl+0x40/0x4c
[    2.420257]  dump_stack_lvl from do_handle_IPI+0xec/0x114
[    2.425689]  do_handle_IPI from ipi_handler+0x18/0x20
[    2.430786]  ipi_handler from handle_percpu_devid_irq+0x78/0x134
[    2.436828]  handle_percpu_devid_irq from generic_handle_domain_irq+0x28/0x38
[    2.444030]  generic_handle_domain_irq from gic_handle_irq+0x64/0x78
[    2.450408]  gic_handle_irq from generic_handle_arch_irq+0x34/0x44
[    2.456634]  generic_handle_arch_irq from call_with_stack+0x18/0x20
[    2.462951]  call_with_stack from __irq_svc+0x98/0xc8
[    2.468048] Exception stack(0xf0041f68 to 0xf0041fb0)
[    2.473114] 1f60:                   00000005 00000000 00056d41 c0119a78 00000001 c1e04cd0
[    2.481323] 1f80: c2100000 c1e04d30 8000406a 412fc0f2 00000000 00000000 c1e03d80 f0041fb8
[    2.489562] 1fa0: c0119764 c010764c a0000113 ffffffff
[    2.494628]  __irq_svc from arch_cpu_idle+0x20/0x3c
[    2.499542]  arch_cpu_idle from default_idle_call+0x24/0x34
[    2.505157]  default_idle_call from do_idle+0xa4/0x11c
[    2.510314]  do_idle from cpu_startup_entry+0x18/0x1c
[    2.515411]  cpu_startup_entry from secondary_start_kernel+0x11c/0x120
[    2.521972]  secondary_start_kernel from 0x801015e0
[    2.526885] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---



I realise having read many posts here prior to posting this that using the PMIC is strongly encouraged, and there are of course lots of reasons to use one. But for this particular "solution", the board designer believes we can forgo dynamic use of a PMIC, and instead the PMIC can be statically configured to provide the neccessary outputs. But if there is something we have over looked, well that is why I make this deviation from IDK clear. 

It can be seen in the boot output, that I have not yet fully removed all PMIC code from the boot process either.
does this relate to why the board is not booting?

there are errors such as:
ti-sysc: probe of 4882c000.target-module failed with error -16
ti-sysc: probe of 4882e000.target-module failed with error -16
...
ti-sysc: probe of 48838074.target-module failed with error -16
...
ti-sysc: probe of 5600fe00.target-module failed with error -16

which correlates with a timer15, timer16, no-idea and a clock, possibly GPU related (for which AM5726 has none), but I think these wouldn't prevent the boot?

[    1.324737] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
[    1.327819] Unable to handle kernel paging request at virtual address f880350c

which happens whilst sysc_probe is taking place:

[    1.378997] PC is at sysc_probe+0xdd4/0x149c



IODelay.
The IODelay process appears to lock the boot up process. in CCS i see it is stuck in a nop loop. By process of elimination, I found that the first line of code that causes this failure is this: (dra7xx_iodelay.c)
static int calibrate_iodelay(u32 base)
{
  ...
  reg = readl(base + CFG_REG_2_OFFSET);
  ...
}

However, with IODelay calibration disabled, I can read that register manually in U-Boot:

md.l 0x4844A014
4844a014: 000021d2 ff00b893 ff032828 01080058  .!......((..X...
4844a024: 00ff00ff ff00ff00 00000001 00000043  ............C...
4844a034: 00000000 00000000 00000000 00000000  ................
4844a044: 00000000 00000000 00000000 00000000  ................
4844a054: 00000000 00000000 00000000 00000000  ................
4844a064: 00000000 00000000 00000000 00000000  ................
4844a074: 00000000 00000000 00000000 00000000  ................
4844a084: 00000000 00000000 00000000 00000000  ................
4844a094: 00000000 00000000 00000000 00000000  ................
4844a0a4: 0000000e 00000000 00000000 00000045  ............E...
4844a0b4: 00000000 00000000 00000000 00000000  ................
4844a0c4: 00000000 00000000 00000000 00000000  ................
4844a0d4: 00000000 000000aa 00000000 0000006c  ............l...
4844a0e4: 000000c8 00000000 0000006c 00000000  ........l.......
4844a0f4: 00000000 00000000 00000000 00000000  ................
4844a104: 0000000f 00000000 00000000 00000000  ................


Please, what do you think I have overlooked?

5822.6887_0650_LINUX.dts.txt

8535.6887_0650_UBOOT.dts.txt

8535.emif_config.h

/*
 * Copyright (C) 2023
 *
 * Author: Andrew Barnes
 *
 * Based on:
 * 	board/phytec/am57xx_phycore_kit/board.c
 * 	board/ti/dra7xx/evm.c
 */

#include <common.h>
#include <env.h>
#include <fastboot.h>
#include <fdt_support.h>
#include <init.h>
#include <malloc.h>
#include <serial.h>
#include <usb.h>
#include <errno.h>
#include <asm/global_data.h>
#include <asm/omap_common.h>
#include <asm/omap_sec_common.h>
#include <asm/emif.h>
#include <asm/gpio.h>
#include <asm/arch/gpio.h>
#include <asm/arch/clock.h>
#include <asm/arch/dra7xx_iodelay.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/sata.h>
#include <asm/arch/gpio.h>
#include <asm/arch/omap.h>
#include <linux/usb/gadget.h>
#include <dwc3-uboot.h>
#include <dwc3-omap-uboot.h>
#include <ti-usb-phy-uboot.h>
#include <mmc.h>
#include <dm/uclass.h>
#include <hang.h>

#include "emif_config.h"
#include "mux_data.h"

DECLARE_GLOBAL_DATA_PTR;

#define GPIO_DDR_VTT_EN		GPIO_TO_PIN(4, 8)

const struct omap_sysinfo sysinfo = {
	"Board: 6887 0650\n"
};

void emif_get_dmm_regs(const struct dmm_lisa_map_regs **dmm_lisa_regs)
{
	*dmm_lisa_regs = &AM572x_DDR3L_532MHz_6887_0650_dmm_regs;
}

void emif_get_reg_dump(u32 emif_nr, const struct emif_regs **regs)
{
	*regs = &AM572x_DDR3L_532MHz_6887_0650_emif_regs;
}

void emif_get_ext_phy_ctrl_const_regs(u32 emif_nr, const u32 **regs, u32 *size)
{
	*regs = AM572x_DDR3L_532MHz_6887_0650_emif1_ext_phy_regs;
	*size = ARRAY_SIZE(AM572x_DDR3L_532MHz_6887_0650_emif1_ext_phy_regs);
}

int get_voltrail_opp(int rail_offset)
{
	int opp;

	switch (rail_offset) {
	case VOLT_MPU:
		opp = DRA7_MPU_OPP;
		break;
	case VOLT_CORE:
		opp = DRA7_CORE_OPP;
		break;
	case VOLT_GPU:
		opp = DRA7_GPU_OPP;
		break;
	case VOLT_EVE:
		opp = DRA7_DSPEVE_OPP;
		break;
	case VOLT_IVA:
		opp = DRA7_IVA_OPP;
		break;
	default:
		opp = OPP_NOM;
	}

	return opp;
}

void hw_data_init(void)
{
	*prcm = &dra7xx_prcm;
	*dplls_data = &dra7xx_dplls;
	*ctrl = &dra7xx_ctrl;
}

int board_init(void)
{
	gpmc_init();
	gd->bd->bi_boot_params = (CFG_SYS_SDRAM_BASE + 0x100);

	return 0;
}

int last_stage_init(void)
{
	return 0;
}


#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
static int device_okay(const char *path)
{
	int node;

	node = fdt_path_offset(gd->fdt_blob, path);
	if (node < 0)
		return 0;

	return fdtdec_get_is_enabled(gd->fdt_blob, node);
}
#endif

int board_late_init(void)
{
	/*
	 * Default FIT boot on HS devices. Non FIT images are not allowed
	 * on HS devices.
	 */
	if (get_device_type() == HS_DEVICE)
		env_set("boot_fit", "1");

	omap_die_id_serial();
	omap_set_fastboot_vars();

#if CONFIG_IS_ENABLED(DM_USB) && CONFIG_IS_ENABLED(OF_CONTROL)
	if (device_okay("/ocp/omap_dwc3_1@48880000"))
		enable_usb_clocks(0);
	if (device_okay("/ocp/omap_dwc3_2@488c0000"))
		enable_usb_clocks(1);
#endif
	return 0;
}

void set_muxconf_regs(void)
{
	do_set_mux32((*ctrl)->control_padconf_core_base,
			early_padconf, ARRAY_SIZE(early_padconf));
}

#ifdef CONFIG_IODELAY_RECALIBRATION
void recalibrate_iodelay(void)
{
	const struct pad_conf_entry *pconf;
	const struct iodelay_cfg_entry *iod, *delta_iod;
	int pconf_sz, iod_sz, delta_iod_sz = 0;
	int ret = 0;

	pconf = core_padconf_array_6887_0650;
	pconf_sz = ARRAY_SIZE(core_padconf_array_6887_0650);
	iod = iodelay_cfg_array_6887_0650;
	iod_sz = ARRAY_SIZE(iodelay_cfg_array_6887_0650);

	/* Setup I/O isolation */
	// ret = __recalibrate_iodelay_start();
	// if (ret)
	// 	goto err;

// 	/* Do the muxing here */
	// do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);

// 	pconf = core_padconf_array_delta_x15_sr2_0;
// 	pconf_sz = ARRAY_SIZE(core_padconf_array_delta_x15_sr2_0);

// 	do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
	
// 	/* Setup IOdelay configuration */
// 	ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
// 	if (delta_iod_sz)
// 		ret = do_set_iodelay((*ctrl)->iodelay_config_base, delta_iod,
// 				     delta_iod_sz);

err:
	/* Closeup.. remove isolation */
	__recalibrate_iodelay_end(ret);
}
#endif

#if defined(CONFIG_MMC)
int board_mmc_init(struct bd_info *bis)
{
	/* init SD */
	omap_mmc_init(0, 0, 0, -1, -1);
	/* init eMMC */
	omap_mmc_init(1, 0, 0, -1, -1);

	return 0;
}

static const struct mmc_platform_fixups am57x_es1_1_mmc1_fixups = {
	.hw_rev = "rev11",
	.unsupported_caps = MMC_CAP(MMC_HS_200) |
			    MMC_CAP(UHS_SDR104),
	.max_freq = 96000000,
};

static const struct mmc_platform_fixups am57x_es1_1_mmc23_fixups = {
	.hw_rev = "rev11",
	.unsupported_caps = MMC_CAP(MMC_HS_200) |
			    MMC_CAP(UHS_SDR104) |
			    MMC_CAP(UHS_SDR50),
	.max_freq = 48000000,
};

const struct mmc_platform_fixups *platform_fixups_mmc(uint32_t addr)
{
	switch (omap_revision()) {
	case DRA752_ES1_0:
	case DRA752_ES1_1:
		if (addr == OMAP_HSMMC1_BASE)
			return &am57x_es1_1_mmc1_fixups;
		else
			return &am57x_es1_1_mmc23_fixups;
	default:
		return NULL;
	}
}
#endif

#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
int spl_start_uboot(void)
{
	/* break into full u-boot on 'c' */
	if (serial_tstc() && serial_getc() == 'c')
		return 1;

#ifdef CONFIG_SPL_ENV_SUPPORT
	env_init();
	env_load();
	if (env_get_yesno("boot_os") != 1)
		return 1;
#endif

	return 0;
}
#endif

#ifdef CONFIG_BOARD_EARLY_INIT_F
/* VTT regulator enable */
static inline void vtt_regulator_enable(void)
{
	if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL)
		return;

	gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en");
	gpio_direction_output(GPIO_DDR_VTT_EN, 1);
}

int board_early_init_f(void)
{
	vtt_regulator_enable();
	return 0;
}
#endif

#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{
	ft_cpu_setup(blob, bd);

	return 0;
}
#endif

#ifdef CONFIG_SPL_LOAD_FIT
int board_fit_config_name_match(const char *name)
{
	return 0;
}
#endif

#if IS_ENABLED(CONFIG_FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE)
int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
{
	if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER)
		return -ENOTSUPP;

	printf("Setting reboot to fastboot flag ...\n");
	env_set("dofastboot", "1");
	env_save();
	return 0;
}
#endif

#ifdef CONFIG_SUPPORT_EMMC_BOOT
static int board_bootmode_has_emmc(void)
{
	/* Check that boot mode is same as BBAI */
	if (gd->arch.omap_boot_mode != 2)
		return -EIO;

	return 0;
}
#endif

// void gpi2c_init(void)
// {
// }

2350.mux_data.h

2350.EMIF_RegisterConfig.xlsm

  • Hello,

    Due to holiday, a majority of our team is currently out of office. Please expect a delay in responses until the following week.

    Apologies for the delay and thank you for your patience.

    Best,

    Kelvin

  • Hi Kelvin,
    Thanks for the holding note. Anything I can do to promote this for a response? Anything I've not provided?
    kind regards

  • I have discovered another deviation from the reference designs, which is that we do not provide the SoC RTC with 32kHz crystal, nor do we provide an external RTC.
    This board will not be capable of keeping track of time via an RTC.

    mentioning here because i see that in another thread regarding imprecise external abort, that it might have been RTC related. 

  • Regarding the issues with IODelay Calibration:

    Can you confirm that the sysboot14 pin is tied to VSS?

    Also, can you confirm that all steps listed in TRM section "IO Delay Recalibration" are followed without any exceptions?

    If there are no exceptions to the sequence, can you try skipping the following step as a debug experiement: "4. Isolate the device IOs via the Isolation Sequence described in Section 18.4.6.1.7 Isolation Requirements".