开发过程我们一般都需要看串口log协助分析,以便分析对应的bug或者优化系统稳定性等问题,那每个平台串口波特率都有可能有一定的出入,不尽相同,而RK3588默认串口波特率是1500000,我们可以通过以下代码进行修改:
uboot下的相关设置:
u-boot/configs/rk3588_defconfig
CONFIG_BAUDRATE=1500000
kernel下dts的相关设置:
kernel-5.10/arch/arm64/boot/dts/rockchip/rk3588-android.dtsi
kernel-5.10/arch/arm64/boot/dts/rockchip/rk3588-linux.dtsi
fiq_debugger: fiq-debugger {
compatible = "rockchip,fiq-debugger";
rockchip,serial-id = <2>;
rockchip,wake-irq = <0>;
/* If enable uart uses irq instead of fiq */
rockchip,irq-mode-enable = <1>;
rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */
interrupts = <GIC_SPI 423 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};
以上修改,通过编译下载进去以后,就能修改成功了!
原作者:leezs0614
|