2023-09-14 11:14:13

by Robert Marko

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch

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 <[email protected]>
---
.../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


2023-09-14 21:32:00

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch

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 <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2023-09-14 22:02:33

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch

> +&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

2023-09-14 22:22:48

by Robert Marko

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch

On Thu, Sep 14, 2023 at 2:51 PM Andrew Lunn <[email protected]> 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: [email protected]
Web: http://www.sartura.hr

2023-09-20 16:42:13

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: marvell: eDPU: add support for version with external switch

Robert Marko <[email protected]> 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 <[email protected]>
> ---
> .../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