netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs
@ 2019-10-08 11:51 Andrew Jeffery
  2019-10-08 11:51 ` [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible Andrew Jeffery
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-08 11:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, robh+dt, mark.rutland, devicetree, linux-kernel, joel, benh

Hello,

This series slightly extends the devicetree binding and driver for the
FTGMAC100 to describe an optional RMII RCLK gate in the clocks property.
Currently it's necessary for the kernel to ungate RCLK on the AST2600 in NCSI
configurations as u-boot does not yet support NCSI (which uses the RMII).

Please review!

Andrew

Andrew Jeffery (3):
  dt-bindings: net: ftgmac100: Document AST2600 compatible
  dt-bindings: net: ftgmac100: Describe clock properties
  net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs

 .../devicetree/bindings/net/ftgmac100.txt     |  7 ++++
 drivers/net/ethernet/faraday/ftgmac100.c      | 35 +++++++++++++++----
 2 files changed, 35 insertions(+), 7 deletions(-)

-- 
2.20.1


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

* [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible
  2019-10-08 11:51 [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
@ 2019-10-08 11:51 ` Andrew Jeffery
  2019-10-08 12:40   ` Joel Stanley
  2019-10-09  4:38   ` Benjamin Herrenschmidt
  2019-10-08 11:51 ` [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties Andrew Jeffery
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-08 11:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, robh+dt, mark.rutland, devicetree, linux-kernel, joel, benh

The AST2600 contains an FTGMAC100-compatible MAC, although it no-longer
contains an MDIO controller.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 Documentation/devicetree/bindings/net/ftgmac100.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt b/Documentation/devicetree/bindings/net/ftgmac100.txt
index 72e7aaf7242e..04cc0191b7dd 100644
--- a/Documentation/devicetree/bindings/net/ftgmac100.txt
+++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
@@ -9,6 +9,7 @@ Required properties:
 
      - "aspeed,ast2400-mac"
      - "aspeed,ast2500-mac"
+     - "aspeed,ast2600-mac"
 
 - reg: Address and length of the register set for the device
 - interrupts: Should contain ethernet controller interrupt
-- 
2.20.1


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

* [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties
  2019-10-08 11:51 [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
  2019-10-08 11:51 ` [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible Andrew Jeffery
@ 2019-10-08 11:51 ` Andrew Jeffery
  2019-10-08 12:42   ` Joel Stanley
  2019-10-08 11:51 ` [PATCH 3/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
  2019-10-09  0:38 ` [PATCH 0/3] " Florian Fainelli
  3 siblings, 1 reply; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-08 11:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, robh+dt, mark.rutland, devicetree, linux-kernel, joel, benh

Critically, the AST2600 requires ungating the RMII RCLK if e.g. NCSI is
in use.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 Documentation/devicetree/bindings/net/ftgmac100.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt b/Documentation/devicetree/bindings/net/ftgmac100.txt
index 04cc0191b7dd..c443b0b84be5 100644
--- a/Documentation/devicetree/bindings/net/ftgmac100.txt
+++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
@@ -24,6 +24,12 @@ Optional properties:
 - no-hw-checksum: Used to disable HW checksum support. Here for backward
   compatibility as the driver now should have correct defaults based on
   the SoC.
+- clocks: In accordance with the generic clock bindings. Must describe the MAC
+  IP clock, and optionally an RMII RCLK gate for the AST2600.
+- clock-names:
+
+      - "MACCLK": The MAC IP clock
+      - "RCLK": Clock gate for the RMII RCLK
 
 Example:
 
-- 
2.20.1


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

* [PATCH 3/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs
  2019-10-08 11:51 [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
  2019-10-08 11:51 ` [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible Andrew Jeffery
  2019-10-08 11:51 ` [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties Andrew Jeffery
@ 2019-10-08 11:51 ` Andrew Jeffery
  2019-10-08 12:44   ` Joel Stanley
  2019-10-09  0:38 ` [PATCH 0/3] " Florian Fainelli
  3 siblings, 1 reply; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-08 11:51 UTC (permalink / raw)
  To: netdev; +Cc: davem, robh+dt, mark.rutland, devicetree, linux-kernel, joel, benh

The 50MHz RCLK has to be enabled before the RMII interface will function.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 35 +++++++++++++++++++-----
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 9b7af94a40bb..9ff791fb0449 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -90,6 +90,9 @@ struct ftgmac100 {
 	struct mii_bus *mii_bus;
 	struct clk *clk;
 
+	/* 2600 RMII clock gate */
+	struct clk *rclk;
+
 	/* Link management */
 	int cur_speed;
 	int cur_duplex;
@@ -1718,12 +1721,14 @@ static void ftgmac100_ncsi_handler(struct ncsi_dev *nd)
 		   nd->link_up ? "up" : "down");
 }
 
-static void ftgmac100_setup_clk(struct ftgmac100 *priv)
+static int ftgmac100_setup_clk(struct ftgmac100 *priv)
 {
-	priv->clk = devm_clk_get(priv->dev, NULL);
-	if (IS_ERR(priv->clk))
-		return;
+	struct clk *clk;
 
+	clk = devm_clk_get(priv->dev, NULL /* MACCLK */);
+	if (IS_ERR(clk))
+		return PTR_ERR(clk);
+	priv->clk = clk;
 	clk_prepare_enable(priv->clk);
 
 	/* Aspeed specifies a 100MHz clock is required for up to
@@ -1732,6 +1737,14 @@ static void ftgmac100_setup_clk(struct ftgmac100 *priv)
 	 */
 	clk_set_rate(priv->clk, priv->use_ncsi ? FTGMAC_25MHZ :
 			FTGMAC_100MHZ);
+
+	/* RCLK is for RMII, typically used for NCSI. Optional because its not
+	 * necessary if it's the 2400 MAC or the MAC is configured for RGMII
+	 */
+	priv->rclk = devm_clk_get_optional(priv->dev, "RCLK");
+	clk_prepare_enable(priv->rclk);
+
+	return 0;
 }
 
 static int ftgmac100_probe(struct platform_device *pdev)
@@ -1853,8 +1866,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
 			goto err_setup_mdio;
 	}
 
-	if (priv->is_aspeed)
-		ftgmac100_setup_clk(priv);
+	if (priv->is_aspeed) {
+		err = ftgmac100_setup_clk(priv);
+		if (err)
+			goto err_ncsi_dev;
+	}
 
 	/* Default ring sizes */
 	priv->rx_q_entries = priv->new_rx_q_entries = DEF_RX_QUEUE_ENTRIES;
@@ -1886,8 +1902,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
 
 	return 0;
 
-err_ncsi_dev:
 err_register_netdev:
+	if (priv->rclk)
+		clk_disable_unprepare(priv->rclk);
+	clk_disable_unprepare(priv->clk);
+err_ncsi_dev:
 	ftgmac100_destroy_mdio(netdev);
 err_setup_mdio:
 	iounmap(priv->base);
@@ -1909,6 +1928,8 @@ static int ftgmac100_remove(struct platform_device *pdev)
 
 	unregister_netdev(netdev);
 
+	if (priv->rclk)
+		clk_disable_unprepare(priv->rclk);
 	clk_disable_unprepare(priv->clk);
 
 	/* There's a small chance the reset task will have been re-queued,
-- 
2.20.1


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

* Re: [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible
  2019-10-08 11:51 ` [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible Andrew Jeffery
@ 2019-10-08 12:40   ` Joel Stanley
  2019-10-09  4:38   ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2019-10-08 12:40 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: netdev, David S . Miller, Rob Herring, Mark Rutland, devicetree,
	Linux Kernel Mailing List, Benjamin Herrenschmidt

On Tue, 8 Oct 2019 at 11:50, Andrew Jeffery <andrew@aj.id.au> wrote:
>
> The AST2600 contains an FTGMAC100-compatible MAC, although it no-longer
> contains an MDIO controller.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

Acked-by: Joel Stanley <joel@jms.id.au>

> ---
>  Documentation/devicetree/bindings/net/ftgmac100.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt b/Documentation/devicetree/bindings/net/ftgmac100.txt
> index 72e7aaf7242e..04cc0191b7dd 100644
> --- a/Documentation/devicetree/bindings/net/ftgmac100.txt
> +++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
> @@ -9,6 +9,7 @@ Required properties:
>
>       - "aspeed,ast2400-mac"
>       - "aspeed,ast2500-mac"
> +     - "aspeed,ast2600-mac"
>
>  - reg: Address and length of the register set for the device
>  - interrupts: Should contain ethernet controller interrupt
> --
> 2.20.1
>

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

* Re: [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties
  2019-10-08 11:51 ` [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties Andrew Jeffery
@ 2019-10-08 12:42   ` Joel Stanley
  2019-10-09  0:19     ` Andrew Jeffery
  0 siblings, 1 reply; 14+ messages in thread
From: Joel Stanley @ 2019-10-08 12:42 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: netdev, David S . Miller, Rob Herring, Mark Rutland, devicetree,
	Linux Kernel Mailing List, Benjamin Herrenschmidt

On Tue, 8 Oct 2019 at 11:50, Andrew Jeffery <andrew@aj.id.au> wrote:
>
> Critically, the AST2600 requires ungating the RMII RCLK if e.g. NCSI is
> in use.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  Documentation/devicetree/bindings/net/ftgmac100.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt b/Documentation/devicetree/bindings/net/ftgmac100.txt
> index 04cc0191b7dd..c443b0b84be5 100644
> --- a/Documentation/devicetree/bindings/net/ftgmac100.txt
> +++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
> @@ -24,6 +24,12 @@ Optional properties:
>  - no-hw-checksum: Used to disable HW checksum support. Here for backward
>    compatibility as the driver now should have correct defaults based on
>    the SoC.
> +- clocks: In accordance with the generic clock bindings. Must describe the MAC
> +  IP clock, and optionally an RMII RCLK gate for the AST2600.

 or AST2500.

With that fixed you can add my ack.


> +- clock-names:
> +
> +      - "MACCLK": The MAC IP clock
> +      - "RCLK": Clock gate for the RMII RCLK
>
>  Example:
>
> --
> 2.20.1
>

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

* Re: [PATCH 3/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs
  2019-10-08 11:51 ` [PATCH 3/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
@ 2019-10-08 12:44   ` Joel Stanley
  0 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2019-10-08 12:44 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: netdev, David S . Miller, Rob Herring, Mark Rutland, devicetree,
	Linux Kernel Mailing List, Benjamin Herrenschmidt

On Tue, 8 Oct 2019 at 11:50, Andrew Jeffery <andrew@aj.id.au> wrote:
>
> The 50MHz RCLK has to be enabled before the RMII interface will function.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  drivers/net/ethernet/faraday/ftgmac100.c | 35 +++++++++++++++++++-----
>  1 file changed, 28 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index 9b7af94a40bb..9ff791fb0449 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -90,6 +90,9 @@ struct ftgmac100 {
>         struct mii_bus *mii_bus;
>         struct clk *clk;
>
> +       /* 2600 RMII clock gate */
> +       struct clk *rclk;
> +
>         /* Link management */
>         int cur_speed;
>         int cur_duplex;
> @@ -1718,12 +1721,14 @@ static void ftgmac100_ncsi_handler(struct ncsi_dev *nd)
>                    nd->link_up ? "up" : "down");
>  }
>
> -static void ftgmac100_setup_clk(struct ftgmac100 *priv)
> +static int ftgmac100_setup_clk(struct ftgmac100 *priv)
>  {
> -       priv->clk = devm_clk_get(priv->dev, NULL);
> -       if (IS_ERR(priv->clk))
> -               return;
> +       struct clk *clk;
>
> +       clk = devm_clk_get(priv->dev, NULL /* MACCLK */);
> +       if (IS_ERR(clk))
> +               return PTR_ERR(clk);
> +       priv->clk = clk;
>         clk_prepare_enable(priv->clk);
>
>         /* Aspeed specifies a 100MHz clock is required for up to
> @@ -1732,6 +1737,14 @@ static void ftgmac100_setup_clk(struct ftgmac100 *priv)
>          */
>         clk_set_rate(priv->clk, priv->use_ncsi ? FTGMAC_25MHZ :
>                         FTGMAC_100MHZ);
> +
> +       /* RCLK is for RMII, typically used for NCSI. Optional because its not
> +        * necessary if it's the 2400 MAC or the MAC is configured for RGMII
> +        */

Or for non-ASPEED users of this driver, assuming they exist.

Reviewed-by: Joel Stanley <joel@jms.id.au>


> +       priv->rclk = devm_clk_get_optional(priv->dev, "RCLK");
> +       clk_prepare_enable(priv->rclk);
> +
> +       return 0;
>  }
>
>  static int ftgmac100_probe(struct platform_device *pdev)
> @@ -1853,8 +1866,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
>                         goto err_setup_mdio;
>         }
>
> -       if (priv->is_aspeed)
> -               ftgmac100_setup_clk(priv);
> +       if (priv->is_aspeed) {
> +               err = ftgmac100_setup_clk(priv);
> +               if (err)
> +                       goto err_ncsi_dev;
> +       }
>
>         /* Default ring sizes */
>         priv->rx_q_entries = priv->new_rx_q_entries = DEF_RX_QUEUE_ENTRIES;
> @@ -1886,8 +1902,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
>
>         return 0;
>
> -err_ncsi_dev:
>  err_register_netdev:
> +       if (priv->rclk)
> +               clk_disable_unprepare(priv->rclk);
> +       clk_disable_unprepare(priv->clk);
> +err_ncsi_dev:
>         ftgmac100_destroy_mdio(netdev);
>  err_setup_mdio:
>         iounmap(priv->base);
> @@ -1909,6 +1928,8 @@ static int ftgmac100_remove(struct platform_device *pdev)
>
>         unregister_netdev(netdev);
>
> +       if (priv->rclk)
> +               clk_disable_unprepare(priv->rclk);
>         clk_disable_unprepare(priv->clk);
>
>         /* There's a small chance the reset task will have been re-queued,
> --
> 2.20.1
>

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

* Re: [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties
  2019-10-08 12:42   ` Joel Stanley
@ 2019-10-09  0:19     ` Andrew Jeffery
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-09  0:19 UTC (permalink / raw)
  To: Joel Stanley
  Cc: netdev, David Miller, Rob Herring, Mark Rutland, devicetree,
	Linux Kernel Mailing List, Benjamin Herrenschmidt



On Tue, 8 Oct 2019, at 23:12, Joel Stanley wrote:
> On Tue, 8 Oct 2019 at 11:50, Andrew Jeffery <andrew@aj.id.au> wrote:
> >
> > Critically, the AST2600 requires ungating the RMII RCLK if e.g. NCSI is
> > in use.
> >
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> > ---
> >  Documentation/devicetree/bindings/net/ftgmac100.txt | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt b/Documentation/devicetree/bindings/net/ftgmac100.txt
> > index 04cc0191b7dd..c443b0b84be5 100644
> > --- a/Documentation/devicetree/bindings/net/ftgmac100.txt
> > +++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
> > @@ -24,6 +24,12 @@ Optional properties:
> >  - no-hw-checksum: Used to disable HW checksum support. Here for backward
> >    compatibility as the driver now should have correct defaults based on
> >    the SoC.
> > +- clocks: In accordance with the generic clock bindings. Must describe the MAC
> > +  IP clock, and optionally an RMII RCLK gate for the AST2600.
> 
>  or AST2500.
> 
> With that fixed you can add my ack.

I'll do a v2 and fix the comments in the driver patch as well.

Cheers,

Andrew

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

* Re: [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs
  2019-10-08 11:51 [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
                   ` (2 preceding siblings ...)
  2019-10-08 11:51 ` [PATCH 3/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
@ 2019-10-09  0:38 ` Florian Fainelli
  2019-10-09  1:11   ` Joel Stanley
  3 siblings, 1 reply; 14+ messages in thread
From: Florian Fainelli @ 2019-10-09  0:38 UTC (permalink / raw)
  To: Andrew Jeffery, netdev
  Cc: davem, robh+dt, mark.rutland, devicetree, linux-kernel, joel, benh



On 10/8/2019 4:51 AM, Andrew Jeffery wrote:
> Hello,
> 
> This series slightly extends the devicetree binding and driver for the
> FTGMAC100 to describe an optional RMII RCLK gate in the clocks property.
> Currently it's necessary for the kernel to ungate RCLK on the AST2600 in NCSI
> configurations as u-boot does not yet support NCSI (which uses the RMII).

RMII as in Reduced MII or Reverse MII in that context?

> 
> Please review!
> 
> Andrew
> 
> Andrew Jeffery (3):
>   dt-bindings: net: ftgmac100: Document AST2600 compatible
>   dt-bindings: net: ftgmac100: Describe clock properties
>   net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs
> 
>  .../devicetree/bindings/net/ftgmac100.txt     |  7 ++++
>  drivers/net/ethernet/faraday/ftgmac100.c      | 35 +++++++++++++++----
>  2 files changed, 35 insertions(+), 7 deletions(-)
> 

-- 
Florian

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

* Re: [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs
  2019-10-09  0:38 ` [PATCH 0/3] " Florian Fainelli
@ 2019-10-09  1:11   ` Joel Stanley
  0 siblings, 0 replies; 14+ messages in thread
From: Joel Stanley @ 2019-10-09  1:11 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Andrew Jeffery, netdev, David S . Miller, Rob Herring,
	Mark Rutland, devicetree, Linux Kernel Mailing List,
	Benjamin Herrenschmidt

On Wed, 9 Oct 2019 at 00:38, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
>
>
> On 10/8/2019 4:51 AM, Andrew Jeffery wrote:
> > Hello,
> >
> > This series slightly extends the devicetree binding and driver for the
> > FTGMAC100 to describe an optional RMII RCLK gate in the clocks property.
> > Currently it's necessary for the kernel to ungate RCLK on the AST2600 in NCSI
> > configurations as u-boot does not yet support NCSI (which uses the RMII).
>
> RMII as in Reduced MII or Reverse MII in that context?

Reduced MII ( https://en.wikipedia.org/wiki/NC-SI#Hardware_interface )

Cheers,

Joel

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

* Re: [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible
  2019-10-08 11:51 ` [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible Andrew Jeffery
  2019-10-08 12:40   ` Joel Stanley
@ 2019-10-09  4:38   ` Benjamin Herrenschmidt
  2019-10-09  4:49     ` Andrew Jeffery
  1 sibling, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2019-10-09  4:38 UTC (permalink / raw)
  To: Andrew Jeffery, netdev
  Cc: davem, robh+dt, mark.rutland, devicetree, linux-kernel, joel

On Tue, 2019-10-08 at 22:21 +1030, Andrew Jeffery wrote:
> The AST2600 contains an FTGMAC100-compatible MAC, although it no-
> longer
> contains an MDIO controller.

How do you talk to the PHY then ?

Cheers,
Ben.

> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  Documentation/devicetree/bindings/net/ftgmac100.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/ftgmac100.txt
> b/Documentation/devicetree/bindings/net/ftgmac100.txt
> index 72e7aaf7242e..04cc0191b7dd 100644
> --- a/Documentation/devicetree/bindings/net/ftgmac100.txt
> +++ b/Documentation/devicetree/bindings/net/ftgmac100.txt
> @@ -9,6 +9,7 @@ Required properties:
>  
>       - "aspeed,ast2400-mac"
>       - "aspeed,ast2500-mac"
> +     - "aspeed,ast2600-mac"
>  
>  - reg: Address and length of the register set for the device
>  - interrupts: Should contain ethernet controller interrupt


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

* Re: [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible
  2019-10-09  4:38   ` Benjamin Herrenschmidt
@ 2019-10-09  4:49     ` Andrew Jeffery
  2019-10-09  4:55       ` Andrew Jeffery
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-09  4:49 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, netdev
  Cc: David Miller, Rob Herring, mark.rutland, devicetree,
	linux-kernel, Joel Stanley



On Wed, 9 Oct 2019, at 15:08, Benjamin Herrenschmidt wrote:
> On Tue, 2019-10-08 at 22:21 +1030, Andrew Jeffery wrote:
> > The AST2600 contains an FTGMAC100-compatible MAC, although it no-
> > longer
> > contains an MDIO controller.
> 
> How do you talk to the PHY then ?

There are still MDIO controllers, they're just not in the MAC IP on the 2600.

Andrew

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

* Re: [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible
  2019-10-09  4:49     ` Andrew Jeffery
@ 2019-10-09  4:55       ` Andrew Jeffery
  2019-10-10  0:10         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: Andrew Jeffery @ 2019-10-09  4:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, netdev
  Cc: David Miller, Rob Herring, mark.rutland, devicetree,
	linux-kernel, Joel Stanley



On Wed, 9 Oct 2019, at 15:19, Andrew Jeffery wrote:
> 
> 
> On Wed, 9 Oct 2019, at 15:08, Benjamin Herrenschmidt wrote:
> > On Tue, 2019-10-08 at 22:21 +1030, Andrew Jeffery wrote:
> > > The AST2600 contains an FTGMAC100-compatible MAC, although it no-
> > > longer
> > > contains an MDIO controller.
> > 
> > How do you talk to the PHY then ?
> 
> There are still MDIO controllers, they're just not in the MAC IP on the 2600.

Sorry, on reflection that description is a little ambiguous in its use of 'it'. I'll
fix that in v2 as well. Does this read better?

"The AST2600 contains an FTGMAC100-compatible MAC, although the MAC
no-longer contains an MDIO controller."

Andrew

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

* Re: [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible
  2019-10-09  4:55       ` Andrew Jeffery
@ 2019-10-10  0:10         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2019-10-10  0:10 UTC (permalink / raw)
  To: Andrew Jeffery, netdev
  Cc: David Miller, Rob Herring, mark.rutland, devicetree,
	linux-kernel, Joel Stanley

On Wed, 2019-10-09 at 15:25 +1030, Andrew Jeffery wrote:
> 
> On Wed, 9 Oct 2019, at 15:19, Andrew Jeffery wrote:
> > 
> > 
> > On Wed, 9 Oct 2019, at 15:08, Benjamin Herrenschmidt wrote:
> > > On Tue, 2019-10-08 at 22:21 +1030, Andrew Jeffery wrote:
> > > > The AST2600 contains an FTGMAC100-compatible MAC, although it
> > > > no-
> > > > longer
> > > > contains an MDIO controller.
> > > 
> > > How do you talk to the PHY then ?
> > 
> > There are still MDIO controllers, they're just not in the MAC IP on
> > the 2600.
> 
> Sorry, on reflection that description is a little ambiguous in its
> use of 'it'. I'll
> fix that in v2 as well. Does this read better?
> 
> "The AST2600 contains an FTGMAC100-compatible MAC, although the MAC
> no-longer contains an MDIO controller."

That's fine. Or to be pendantic, say the MDIO controller has been moved
of the MAC unit into its own separate block or something along those
lines so people like me don't get anxious :)

Cheers,
Ben.



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

end of thread, other threads:[~2019-10-10  0:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 11:51 [PATCH 0/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
2019-10-08 11:51 ` [PATCH 1/3] dt-bindings: net: ftgmac100: Document AST2600 compatible Andrew Jeffery
2019-10-08 12:40   ` Joel Stanley
2019-10-09  4:38   ` Benjamin Herrenschmidt
2019-10-09  4:49     ` Andrew Jeffery
2019-10-09  4:55       ` Andrew Jeffery
2019-10-10  0:10         ` Benjamin Herrenschmidt
2019-10-08 11:51 ` [PATCH 2/3] dt-bindings: net: ftgmac100: Describe clock properties Andrew Jeffery
2019-10-08 12:42   ` Joel Stanley
2019-10-09  0:19     ` Andrew Jeffery
2019-10-08 11:51 ` [PATCH 3/3] net: ftgmac100: Ungate RCLK for RMII on ASPEED MACs Andrew Jeffery
2019-10-08 12:44   ` Joel Stanley
2019-10-09  0:38 ` [PATCH 0/3] " Florian Fainelli
2019-10-09  1:11   ` Joel Stanley

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).