Hello,
I am now able to boot Linux, after I changed the devicetree files. Now,
neither Barebox nor Linux can detect the Ethernet PHY.
I copied the devicetree files from Enclustra's BSP because e.g. they
include skew parameters for the Ethernet PHY, that, if I understood
well, depend on board routing.
To port the board to Barebox, I took the Terasic DE0, which has the same
SoC FPGA and the same Ethernet PHY, the Microchip KSZ9031RNX. The MDIO
bus address on the DE0 is 1, and 3 on the SA2.
@dok had me type some commands in the Barebox prompt such as devinfo,
miitool, but it didn't solve the issue.
I notices differences in the devicetree files of the DE0 and the SA2. I
tried to group them; see the links below.
Links:
- the boot log: https://paste.debian.net/1387433/
- Ethernet-related DT of Terasic DE0: https://paste.debian.net/1387428/
- Ethernet-related DT of Enclustra SA2: https://paste.debian.net/1387430/
- arch/arm/boards/enclustra-sa2/board.c (seems to tweak MDIO timing ?):
https://paste.debian.net/1387437/
- the KSZ9031RNX PHY datasheet:
https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/KSZ9031RNX-Data-Sheet-DS00002117.pdf
David
Le 03/07/2025 à 16:21, David Picard a écrit :
Hello,
I'm trying to port the Enclustra SA2 module. I started off the Terasic
DE0 nano Soc board, that I could run with success previously. They
both have a Cyclone V SoC FPGA. I added some pr_debug().
My code is here, in the board-enclustra-sa2 branch:
https://github.com/dpproto/barebox
It hangs when the execution jumps to the uncompressed Barebox image,
and I'm really stuck.
Enclustra provides a U-Boot configuration, with handoff files. I tried
to compare them with those I copied from a sample Quartus project they
provide too. I couldn't notice striking differences, although it's not
easy to compare because they used an older version of Quartus.
- The addresses and sizes in the log output below don't seem to exceed
SDRAM boundaries, do they?
- Any hint on anything to check?
David
=============================
barebox 2025.06.1 #1 Thu Jul 3 10:53:43 CEST 2025
Board: SoCFPGA
No consoles were activated. Activating all consoles as fallback!
dw_mmc dw_mmc0: registered as mci0
mci0: detected SD card version 2.0
mci0: registered disk0
starting bootloader...
arch/arm/boards/enclustra-sa2/lowlevel.c: __start_socfpga_sa2() >>> start
include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>> start
include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>>
arm_cpu_lowlevel_init() OK
include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>>
fdt_blob=0x00002320 fdt=0x1ff87ae8 size=0x40000000
include/mach/socfpga/lowlevel.h: start_socfpga_c5_common() >>> calling
barebox_arm_entry()...
uncompress.c: memory at 0x00000000, size 0x40000000
mmu: enabling MMU, ttb @ 0x3ffe0000
endmem = 0x40000000
arm_mem_scratch = 0x3fff8000+0x00008000
arm_mem_stack = 0x3fff0000+0x00008000
arm_mem_ttb = 0x3ffe0000+0x00010000
arm_mem_barebox_image = 0x3fe00000+0x00200000
arm_mem_early_malloc = 0x3fde0000+0x00020000
membase = 0x00000000+0x40000000
uncompress.c: uncompressing barebox binary at 0x1ff8c800 (size
0x00056b67) to 0x3fe00000 (uncompressed size: 0x000778b0)
uncompress.c: jumping to uncompressed image at 0x3fe00001
uncompress.c: calling armv7_switch_to_hyp()...
uncompress.c: armv7_switch_to_hyp() OK. Now jumping...
=============================