Devicetree
 help / color / mirror / Atom feed
From: Daniel Golle <daniel@makrotopia.org>
To: Alastair D'Silva <alastair@d-silva.org>
Cc: Junhui Liu <junhui.liu@pigmoral.tech>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Richard Cochran <richardcochran@gmail.com>,
	linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Andre Przywara <andre.przywara@arm.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org,
	Jerome Brunet <jbrunet@baylibre.com>,
	Enzo Adriano <enzo.adriano.code@gmail.com>,
	Norman Herms <dockseed@proton.me>,
	Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com>
Subject: Re: [PATCH v7 7/8] clk: sunxi-ng: a733: Add bus clock gates
Date: Sat, 28 Nov 2026 14:42:06 +0000	[thread overview]
Message-ID: <awroPiqKWB6Wl7yE@makrotopia.org> (raw)
In-Reply-To: <20261125115320.3692954-1-alastair@d-silva.org>

Hi Alastair,

On Wed, Nov 25, 2026 at 10:53:20PM +1100, Alastair D'Silva wrote:
> While bringing up GMAC0 on the OrangePi 4 Pro with this v7 CCU series,
> link-up and DMA broke as soon as clk_disable_unused() ran.
>
> ahb-msi-lite0 (0x5c0, BIT(16)) and mbus-msi-lite0 (0x5e0, BIT(29)) gate
> the shared MSI-Lite0 bus fabric used by GMAC0 and other masters, whereas
> bus-msi-lite0 is only its register configuration clock. Referencing
> ahb-msi-lite0 and mbus-msi-lite0 only in gmac0 does not model the
> shared fabric, and gating them off breaks GMAC0 DMA.
>
> Could you please mark ahb_msi_lite0_clk and mbus_msi_lite0_clk with
> CLK_IS_CRITICAL, matching ahb_store_clk and mbus_store_clk in this
> driver?

I see the same on the Orange Pi 4 Pro, but I would rather not make
these two gates critical.

A gate in front of a shared fabric is still a gate that each master
behind it depends on, and the clock framework already handles sharing:
every master that needs the fabric lists the gates, and they stay
enabled as long as one of them is in use. The A733 USB hosts are in the
same position with mbus-msi-lite2, which both EHCI/OHCI pairs and the
DWC3 controller need, and listing it in those nodes is enough there.

Which masters other than GMAC0 sit behind MSI-Lite0 is not documented.
The vendor CCU marks both gates CLK_IGNORE_UNUSED, and no node in the
vendor device tree names them, so the BSP does not tell us either.
CLK_IS_CRITICAL would keep the fabric clocked on every A733 system,
including those without Ethernet, and the next master that turns out
to need it would work by accident, with nothing in its node saying so.

So I would suggest letting the A733 GMAC binding take ahb-msi-lite0 and
mbus-msi-lite0 as two additional clocks, with GMAC0 in the dtsi
referencing them and the glue driver enabling them, in place of a CCU
change. Any other master found to depend on MSI-Lite0 can then list
the same gates. As you plan to rebase the Orange Pi 4 Pro Ethernet
support on Jerome's GMAC210 series, I will raise the binding side in
that thread.

For transparency: an LLM coding assistant helped with the analysis and
with drafting this reply.

Cheers,
Daniel

  parent reply	other threads:[~2026-11-28 14:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  7:11 [PATCH v7 0/8] clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM Junhui Liu
2026-11-12  7:11 ` [PATCH v7 1/8] dt-bindings: clk: sun60i-a733-ccu: Add Allwinner A733 support Junhui Liu
2026-11-12  7:11 ` [PATCH v7 2/8] clk: sunxi-ng: sdm: Add dual patterns support Junhui Liu
2026-11-12  7:11 ` [PATCH v7 3/8] clk: sunxi-ng: a733: Add PRCM CCU Junhui Liu
2026-11-12  7:11 ` [PATCH v7 4/8] clk: sunxi-ng: a733: Add PLL clocks support Junhui Liu
2026-11-25 12:24   ` Alastair D'Silva
2026-11-26  3:19     ` Junhui Liu
2026-11-26  3:37     ` Junhui Liu
2026-11-26  6:48   ` Alastair D'Silva
2026-11-12  7:11 ` [PATCH v7 5/8] clk: sunxi-ng: a733: Add bus " Junhui Liu
2026-11-12  7:11 ` [PATCH v7 6/8] clk: sunxi-ng: a733: Add mod " Junhui Liu
2026-11-12 14:58   ` Chen-Yu Tsai
2026-11-13  7:18   ` sashiko-bot
2026-11-15 11:55     ` Chen-Yu Tsai
2026-11-12  7:11 ` [PATCH v7 7/8] clk: sunxi-ng: a733: Add bus clock gates Junhui Liu
2026-11-25 11:53   ` Alastair D'Silva
2026-11-26  3:56     ` Chen-Yu Tsai
2026-11-28 14:42     ` Daniel Golle [this message]
2026-11-12  7:11 ` [PATCH v7 8/8] clk: sunxi-ng: a733: Add reset lines Junhui Liu
2026-11-15 12:09 ` [PATCH v7 0/8] clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM Chen-Yu Tsai

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=awroPiqKWB6Wl7yE@makrotopia.org \
    --to=daniel@makrotopia.org \
    --cc=alastair@d-silva.org \
    --cc=alex@ghiti.fr \
    --cc=andre.przywara@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bmasney+clk@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dockseed@proton.me \
    --cc=enzo.adriano.code@gmail.com \
    --cc=jbrunet+clk@baylibre.com \
    --cc=jbrunet@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=junhui.liu@pigmoral.tech \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=vinicius.eduardo.pedrosa@gmail.com \
    --cc=wens@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