Can't get U-Boot working on Geniatech XPI-3566-ZERO

Mizsei Zoltán zmizsei at extrowerk.com
Fri Apr 12 19:26:56 CEST 2024


Hi Jonas,

thank You, i tried my best to follow your hints as good as possible. This is what i did:

- git clone https://github.com/rockchip-linux/rkbin
- git clone https://github.com/u-boot/u-boot
- modified the following files:

```
diff --git a/arch/arm/dts/rk3568-generic.dts b/arch/arm/dts/rk3568-generic.dts
index 88eb1bfd..847ebd51 100644
--- a/arch/arm/dts/rk3568-generic.dts
+++ b/arch/arm/dts/rk3568-generic.dts
@@ -16,7 +16,7 @@
        };
 
        chosen {
-               stdout-path = "serial2:1500000n8";
+               stdout-path = "serial1:1500000n8";
        };
 };
 
@@ -43,6 +43,7 @@
        status = "okay";
 };
 
-&uart2 {
+&uart1 {
        status = "okay";
 };
+
diff --git a/configs/generic-rk3568_defconfig b/configs/generic-rk3568_defconfig
index e7d5e55b..aeb117e7 100644
--- a/configs/generic-rk3568_defconfig
+++ b/configs/generic-rk3568_defconfig
@@ -6,7 +6,7 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_DEFAULT_DEVICE_TREE="rk3568-generic"
 CONFIG_ROCKCHIP_RK3568=y
 CONFIG_SPL_SERIAL=y
-CONFIG_DEBUG_UART_BASE=0xFE660000
+CONFIG_DEBUG_UART_BASE=0xFE650000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_SYS_LOAD_ADDR=0xc00800
 CONFIG_DEBUG_UART=y
```

- modified this file: 
```
diff --git a/tools/ddrbin_param.txt b/tools/ddrbin_param.txt
index 0dfdd31..826f927 100644
--- a/tools/ddrbin_param.txt
+++ b/tools/ddrbin_param.txt
@@ -9,7 +9,7 @@ lp4_freq=
 lp4x_freq=
 lp5_freq=
 
-uart id=
+uart id=1
 uart iomux=
 uart baudrate=
```

- Runned the following command:
# ./ddrbin_tool rk3566 ddrbin_param.txt ~/rkbin/bin/rk35/rk3566_ddr_920MHz_v1.21.bin 
version v1.19 20240117
chip rk3566
version 5

new bin config:
uart id: 1
modify end

The file modification date changed, so i assume it should be ok.

- Runned the following commands:
# CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make generic-rk3568_defconfig O="build/generic-rk3568_defconfig"
#ROCKCHIP_TPL='~/rkbin/bin/rk35/rk3566_ddr_920MHz_v1.21.bin'  BL31='~/rkbin/bin/rk35/rk3568_bl31_v1.44.elf' CROSS_COMPILE=aarch64-linux-gnu- make O="build/generic-rk3568_defconfig"

I have acquired the MiniLoaderAll.bin via extracting the official update.img from the vendor.
# rkdeveloptool db MiniLoaderAll.bin
# rkdeveloptool wl 64 '~/u-boot/build/generic-rk3568_defconfig/u-boot-rockchip.bin'

- Then i have connected my USB-UART adapter to 
BOARD PIN 8 (GND)  -> USB UART PIN GND
BOARD PIN 10 (UART1_TX)   -> USB UART PIN RX
BOARD PIN 12 (UART1_RX)  -> USB UART PIN TX

- Started minicom:
# minicom -D /dev/ttyUSB0 -b 1500000

But i still don't get any output at all.

Any idea what iam i doing wrong here?

Best Regards,
-- ext


Jonas Karlman írta 2024. ápr.. 8, H-n 21:31 órakor:
> Hi Z,
>
> On 2024-04-08 09:40, Mizsei Zoltán wrote:
>> Hi,
>> 
>> I'm trying to get a mainline U-Boot running on the Geniatech XPI-3566-ZERO RK3566 based SBC [1], but all my attempts have failed so far.
>> 
>> The SBC doesn't have any SD-Card slot, please keep this in mind!
>> 
>> I can build U-Boot, but when I write the resulting binary to the eMMC using rkdeveloptool, the boot stops and I see no output on the UART pins using 1500000 baud transfer rate.
>> 
>> My steps were the following:
>> 
>> - git clone https://github.com/u-boot/u-boot
>> - cd u-boot
>> - CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make rk3568_defconfig
>
> There is no rk3568_defconfig target but generic-rk3568_defconfig may 
> work better.
>
>> - ROCKCHIP_TPL='rkbin/bin/rk35/rk3566_ddr_1056MHz_v1.21.bin'  BL31='rkbin/bin/rk35/rk3568_bl31_v1.44.elf' CROSS_COMPILE=aarch64-linux-gnu- make
>> - rkdeveloptool db MiniLoaderAll.bin
>> - rkdeveloptool wl 64 u-boot-rockchip.bin
>> 
>> After that I can no longer communicate with the board via UART and it no longer boots.
>
> After looking at the specification for this board it looks like GPIO 
> pin 8 and 10 is connected to uart1 and not uart2 that is typically used 
> for debug uart on rockchip devices.
>
>> 
>> I've built uboot countless times, I've followed all sorts of guides, I've tried modifying FDT and transplanting the DTS from the official SDK, I have tried vanilla defconfigs and tried to modify them aswell, I think I've tried everything, but no matter what I do I just can't get it working.
>> The vendored U-Boot works ok, but I plant to run OpenBSD, for which an upstream U-Boot would be better situated (according to the OBSD mailing list).
>> 
>> Please give me some hints because I'm running out of ideas. I've spent countless hours trying to get this to work but haven't succeeded.
>
> You can try changing stdout-path to "serial1:1500000n8" and enable the 
> uart1 node in generic-rk3568.dts.
> Also change to CONFIG_DEBUG_UART_BASE=0xFE650000, and also use rkbin 
> tools/ddrbin_tool and change to use uart1 on ddr bin.
>
> After that you should probably start seeing something on uart and that 
> may help you get a little bit further.
>
> Regards,
> Jonas
>
>> 
>> Thank You very much!
>> 
>> Best Regards,
>> 
>> --Z--
>> 
>> [1] https://www.geniatech.com/product/xpi-3566-zero/

-- 
--Z--


More information about the U-Boot mailing list