ARM: dts: am335x-evm: fix number of cpsw

Message ID 20180908223340.15393-1-grygorii.strashko@ti.com
State New
Headers show
Series
  • ARM: dts: am335x-evm: fix number of cpsw
Related show

Commit Message

Grygorii Strashko Sept. 8, 2018, 10:33 p.m.
am335x-evm has only one CPSW external port physically wired, but DT defines
2 ext. ports. As result, PHY connection failure reported for the second
ext. port.

Update DT to reflect am335x-evm board HW configuration, and, while here,
switch to use phy-handle instead of phy_id.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

---
 arch/arm/boot/dts/am335x-evm.dts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
2.10.5

Comments

Grygorii Strashko Sept. 10, 2018, 8:14 p.m. | #1
Hi Tony,

On 09/08/2018 05:33 PM, Grygorii Strashko wrote:
> am335x-evm has only one CPSW external port physically wired, but DT defines

> 2 ext. ports. As result, PHY connection failure reported for the second

> ext. port.

> 

> Update DT to reflect am335x-evm board HW configuration, and, while here,

> switch to use phy-handle instead of phy_id.

> 

> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

> ---


This is fix. Seems I messed up with subj, should be 
"[PATCH] ARM: dts: am335x-evm: fix number of cpsw slaves"

>   arch/arm/boot/dts/am335x-evm.dts | 12 ++++++------

>   1 file changed, 6 insertions(+), 6 deletions(-)

> 

> diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts

> index 1356fd6..d71f52c 100644

> --- a/arch/arm/boot/dts/am335x-evm.dts

> +++ b/arch/arm/boot/dts/am335x-evm.dts

> @@ -713,6 +713,7 @@

>   	pinctrl-0 = <&cpsw_default>;

>   	pinctrl-1 = <&cpsw_sleep>;

>   	status = "okay";

> +	slaves = <1>;

>   };

>   

>   &davinci_mdio {

> @@ -720,15 +721,14 @@

>   	pinctrl-0 = <&davinci_mdio_default>;

>   	pinctrl-1 = <&davinci_mdio_sleep>;

>   	status = "okay";

> -};

>   

> -&cpsw_emac0 {

> -	phy_id = <&davinci_mdio>, <0>;

> -	phy-mode = "rgmii-txid";

> +	ethphy0: ethernet-phy@0 {

> +		reg = <0>;

> +	};

>   };

>   

> -&cpsw_emac1 {

> -	phy_id = <&davinci_mdio>, <1>;

> +&cpsw_emac0 {

> +	phy-handle = <&ethphy0>;

>   	phy-mode = "rgmii-txid";

>   };

>   

> 


-- 
regards,
-grygorii
Tony Lindgren Sept. 20, 2018, 9:31 p.m. | #2
* Grygorii Strashko <grygorii.strashko@ti.com> [180908 15:37]:
> am335x-evm has only one CPSW external port physically wired, but DT defines

> 2 ext. ports. As result, PHY connection failure reported for the second

> ext. port.

> 

> Update DT to reflect am335x-evm board HW configuration, and, while here,

> switch to use phy-handle instead of phy_id.

> 

> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>


Seems like this has gone unnoticed for years so applying into
omap-for-v4.20/dt. Let me know if this is needed as a fix for the -rc
cycle, seems it just causes some noise on the dmesg.

Regards,

Tony

Patch

diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index 1356fd6..d71f52c 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -713,6 +713,7 @@ 
 	pinctrl-0 = <&cpsw_default>;
 	pinctrl-1 = <&cpsw_sleep>;
 	status = "okay";
+	slaves = <1>;
 };
 
 &davinci_mdio {
@@ -720,15 +721,14 @@ 
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
 	status = "okay";
-};
 
-&cpsw_emac0 {
-	phy_id = <&davinci_mdio>, <0>;
-	phy-mode = "rgmii-txid";
+	ethphy0: ethernet-phy@0 {
+		reg = <0>;
+	};
 };
 
-&cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <1>;
+&cpsw_emac0 {
+	phy-handle = <&ethphy0>;
 	phy-mode = "rgmii-txid";
 };