devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties
@ 2023-09-14  9:45 Robert Marko
  2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Robert Marko @ 2023-09-14  9:45 UTC (permalink / raw)
  To: andrew, gregory.clement, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: luka.perkov, Robert Marko

Rename the GPIO related SFP properties to include the preffered -gpios
suffix as defined in the SFP schema.

This fixes the following warning:
arch/arm64/boot/dts/marvell/armada-3720-eDPU.dtb: sfp-eth1: 'los-gpio', 'mod-def0-gpio', 'tx-disable-gpio', 'tx-fault-gpio' do not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/net/sff,sfp.yaml#

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
index 3f79923376fb..3a9b6907185d 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
@@ -61,10 +61,10 @@ led-alarm2 {
 	sfp_eth1: sfp-eth1 {
 		compatible = "sff,sfp";
 		i2c-bus = <&i2c1>;
-		los-gpio = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
-		mod-def0-gpio = <&gpiosb 8 GPIO_ACTIVE_LOW>;
-		tx-disable-gpio = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
-		tx-fault-gpio = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
+		los-gpios = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpios = <&gpiosb 8 GPIO_ACTIVE_LOW>;
+		tx-disable-gpios = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
+		tx-fault-gpios = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
 		maximum-power-milliwatt = <3000>;
 	};
 };
-- 
2.41.0


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

