UART2引脚:
UART2_TX_M0 GPIO1_C7
UART2_RX_M0 GPIO1_C6
创建一个debug_uart2.dtsi文件,内容如下:
/ {
chosen {
bootargs = "earlycon=uart8250,mmio32,0xff0e0000 console=ttyS2,115200n8 root=PARTUUID=614e0000-0000 rootwait snd_aloop.index=7 snd_aloop.use_raw_jiffies=1";
};
};
&fiq_debugger {
status = "disabled";
};
&uart2 {
status = "okay";
};
然后在设备树文件Luckfox_Nova_SDK_250430/kernel/arch/arm64/boot/dts/rockchip/luckfox-rk3308b-evb-v10.dts末尾include这个debug_uart2.dtsi文件就可以了。
#include "../../../../../../../ominicyl_driver/debug_uart2.dtsi"
./build.sh,然后烧录。