|
Rico Board 的UART3 UART5以TTL引导扩展接口上,但默认提供的内核中没有使能,需要在设备数文件中添加相应的代码。需要修改如下两个文件:
/arch/arm/boot/dts/myir_ricoboard.dts
/arch/arm/boot/dts/am4372.dtsi
添加一下内容:
[mw_shl_code=c,true]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";
[/mw_shl_code]
使用如下命令重新编译生成dtb文件
[mw_shl_code=bash,true]$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage dtbs[/mw_shl_code]
这是编译好的dtb文件
myir_ricoboard.dtb
(47.45 KB, 下载次数: 8932)
|
|