* [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch
  2023-09-14  9:45 [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Robert Marko
@ 2023-09-14  9:45 ` Robert Marko
  2023-09-14 12:51   ` Andrew Lunn
                     ` (2 more replies)
  2023-09-14 12:48 ` [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Andrew Lunn
  2023-09-20  9:57 ` Gregory CLEMENT
  2 siblings, 3 replies; 8+ messages in thread
From: Robert Marko @ 2023-09-14  9:45 UTC (permalink / raw)
  To: andrew, gregory.clement, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: luka.perkov, Robert Marko

New revision of eDPU uses an Marvell MV88E6361 switch to connect the SFP
cage and G.hn IC instead of connecting them directly to the ethernet
controllers.

U-Boot will enable the switch node and disable the unused ethernet
controller.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 .../boot/dts/marvell/armada-3720-eDPU.dts     | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
index 57fc698e55d0..d6d37a1f6f38 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
@@ -12,3 +12,50 @@ / {
 &eth0 {
 	phy-mode = "2500base-x";
 };
+
+/*
+ * External MV88E6361 switch is only available on v2 of the board.
+ * U-Boot will enable the MDIO bus and switch nodes.
+ */
+&mdio {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&smi_pins>;
+
+	/* Actual device is MV88E6361 */
+	switch: switch@0 {
+		compatible = "marvell,mv88e6190";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0>;
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				label = "cpu";
+				phy-mode = "2500base-x";
+				managed = "in-band-status";
+				ethernet = <&eth0>;
+			};
+
+			port@9 {
+				reg = <9>;
+				label = "downlink";
+				phy-mode = "2500base-x";
+				managed = "in-band-status";
+			};
+
+			port@a {
+				reg = <10>;
+				label = "uplink";
+				phy-mode = "2500base-x";
+				managed = "in-band-status";
+				sfp = <&sfp_eth1>;
+			};
+		};
+	};
+};
-- 
2.41.0


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

* Re: [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties
  2023-09-14  9:45 [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Robert Marko
  2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
@ 2023-09-14 12:48 ` Andrew Lunn
  2023-09-20  9:57 ` Gregory CLEMENT
  2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2023-09-14 12:48 UTC (permalink / raw)
  To: Robert Marko
  Cc: gregory.clement, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel, luka.perkov

On Thu, Sep 14, 2023 at 11:45:00AM +0200, Robert Marko wrote:
> Rename the GPIO related SFP properties to include the preffered -gpios
> suffix as defined in the SFP schema.
> 
> This fixes the following warning:
> arch/arm64/boot/dts/marvell/armada-3720-eDPU.dtb: sfp-eth1: 'los-gpio', 'mod-def0-gpio', 'tx-disable-gpio', 'tx-fault-gpio' do not match any of the regexes: 'pinctrl-[0-9]+'
> from schema $id: http://devicetree.org/schemas/net/sff,sfp.yaml#
> 
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>

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

    Andrew

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

* Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch
  2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
@ 2023-09-14 12:51   ` Andrew Lunn
  2023-09-14 12:52     ` Robert Marko
  2023-09-14 15:05   ` Andrew Lunn
  2023-09-20  9:57   ` Gregory CLEMENT
  2 siblings, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2023-09-14 12:51 UTC (permalink / raw)
  To: Robert Marko
  Cc: gregory.clement, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel, luka.perkov

> +&mdio {
> +	status = "disabled";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&smi_pins>;
> +
> +	/* Actual device is MV88E6361 */
> +	switch: switch@0 {
> +		compatible = "marvell,mv88e6190";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		reg = <0>;
> +		status = "disabled";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				label = "cpu";
> +				phy-mode = "2500base-x";
> +				managed = "in-band-status";
> +				ethernet = <&eth0>;
> +			};
> +

So ports 1 through 7 are completely unused? 

> +			port@9 {
> +				reg = <9>;
> +				label = "downlink";
> +				phy-mode = "2500base-x";
> +				managed = "in-band-status";
> +			};

	Andrew

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

* Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch
  2023-09-14 12:51   ` Andrew Lunn
@ 2023-09-14 12:52     ` Robert Marko
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Marko @ 2023-09-14 12:52 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: gregory.clement, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel, luka.perkov

On Thu, Sep 14, 2023 at 2:51 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > +&mdio {
> > +     status = "disabled";
> > +     pinctrl-names = "default";
> > +     pinctrl-0 = <&smi_pins>;
> > +
> > +     /* Actual device is MV88E6361 */
> > +     switch: switch@0 {
> > +             compatible = "marvell,mv88e6190";
> > +             #address-cells = <1>;
> > +             #size-cells = <0>;
> > +             reg = <0>;
> > +             status = "disabled";
> > +
> > +             ports {
> > +                     #address-cells = <1>;
> > +                     #size-cells = <0>;
> > +
> > +                     port@0 {
> > +                             reg = <0>;
> > +                             label = "cpu";
> > +                             phy-mode = "2500base-x";
> > +                             managed = "in-band-status";
> > +                             ethernet = <&eth0>;
> > +                     };
> > +
>
> So ports 1 through 7 are completely unused?

Yes, only 3 ports are used.
Regards,
Robert
>
> > +                     port@9 {
> > +                             reg = <9>;
> > +                             label = "downlink";
> > +                             phy-mode = "2500base-x";
> > +                             managed = "in-band-status";
> > +                     };
>
>         Andrew



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

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

* Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch
  2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
  2023-09-14 12:51   ` Andrew Lunn
@ 2023-09-14 15:05   ` Andrew Lunn
  2023-09-20  9:57   ` Gregory CLEMENT
  2 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2023-09-14 15:05 UTC (permalink / raw)
  To: Robert Marko
  Cc: gregory.clement, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel, luka.perkov

On Thu, Sep 14, 2023 at 11:45:01AM +0200, Robert Marko wrote:
> New revision of eDPU uses an Marvell MV88E6361 switch to connect the SFP
> cage and G.hn IC instead of connecting them directly to the ethernet
> controllers.
> 
> U-Boot will enable the switch node and disable the unused ethernet
> controller.
> 
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>

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

    Andrew

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

* Re: [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties
  2023-09-14  9:45 [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Robert Marko
  2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
  2023-09-14 12:48 ` [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Andrew Lunn
@ 2023-09-20  9:57 ` Gregory CLEMENT
  2 siblings, 0 replies; 8+ messages in thread
From: Gregory CLEMENT @ 2023-09-20  9:57 UTC (permalink / raw)
  To: Robert Marko, andrew, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: luka.perkov, Robert Marko

Robert Marko <robert.marko@sartura.hr> writes:

> Rename the GPIO related SFP properties to include the preffered -gpios
> suffix as defined in the SFP schema.
>
> This fixes the following warning:
> arch/arm64/boot/dts/marvell/armada-3720-eDPU.dtb: sfp-eth1: 'los-gpio', 'mod-def0-gpio', 'tx-disable-gpio', 'tx-fault-gpio' do not match any of the regexes: 'pinctrl-[0-9]+'
> from schema $id: http://devicetree.org/schemas/net/sff,sfp.yaml#
>

Applied on mvebu/dt64

Thanks,

Gregory
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> ---
>  arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
> index 3f79923376fb..3a9b6907185d 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
> @@ -61,10 +61,10 @@ led-alarm2 {
>  	sfp_eth1: sfp-eth1 {
>  		compatible = "sff,sfp";
>  		i2c-bus = <&i2c1>;
> -		los-gpio = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
> -		mod-def0-gpio = <&gpiosb 8 GPIO_ACTIVE_LOW>;
> -		tx-disable-gpio = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
> -		tx-fault-gpio = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
> +		los-gpios = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
> +		mod-def0-gpios = <&gpiosb 8 GPIO_ACTIVE_LOW>;
> +		tx-disable-gpios = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
> +		tx-fault-gpios = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
>  		maximum-power-milliwatt = <3000>;
>  	};
>  };
> -- 
> 2.41.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

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

* Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch
  2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
  2023-09-14 12:51   ` Andrew Lunn
  2023-09-14 15:05   ` Andrew Lunn
@ 2023-09-20  9:57   ` Gregory CLEMENT
  2 siblings, 0 replies; 8+ messages in thread
From: Gregory CLEMENT @ 2023-09-20  9:57 UTC (permalink / raw)
  To: Robert Marko, andrew, sebastian.hesselbarth, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-kernel, devicetree,
	linux-kernel
  Cc: luka.perkov, Robert Marko

Robert Marko <robert.marko@sartura.hr> writes:

> New revision of eDPU uses an Marvell MV88E6361 switch to connect the SFP
> cage and G.hn IC instead of connecting them directly to the ethernet
> controllers.
>
> U-Boot will enable the switch node and disable the unused ethernet
> controller.
>


Applied on mvebu/dt64

Thanks,

Gregory

> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
> ---
>  .../boot/dts/marvell/armada-3720-eDPU.dts     | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
> index 57fc698e55d0..d6d37a1f6f38 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
> @@ -12,3 +12,50 @@ / {
>  &eth0 {
>  	phy-mode = "2500base-x";
>  };
> +
> +/*
> + * External MV88E6361 switch is only available on v2 of the board.
> + * U-Boot will enable the MDIO bus and switch nodes.
> + */
> +&mdio {
> +	status = "disabled";
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&smi_pins>;
> +
> +	/* Actual device is MV88E6361 */
> +	switch: switch@0 {
> +		compatible = "marvell,mv88e6190";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		reg = <0>;
> +		status = "disabled";
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				label = "cpu";
> +				phy-mode = "2500base-x";
> +				managed = "in-band-status";
> +				ethernet = <&eth0>;
> +			};
> +
> +			port@9 {
> +				reg = <9>;
> +				label = "downlink";
> +				phy-mode = "2500base-x";
> +				managed = "in-band-status";
> +			};
> +
> +			port@a {
> +				reg = <10>;
> +				label = "uplink";
> +				phy-mode = "2500base-x";
> +				managed = "in-band-status";
> +				sfp = <&sfp_eth1>;
> +			};
> +		};
> +	};
> +};
> -- 
> 2.41.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

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

end of thread, other threads:[~2023-09-20  9:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14  9:45 [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Robert Marko
2023-09-14  9:45 ` [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch Robert Marko
2023-09-14 12:51   ` Andrew Lunn
2023-09-14 12:52     ` Robert Marko
2023-09-14 15:05   ` Andrew Lunn
2023-09-20  9:57   ` Gregory CLEMENT
2023-09-14 12:48 ` [PATCH 1/2] arm64: dts: marvell: uDPU: rename the SFP GPIO properties Andrew Lunn
2023-09-20  9:57 ` Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).