Miqipi/UART

From wiki
Jump to: navigation, search


MIQI board, have the UART3 for use

Configuration Steps

Here we use uart3 as an example.

Create DTS Node

The DTS node have already been created in file kernel/arch/arm/boot/dts/rk3288.dtsi, shown as following:

 uart_gps: serial@ff1b0000 {
 compatible = "rockchip,serial";
 reg = <0xff1b0000 0x100>;
 clock-frequency = <24000000>;
 clocks = <&clk_uart3>, <&clk_gates6 11>;
 clock-names = "sclk_uart", "pclk_uart";
 current-speed = <115200>;
 reg-shift = <2>;
 reg-io-width = <4>;
 dmas = <&pdma1 7>, <&pdma1 8>;
 #dma-cells = <2>;
 pinctrl-names = "default";
 pinctrl-0 = <&uart3_xfer &uart3_cts &uart3_rts>;
 status = "disabled";
 };

Note: uart_gps is defined in "aliases" node as: serial3 = &uart_gps;
The only thing you need to do is adding following code in file kernel/arch/arm/boot/dts/rk3288-miqi.dts:

 &uart_gps {
       status = "okay";
       dma-names = "!tx", "!rx";
       pinctrl-0 = <&uart3_xfer &uart3_cts>;
 };


Compile and Flash Kernel

Turn on CONFIG_SERIAL_ROCKCHIP in kernel configuration, which will add corresponding drivers/tty/serial/rk_serial.c to kernel.
Then compile the kernel as followed:

 make rk3288-miqi.img

After successful compilation, flash kernel.img and resource.img under kernel directory to the miqi board.