linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: ftgmac100: support fixed link
@ 2022-09-05 23:56 rentao.bupt
  2022-09-05 23:56 ` [PATCH net-next 1/2] " rentao.bupt
  2022-09-05 23:56 ` [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller rentao.bupt
  0 siblings, 2 replies; 11+ messages in thread
From: rentao.bupt @ 2022-09-05 23:56 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel

From: Tao Ren <taoren@fb.com>

The patch series adds fixed link support to ftgmac100 driver.

Patch #1 adds fixed link logic into ftgmac100 driver.

Patch #2 enables mac3 controller in Elbert dts, and mac3 is connected to
the onboard switch directly.

Tao Ren (2):
  net: ftgmac100: support fixed link
  ARM: dts: aspeed: elbert: Enable mac3 controller

 .../boot/dts/aspeed-bmc-facebook-elbert.dts   | 11 +++++++++
 drivers/net/ethernet/faraday/ftgmac100.c      | 24 +++++++++++++++++++
 2 files changed, 35 insertions(+)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH net-next 1/2] net: ftgmac100: support fixed link
  2022-09-05 23:56 [PATCH net-next 0/2] net: ftgmac100: support fixed link rentao.bupt
@ 2022-09-05 23:56 ` rentao.bupt
  2022-09-06  0:24   ` Andrew Lunn
  2022-09-05 23:56 ` [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller rentao.bupt
  1 sibling, 1 reply; 11+ messages in thread
From: rentao.bupt @ 2022-09-05 23:56 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Tao Ren

From: Tao Ren <rentao.bupt@gmail.com>

Support fixed link in ftgmac100 driver. Fixed link is used on several
Meta OpenBMC platforms, such as Elbert (AST2620) and Wedge400 (AST2520).

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 9277d5fb5052..da04beee5865 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1701,10 +1701,14 @@ static int ftgmac100_setup_mdio(struct net_device *netdev)
 
 static void ftgmac100_phy_disconnect(struct net_device *netdev)
 {
+	struct ftgmac100 *priv = netdev_priv(netdev);
+
 	if (!netdev->phydev)
 		return;
 
 	phy_disconnect(netdev->phydev);
+	if (of_phy_is_fixed_link(priv->dev->of_node))
+		of_phy_deregister_fixed_link(priv->dev->of_node);
 }
 
 static void ftgmac100_destroy_mdio(struct net_device *netdev)
@@ -1867,6 +1871,26 @@ static int ftgmac100_probe(struct platform_device *pdev)
 			err = -EINVAL;
 			goto err_phy_connect;
 		}
+	} else if (np && of_phy_is_fixed_link(np)) {
+		struct phy_device *phy;
+
+		err = of_phy_register_fixed_link(np);
+		if (err) {
+			dev_err(&pdev->dev, "Failed to register fixed PHY\n");
+			goto err_phy_connect;
+		}
+
+		phy = of_phy_get_and_connect(priv->netdev, np,
+					     &ftgmac100_adjust_link);
+		if (!phy) {
+			dev_err(&pdev->dev, "Failed to connect to fixed PHY\n");
+			of_phy_deregister_fixed_link(np);
+			err = -EINVAL;
+			goto err_phy_connect;
+		}
+
+		/* Display what we found */
+		phy_attached_info(phy);
 	} else if (np && of_get_property(np, "phy-handle", NULL)) {
 		struct phy_device *phy;
 
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-05 23:56 [PATCH net-next 0/2] net: ftgmac100: support fixed link rentao.bupt
  2022-09-05 23:56 ` [PATCH net-next 1/2] " rentao.bupt
@ 2022-09-05 23:56 ` rentao.bupt
  2022-09-06  0:22   ` Andrew Lunn
  1 sibling, 1 reply; 11+ messages in thread
From: rentao.bupt @ 2022-09-05 23:56 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Tao Ren

From: Tao Ren <rentao.bupt@gmail.com>

Enable mac3 controller in Elbert dts: Elbert MAC3 is connected to the
onboard switch directly (fixed link).

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
---
 arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
