Modify CPU UART Baud Rate on RK3588 Linux SDK

To standardize the adjustment of the CPU debug UART baud rate (for example, setting it to 115200), follow the steps below:

1. Modify the UART baud rate during the U-Boot stage
According to the “Rockchip_Developer_Guide_DDR_CN.pdf” document, the SDK provides the ddrbin_tool tool for modification.

Edit the DDR parameter configuration file:
Modify the uart baudrate in the neardi-rk3588-linux/rkbin/tools/ddrbin_param.txt file to 115200.

Regenerate the DDR initialization firmware:

neardi-rk3588-linux$ ./rkbin/tools/ddrbin_tool ./rkbin/tools/ddrbin_param.txt ./rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin

The current bin file used by RK3588 can be obtained from the FlashData parameter in neardi-rk3588-linux/rkbin/RKBOOT/RK3588MINIALL.ini,

FlashData=bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin

2. Modify the UART baud rate during the Linux Kernel stage
Edit the device tree file:

+++ b/kernel/arch/arm64/boot/dts/rockchip/rk3588-linux.dtsi
@@ -45,7 +45,7 @@ fiq_debugger: fiq-debugger {
                rockchip,wake-irq = <0>;
                /* If enabled, UART uses IRQ instead of FIQ */
                rockchip,irq-mode-enable = <1>;
-               rockchip,baudrate = <1500000>;  /* Only 115200 and 1500000 are supported */
+               rockchip,baudrate = <115200>;  /* Only 115200 and 1500000 are supported */
                interrupts = <GIC_SPI 423 IRQ_TYPE_LEVEL_LOW>;
                pinctrl-names = "default";
                pinctrl-0 = <&uart2m0_xfer>;

3. Rebuild and flash the firmware

neardi-rk3588-linux$ ./build.sh

After completing the build, reflash the full firmware (by default, this is the Buildroot firmware).

If you need the Ubuntu firmware, re-execute the Ubuntu packaging steps.