设为首页收藏本站

米尔科技论坛

 找回密码
 注册账号

QQ登录

只需一步,快速开始

查看: 8166|回复: 0

Rico Board 添加应用串口

[复制链接]

21

主题

42

帖子

575

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
575
oneal.tang 发表于 2015-7-8 09:36:41 | 显示全部楼层 |阅读模式
Rico Board 的UART3 UART5以TTL引导扩展接口上,但默认提供的内核中没有使能,需要在设备数文件中添加相应的代码。需要修改如下两个文件:

/arch/arm/boot/dts/myir_ricoboard.dts
/arch/arm/boot/dts/am4372.dtsi

添加一下内容:

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index e1cf7ad..8b4ec3b 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -26,6 +26,8 @@
                 i2c1 = &i2c1;
                 i2c2 = &i2c2;
                 serial0 = &uart0;
+                serial3 = &uart3;        
+                serial5 = &uart5;
                 ethernet0 = &cpsw_emac0;
                 ethernet1 = &cpsw_emac1;
                 d_can0 = &dcan0;
diff --git a/arch/arm/boot/dts/myir_ricoboard.dts b/arch/arm/boot/dts/myir_ricoboard.dts
index c0d27ef..7d1cd74 100644
--- a/arch/arm/boot/dts/myir_ricoboard.dts
+++ b/arch/arm/boot/dts/myir_ricoboard.dts
@@ -430,6 +430,20 @@
                 >;
         };
 
+        uart3_pins: uart3_pins {
+                pinctrl-single,pins = <
+                        0x228 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart3_rxd.uart3_rxd */
+                        0x22c (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart3_txd.uart3_txd */
+                >;
+        };
+        
+        uart5_pins: uart5_pins {
+                pinctrl-single,pins = <
+                        0x108 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE3) /* mii1_col.uart5_rxd */
+                        0x144 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE3) /* rmii1_ref_clk.uart5_txd */
+                >;
+        };        
+
         tsl2550: tsl2550@39 {
                 compatible = "taos,tsl2550";
                 reg = <0x39>;
@@ -963,6 +977,18 @@
         pinctrl-0 = <&uart0_pins>;
 };
 
+&uart3 {
+        status = "okay";
+        pinctrl-names = "default";
+        pinctrl-0 = <&uart3_pins>;
+};
+
+&uart5 {
+        status = "okay";
+        pinctrl-names = "default";
+        pinctrl-0 = <&uart5_pins>;
+};
+
 &vpfe1 {
         status = "okay";
         pinctrl-names = "default", "sleep";


使用如下命令重新编译生成dtb文件
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage dtbs


这是编译好的dtb文件
myir_ricoboard.dtb (47.45 KB, 下载次数: 6780)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2021-1-25 14:44 , Processed in 0.185816 second(s), 31 queries .

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表