diff mbox

[2/2] arm64: dts: marvell: mcbin: enable uart headers

Message ID 97a7416bb0eb19c9d32e41984e292a869ff14230.1517299286.git.baruch@tkos.co.il (mailing list archive)
State New, archived
Headers show

Commit Message

Baruch Siach Jan. 30, 2018, 8:01 a.m. UTC
Add description of the J25 and J27 UART headers of the Macchiatobin. They use
uart peripherals that the CP0 (J25) and CP1 (J27) provides.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Thomas Petazzoni Jan. 30, 2018, 10:27 a.m. UTC | #1
Hello,

On Tue, 30 Jan 2018 10:01:26 +0200, Baruch Siach wrote:
> Add description of the J25 and J27 UART headers of the Macchiatobin. They use
> uart peripherals that the CP0 (J25) and CP1 (J27) provides.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Thanks. One minor nit below.

> ---
>  arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
> index 626e9d0462c3..3ce15b740bb0 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
> @@ -163,6 +163,12 @@
>  	};
>  };
>  
> +&cp0_uart1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&cp0_uart1_pins>;
> +	status = "okay";
> +};

It'd be nice to indicate in the DT that this is accessible through J25.

> +&cp1_uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&cp1_uart0_pins>;
> +	status = "okay";
>  };

And this through J27.

Thanks!

Thomas
Russell King (Oracle) Jan. 30, 2018, 4:05 p.m. UTC | #2
On Tue, Jan 30, 2018 at 10:01:26AM +0200, Baruch Siach wrote:
> Add description of the J25 and J27 UART headers of the Macchiatobin. They use
> uart peripherals that the CP0 (J25) and CP1 (J27) provides.

The headers are just fed with the GPIO-level signals, which means any
industry standard usage would require additional RS232 level shifting
hardware.  So, they're certainly not "generic" serial ports.

While these are labelled up as UARTs, there's no reason to dedicate
them as such, they could equally be used to connect to a smart battery/
UPS system as a SMBus port, or even to control system LEDs / read
the status of system buttons.

Do you have an application for these headers?  If not, it's probably
best to leave them alone (until we have DT overlay support sorted to
allow boot-loader configuration of hardware such as these - which is
being worked on for TI and other boards.)
Baruch Siach Jan. 30, 2018, 4:47 p.m. UTC | #3
Hi Russell,

On Tue, Jan 30, 2018 at 04:05:17PM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 30, 2018 at 10:01:26AM +0200, Baruch Siach wrote:
> > Add description of the J25 and J27 UART headers of the Macchiatobin. They use
> > uart peripherals that the CP0 (J25) and CP1 (J27) provides.
> 
> The headers are just fed with the GPIO-level signals, which means any
> industry standard usage would require additional RS232 level shifting
> hardware.  So, they're certainly not "generic" serial ports.
> 
> While these are labelled up as UARTs, there's no reason to dedicate
> them as such, they could equally be used to connect to a smart battery/
> UPS system as a SMBus port, or even to control system LEDs / read
> the status of system buttons.
> 
> Do you have an application for these headers?  If not, it's probably
> best to leave them alone (until we have DT overlay support sorted to
> allow boot-loader configuration of hardware such as these - which is
> being worked on for TI and other boards.)

The console UART on the FTDI CON9 microUSB is not accessible when the board is 
mounted on a COTS ATX enclosure. So some users would like UART access through 
the UART headers.

Would you be fine with this patch when 'status = "okay"' is omitted?

baruch
Russell King (Oracle) Jan. 30, 2018, 4:58 p.m. UTC | #4
On Tue, Jan 30, 2018 at 06:47:12PM +0200, Baruch Siach wrote:
> Hi Russell,
> 
> On Tue, Jan 30, 2018 at 04:05:17PM +0000, Russell King - ARM Linux wrote:
> > On Tue, Jan 30, 2018 at 10:01:26AM +0200, Baruch Siach wrote:
> > > Add description of the J25 and J27 UART headers of the Macchiatobin. They use
> > > uart peripherals that the CP0 (J25) and CP1 (J27) provides.
> > 
> > The headers are just fed with the GPIO-level signals, which means any
> > industry standard usage would require additional RS232 level shifting
> > hardware.  So, they're certainly not "generic" serial ports.
> > 
> > While these are labelled up as UARTs, there's no reason to dedicate
> > them as such, they could equally be used to connect to a smart battery/
> > UPS system as a SMBus port, or even to control system LEDs / read
> > the status of system buttons.
> > 
> > Do you have an application for these headers?  If not, it's probably
> > best to leave them alone (until we have DT overlay support sorted to
> > allow boot-loader configuration of hardware such as these - which is
> > being worked on for TI and other boards.)
> 
> The console UART on the FTDI CON9 microUSB is not accessible when the board is 
> mounted on a COTS ATX enclosure. So some users would like UART access through 
> the UART headers.

Please include this information in the commit log.

I'll also point out that the latest board revision also offers a UART
header for the standard console port too, so even if the microUSB is
not available, the standard console is still usable.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
index 626e9d0462c3..3ce15b740bb0 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
@@ -163,6 +163,12 @@ 
 	};
 };
 
+&cp0_uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cp0_uart1_pins>;
+	status = "okay";
+};
+
 &cp0_mdio {
 	pinctrl-names = "default";
 	pinctrl-0 = <&cp0_ge_mdio_pins>;
@@ -195,6 +201,10 @@ 
 		marvell,pins = "mpp37", "mpp38";
 		marvell,function = "i2c0";
 	};
+	cp0_uart1_pins: uart1-pins {
+		marvell,pins = "mpp40", "mpp41";
+		marvell,function = "uart1";
+	};
 	cp0_xhci_vbus_pins: xhci0-vbus-pins {
 		marvell,pins = "mpp47";
 		marvell,function = "gpio";
@@ -290,6 +300,16 @@ 
 		marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", "mpp16";
 		marvell,function = "spi1";
 	};
+	cp1_uart0_pins: uart0-pins {
+		marvell,pins = "mpp6", "mpp7";
+		marvell,function = "uart0";
+	};
+};
+
+&cp1_uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cp1_uart0_pins>;
+	status = "okay";
 };
 
 &cp1_sata0 {