All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration
@ 2016-01-23 20:37 ` Aaro Koskinen
  0 siblings, 0 replies; 6+ messages in thread
From: Aaro Koskinen @ 2016-01-23 20:37 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Martin Michlmayr, Rick Thomas
  Cc: 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.

Signed-off-by: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>
---
 arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
index f65b727..24f1d30 100644
--- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
+++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
@@ -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@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@10140 {
 			p2 {
 				gpio-hog;
 				gpios = <2 GPIO_ACTIVE_HIGH>;
+				/*
+				 * SelUARTorSD selects between the second UART
+				 * (serial@12100) and SD (mvsdio@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";
 			};
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration
@ 2016-01-23 20:37 ` Aaro Koskinen
  0 siblings, 0 replies; 6+ messages in thread
From: Aaro Koskinen @ 2016-01-23 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
index f65b727..24f1d30 100644
--- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
+++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
@@ -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";
 			};
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration
  2016-01-23 20:37 ` Aaro Koskinen
@ 2016-01-24 17:28     ` Andrew Lunn
  -1 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2016-01-24 17:28 UTC (permalink / raw)
  To: Aaro Koskinen
  Cc: Gregory Clement, Jason Cooper,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Martin Michlmayr, Rick Thomas

On Sat, Jan 23, 2016 at 10:37:17PM +0200, Aaro Koskinen wrote:
> 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.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>

Reviewed-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>

Thanks
	Andrew

> ---
>  arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> index f65b727..24f1d30 100644
> --- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> @@ -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@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@10140 {
>  			p2 {
>  				gpio-hog;
>  				gpios = <2 GPIO_ACTIVE_HIGH>;
> +				/*
> +				 * SelUARTorSD selects between the second UART
> +				 * (serial@12100) and SD (mvsdio@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";
>  			};
> -- 
> 2.4.0
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration
@ 2016-01-24 17:28     ` Andrew Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2016-01-24 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 23, 2016 at 10:37:17PM +0200, Aaro Koskinen wrote:
> 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.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Thanks
	Andrew

> ---
>  arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> index f65b727..24f1d30 100644
> --- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> @@ -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";
>  			};
> -- 
> 2.4.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration
  2016-01-23 20:37 ` Aaro Koskinen
@ 2016-01-25 15:41     ` Gregory CLEMENT
  -1 siblings, 0 replies; 6+ messages in thread
From: Gregory CLEMENT @ 2016-01-25 15:41 UTC (permalink / raw)
  To: Aaro Koskinen
  Cc: Jason Cooper, Andrew Lunn,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Martin Michlmayr, Rick Thomas

Hi Aaro,
 
 On sam., janv. 23 2016, Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org> wrote:

> 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.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>

Applied on mvebu/dt with Andrew Reviewed-by tag

Thanks,

Gregory

> ---
>  arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> index f65b727..24f1d30 100644
> --- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> @@ -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@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@10140 {
>  			p2 {
>  				gpio-hog;
>  				gpios = <2 GPIO_ACTIVE_HIGH>;
> +				/*
> +				 * SelUARTorSD selects between the second UART
> +				 * (serial@12100) and SD (mvsdio@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";
>  			};
> -- 
> 2.4.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration
@ 2016-01-25 15:41     ` Gregory CLEMENT
  0 siblings, 0 replies; 6+ messages in thread
From: Gregory CLEMENT @ 2016-01-25 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Aaro,
 
 On sam., janv. 23 2016, Aaro Koskinen <aaro.koskinen@iki.fi> wrote:

> 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.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Applied on mvebu/dt with Andrew Reviewed-by tag

Thanks,

Gregory

> ---
>  arch/arm/boot/dts/kirkwood-openrd.dtsi | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/kirkwood-openrd.dtsi b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> index f65b727..24f1d30 100644
> --- a/arch/arm/boot/dts/kirkwood-openrd.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-openrd.dtsi
> @@ -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";
>  			};
> -- 
> 2.4.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-25 15:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-23 20:37 [PATCH] ARM: DTS: kirkwood-openrd: provide template for RS-232/485 configuration Aaro Koskinen
2016-01-23 20:37 ` Aaro Koskinen
     [not found] ` <1453581437-14135-1-git-send-email-aaro.koskinen-X3B1VOXEql0@public.gmane.org>
2016-01-24 17:28   ` Andrew Lunn
2016-01-24 17:28     ` Andrew Lunn
2016-01-25 15:41   ` Gregory CLEMENT
2016-01-25 15:41     ` Gregory CLEMENT

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.