# BananaPi M2 Zero: Add HDMI out and ethernet

- List: linux-arm-kernel
- 11 messages, 3 authors
- Page: https://ratatoskr.run/linux-arm-kernel/2021/02/8804721/t

## BananaPi M2 Zero: Add HDMI out and ethernet

- From: Pieter Beers \<hidden\>
- Date: 2021-02-28 16:18:46 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/02/8804721.md

```text
I'm sending two patches to enable HDMI out and ethernet on the BananaPi M2 Zero. Please let me know whether they can be accepted in the current form, or whether I need to do anything in addition.

Jernej Škrabec found my HDMI out patch, and wrote that seemed good to go. He also let me know that the ethernet patch would probably be rejected, since the BananaPi M2 Zero does not come with a physical RJ-45 port. 
However, it does come with a four-hole dedicated ethernet header. I thought, since the presence of such a header is, as far as I know, enough to enable UART tty, then perhaps the same might go for ethernet? In any 
case, it would be very nice if you can accept the HDMI out patch, and nicer still if you could also accept the ethernet patch!

Kind regards,

Pieter Beers

[PATCH 1/2] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out
[PATCH 2/2] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add ethernet


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## \[PATCH 1/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out

- From: Pieter Beers \<hidden\>
- Date: 2021-02-28 16:18:46 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/02/8804719.md

```text
Add HDMI out, including the display engine, to the BananaPi
M2 Zero.

Signed-off-by: Pieter Beers <redacted>
---
 .../dts/sun8i-h2-plus-bananapi-m2-zero.dts    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index e76d56a3df9c..d339a26662cb 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -26,6 +26,17 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -107,6 +118,20 @@
 	};
 };
 
+&de {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &ohci0 {
 	status = "okay";
 };
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## \[PATCH 2/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add ethernet

- From: Pieter Beers \<hidden\>
- Date: 2021-02-28 16:18:46 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/02/8804720.md

```text
This patch enables the ethernet driver for the BananaPi M2 Zero

The BananaPi M2 Zero does not have an RJ-45 interface, but it
does feature a four-hole header to which an RJ-45 port can be
connected, for a 100 Mbps ethernet link.

Signed-off-by: Pieter Beers <redacted>
---
 arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index d339a26662cb..d35a978b243d 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -240,3 +240,10 @@
 	 */
 	status = "okay";
 };
+
+&emac {
+	status = "okay";
+	phy-handle = <&int_mii_phy>;
+	phy-mode = "mii";
+	allwinner,leds-active-low;
+};
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## Re: \[PATCH 1/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out

- From: Maxime Ripard \<hidden\>
- Date: 2021-03-02 09:20:50 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804737.md

```text
Hi,

On Sun, Feb 28, 2021 at 05:16:56PM +0100, Pieter Beers wrote:
> Add HDMI out, including the display engine, to the BananaPi
> M2 Zero.
> 
> Signed-off-by: Pieter Beers <redacted>
> ---
>  .../dts/sun8i-h2-plus-bananapi-m2-zero.dts    | 25 +++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
> index e76d56a3df9c..d339a26662cb 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
> @@ -26,6 +26,17 @@
>  		stdout-path = "serial0:115200n8";
>  	};
>  
> +	connector {
> +		compatible = "hdmi-connector";
> +		type = "a";
> +
> +		port {
> +			hdmi_con_in: endpoint {
> +				remote-endpoint = <&hdmi_out_con>;
> +			};
> +		};
> +	};
> +
>  	leds {
>  		compatible = "gpio-leds";
>  
> @@ -107,6 +118,20 @@
>  	};
>  };
>  
> +&de {
> +	status = "okay";
> +};
> +
> +&hdmi {
> +	status = "okay";
> +};
> +
> +&hdmi_out {
> +	hdmi_out_con: endpoint {
> +		remote-endpoint = <&hdmi_con_in>;
> +	};
> +};
> +

These nodes should be ordered by alphabetical order

Thanks!
Maxime
```

## Re: Re: \[PATCH 1/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out

- From: Jernej Škrabec \<hidden\>
- Date: 2021-03-03 15:14:05 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804748.md

```text
Hi!

