Devicetree
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2
@ 2024-03-09  1:30 Niklas Söderlund
  2024-03-09 11:41 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Niklas Söderlund @ 2024-03-09  1:30 UTC (permalink / raw)
  To: Geert Uytterhoeven, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-renesas-soc, devicetree
  Cc: Niklas Söderlund

Describe the two Marvel 88Q2110/QFN40 PHYs available on the R-Car V4H
White Hawk RAVB/Ethernet(1000Base-T1) sub-board. The two PHYs are wired
up on the board by default, there is no need to move any resistors which
are needed to access other PHYs available on this sub-board.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
Hello Geert,

This patch depends on the update to the bindings posted in [1] to not
fail DT validation check's. However with this change I can bind to the
two PHYs without having to touch ether the PHY or RAVB drivers, the MDIO
core handle the reset of the MDIO bus.

1. [PACH] dt-bindings: net: renesas,etheravb: Add MDIO bus reset properties
---
 .../renesas/r8a779g0-white-hawk-ethernet.dtsi | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-ethernet.dtsi b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-ethernet.dtsi
index 4f411f95c674..63e0fdae4ff6 100644
--- a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-ethernet.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-ethernet.dtsi
@@ -6,6 +6,38 @@
  * Copyright (C) 2022 Glider bv
  */
 
