RK3399-UART功能特点 1、UART (Universal Asynchronous Receiver/Transmitter),以下是linux 4.4 uart驱动支持的一些特性︰ 最高支持4M波特率 只有UART0和UART3支持硬件自动流控 支持中断传输模式 2、 DTS节点配置 使能,无需其他配置: &uart0 { status = "okay"; }; 使能后/dev/ttyS0 设备就可以使用。 3、关闭Linux串口打印 3.1 关掉FIQ debugger,Disable以下节点 fiq_debugger: fiq-debugger { compatible = "rockchip,fiq-debugger"; rockchip,serial-id = <2>; 设置串口id rockchip,signal-irq = <182>; rockchip,wake-irq = <0>; rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */ rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ pinctrl-names = "default"; pinctrl-0 = <&uart2c_xfer>; 配置iomux status = “disabled”; } 3.2 去掉earlyprintk=uart8250-32bit,0xff690000 chosen { bootargs = "earlyprintk=uart8250-32bit,0xff690000"; }; 3.3 在烧写parameter.txt commandline:androidboot.console=ttyFIQ0,去掉ttyFIQ0。 3.4 android/device/rockchip/common/recovery/etc/init.rc service recovery /sbin/recovery #console 这个注释掉 seclabel u:r:recovery:s0 4 打印串口2改为其他串口 fiq_debugger: fiq-debugger { compatible = "rockchip,fiq-debugger"; rockchip,serial-id = <2>; 设置串口id rockchip,signal-irq = <182>; rockchip,wake-irq = <0>; rockchip,irq-mode-enable = <1>; /* If enable uart uses irq instead of fiq */ rockchip,baudrate = <1500000>; /* Only 115200 and 1500000 */ pinctrl-names = "default"; pinctrl-0 = <&uart2c_xfer>; 配置iomux }; chosen { bootargs = "earlyprintk=uart8250-32bit,0xff690000"; 新串口的地址 }; 以上所需信息都可以,通过串口设备的DTS节点获取,举个例子: uart1: serial@ff190000 { compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart"; reg = <0x0 0xff190000 0x0 0x100>; clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>; clock-names = "baudclk", "apb_pclk"; interrupts = dmas = <&dmac_peri 2>, <&dmac_peri 3>; dma-names = "tx", "rx"; reg-shift = <2>; reg-io-width = <4>; pinctrl-names = "default"; /*pinctrl-0 = <&uart1_xfer>;*/ status = "disabled"; }; |
curton 2019-5-8 12:24
curton 2019-4-29 18:47