index 27b43fe099f1..52cb617783ac 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
@@ -183,3 +183,14 @@ imux31: i2c@7 {
 &i2c11 {
 	status = "okay";
 };
+
+&mac3 {
+	status = "okay";
+	phy-mode = "rgmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii4_default>;
+	fixed-link {
+		speed = <1000>;
+		full-duplex;
+	};
+};
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-05 23:56 ` [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller rentao.bupt
@ 2022-09-06  0:22   ` Andrew Lunn
  2022-09-06  1:41     ` Tao Ren
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2022-09-06  0:22 UTC (permalink / raw)
  To: rentao.bupt
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel

On Mon, Sep 05, 2022 at 04:56:34PM -0700, rentao.bupt@gmail.com wrote:
> From: Tao Ren <rentao.bupt@gmail.com>
> 
> Enable mac3 controller in Elbert dts: Elbert MAC3 is connected to the
> onboard switch directly (fixed link).

What is the switch? Could you also add a DT node for it?

> 
> Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> index 27b43fe099f1..52cb617783ac 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> @@ -183,3 +183,14 @@ imux31: i2c@7 {
>  &i2c11 {
>  	status = "okay";
>  };
> +
> +&mac3 {
> +	status = "okay";
> +	phy-mode = "rgmii";

'rgmii' is suspicious, though not necessarily wrong. This value is
normally passed to the PHY, so the PHY inserts the RGMII delay. You
however don't have a PHY. So i assume the switch is inserting the
delay? Again, being able to see the DT properties for the switch would
be useful.

   Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 1/2] net: ftgmac100: support fixed link
  2022-09-05 23:56 ` [PATCH net-next 1/2] " rentao.bupt
@ 2022-09-06  0:24   ` Andrew Lunn
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2022-09-06  0:24 UTC (permalink / raw)
  To: rentao.bupt
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel

On Mon, Sep 05, 2022 at 04:56:33PM -0700, rentao.bupt@gmail.com wrote:
> From: Tao Ren <rentao.bupt@gmail.com>
> 
> Support fixed link in ftgmac100 driver. Fixed link is used on several
> Meta OpenBMC platforms, such as Elbert (AST2620) and Wedge400 (AST2520).
> 
> Signed-off-by: Tao Ren <rentao.bupt@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-06  0:22   ` Andrew Lunn
@ 2022-09-06  1:41     ` Tao Ren
  2022-09-06 11:55       ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: Tao Ren @ 2022-09-06  1:41 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel

Hi Andrew,

On Tue, Sep 06, 2022 at 02:22:50AM +0200, Andrew Lunn wrote:
> On Mon, Sep 05, 2022 at 04:56:34PM -0700, rentao.bupt@gmail.com wrote:
> > From: Tao Ren <rentao.bupt@gmail.com>
> > 
> > Enable mac3 controller in Elbert dts: Elbert MAC3 is connected to the
> > onboard switch directly (fixed link).
> 
> What is the switch? Could you also add a DT node for it?
> 
> > 
> > Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
> > ---
> >  arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > index 27b43fe099f1..52cb617783ac 100644
> > --- a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > @@ -183,3 +183,14 @@ imux31: i2c@7 {
> >  &i2c11 {
> >  	status = "okay";
> >  };
> > +
> > +&mac3 {
> > +	status = "okay";
> > +	phy-mode = "rgmii";
> 
> 'rgmii' is suspicious, though not necessarily wrong. This value is
> normally passed to the PHY, so the PHY inserts the RGMII delay. You
> however don't have a PHY. So i assume the switch is inserting the
> delay? Again, being able to see the DT properties for the switch would
> be useful.
> 
>    Andrew

Thank you for the quick review!

The BMC mac3 is connected to BCM53134P's IMP_RGMII port, and there is no
PHY between BMC MAC and BCM53134P. BCM53134P loads configurations from
its EEPROM when the chip is powered.

Could you please point me an example showing how to describe the switch in
dts? Anyhow I will need to improve the patch description and comments in
v2.


Thanks,

- Tao

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-06  1:41     ` Tao Ren
@ 2022-09-06 11:55       ` Andrew Lunn
  2022-09-06 17:05         ` Florian Fainelli
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2022-09-06 11:55 UTC (permalink / raw)
  To: Tao Ren
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel, Florian Fainelli

On Mon, Sep 05, 2022 at 06:41:33PM -0700, Tao Ren wrote:
> Hi Andrew,
> 
> On Tue, Sep 06, 2022 at 02:22:50AM +0200, Andrew Lunn wrote:
> > On Mon, Sep 05, 2022 at 04:56:34PM -0700, rentao.bupt@gmail.com wrote:
> > > From: Tao Ren <rentao.bupt@gmail.com>
> > > 
> > > Enable mac3 controller in Elbert dts: Elbert MAC3 is connected to the
> > > onboard switch directly (fixed link).
> > 
> > What is the switch? Could you also add a DT node for it?
> > 
> > > 
> > > Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
> > > ---
> > >  arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > > index 27b43fe099f1..52cb617783ac 100644
> > > --- a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > > +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > > @@ -183,3 +183,14 @@ imux31: i2c@7 {
> > >  &i2c11 {
> > >  	status = "okay";
> > >  };
> > > +
> > > +&mac3 {
> > > +	status = "okay";
> > > +	phy-mode = "rgmii";
> > 
> > 'rgmii' is suspicious, though not necessarily wrong. This value is
> > normally passed to the PHY, so the PHY inserts the RGMII delay. You
> > however don't have a PHY. So i assume the switch is inserting the
> > delay? Again, being able to see the DT properties for the switch would
> > be useful.
> > 
> >    Andrew
> 
> Thank you for the quick review!
> 
> The BMC mac3 is connected to BCM53134P's IMP_RGMII port, and there is no
> PHY between BMC MAC and BCM53134P. BCM53134P loads configurations from
> its EEPROM when the chip is powered.

So i assume you have the switch RGMII port doing the delays. That is
fine.

> Could you please point me an example showing how to describe the switch in
> dts? Anyhow I will need to improve the patch description and comments in
> v2.

It looks like drivers/net/dsa/b53 does not support this particular
switch. You could consider extending the driver. See

Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml

for documentation of the binding.

    Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-06 11:55       ` Andrew Lunn
@ 2022-09-06 17:05         ` Florian Fainelli
  2022-09-06 23:35           ` Tao Ren
  0 siblings, 1 reply; 11+ messages in thread
From: Florian Fainelli @ 2022-09-06 17:05 UTC (permalink / raw)
  To: Andrew Lunn, Tao Ren
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Heyi Guo, Dylan Hung, Guangbin Huang, Liang He, Hao Chen,
	Rob Herring, Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery,
	Tao Ren, netdev, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel



On 9/6/2022 4:55 AM, Andrew Lunn wrote:
> On Mon, Sep 05, 2022 at 06:41:33PM -0700, Tao Ren wrote:
>> Hi Andrew,
>>
>> On Tue, Sep 06, 2022 at 02:22:50AM +0200, Andrew Lunn wrote:
>>> On Mon, Sep 05, 2022 at 04:56:34PM -0700, rentao.bupt@gmail.com wrote:
>>>> From: Tao Ren <rentao.bupt@gmail.com>
>>>>
>>>> Enable mac3 controller in Elbert dts: Elbert MAC3 is connected to the
>>>> onboard switch directly (fixed link).
>>>
>>> What is the switch? Could you also add a DT node for it?
>>>
>>>>
>>>> Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
>>>> ---
>>>>   arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 11 +++++++++++
>>>>   1 file changed, 11 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
>>>> index 27b43fe099f1..52cb617783ac 100644
>>>> --- a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
>>>> +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
>>>> @@ -183,3 +183,14 @@ imux31: i2c@7 {
>>>>   &i2c11 {
>>>>   	status = "okay";
>>>>   };
>>>> +
>>>> +&mac3 {
>>>> +	status = "okay";
>>>> +	phy-mode = "rgmii";
>>>
>>> 'rgmii' is suspicious, though not necessarily wrong. This value is
>>> normally passed to the PHY, so the PHY inserts the RGMII delay. You
>>> however don't have a PHY. So i assume the switch is inserting the
>>> delay? Again, being able to see the DT properties for the switch would
>>> be useful.
>>>
>>>     Andrew
>>
>> Thank you for the quick review!
>>
>> The BMC mac3 is connected to BCM53134P's IMP_RGMII port, and there is no
>> PHY between BMC MAC and BCM53134P. BCM53134P loads configurations from
>> its EEPROM when the chip is powered.
> 
> So i assume you have the switch RGMII port doing the delays. That is
> fine.
> 
>> Could you please point me an example showing how to describe the switch in
>> dts? Anyhow I will need to improve the patch description and comments in
>> v2.
> 
> It looks like drivers/net/dsa/b53 does not support this particular
> switch. You could consider extending the driver. See
> 
> Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> 
> for documentation of the binding.

Correct the 53134 is not supported at the moment by the b53 driver, 
however it should not be too hard to support it, if you would be willing 
to add it, I would be glad to review patches.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-06 17:05         ` Florian Fainelli
@ 2022-09-06 23:35           ` Tao Ren
  2022-09-07  0:36             ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: Tao Ren @ 2022-09-06 23:35 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heyi Guo, Dylan Hung, Guangbin Huang, Liang He,
	Hao Chen, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, Tao Ren, netdev, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel

Hi Florian and Andrew,

On Tue, Sep 06, 2022 at 10:05:46AM -0700, Florian Fainelli wrote:
> 
> 
> On 9/6/2022 4:55 AM, Andrew Lunn wrote:
> > On Mon, Sep 05, 2022 at 06:41:33PM -0700, Tao Ren wrote:
> > > Hi Andrew,
> > > 
> > > On Tue, Sep 06, 2022 at 02:22:50AM +0200, Andrew Lunn wrote:
> > > > On Mon, Sep 05, 2022 at 04:56:34PM -0700, rentao.bupt@gmail.com wrote:
> > > > > From: Tao Ren <rentao.bupt@gmail.com>
> > > > > 
> > > > > Enable mac3 controller in Elbert dts: Elbert MAC3 is connected to the
> > > > > onboard switch directly (fixed link).
> > > > 
> > > > What is the switch? Could you also add a DT node for it?
> > > > 
> > > > > 
> > > > > Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
> > > > > ---
> > > > >   arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts | 11 +++++++++++
> > > > >   1 file changed, 11 insertions(+)
> > > > > 
> > > > > diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > > > > index 27b43fe099f1..52cb617783ac 100644
> > > > > --- a/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > > > > +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-elbert.dts
> > > > > @@ -183,3 +183,14 @@ imux31: i2c@7 {
> > > > >   &i2c11 {
> > > > >   	status = "okay";
> > > > >   };
> > > > > +
> > > > > +&mac3 {
> > > > > +	status = "okay";
> > > > > +	phy-mode = "rgmii";
> > > > 
> > > > 'rgmii' is suspicious, though not necessarily wrong. This value is
> > > > normally passed to the PHY, so the PHY inserts the RGMII delay. You
> > > > however don't have a PHY. So i assume the switch is inserting the
> > > > delay? Again, being able to see the DT properties for the switch would
> > > > be useful.
> > > > 
> > > >     Andrew
> > > 
> > > Thank you for the quick review!
> > > 
> > > The BMC mac3 is connected to BCM53134P's IMP_RGMII port, and there is no
> > > PHY between BMC MAC and BCM53134P. BCM53134P loads configurations from
> > > its EEPROM when the chip is powered.
> > 
> > So i assume you have the switch RGMII port doing the delays. That is
> > fine.
> > 
> > > Could you please point me an example showing how to describe the switch in
> > > dts? Anyhow I will need to improve the patch description and comments in
> > > v2.
> > 
> > It looks like drivers/net/dsa/b53 does not support this particular
> > switch. You could consider extending the driver. See
> > 
> > Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> > 
> > for documentation of the binding.
> 
> Correct the 53134 is not supported at the moment by the b53 driver, however
> it should not be too hard to support it, if you would be willing to add it,
> I would be glad to review patches.
> -- 
> Florian

Thank you for the inputs, and I do have plan to dig into dsa drivers and
work out patches when I get chance, because most FBOSS switches have
onboard switch chips connecting BMC and Host to the front-panel
management port.

Specific to this Elbert platform, we don't have plan to configure
BCM53134 via OpenBMC MDIO (dts), because we expect the switch always
loads configurations from its EEPROM.

I've sent out v2 with more comments in the dts file; could you please
check and let me know if it's reasonable/acceptable? Thank you.


Thanks,

Tao

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-06 23:35           ` Tao Ren
@ 2022-09-07  0:36             ` Andrew Lunn
  2022-09-07  1:08               ` Tao Ren
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2022-09-07  0:36 UTC (permalink / raw)
  To: Tao Ren
  Cc: Florian Fainelli, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heyi Guo, Dylan Hung, Guangbin Huang, Liang He,
	Hao Chen, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, Tao Ren, netdev, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel

> Specific to this Elbert platform, we don't have plan to configure
> BCM53134 via OpenBMC MDIO (dts), because we expect the switch always
> loads configurations from its EEPROM.

DSA offers more than configuration. You can also get interface
statistics, and knowledge of if an interface is up/down. And since the
PHY of the switch becomes normal Linux PHYs, you can do cable testing,
if the PHY has support, etc.

Do you have spanning tree to break L2 network loops? Linux will
provide that as well.

However, if you are happy with dumb switch, then what you posted is
sufficient.

	Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller
  2022-09-07  0:36             ` Andrew Lunn
@ 2022-09-07  1:08               ` Tao Ren
  0 siblings, 0 replies; 11+ messages in thread
From: Tao Ren @ 2022-09-07  1:08 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Florian Fainelli, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heyi Guo, Dylan Hung, Guangbin Huang, Liang He,
	Hao Chen, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, Tao Ren, netdev, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel

Hi Andrew,

On Wed, Sep 07, 2022 at 02:36:33AM +0200, Andrew Lunn wrote:
> > Specific to this Elbert platform, we don't have plan to configure
> > BCM53134 via OpenBMC MDIO (dts), because we expect the switch always
> > loads configurations from its EEPROM.
> 
> DSA offers more than configuration. You can also get interface
> statistics, and knowledge of if an interface is up/down. And since the
> PHY of the switch becomes normal Linux PHYs, you can do cable testing,
> if the PHY has support, etc.
> 
> Do you have spanning tree to break L2 network loops? Linux will
> provide that as well.
> 
> However, if you are happy with dumb switch, then what you posted is
> sufficient.
> 
> 	Andrew

Apprently I have very limited knowledge in DSA area, because I didn't
know these features.

I will keep the patch series as is for now, to at least enable ethernet
in Elbert OpenBMC, and will work out new patch series to add BCM53134 in
DSA later.

Thanks again for the review.


Cheers,

Tao


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-09-07  1:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 23:56 [PATCH net-next 0/2] net: ftgmac100: support fixed link rentao.bupt
2022-09-05 23:56 ` [PATCH net-next 1/2] " rentao.bupt
2022-09-06  0:24   ` Andrew Lunn
2022-09-05 23:56 ` [PATCH net-next 2/2] ARM: dts: aspeed: elbert: Enable mac3 controller rentao.bupt
2022-09-06  0:22   ` Andrew Lunn
2022-09-06  1:41     ` Tao Ren
2022-09-06 11:55       ` Andrew Lunn
2022-09-06 17:05         ` Florian Fainelli
2022-09-06 23:35           ` Tao Ren
2022-09-07  0:36             ` Andrew Lunn
2022-09-07  1:08               ` Tao Ren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).