Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Stefan Dösinger" <stefandoesinger@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks
Date: Thu, 02 Jul 2026 20:47:27 +0000	[thread overview]
Message-ID: <20260702204727.A39C81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260702-zx29clk-v6-9-377b704f80c4@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Required GMAC clock gates lack the CLK_IS_CRITICAL flag and will be disabled by the clock framework.
--

commit 1d4a13593592a02eeff53731204ae6b0376ef509
Author: Stefan Dösinger <stefandoesinger@gmail.com>
Subject: clk: zte: Introduce a driver for zx297520v3 matrix clocks

This commit introduces a new clock driver for the ZTE zx297520v3 matrix
clocks. It defines the matrix muxes, inputs, and gates, mapping them to
the hardware registers. The driver is then registered alongside the
existing topclk driver.

> diff --git a/drivers/clk/zte/clk-zx297520v3.c b/drivers/clk/zte/clk-zx297520v3.c
> index 6fc98f98cf9c8..501f333b84fee 100644
> --- a/drivers/clk/zte/clk-zx297520v3.c
> +++ b/drivers/clk/zte/clk-zx297520v3.c

[ ... ]

> +	/* ZTE's driver has a statemt to the effect of *(top->base+0x11c) = 5, with a comment
> +	 * suggesting that this sets a 50 mhz clock. The clock code itself lists gmac clocks in
> +	 * matrix+110 and lists the parents of these clock as 50mhz gpll output, but the GMAC
> +	 * driver never enables the clocks. It turns out ZTE's code is highly misleading.
> +	 *
> +	 * The GMAC's work clock is definitly not any gpll output because it keeps working fine with
> +	 * gpll disabled. The MDIO speed is mostly unaffected by mpll speed changes, so it is most
> +	 * likely not fed by mpll either. All other PLLs can be disabled without breaking GMAC, so
> +	 * osc26m is the only possible remaining parent.
> +	 *
> +	 * The GMAC Gates are left enabled by the boot loader and are required for the GMAC to work.
> +	 *
> +	 * As for the 50 MHz comment: See rmiiphy_wclk.
> +	 */
> +	GATE(ZX297520V3_GMAC_WCLK,         "gmac_wclk",      clk_main[0],     0x110,  0, 0),
> +	GATE(ZX297520V3_GMAC_PCLK,         "gmac_pclk",      clk_main[0],     0x110,  1, 0),
> +	GATE(ZX297520V3_GMAC_AHB,          "gmac_ahb",       "ahb_wclk",      0x110,  2, 0),

[Severity: High]
Since the comment indicates the GMAC driver never enables these clocks but
they are required for the GMAC to work, will the clock framework's
clk_disable_unused() late initcall turn them off?

If they are left with 0 flags, the unused clock sweep will disable any
unclaimed clocks. Should these gates be marked with CLK_IS_CRITICAL (or
CLK_IGNORE_UNUSED) so they remain enabled and the Ethernet interface
keeps functioning?

> +
> +	GATE(ZX297520V3_MBOX_PCLK,         "mbox_pclk",      clk_main[0],      0x88,  2, 0),

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-zx29clk-v6-0-377b704f80c4@gmail.com?part=9

  reply	other threads:[~2026-07-02 20:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 20:27 [PATCH v6 00/12] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-07-02 20:27 ` [PATCH v6 01/12] dt-bindings: soc: zte: Add zx297520v3 top clock and reset bindings Stefan Dösinger
2026-07-03  6:03   ` Krzysztof Kozlowski
2026-07-03  6:26   ` Krzysztof Kozlowski
2026-07-03 17:20     ` Stefan Dösinger
2026-07-04  8:35       ` Krzysztof Kozlowski
2026-07-02 20:27 ` [PATCH v6 02/12] dt-bindings: soc: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-07-03  6:07   ` Krzysztof Kozlowski
2026-07-02 20:27 ` [PATCH v6 03/12] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-07-02 20:27 ` [PATCH v6 04/12] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 05/12] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 06/12] clk: zte: Add regmap based clocks Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 07/12] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-07-02 20:50   ` sashiko-bot
2026-07-02 20:28 ` [PATCH v6 08/12] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-07-02 20:41   ` sashiko-bot
2026-07-02 20:28 ` [PATCH v6 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks Stefan Dösinger
2026-07-02 20:47   ` sashiko-bot [this message]
2026-07-02 20:28 ` [PATCH v6 10/12] clk: zte: Introduce a driver for zx297520v3 LSP clocks Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 11/12] reset: zte: Add a zx297520v3 reset driver Stefan Dösinger
2026-07-02 20:49   ` sashiko-bot
2026-07-03  9:16   ` Philipp Zabel
2026-07-03 16:19     ` Stefan Dösinger
2026-07-02 20:28 ` [PATCH v6 12/12] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
2026-07-02 20:47   ` sashiko-bot

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=20260702204727.A39C81F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=stefandoesinger@gmail.com \
    /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