2021-08-31 13:43:44

by Michael Walle

[permalink] [raw]
Subject: [PATCH 7/7] arm64: dts: ls1028a: use phy-mode instead of phy-connection-type

In linux both are identical, phy-mode is used more often, though. Also
for the ls1028a both phy-connection-type and phy-mode was used, one for
the enetc nodes and the other for the switch nodes. Unify them. But the
main reason for this is that the device tree files can be shared with
the u-boot ones; there the enetc driver only supports the "phy-mode"
property.

Suggested-by: Vladimir Oltean <[email protected]>
Signed-off-by: Michael Walle <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 2 +-
arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts
index 836a9b7d8263..7cd29ab970d9 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dts
@@ -54,6 +54,6 @@ &enetc_port0 {

&enetc_port1 {
phy-handle = <&phy0>;
- phy-connection-type = "rgmii-id";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts
index 77ed0ebd2c75..9b5e92fb753e 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var4.dts
@@ -42,6 +42,6 @@ vddh: vddh-regulator {

&enetc_port1 {
phy-handle = <&phy1>;
- phy-connection-type = "rgmii-id";
+ phy-mode = "rgmii-id";
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts
index b3e9c499e8b0..d74e738e4070 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts
@@ -90,7 +90,7 @@ phy0: ethernet-phy@5 {

&enetc_port0 {
phy-handle = <&phy0>;
- phy-connection-type = "sgmii";
+ phy-mode = "sgmii";
managed = "in-band-status";
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
index f36f87858aef..6e2a1da662fb 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
@@ -320,7 +320,7 @@ mux: mux-controller {

&enetc_port1 {
phy-handle = <&qds_phy1>;
- phy-connection-type = "rgmii-id";
+ phy-mode = "rgmii-id";
status = "okay";
};

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
index ea11b1eb01f8..7719f44bcaed 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
@@ -221,7 +221,7 @@ qsgmii_phy3: ethernet-phy@13 {

&enetc_port0 {
phy-handle = <&sgmii_phy0>;
- phy-connection-type = "sgmii";
+ phy-mode = "sgmii";
managed = "in-band-status";
status = "okay";
};
--
2.30.2


2021-08-31 14:01:19

by Vladimir Oltean

[permalink] [raw]
Subject: Re: [PATCH 7/7] arm64: dts: ls1028a: use phy-mode instead of phy-connection-type

On Tue, Aug 31, 2021 at 03:40:13PM +0200, Michael Walle wrote:
> In linux both are identical, phy-mode is used more often, though. Also
> for the ls1028a both phy-connection-type and phy-mode was used, one for
> the enetc nodes and the other for the switch nodes. Unify them. But the
> main reason for this is that the device tree files can be shared with
> the u-boot ones; there the enetc driver only supports the "phy-mode"
> property.
>
> Suggested-by: Vladimir Oltean <[email protected]>
> Signed-off-by: Michael Walle <[email protected]>
> ---

Actually that is not really a valid reason in itself for this change.
The enetc U-Boot driver is perhaps a bit silly in that it calls
ofnode_read_string(dev_ofnode(dev), "phy-mode") manually, especially
since right below, it uses dm_eth_phy_connect() which searches for both.

So we are artificially restricting what we support. It would be fine to
do the dm_eth_phy_connect first, then use phy->interface for enetc_start_pcs().

Anyway, I do not mind the patch at all.

Reviewed-by: Vladimir Oltean <[email protected]>

2021-08-31 14:08:35

by Michael Walle

[permalink] [raw]
Subject: Re: [PATCH 7/7] arm64: dts: ls1028a: use phy-mode instead of phy-connection-type

Am 2021-08-31 15:59, schrieb Vladimir Oltean:
> On Tue, Aug 31, 2021 at 03:40:13PM +0200, Michael Walle wrote:
>> In linux both are identical, phy-mode is used more often, though. Also
>> for the ls1028a both phy-connection-type and phy-mode was used, one
>> for
>> the enetc nodes and the other for the switch nodes. Unify them. But
>> the
>> main reason for this is that the device tree files can be shared with
>> the u-boot ones; there the enetc driver only supports the "phy-mode"
>> property.
>>
>> Suggested-by: Vladimir Oltean <[email protected]>
>> Signed-off-by: Michael Walle <[email protected]>
>> ---
>
> Actually that is not really a valid reason in itself for this change.
> The enetc U-Boot driver is perhaps a bit silly in that it calls
> ofnode_read_string(dev_ofnode(dev), "phy-mode") manually, especially
> since right below, it uses dm_eth_phy_connect() which searches for
> both.
>
> So we are artificially restricting what we support. It would be fine to
> do the dm_eth_phy_connect first, then use phy->interface for
> enetc_start_pcs().

You mean in u-boot. I had a patch for it, but because you suggested
to convert it to the new property name, it isn't really needed anyway.
u-boot is just using the device trees within its source tree, so I
didn't care anymore ;)

> Anyway, I do not mind the patch at all.
>
> Reviewed-by: Vladimir Oltean <[email protected]>
Thanks!

-michael