Firefly开源社区

Firefly-RK3288 使用uart4

1637

积分

10

威望

12

贡献

中级创客

Rank: 4

积分
1637
QQ
发表于 2018-11-9 16:14:27     
Firefly-RK3288 Android5.1 SPI0和UART4是复用,而软件默认是打开SPI0功能,如果需要UART4功能,只需要添加如下补丁进行修改即可

diff --git a/device/rockchip/common/init.connectivity.rc b/device/rockchip/common/init.connectivity.rc
index 36e7c14..12cdfdf 100755
--- a/device/rockchip/common/init.connectivity.rc
+++ b/device/rockchip/common/init.connectivity.rc
@@ -60,10 +60,12 @@ on boot
# bluetooth power up/down interface
     chmod 0660 /dev/ttyS0
     chmod 0666 /dev/ttyS1
+    chmod 0666 /dev/ttyS4
     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 root root /dev/ttyS4
     chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
     chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
     chmod 0664 /sys/class/rfkill/rfkill0/state
diff --git a/kernel/arch/arm/boot/dts/firefly-rk3288.dts b/kernel/arch/arm/boot/dts/firefly-rk3288.dts
index 5e69784..7a246a1 100755
--- a/kernel/arch/arm/boot/dts/firefly-rk3288.dts
+++ b/kernel/arch/arm/boot/dts/firefly-rk3288.dts
@@ -310,7 +310,7 @@
};

&spi0 {
-        status = "okay";
+        status = "disabled";
        max-freq = <48000000>;       
     spidev@00 {
         compatible = "linux,spidev";
@@ -423,6 +423,10 @@
     status = "okay";
};

+&uart_exp {
+    status = "okay";
+};
+


回复

使用道具 举报

*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表