Skip to contentSkip to conversation

ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration

PATCH New Aaro Koskinen 3 participants 3 messages Jan 23, 2016 – Jan 25, 2016 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration

Some OpenRD boards have RS-232 and RS-486 connectors wired, but using them needs a custom DTB as the current DTB configures SD card slot instead.

This patch adds documentation into the DTS on how to change the configuration.

---
 arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
arch/arm/boot/dts/kirkwood-openrd.dtsi +30 -1
index f65b727..24f1d30 100644
@@ -40,7 +40,7 @@
 			pinctrl-0 = <&pmx_select28 &pmx_sdio_cd &pmx_select34>;
 			pinctrl-names = "default";
 
-			pmx_select28: pmx-select-rs232-rs484 {
+			pmx_select28: pmx-select-rs232-rs485 {
 				marvell,pins = "mpp28";
 				marvell,function = "gpio";
 			};
@@ -65,10 +65,39 @@
 			status = "okay";
 			cd-gpios = <&gpio0 29 9>;
 		};
+		gpio at 10100 {
+			p28 {
+				gpio-hog;
+				gpios = <28 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelRS232or485 selects between RS-232 or RS-485
+				 * mode for the second UART.
+				 *
+				 * Low: RS-232
+				 * High: RS-485
+				 *
+				 * To use the second UART, you need to change also
+				 * the SelUARTorSD.
+				 */
+				output-low;
+				line-name = "SelRS232or485";
+			};
+		};
 		gpio at 10140 {
 			p2 {
 				gpio-hog;
 				gpios = <2 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelUARTorSD selects between the second UART
+				 * (serial at 12100) and SD (mvsdio at 90000).
+				 *
+				 * Low: UART
+				 * High: SD
+				 *
+				 * When changing this line make sure the newly
+				 * selected device node is enabled and the
+				 * previously selected device node is disabled.
+				 */
 				output-high; /* Select SD by default */
 				line-name = "SelUARTorSD";
 			};
Signature · 1 line
2.4.0
#1 lore raw

PATCH 1/1 ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration

Quoted 7 lines · Aaro Koskinen

Some OpenRD boards have RS-232 and RS-486 connectors wired, but using them needs a custom DTB as the current DTB configures SD card slot instead.

This patch adds documentation into the DTS on how to change the configuration.

Thanks
Andrew

Quoted 60 lines
---
 arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
arch/arm/boot/dts/kirkwood-openrd.dtsi +30 -1
index f65b727..24f1d30 100644
@@ -40,7 +40,7 @@
 			pinctrl-0 = <&pmx_select28 &pmx_sdio_cd &pmx_select34>;
 			pinctrl-names = "default";
 
-			pmx_select28: pmx-select-rs232-rs484 {
+			pmx_select28: pmx-select-rs232-rs485 {
 				marvell,pins = "mpp28";
 				marvell,function = "gpio";
 			};
@@ -65,10 +65,39 @@
 			status = "okay";
 			cd-gpios = <&gpio0 29 9>;
 		};
+		gpio at 10100 {
+			p28 {
+				gpio-hog;
+				gpios = <28 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelRS232or485 selects between RS-232 or RS-485
+				 * mode for the second UART.
+				 *
+				 * Low: RS-232
+				 * High: RS-485
+				 *
+				 * To use the second UART, you need to change also
+				 * the SelUARTorSD.
+				 */
+				output-low;
+				line-name = "SelRS232or485";
+			};
+		};
 		gpio at 10140 {
 			p2 {
 				gpio-hog;
 				gpios = <2 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelUARTorSD selects between the second UART
+				 * (serial at 12100) and SD (mvsdio at 90000).
+				 *
+				 * Low: UART
+				 * High: SD
+				 *
+				 * When changing this line make sure the newly
+				 * selected device node is enabled and the
+				 * previously selected device node is disabled.
+				 */
 				output-high; /* Select SD by default */
 				line-name = "SelUARTorSD";
 			};
Signature · 1 line
2.4.0
#2 lore raw

PATCH 1/1 ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration

In reply to Aaro Koskinen

Hi Aaro,

Quoted 7 lines · Aaro Koskinen

Some OpenRD boards have RS-232 and RS-486 connectors wired, but using them needs a custom DTB as the current DTB configures SD card slot instead.

This patch adds documentation into the DTS on how to change the configuration.

Applied on mvebu/dt with Andrew Reviewed-by tag

Thanks,

Gregory

Quoted 65 lines
---
 arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
arch/arm/boot/dts/kirkwood-openrd.dtsi +30 -1
index f65b727..24f1d30 100644
@@ -40,7 +40,7 @@
 			pinctrl-0 = <&pmx_select28 &pmx_sdio_cd &pmx_select34>;
 			pinctrl-names = "default";
 
-			pmx_select28: pmx-select-rs232-rs484 {
+			pmx_select28: pmx-select-rs232-rs485 {
 				marvell,pins = "mpp28";
 				marvell,function = "gpio";
 			};
@@ -65,10 +65,39 @@
 			status = "okay";
 			cd-gpios = <&gpio0 29 9>;
 		};
+		gpio at 10100 {
+			p28 {
+				gpio-hog;
+				gpios = <28 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelRS232or485 selects between RS-232 or RS-485
+				 * mode for the second UART.
+				 *
+				 * Low: RS-232
+				 * High: RS-485
+				 *
+				 * To use the second UART, you need to change also
+				 * the SelUARTorSD.
+				 */
+				output-low;
+				line-name = "SelRS232or485";
+			};
+		};
 		gpio at 10140 {
 			p2 {
 				gpio-hog;
 				gpios = <2 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelUARTorSD selects between the second UART
+				 * (serial at 12100) and SD (mvsdio at 90000).
+				 *
+				 * Low: UART
+				 * High: SD
+				 *
+				 * When changing this line make sure the newly
+				 * selected device node is enabled and the
+				 * previously selected device node is disabled.
+				 */
 				output-high; /* Select SD by default */
 				line-name = "SelUARTorSD";
 			};
Signature · 7 lines
2.4.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com