今日修改波特率,遇到一个现象就是uboot一直都是1500000
1.修改uboot
index 674ff1a9be..20468f8ec9 100644
--- a/u-boot/arch/arm/dts/rv1126.dtsi
+++ b/u-boot/arch/arm/dts/rv1126.dtsi
@@ -265,9 +265,9 @@
rockchip,serial-id = <2>;
rockchip,wake-irq = <0>;
rockchip,irq-mode-enable = <0>;
- rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
+ rockchip,baudrate = <115200>; /* Only 115200 and 1500000 */
interrupts = ;
- status = "disabled";
+ status = "okay";
};
--- a/configs/rv1126_defconfig
+++ b/configs/rv1126_defconfig
@@ -156,7 +156,7 @@ CONFIG_ROCKCHIP_SDRAM_COMMON=y
CONFIG_DM_RESET=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_RESET_ROCKCHIP=y
-CONFIG_BAUDRATE=1500000
+CONFIG_BAUDRATE=115200
CONFIG_DEBUG_UART_BASE=0xff570000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
2.kernel
--- a/kernel/arch/arm/boot/dts/rv1126.dtsi
+++ b/kernel/arch/arm/boot/dts/rv1126.dtsi
@@ -332,7 +332,7 @@
rockchip,serial-id = <2>;
rockchip,wake-irq = <0>;
rockchip,irq-mode-enable = <0>;
- rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
+ rockchip,baudrate = <115200>; /* Only 115200 and 1500000 */
interrupts = ;
status = "disabled";
};
3.buildroot
buildroot/configs/rockchip/rv1126_rv1109_arm.config,找到1500000参数,改为115200.
--- a/buildroot/configs/rockchip/chips/rv1126_rv1109_arm.config
+++ b/buildroot/configs/rockchip/chips/rv1126_rv1109_arm.config
@@ -1,3 +1,5 @@
#include "chips/rv1126_rv1109.config"
#include "toolchain/arm_8_armhf.config"
BR2_arm=y
+BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
=========================================================================
uboot阶段一直都没有变化直到我该了另外一个地方
4.修改DDR初始化和SPL初始化波特率
diff --git a/rkbin/tools/ddrbin_param.txt b/rkbin/tools/ddrbin_param.txt
old mode 100644
new mode 100755
index 711d32c5e..718cca5e2
--- a/rkbin/tools/ddrbin_param.txt
+++ b/rkbin/tools/ddrbin_param.txt
@@ -11,7 +11,7 @@ lp5_freq=
uart id=
uart iomux=
-uart baudrate=
+uart baudrate=115200
sr_idle=
pd_idle=
然后编译一下
./ddrbin_tool ddrbin_param.txt ../bin/rv11/rv1126_ddr_924MHz_v1.10.bin
然后重新编译之后就可以看到全部波特率为115200.
参考博客:
rockchip SDK修改波特率为115200_修改波特率设置为115200_Keith-Yang的博客-CSDN博客
阑珊步履行,且行且珍惜!