Re: [PATCH v2 1/9] dt-bindings: phy: allwinner,sun50i-a64-usb-phy: Add Allwinner A733
From: Alastair D'Silva
Date: Mon Nov 30 2026 - 18:08:04 EST
On Mon, 2026-11-30 at 08:24 -0300, Vinicius Pedrosa wrote:
> Hi Alastair,
>
> On Mon, 30 Nov 2026 12:16:15 +1100, Alastair D'Silva <alastair@xxxxxxxxxxx> wrote:
> > The A733 USB PHY requires the OTG/PHY register bus clock (bus) in addition
> > to the two PHY reference clocks.
>
> My A733 PHY binding v2 [1] already adds this compatible with the D1
> fallback, and Krzysztof acked it. Your patch adds the same compatible
> without the fallback and requires a third clock.
>
> On my Cubie A7Z, USB1 enumerated at high speed with no bus clock
> specified in the PHY node. I haven't checked whether CLK_BUS_OTG was
> left enabled by firmware, so this doesn't establish that the clock
> is unnecessary.
>
> Is there a manual reference or a test showing that the PHY needs
> this clock explicitly? Could we keep the D1 fallback when combining
> the binding changes, if it's still appropriate?
>
> [1] https://lore.kernel.org/r/20261116105544.669029-2-vinicius.eduardo.pedrosa@xxxxxxxxx
>
> Thanks,
> Vinicius
Hi Vinicius,
Thanks for pointing out your v2 series. I tested `CLK_BUS_OTG` gating on
an OrangePi 4 Pro via `/dev/mem` (`0x02003304 BIT(8)`):
- With `CLK_BUS_OTG = 0`: `phy_ctrl` (`0x04100400`) and `phy_ctl`
(`0x04100410`) read `0x0` and writes are dropped. `pmu1` (`0x04200800`)
is unaffected.
- With `CLK_BUS_OTG = 1` (even with `RST_BUS_OTG = 0`): `phy_ctrl` reads
`0x40000000`, `phy_ctl` reads `0x00034818`, and writes succeed.
I also booted your v2 series on the OrangePi 4 Pro without
`clk_ignore_unused`: `bus-otg` stayed gated off (`enable_cnt = 0`) and
the onboard USB 2.0 hub on USB1 enumerated at 480 Mbps.
I will rebase v3 on your v2 binding and keep the `sun20i-d1-usb-phy`
fallback. Since none of the four A733 boards enable USB0, we can leave
`CLK_BUS_OTG` for when PHY0/USB0 is used.
Regards,
Alastair
--
Alastair D'Silva