Dne torek, 02. marec 2021 ob 10:19:25 CET je Maxime Ripard napisal(a):
> Hi,
> 
> On Sun, Feb 28, 2021 at 05:16:56PM +0100, Pieter Beers wrote:
> > Add HDMI out, including the display engine, to the BananaPi
> > M2 Zero.
> > 
> > Signed-off-by: Pieter Beers <redacted>
> > ---
> >  .../dts/sun8i-h2-plus-bananapi-m2-zero.dts    | 25 +++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/
arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
> > index e76d56a3df9c..d339a26662cb 100644
> > --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
> > @@ -26,6 +26,17 @@
> >  		stdout-path = "serial0:115200n8";
> >  	};
> >  
> > +	connector {
> > +		compatible = "hdmi-connector";
> > +		type = "a";

I didn't noticed earlier, but BananaPi M2 Zero has mini HDMI, so type should 
be set to "c" here.

Best regards,
Jernej

> > +
> > +		port {
> > +			hdmi_con_in: endpoint {
> > +				remote-endpoint = 
<&hdmi_out_con>;
> > +			};
> > +		};
> > +	};
> > +
> >  	leds {
> >  		compatible = "gpio-leds";
> >  
> > @@ -107,6 +118,20 @@
> >  	};
> >  };
> >  
> > +&de {
> > +	status = "okay";
> > +};
> > +
> > +&hdmi {
> > +	status = "okay";
> > +};
> > +
> > +&hdmi_out {
> > +	hdmi_out_con: endpoint {
> > +		remote-endpoint = <&hdmi_con_in>;
> > +	};
> > +};
> > +
> 
> These nodes should be ordered by alphabetical order
> 
> Thanks!
> Maxime
> 



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## \[PATCH 0/2 v2\] BananaPi M2 Zero: Add HDMI-out and ethernet

- From: Pieter Beers \<hidden\>
- Date: 2021-03-04 19:17:33 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804827.md

```text
Hi, I'm resending my patches that add HDMI out and ethernet to the BananaPi M2 Zero device tree. This time, I put all new nodes in alphabetical order and changed the hdmi connector type to "c" (mini-hdmi).

Kind regards,

Pieter Beers

[PATCH 1/2] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out
[PATCH 2/2] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add ethernet


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## \[PATCH 2/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add ethernet

- From: Pieter Beers \<hidden\>
- Date: 2021-03-04 19:17:42 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804828.md

```text
This patch enables the ethernet driver for the BananaPi M2 Zero

The BananaPi M2 Zero does not have an RJ-45 interface, but it
does feature a four-hole header to which an RJ-45 port can be
connected, for a 100 Mbps ethernet link.

Signed-off-by: Pieter Beers <redacted>
---
 arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index 9c7b370b836d..1e87fc190ed3 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -93,6 +93,13 @@
 	status = "okay";
 };
 
+&emac {
+	status = "okay";
+	phy-handle = <&int_mii_phy>;
+	phy-mode = "mii";
+	allwinner,leds-active-low;
+};
+
 &hdmi {
 	status = "okay";
 };
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## \[PATCH 1/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out

- From: Pieter Beers \<hidden\>
- Date: 2021-03-04 19:17:42 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804829.md

```text
Add HDMI out, including the display engine, to the BananaPi
M2 Zero.

Signed-off-by: Pieter Beers <redacted>
---
 .../dts/sun8i-h2-plus-bananapi-m2-zero.dts    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index e76d56a3df9c..9c7b370b836d 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -26,6 +26,17 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	connector {
+		compatible = "hdmi-connector";
+		type = "c";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -74,10 +85,24 @@
 	cpu-supply = <&reg_vdd_cpux>;
 };
 
+&de {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
 
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &mmc0 {
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
-- 
2.17.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## Re: \[PATCH 1/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out

- From: Jernej Škrabec \<hidden\>
- Date: 2021-03-04 19:32:13 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804830.md

```text
Hi!

Dne četrtek, 04. marec 2021 ob 20:14:55 CET je Pieter Beers napisal(a):
> Add HDMI out, including the display engine, to the BananaPi
> M2 Zero.
> 
> Signed-off-by: Pieter Beers <redacted>

This looks good now, so:

Reviewed-by: Jernej Skrabec <redacted>

Nit: In future, please include patch version in all patches, not only cover 
letter.

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## Re: \[PATCH 1/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out

- From: Maxime Ripard \<hidden\>
- Date: 2021-03-08 15:17:38 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804926.md

```text
On Thu, Mar 04, 2021 at 08:14:55PM +0100, Pieter Beers wrote:
> Add HDMI out, including the display engine, to the BananaPi
> M2 Zero.
> 
> Signed-off-by: Pieter Beers <redacted>

Applied, thanks
Maxime
```

## Re: \[PATCH 2/2\] ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add ethernet

- From: Maxime Ripard \<hidden\>
- Date: 2021-03-08 15:47:58 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/03/8804941.md

```text
Hi,

On Thu, Mar 04, 2021 at 08:14:56PM +0100, Pieter Beers wrote:
> This patch enables the ethernet driver for the BananaPi M2 Zero
> 
> The BananaPi M2 Zero does not have an RJ-45 interface, but it
> does feature a four-hole header to which an RJ-45 port can be
> connected, for a 100 Mbps ethernet link.
> 
> Signed-off-by: Pieter Beers <redacted>

All the optional features of a board are typically handled by an
overlay.

Maxime
```
