[RK3288] [Android6.0] Debug Notes---Normal serial port to add "turn"

Source: Internet
Author: User

This article was reproduced from: http://blog.csdn.net/kris_fei/article/details/54574073

Tags: rk3288 serial port Add2017-01-16 14:52 1079 People read comments (0) favorite reports

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Platform:rockchip
Os:android 6.0
kernel:3.10.92

uart0,1,3,4 (common serial port) uses the same serial port driver.
The driver code for the UART2 (debug serial port) is embedded in Fiq debugger.

The relevant configuration is in Rk3288.dtsi:
aliases {
Serial0 = &uart_bt;
Serial1 = &uart_bb;
Serial2 = &uart_dbg;
Serial3 = &uart_gps;
Serial4 = &uart_exp;
......
}

UART_BB: [email protected] {
compatible = "rockchip,serial";
Reg = <0xff190000 0x100>;
Interrupts = <gic_spi irq_type_level_high>;
Clock-frequency = <24000000>;
clocks = <&clk_uart1>, <&clk_gates6 9>;
Clock-names = "Sclk_uart", "Pclk_uart";
Reg-shift = <2>;
Reg-io-width = <4>;
DMAs = <&pdma1 3>, <&pdma1 4>;
#dma-cells = <2>;
Pinctrl-names = "Default";
pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
Status = "Disabled";
};

Suppose you want to use Uart1, which is UART_BB, just add it to the main DTS:
&AMP;UART_BB {
Status = "Okay";
Dma-names = "!tx", "!rx";
};

In addition, since UART1 is used as the base band communication, the. RC is modified to the permissions you need
Diff--git A/init.connectivity.rc B/init.connectivity.rc
Index 71d125a: 1e06417 100755
---a/init.connectivity.rc
+ + b/init.connectivity.rc
@@ -54,10 +54,8 @@ -54,10 Boot

# Bluetooth Power Up/down interface
chmod 0660/DEV/TTYS0
-Chmod 0660/dev/ttys1
chmod 0660/dev/vflash
chown bluetooth Net_bt_stack/dev/vflash
-Chown bluetooth net_bt_stack/dev/ttys1
chown bluetooth NET_BT_STACK/DEV/TTYS0
chown bluetooth Net_bt_stack/sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack/sys/class/rfkill/rfkill0/state
Diff--git A/ueventd.rockchip.rc B/ueventd.rockchip.rc
Index B7F45C2: c6d773a 100644
---a/ueventd.rockchip.rc
+ + b/ueventd.rockchip.rc
@@ -31,6 +31,9 @@
/dev/mirroring 0664 Media Media
/dev/iep 0660 Media Media

+ #Kris
+/DEV/TTYS1 0666 System System
+
# for Sensor HAL
/dev/akm8973 0660 System System
/dev/accelerometer 0660 System System

Test:
You can get two boards, and then connect two identical serial ports, a piece of hair
1.
# CAT/DEV/TTYS1
2.
# echo Test >/dev/ttys1

[RK3288] [Android6.0] Debug Notes---Normal serial port to add "turn"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.