mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: am335x: update cpsw nodes
@ 2022-07-04 11:49 yegorslists
  2022-07-05  3:53 ` Sascha Hauer
  2022-07-06  5:44 ` Ahmad Fatoum
  0 siblings, 2 replies; 4+ messages in thread
From: yegorslists @ 2022-07-04 11:49 UTC (permalink / raw)
  To: barebox; +Cc: sha

From: Yegor Yefremov <yegorslists@googlemail.com>

Switch to cpsw switchdev definition.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 arch/arm/dts/am335x-baltos-minimal.dts | 29 ++++++++++++++++----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/arch/arm/dts/am335x-baltos-minimal.dts b/arch/arm/dts/am335x-baltos-minimal.dts
index dff901f050..e55a2d7cbb 100644
--- a/arch/arm/dts/am335x-baltos-minimal.dts
+++ b/arch/arm/dts/am335x-baltos-minimal.dts
@@ -399,33 +399,40 @@
 	};
 };
 
-&mac {
+&mac_sw {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&cpsw_default>;
 	pinctrl-1 = <&cpsw_sleep>;
-	dual_emac = <1>;
 
 	status = "okay";
 };
 
-&davinci_mdio {
+&davinci_mdio_sw {
+	status = "okay";
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&davinci_mdio_default>;
 	pinctrl-1 = <&davinci_mdio_sleep>;
 
-	status = "okay";
+	phy1: ethernet-phy@1 {
+		reg = <7>;
+		eee-broken-100tx;
+		eee-broken-1000t;
+	};
 };
 
-&cpsw_emac0 {
-	phy_id = <&davinci_mdio>, <0>;
+&cpsw_port1 {
 	phy-mode = "rmii";
-	dual_emac_res_vlan = <1>;
+	ti,dual-emac-pvid = <1>;
+	fixed-link {
+		speed = <100>;
+		full-duplex;
+	};
 };
 
-&cpsw_emac1 {
-	phy_id = <&davinci_mdio>, <7>;
-	phy-mode = "rgmii-txid";
-	dual_emac_res_vlan = <2>;
+&cpsw_port2 {
+	phy-mode = "rgmii-id";
+	ti,dual-emac-pvid = <2>;
+	phy-handle = <&phy1>;
 };
 
 &mmc1 {
-- 
2.17.0




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

* Re: [PATCH] ARM: dts: am335x: update cpsw nodes
  2022-07-04 11:49 [PATCH] ARM: dts: am335x: update cpsw nodes yegorslists
@ 2022-07-05  3:53 ` Sascha Hauer
  2022-07-06  5:44 ` Ahmad Fatoum
  1 sibling, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2022-07-05  3:53 UTC (permalink / raw)
  To: yegorslists; +Cc: barebox

On Mon, Jul 04, 2022 at 01:49:59PM +0200, yegorslists@googlemail.com wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> Switch to cpsw switchdev definition.
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  arch/arm/dts/am335x-baltos-minimal.dts | 29 ++++++++++++++++----------
>  1 file changed, 18 insertions(+), 11 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/dts/am335x-baltos-minimal.dts b/arch/arm/dts/am335x-baltos-minimal.dts
> index dff901f050..e55a2d7cbb 100644
> --- a/arch/arm/dts/am335x-baltos-minimal.dts
> +++ b/arch/arm/dts/am335x-baltos-minimal.dts
> @@ -399,33 +399,40 @@
>  	};
>  };
>  
> -&mac {
> +&mac_sw {
>  	pinctrl-names = "default", "sleep";
>  	pinctrl-0 = <&cpsw_default>;
>  	pinctrl-1 = <&cpsw_sleep>;
> -	dual_emac = <1>;
>  
>  	status = "okay";
>  };
>  
> -&davinci_mdio {
> +&davinci_mdio_sw {
> +	status = "okay";
>  	pinctrl-names = "default", "sleep";
>  	pinctrl-0 = <&davinci_mdio_default>;
>  	pinctrl-1 = <&davinci_mdio_sleep>;
>  
> -	status = "okay";
> +	phy1: ethernet-phy@1 {
> +		reg = <7>;
> +		eee-broken-100tx;
> +		eee-broken-1000t;
> +	};
>  };
>  
> -&cpsw_emac0 {
> -	phy_id = <&davinci_mdio>, <0>;
> +&cpsw_port1 {
>  	phy-mode = "rmii";
> -	dual_emac_res_vlan = <1>;
> +	ti,dual-emac-pvid = <1>;
> +	fixed-link {
> +		speed = <100>;
> +		full-duplex;
> +	};
>  };
>  
> -&cpsw_emac1 {
> -	phy_id = <&davinci_mdio>, <7>;
> -	phy-mode = "rgmii-txid";
> -	dual_emac_res_vlan = <2>;
> +&cpsw_port2 {
> +	phy-mode = "rgmii-id";
> +	ti,dual-emac-pvid = <2>;
> +	phy-handle = <&phy1>;
>  };
>  
>  &mmc1 {
> -- 
> 2.17.0
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH] ARM: dts: am335x: update cpsw nodes
  2022-07-04 11:49 [PATCH] ARM: dts: am335x: update cpsw nodes yegorslists
  2022-07-05  3:53 ` Sascha Hauer
@ 2022-07-06  5:44 ` Ahmad Fatoum
  2022-07-06  6:13   ` Yegor Yefremov
  1 sibling, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2022-07-06  5:44 UTC (permalink / raw)
  To: yegorslists, barebox; +Cc: sha

Hello Yegor,

On 04.07.22 13:49, yegorslists@googlemail.com wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> Switch to cpsw switchdev definition.

Both bindings should be supported by the same driver in barebox.
Is this just to align with your Linux DT or did you experience breakage?

Cheers,
Ahmad

> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
>  arch/arm/dts/am335x-baltos-minimal.dts | 29 ++++++++++++++++----------
>  1 file changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/dts/am335x-baltos-minimal.dts b/arch/arm/dts/am335x-baltos-minimal.dts
> index dff901f050..e55a2d7cbb 100644
> --- a/arch/arm/dts/am335x-baltos-minimal.dts
> +++ b/arch/arm/dts/am335x-baltos-minimal.dts
> @@ -399,33 +399,40 @@
>  	};
>  };
>  
> -&mac {
> +&mac_sw {
>  	pinctrl-names = "default", "sleep";
>  	pinctrl-0 = <&cpsw_default>;
>  	pinctrl-1 = <&cpsw_sleep>;
> -	dual_emac = <1>;
>  
>  	status = "okay";
>  };
>  
> -&davinci_mdio {
> +&davinci_mdio_sw {
> +	status = "okay";
>  	pinctrl-names = "default", "sleep";
>  	pinctrl-0 = <&davinci_mdio_default>;
>  	pinctrl-1 = <&davinci_mdio_sleep>;
>  
> -	status = "okay";
> +	phy1: ethernet-phy@1 {
> +		reg = <7>;
> +		eee-broken-100tx;
> +		eee-broken-1000t;
> +	};
>  };
>  
> -&cpsw_emac0 {
> -	phy_id = <&davinci_mdio>, <0>;
> +&cpsw_port1 {
>  	phy-mode = "rmii";
> -	dual_emac_res_vlan = <1>;
> +	ti,dual-emac-pvid = <1>;
> +	fixed-link {
> +		speed = <100>;
> +		full-duplex;
> +	};
>  };
>  
> -&cpsw_emac1 {
> -	phy_id = <&davinci_mdio>, <7>;
> -	phy-mode = "rgmii-txid";
> -	dual_emac_res_vlan = <2>;
> +&cpsw_port2 {
> +	phy-mode = "rgmii-id";
> +	ti,dual-emac-pvid = <2>;
> +	phy-handle = <&phy1>;
>  };
>  
>  &mmc1 {


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH] ARM: dts: am335x: update cpsw nodes
  2022-07-06  5:44 ` Ahmad Fatoum
@ 2022-07-06  6:13   ` Yegor Yefremov
  0 siblings, 0 replies; 4+ messages in thread
From: Yegor Yefremov @ 2022-07-06  6:13 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, Sascha Hauer

Hi Ahmad,

On Wed, Jul 6, 2022 at 7:44 AM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> Hello Yegor,
>
> On 04.07.22 13:49, yegorslists@googlemail.com wrote:
> > From: Yegor Yefremov <yegorslists@googlemail.com>
> >
> > Switch to cpsw switchdev definition.
>
> Both bindings should be supported by the same driver in barebox.
> Is this just to align with your Linux DT or did you experience breakage?

barebox couldn't start, because cpsw initialization failed.

Aligning with the upstream Linux DTS was also required, otherwise, the
MACs were set for the old network nodes, and switchdev ones used
internal MAC from TI.

Yegor

> > Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> > ---
> >  arch/arm/dts/am335x-baltos-minimal.dts | 29 ++++++++++++++++----------
> >  1 file changed, 18 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/arm/dts/am335x-baltos-minimal.dts b/arch/arm/dts/am335x-baltos-minimal.dts
> > index dff901f050..e55a2d7cbb 100644
> > --- a/arch/arm/dts/am335x-baltos-minimal.dts
> > +++ b/arch/arm/dts/am335x-baltos-minimal.dts
> > @@ -399,33 +399,40 @@
> >       };
> >  };
> >
> > -&mac {
> > +&mac_sw {
> >       pinctrl-names = "default", "sleep";
> >       pinctrl-0 = <&cpsw_default>;
> >       pinctrl-1 = <&cpsw_sleep>;
> > -     dual_emac = <1>;
> >
> >       status = "okay";
> >  };
> >
> > -&davinci_mdio {
> > +&davinci_mdio_sw {
> > +     status = "okay";
> >       pinctrl-names = "default", "sleep";
> >       pinctrl-0 = <&davinci_mdio_default>;
> >       pinctrl-1 = <&davinci_mdio_sleep>;
> >
> > -     status = "okay";
> > +     phy1: ethernet-phy@1 {
> > +             reg = <7>;
> > +             eee-broken-100tx;
> > +             eee-broken-1000t;
> > +     };
> >  };
> >
> > -&cpsw_emac0 {
> > -     phy_id = <&davinci_mdio>, <0>;
> > +&cpsw_port1 {
> >       phy-mode = "rmii";
> > -     dual_emac_res_vlan = <1>;
> > +     ti,dual-emac-pvid = <1>;
> > +     fixed-link {
> > +             speed = <100>;
> > +             full-duplex;
> > +     };
> >  };
> >
> > -&cpsw_emac1 {
> > -     phy_id = <&davinci_mdio>, <7>;
> > -     phy-mode = "rgmii-txid";
> > -     dual_emac_res_vlan = <2>;
> > +&cpsw_port2 {
> > +     phy-mode = "rgmii-id";
> > +     ti,dual-emac-pvid = <2>;
> > +     phy-handle = <&phy1>;
> >  };
> >
> >  &mmc1 {
>
>
> --
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2022-07-06  6:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 11:49 [PATCH] ARM: dts: am335x: update cpsw nodes yegorslists
2022-07-05  3:53 ` Sascha Hauer
2022-07-06  5:44 ` Ahmad Fatoum
2022-07-06  6:13   ` Yegor Yefremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox