mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alastair D'Silva <alastair@d-silva.org>
To: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	 Manivannan Sadhasivam	 <mani@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski	 <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Greg Kroah-Hartman	 <gregkh@linuxfoundation.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	 Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland	 <samuel@sholland.org>,
	Maxime Ripard <mripard@kernel.org>,
	Andre Przywara	 <andre.przywara@arm.com>,
	Daniel Golle <daniel@makrotopia.org>,
	Enzo Adriano	 <enzo.adriano.code@gmail.com>,
	linux-phy@lists.infradead.org, 	devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
		linux-sunxi@lists.linux.dev, linux-usb@vger.kernel.org,
		linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/9] dt-bindings: phy: allwinner,sun50i-a64-usb-phy: Add Allwinner A733
Date: Tue, 01 Dec 2026 10:07:49 +1100	[thread overview]
Message-ID: <9b3dc660c6848fff732409000070a22643a5a593.camel@d-silva.org> (raw)
In-Reply-To: <20261130112408.47846-1-vinicius.eduardo.pedrosa@gmail.com>


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@d-silva.org> 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@gmail.com
> 
> 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

  reply	other threads:[~2026-11-30 23:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 1/9] dt-bindings: phy: allwinner,sun50i-a64-usb-phy: Add Allwinner A733 Alastair D'Silva
2026-11-30 11:24   ` Vinicius Pedrosa
2026-11-30 23:07     ` Alastair D'Silva [this message]
2026-11-30  1:16 ` [PATCH v2 2/9] dt-bindings: usb: generic-{ehci,ohci}: " Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 3/9] usb: ehci-platform: Increase EHCI_MAX_CLKS to 5 Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 4/9] phy: allwinner: sun4i-usb: Add Allwinner A733 support Alastair D'Silva
2026-11-30 11:25   ` Vinicius Pedrosa
2026-11-30 22:19     ` Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 5/9] arm64: dts: allwinner: sun60i-a733: Add USB 2.0 host nodes Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 6/9] arm64: dts: allwinner: sun60i-a733-orangepi-4-pro: Enable USB 2.0 host Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 7/9] arm64: dts: allwinner: sun60i-a733-cubie-a7a: " Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 8/9] arm64: dts: allwinner: sun60i-a733-cubie-a7s: " Alastair D'Silva
2026-11-30  1:16 ` [PATCH v2 9/9] arm64: dts: allwinner: sun60i-a733-cubie-a7z: " Alastair D'Silva

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=9b3dc660c6848fff732409000070a22643a5a593.camel@d-silva.org \
    --to=alastair@d-silva.org \
    --cc=andre.przywara@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=enzo.adriano.code@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-usb@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=stern@rowland.harvard.edu \
    --cc=vinicius.eduardo.pedrosa@gmail.com \
    --cc=vkoul@kernel.org \
    --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

all inboxes | Powered by JetHome®