Re: [PATCH v7 7/8] clk: sunxi-ng: a733: Add bus clock gates
From: Daniel Golle
Date: Sat Nov 28 2026 - 09:42:39 EST
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