2020-09-08 07:32:15

by Andre Heider

[permalink] [raw]
Subject: [PATCH] arm64: dts: marvell: espressobin: Simplify v7 ethernet port labeling

Now that the switch ports have a label in the .dtsi, simplify the whole
"switch0" block for the v7 dts files.

Signed-off-by: Andre Heider <[email protected]>
---

This goes on top of Pali's patch:
"arm64: dts: marvell: espressobin: Add ethernet switch aliases"

The resulting .dtb files are the same.

.../armada-3720-espressobin-v7-emmc.dts | 18 +++++-------------
.../dts/marvell/armada-3720-espressobin-v7.dts | 18 +++++-------------
2 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
index 215d2f702623..61d49d6a2a2a 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
@@ -28,20 +28,12 @@ aliases {
};
};

-&switch0 {
- ports {
- switch0port1: port@1 {
- reg = <1>;
- label = "lan1";
- phy-handle = <&switch0phy0>;
- };
+&switch0port1 {
+ label = "lan1";
+};

- switch0port3: port@3 {
- reg = <3>;
- label = "wan";
- phy-handle = <&switch0phy2>;
- };
- };
+&switch0port3 {
+ label = "wan";
};

/* U11 */
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
index b6f4af8ebafb..44dbe9a21cc7 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
@@ -27,18 +27,10 @@ aliases {
};
};

-&switch0 {
- ports {
- switch0port1: port@1 {
- reg = <1>;
- label = "lan1";
- phy-handle = <&switch0phy0>;
- };
+&switch0port1 {
+ label = "lan1";
+};

- switch0port3: port@3 {
- reg = <3>;
- label = "wan";
- phy-handle = <&switch0phy2>;
- };
- };
+&switch0port3 {
+ label = "wan";
};
--
2.28.0


2020-09-08 07:37:37

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: marvell: espressobin: Simplify v7 ethernet port labeling

On Tuesday 08 September 2020 09:30:50 Andre Heider wrote:
> Now that the switch ports have a label in the .dtsi, simplify the whole
> "switch0" block for the v7 dts files.
>
> Signed-off-by: Andre Heider <[email protected]>

Thank you, looks good!

Reviewed-by: Pali Rohár <[email protected]>

> ---
>
> This goes on top of Pali's patch:
> "arm64: dts: marvell: espressobin: Add ethernet switch aliases"
>
> The resulting .dtb files are the same.
>
> .../armada-3720-espressobin-v7-emmc.dts | 18 +++++-------------
> .../dts/marvell/armada-3720-espressobin-v7.dts | 18 +++++-------------
> 2 files changed, 10 insertions(+), 26 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> index 215d2f702623..61d49d6a2a2a 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> @@ -28,20 +28,12 @@ aliases {
> };
> };
>
> -&switch0 {
> - ports {
> - switch0port1: port@1 {
> - reg = <1>;
> - label = "lan1";
> - phy-handle = <&switch0phy0>;
> - };
> +&switch0port1 {
> + label = "lan1";
> +};
>
> - switch0port3: port@3 {
> - reg = <3>;
> - label = "wan";
> - phy-handle = <&switch0phy2>;
> - };
> - };
> +&switch0port3 {
> + label = "wan";
> };
>
> /* U11 */
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
> index b6f4af8ebafb..44dbe9a21cc7 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
> @@ -27,18 +27,10 @@ aliases {
> };
> };
>
> -&switch0 {
> - ports {
> - switch0port1: port@1 {
> - reg = <1>;
> - label = "lan1";
> - phy-handle = <&switch0phy0>;
> - };
> +&switch0port1 {
> + label = "lan1";
> +};
>
> - switch0port3: port@3 {
> - reg = <3>;
> - label = "wan";
> - phy-handle = <&switch0phy2>;
> - };
> - };
> +&switch0port3 {
> + label = "wan";
> };
> --
> 2.28.0
>

2020-09-08 17:46:25

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: marvell: espressobin: Simplify v7 ethernet port labeling

On Tue, Sep 08, 2020 at 09:30:50AM +0200, Andre Heider wrote:
> Now that the switch ports have a label in the .dtsi, simplify the whole
> "switch0" block for the v7 dts files.
>
> Signed-off-by: Andre Heider <[email protected]>

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

Andrew

2020-09-23 15:05:13

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: marvell: espressobin: Simplify v7 ethernet port labeling

Hi Andre,

> Now that the switch ports have a label in the .dtsi, simplify the whole
> "switch0" block for the v7 dts files.
>
> Signed-off-by: Andre Heider <[email protected]>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>
> This goes on top of Pali's patch:
> "arm64: dts: marvell: espressobin: Add ethernet switch aliases"
>
> The resulting .dtb files are the same.
>
> .../armada-3720-espressobin-v7-emmc.dts | 18 +++++-------------
> .../dts/marvell/armada-3720-espressobin-v7.dts | 18 +++++-------------
> 2 files changed, 10 insertions(+), 26 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> index 215d2f702623..61d49d6a2a2a 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
> @@ -28,20 +28,12 @@ aliases {
> };
> };
>
> -&switch0 {
> - ports {
> - switch0port1: port@1 {
> - reg = <1>;
> - label = "lan1";
> - phy-handle = <&switch0phy0>;
> - };
> +&switch0port1 {
> + label = "lan1";
> +};
>
> - switch0port3: port@3 {
> - reg = <3>;
> - label = "wan";
> - phy-handle = <&switch0phy2>;
> - };
> - };
> +&switch0port3 {
> + label = "wan";
> };
>
> /* U11 */
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
> index b6f4af8ebafb..44dbe9a21cc7 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
> @@ -27,18 +27,10 @@ aliases {
> };
> };
>
> -&switch0 {
> - ports {
> - switch0port1: port@1 {
> - reg = <1>;
> - label = "lan1";
> - phy-handle = <&switch0phy0>;
> - };
> +&switch0port1 {
> + label = "lan1";
> +};
>
> - switch0port3: port@3 {
> - reg = <3>;
> - label = "wan";
> - phy-handle = <&switch0phy2>;
> - };
> - };
> +&switch0port3 {
> + label = "wan";
> };
> --
> 2.28.0
>

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