+&avb1 {
+	pinctrl-0 = <&avb1_pins>;
+	pinctrl-names = "default";
+	phy-handle = <&phy1>;
+	status = "okay";
+	reset-gpios = <&gpio6 1 GPIO_ACTIVE_LOW>;
+	reset-post-delay-us = <4000>;
+
+	phy1: ethernet-phy@1 {
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <0>;
+		interrupt-parent = <&gpio6>;
+		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
+&avb2 {
+	pinctrl-0 = <&avb2_pins>;
+	pinctrl-names = "default";
+	phy-handle = <&phy2>;
+	status = "okay";
+	reset-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
+	reset-post-delay-us = <4000>;
+
+	phy2: ethernet-phy@2 {
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <0>;
+		interrupt-parent = <&gpio5>;
+		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
+
 &i2c0 {
 	eeprom@53 {
 		compatible = "rohm,br24g01", "atmel,24c01";
@@ -14,3 +46,45 @@ eeprom@53 {
 		pagesize = <8>;
 	};
 };
+
+&pfc {
+	avb1_pins: avb1 {
+		mux {
+			groups = "avb1_link", "avb1_mdio", "avb1_rgmii",
+				 "avb1_txcrefclk";
+			function = "avb1";
+		};
+
+		pins_mdio {
+			groups = "avb1_mdio";
+			drive-strength = <24>;
+			bias-disable;
+		};
+
+		pins_mii {
+			groups = "avb1_rgmii";
+			drive-strength = <24>;
+			bias-disable;
+		};
+	};
+
+	avb2_pins: avb2 {
+		mux {
+			groups = "avb2_link", "avb2_mdio", "avb2_rgmii",
+				 "avb2_txcrefclk";
+			function = "avb2";
+		};
+
+		pins_mdio {
+			groups = "avb2_mdio";
+			drive-strength = <24>;
+			bias-disable;
+		};
+
+		pins_mii {
+			groups = "avb2_rgmii";
+			drive-strength = <24>;
+			bias-disable;
+		};
+	};
+};
-- 
2.44.0


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

* Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2
  2024-03-09  1:30 [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2 Niklas Söderlund
@ 2024-03-09 11:41 ` Krzysztof Kozlowski
  2024-03-09 11:54   ` Biju Das
  2024-03-09 14:43   ` Niklas Söderlund
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-09 11:41 UTC (permalink / raw)
  To: Niklas Söderlund, Geert Uytterhoeven, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-renesas-soc, devicetree

On 09/03/2024 02:30, Niklas Söderlund wrote:
> +
> +&pfc {
> +	avb1_pins: avb1 {
> +		mux {
> +			groups = "avb1_link", "avb1_mdio", "avb1_rgmii",
> +				 "avb1_txcrefclk";
> +			function = "avb1";
> +		};
> +
> +		pins_mdio {

You should not use underscores in node names.

Best regards,
Krzysztof


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

* RE: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2
  2024-03-09 11:41 ` Krzysztof Kozlowski
@ 2024-03-09 11:54   ` Biju Das
  2024-03-09 14:44     ` Niklas Söderlund
  2024-03-09 14:43   ` Niklas Söderlund
  1 sibling, 1 reply; 5+ messages in thread
From: Biju Das @ 2024-03-09 11:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Niklas Söderlund, Geert Uytterhoeven,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org



> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Saturday, March 9, 2024 11:41 AM
> Subject: Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2

Typo adv1->avb1??

Cheers,
Biju

> 
> On 09/03/2024 02:30, Niklas Söderlund wrote:
> > +
> > +&pfc {
> > +	avb1_pins: avb1 {
> > +		mux {
> > +			groups = "avb1_link", "avb1_mdio", "avb1_rgmii",
> > +				 "avb1_txcrefclk";
> > +			function = "avb1";
> > +		};
> > +
> > +		pins_mdio {
> 
> You should not use underscores in node names.
> 
> Best regards,
> Krzysztof
> 


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

* Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2
  2024-03-09 11:41 ` Krzysztof Kozlowski
  2024-03-09 11:54   ` Biju Das
@ 2024-03-09 14:43   ` Niklas Söderlund
  1 sibling, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2024-03-09 14:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Geert Uytterhoeven, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-renesas-soc, devicetree

Hi Krzysztof,

Thanks for your feedback.

On 2024-03-09 12:41:11 +0100, Krzysztof Kozlowski wrote:
> On 09/03/2024 02:30, Niklas Söderlund wrote:
> > +
> > +&pfc {
> > +	avb1_pins: avb1 {
> > +		mux {
> > +			groups = "avb1_link", "avb1_mdio", "avb1_rgmii",
> > +				 "avb1_txcrefclk";
> > +			function = "avb1";
> > +		};
> > +
> > +		pins_mdio {
> 
> You should not use underscores in node names.

My bad will fix in v2. Where I also as you suggest in the binding patch 
will use a separate mdio node to describe the bus.

-- 
Kind Regards,
Niklas Söderlund

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

* Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2
  2024-03-09 11:54   ` Biju Das
@ 2024-03-09 14:44     ` Niklas Söderlund
  0 siblings, 0 replies; 5+ messages in thread
From: Niklas Söderlund @ 2024-03-09 14:44 UTC (permalink / raw)
  To: Biju Das
  Cc: Krzysztof Kozlowski, Geert Uytterhoeven, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley,
	linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org

Hi Biju,

Thanks for your reply.

On 2024-03-09 11:54:39 +0000, Biju Das wrote:
> 
> 
> > -----Original Message-----
> > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Sent: Saturday, March 9, 2024 11:41 AM
> > Subject: Re: [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2
> 
> Typo adv1->avb1??

Indeed, will fix.

> 
> Cheers,
> Biju
> 
> > 
> > On 09/03/2024 02:30, Niklas Söderlund wrote:
> > > +
> > > +&pfc {
> > > +	avb1_pins: avb1 {
> > > +		mux {
> > > +			groups = "avb1_link", "avb1_mdio", "avb1_rgmii",
> > > +				 "avb1_txcrefclk";
> > > +			function = "avb1";
> > > +		};
> > > +
> > > +		pins_mdio {
> > 
> > You should not use underscores in node names.
> > 
> > Best regards,
> > Krzysztof
> > 
> 

-- 
Kind Regards,
Niklas Söderlund

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

end of thread, other threads:[~2024-03-09 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-09  1:30 [PATCH] arm64: dts: renesas: white-hawk: ethernet: Describe adv1 and avb2 Niklas Söderlund
2024-03-09 11:41 ` Krzysztof Kozlowski
2024-03-09 11:54   ` Biju Das
2024-03-09 14:44     ` Niklas Söderlund
2024-03-09 14:43   ` Niklas Söderlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox