Re: [PATCH 3/6] clk: sunxi-ng: a733: Mark mbus-msi-lite2 clock as critical

From: Daniel Golle

Date: Sat Nov 28 2026 - 10:01:19 EST


Hi Alastair,

On Fri, Nov 27, 2026 at 09:08:05PM +1100, Alastair D'Silva wrote:
> The mbus-msi-lite2 clock gates the shared MSI-Lite2 DMA fabric used by the
> USB controllers. Without CLK_IS_CRITICAL, clk_disable_unused() gates it off
> and breaks USB 2.0 host DMA transfers.
>
> Mark mbus-msi-lite2 as CLK_IS_CRITICAL, matching mbus-store in this driver.

I ran into the same on the Orange Pi 4 Pro: once the gate is off, the
OHCI frame counter in the HCCA stops and every EHCI transfer times
out, so the on-board hub fails enumeration with -110.

I would rather not make it critical, though, for the same reason as
for MSI-Lite0 in the CCU thread
(<20261125115320.3692954-1-alastair@xxxxxxxxxxx>): the gate has
consumers, and they are known here. All four EHCI/OHCI controllers
(and the DWC3 of the USB 3 port) sit behind MSI-Lite2, so each of them
can list the gate as a clock, and the clock framework keeps it on
while any of them is in use. A board without USB in use then does not
keep the fabric clocked.

What that takes in this series:

- 5/6: add <&ccu CLK_MBUS_MSI_LITE2> to the clocks of ehci0/ohci0 and
ehci1/ohci1;
- 2/6: the generic-ehci and generic-ohci bindings have to allow one
more clock for the A733: five for EHCI (bus EHCI, bus OHCI, OHCI
module clock, AHB USB SYS and the MSI-Lite2 gate) and four for OHCI;
- ehci-platform: EHCI_MAX_CLKS is 4 today, so it needs to become 5.

With that, and without this patch, all four ports work on the board
here, including the hub, and clk_summary shows mbus-msi-lite2 held by
the host controllers. I can send the binding and ehci-platform parts
for you to fold in, if that helps.

For transparency: an LLM coding assistant helped with the analysis and
with drafting this reply. I personally review every line before
submission and test manually on the hardware.

Cheers,
Daniel