netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH net-next v2 3/3] net: stmmac: Add DWMAC glue layer for Renesas GBETH
Date: Sun, 9 Mar 2025 08:50:28 +0000	[thread overview]
Message-ID: <Z81WVNGlvRNW5JFk@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250308200921.1089980-4-prabhakar.mahadev-lad.rj@bp.renesas.com>

On Sat, Mar 08, 2025 at 08:09:21PM +0000, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Add the DWMAC glue layer for the GBETH IP found in the Renesas RZ/V2H(P)
> SoC.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v1->v2
> - Dropped __initconst for renesas_gbeth_clks array
> - Added clks_config callback
> - Dropped STMMAC_FLAG_RX_CLK_RUNS_IN_LPI flag as this needs
>   investigation.

I thought you had got to the bottom of this, and it was a bug in your
clock driver?

> + * The Rx and Tx clocks are supplied as follows for the GBETH IP.
> + *
> + *                         Rx / Tx
> + *   -------+------------- on / off -------
> + *          |
> + *          |            Rx-180 / Tx-180
> + *          +---- not ---- on / off -------

Thanks for the diagram.

> +struct renesas_gbeth {
> +	struct device *dev;
> +	void __iomem *regs;
> +	unsigned int num_clks;
> +	struct clk *clk_tx_i;
> +	struct clk_bulk_data *clks;
> +	struct reset_control *rstc;
> +};

If you stored a pointer to struct plat_stmmacenet_data, then you
wouldn't need num_clks, clk_tx_i or clks. If you look at
dwmac-dwc-qos-eth.c, I recently added a helper (dwc_eth_find_clk())
which could be made generic.

You can then include the clk_tx_i clock in the bulk clock, and
use the helper to set plat_dat->clk_tx_i.

> +	plat_dat->flags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY |
> +			   STMMAC_FLAG_EN_TX_LPI_CLOCKGATING |

Didn't I send you a patch that provides
STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP so we can move towards the PHY
saying whether it permits the TX clock to be disabled?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2025-03-09  8:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-08 20:09 [PATCH net-next v2 0/3] Add GBETH glue layer driver for Renesas RZ/V2H(P) SoC Prabhakar
2025-03-08 20:09 ` [PATCH net-next v2 1/3] dt-bindings: net: dwmac: Increase 'maxItems' for 'interrupts' and 'interrupt-names' Prabhakar
2025-03-10 21:30   ` Rob Herring
2025-03-11  7:16     ` Lad, Prabhakar
2025-03-11  8:50       ` Lad, Prabhakar
2025-03-08 20:09 ` [PATCH net-next v2 2/3] dt-bindings: net: Document support for Renesas RZ/V2H(P) GBETH Prabhakar
2025-03-10 21:31   ` Rob Herring (Arm)
2025-03-08 20:09 ` [PATCH net-next v2 3/3] net: stmmac: Add DWMAC glue layer for Renesas GBETH Prabhakar
2025-03-09  8:50   ` Russell King (Oracle) [this message]
2025-03-09 11:24     ` Lad, Prabhakar
2025-03-09 12:18       ` Russell King (Oracle)
2025-03-09 21:06         ` Lad, Prabhakar
2025-03-09  8:53   ` [PATCH net-next] net: stmmac: allow platforms to use PHY tx clock stop capability Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z81WVNGlvRNW5JFk@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=joabreu@synopsys.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).