General serial port configuration
Let’s take UART1 as an example,To describe the configuration in the kernel when a normal serial port is turned on。Change Status in DTS to OK:
# vi arch/arm/boot/dts/infinity2m.dtsi
uart1: uart1@1F221200 {
compatible = "sstar,uart";
reg = <0x1F221200 0x100>;
interrupts = <GIC_SPI INT_IRQ_UART_1 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&CLK_uart1>;
status = "ok";
};
Configure the corresponding pin as UART_MODE_1:
# vi arch/arm/boot/dts/infinity2m-ssc011a-s01a-padmux-display.dtsi
<PAD_UART1_RX PINMUX_FOR_UART1_MODE_1 MDRV_PUSE_UART1_RX >,
<PAD_UART1_TX PINMUX_FOR_UART1_MODE_1 MDRV_PUSE_UART1_TX >,
Load the SStarSerial/UART driver:
# cd linux-4.9.84 && ARCH=arm make menuconfig
文档更新时间: 2021-03-17 17:33 作者:Aeeditor