We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:c2_hardware_uart [2017/01/10 16:17]
odroid [Another UART port on 40pin header]
en:c2_hardware_uart [2017/01/31 13:16] (current)
brian.kim
Line 75: Line 75:
 [[http://​forum.odroid.com/​viewtopic.php?​f=115&​t=17279|How to enable the RTS/CTS]] [[http://​forum.odroid.com/​viewtopic.php?​f=115&​t=17279|How to enable the RTS/CTS]]
  
 +==== How to enable UART_B and UART_C ports ====
 +Up to 4 ports can be used for UART in ODROID-C2---UART_A0(Serial console), UART_A, UART_B and UART_C.\\
 +There are UART_A, UART_B and UART_C in [[http://​odroid.com/​dokuwiki/​doku.php?​id=en:​c2_hardware#​expansion_connectors|expansion connectors of ODROID-C2]].
  
 +  * //<UART pin>// | //<Pin number>// ​
 +  * UART_A TX | 8
 +  * UART_A RX | 10
 +  * UART_B TX | 3
 +  * UART_B RX | 5
 +  * UART_C TX | 32
 +  * UART_C RX | 26
  
 +In order to enable UART_B and UART_C ports, it is necessary to modify the //​meson64_odroidc2.dts//​ file.
 +
 +1. Kernel source download
 +
 +<​code>​
 +sudo apt-get update
 +sudo apt-get install git
 +git clone --depth 1 https://​github.com/​hardkernel/​linux.git -b odroidc2-3.14.y
 +</​code>​
 +
 +2. Delete I2C_A definition
 +
 +I2C_A uses same pins as UART_B by pinmux. So, i2c_a definition needs to be removed.
 +
 +  * //​($LINUX)/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts//​
 +<​code>​
 +iff --git a/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts b/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts
 +index e6a25b0..db09b04 100755
 +--- a/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts
 ++++ b/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts
 +@@ -813,18 +813,6 @@
 + 
 + };
 + 
 +-&i2c_a {
 +-       ​status = "​okay";​
 +-
 +-       /* Hardkernel I2C RTC */
 +-       ​pcf8563:​ pcf8563@51 ​    {
 +-               ​status = "​disabled";​
 +-               ​compatible = "​nxp,​pcf8563";​
 +-               reg = <​0x51>;​
 +-               #​clock-cells = <0>;
 +-       };
 +-};
 +-
 + &​i2c_b {
 +        status = "​okay";​
 +
 +</​code>​
 +
 +3. Add UART_B and UART_C definitions
 +  * //​($LINUX)/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts//​
 +<​code>​
 +diff --git a/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts b/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts
 +index e6a25b0..fd41552 100755
 +--- a/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts
 ++++ b/​arch/​arm64/​boot/​dts/​meson64_odroidc2.dts
 +@@ -31,6 +31,8 @@
 +        aliases {
 +                serial0 = &​uart_AO;​
 +                serial1 = &​uart_A;​
 ++               ​serial2 = &​uart_B;​
 ++               ​serial3 = &​uart_C;​
 +        };
 + 
 +        gpu_dvfs_tbl:​ gpu_dvfs_tbl {
 +@@ -459,6 +461,32 @@
 +                pinctrl-0 = <&​a_uart_pins>;​
 +        };
 + 
 ++       ​uart_B:​ serial@c11084dc {
 ++               ​compatible = "​amlogic,​ meson-uart";​
 ++               reg = <0x0 0xc11084dc 0x0 0x18>;
 ++               ​interrupts = <0 75 1>;
 ++               ​status = "​okay";​
 ++               ​clocks = <&​clock CLK_XTAL>;​
 ++               ​clock-names = "​clk_uart";​
 ++               ​fifosize = < 64 >;
 ++               ​pinctrl-names = "​default";​
 ++               ​pinctrl-0 = <&​b_uart_pins>;​
 ++               ​resets = <&​clock GCLK_IDX_UART1>;​
 ++       };
 ++
 ++       ​uart_C:​ serial@c1108700 {
 ++               ​compatible = "​amlogic,​ meson-uart";​
 ++               reg = <0x0 0xc1108700 0x0 0x14>;
 ++               ​interrupts = <0 93 1>;
 ++               ​status = "​okay";​
 ++               ​clocks = <&​clock CLK_XTAL>;​
 ++               ​clock-names = "​clk_uart";​
 ++               ​fifosize = < 64 >;
 ++               ​pinctrl-names = "​default";​
 ++               ​pinctrl-0 = <&​c_uart_pins>;​
 ++               ​resets = <&​clock GCLK_IDX_UART2>;​
 ++       };
 ++
 +        canvas {
 +                compatible = "​amlogic,​ meson, canvas";​
 +                dev_name = "​amlogic-canvas";​
 +</​code>​
 +
 +  * [[https://​gist.githubusercontent.com/​bkrepo/​ae548109e3f94fd41fed2defa270057b/​raw/​b50265071e0c4bfe22fcc418aba938bf843bfa8a/​meson64_odroidc2.dts|meson64_odroidc2.dts]]
 +
 +4. Install modified dtb file
 +<​code>​
 +make odroidc2_defconfig
 +make dtbs
 +sudo cp -f arch/​arm64/​boot/​dts/​meson64_odroidc2.dtb /​media/​boot/​
 +sudo reboot
 +</​code>​
 +5. Done
en/c2_hardware_uart.txt ยท Last modified: 2017/01/31 13:16 by brian.kim
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0