Repository navigation
novatek: stay below 64 MiB; the rest of the vendor board set-up - #97
Conversation
U-Boot relocated to the top of the DDR. On the NT98566 that is past 64 MiB, so the MAC's descriptors and buffers went there too, and on an XM N8S board the Tx DMA never took the first descriptor: the link came up, then "eqos: Tx timed out" on every frame (#95). The vendor U-Boot never leaves /nvt_memory_cfg/uboot (0x3900000, 6.75 MiB): its ram_size is that region. Relocate to its top, as the vendor does; the DDR size, the osmem split and the lmb reservations are unchanged. On the NT98562 this also keeps U-Boot off core2entry2, just above. Verified under qemu-hisilicon, nt98562 and nt98566: relocaddr 0x3f6b000, a 3 MB tftpboot with matching crc32, ping, boot to login from an 8 MiB image with the nt9856x_lite kernel and rootfs, Linux's driver gets its lease. Not yet on silicon: whether this fixes #95 is for the reporter to confirm.
What the vendor U-Boot's nvt_ivot_hw_init_early() and nvt_ivot_hw_init() (nvt-na51089/na51089_hw_init.c) do, in board_init(), in their order: - the OTP controller's timing for the APB clock, and CG 0x70 bit 16 cleared; - the CPU clock the loader's device tree asks for (/cpus/cpu@0 clock-frequency, 960 MHz on the Xiongmai trees: PLL8 at ratio 0xA00000), and the APB clock if it names one, as nvt_cpu_freq and nvt_apb_freq do; their polls get a timeout; - the AXI bridge timeouts (0xF0012018, 0xF0013018); - the USB PHY set-up by chip revision, then its power-down. Its PHY reset on D_GPIO(1) stays out: the pin is set in the EVB's header, nvt-na51089-evb.h, and may be anything on another board. Verified under qemu-hisilicon, nt98562 and nt98566: boot to login from an 8 MiB image with the nt9856x_lite kernel and rootfs, a 3 MB tftpboot with matching crc32, ping, Linux's driver gets its lease. qemu does not model the clock switch or the bridges; not yet on silicon.
PR Summary by QodoNovatek: relocate below 64 MiB and complete vendor board setup
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
From the review of the board set-up: - the waits return a status: the CPU is not switched to a PLL8 that did not lock (the clock stays as the loader left it, with a message), and an unacknowledged switch says so; the vendor waits for ever; - the eFuse controller's timing is set again when the device tree changes the APB clock; the vendor leaves it at the old clock's. No Xiongmai tree names an APB clock, so this only matters for others. Verified under qemu-hisilicon, nt98562 and nt98566: boot to login, a 3 MB tftpboot with matching crc32, ping, Linux's lease.
Addresses #95 (NT98566, XM N8S: link up, then
eqos: Tx timed outfrom the first frame).novatek: stay in the loader's U-Boot region, below 64 MiB
U-Boot relocated to the top of the DDR, which on the NT98566 is past 64 MiB, so the MAC's descriptors and buffers went there too. The vendor U-Boot never leaves
/nvt_memory_cfg/uboot(0x3900000, 6.75 MiB). U-Boot now relocates to the top of that region. The DDR size, theosmemsplit and the lmb reservations don't change. On the NT98562 this also keeps U-Boot offcore2entry2.novatek: the rest of the vendor U-Boot's board set-up
What
nvt_ivot_hw_init_early()/nvt_ivot_hw_init()do, in their order:The EVB-only PHY reset on D_GPIO(1) stays out.
Verified under qemu-hisilicon, nt98562 and nt98566:
Not yet on silicon. Whether #95 is fixed is for the reporter to confirm.