From: Andre Przywara <andre.przywara@arm.com>
To: Chris Morgan <macromorgan@hotmail.com>
Cc: Chris Morgan <macroalpha82@gmail.com>,
linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
mripard@kernel.org, jagan@edgeble.ai, heiko@sntech.de,
uwu@icenowy.me, daniel@ffwll.ch, airlied@gmail.com,
sam@ravnborg.org, neil.armstrong@linaro.org, noralf@tronnes.org,
samuel@sholland.org, jernej.skrabec@gmail.com, wens@csie.org,
conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
robh+dt@kernel.org
Subject: Re: [PATCH V3 6/8] ARM: dts: sun8i: v3s: add EHCI and OHCI to v3s dts
Date: Fri, 25 Aug 2023 22:53:26 +0100 [thread overview]
Message-ID: <20230825225326.613d0052@slackpad.lan> (raw)
In-Reply-To: <SN6PR06MB53420D67BB7E11486388637EA5E3A@SN6PR06MB5342.namprd06.prod.outlook.com>
On Fri, 25 Aug 2023 10:58:00 -0500
Chris Morgan <macromorgan@hotmail.com> wrote:
Hi Chris,
> On Thu, Aug 24, 2023 at 10:21:50PM +0100, Andre Przywara wrote:
> > On Wed, 23 Aug 2023 16:25:52 -0500
> > Chris Morgan <macroalpha82@gmail.com> wrote:
> >
> > Hi Chris,
> >
> > > From: Chris Morgan <macromorgan@hotmail.com>
> > >
> > > Add the EHCI and OHCI controller to the Allwinner v3s to support using
> > > USB in host mode.
> >
> > Alright, so was it really that easy? I was afraid we left out host mode
> > for a reason back then ....
>
> Can't speak to that, but it is working for me as both a host and a
> gadget.
>
> >
> > >
> > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > > ---
> > > arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi | 19 +++++++++++++++++++
> > > 1 file changed, 19 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi
> > > index c87476ea31e2..eb63dd274305 100644
> > > --- a/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi
> > > +++ b/arch/arm/boot/dts/allwinner/sun8i-v3s.dtsi
> > > @@ -319,6 +319,25 @@ usbphy: phy@1c19400 {
> > > #phy-cells = <1>;
> > > };
> > >
> > > + ehci: usb@1c1a000 {
> > > + compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci";
> > > + reg = <0x01c1a000 0x100>;
> > > + interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
> > > + clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
> > > + resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
> >
> > Please add the link the PHY here:
> > phys = <&usbphy 0>;
> > phy-names = "usb";
>
> usbphy 0 doesn't work, but if I do phys = <&usbphy 1>; for here and the
> OHCI node it does work. Is that expected/acceptable?
Well, that means it doesn't work, because the V3s has only one PHY, so
"1" is invalid, and will either be ignored or rejected (any hints in
dmesg?)
> By "doesn't work"
> I mean the device is always in HOST mode if I use 0 and switches
> correctly (the extcon shows HOST=0 when unplugged or plugged into my
> computer, and shows HOST=1 if I plug in a device which I assume is
> the desired behavior).
You mean the latter part was with <usbphy 1>, and that's the same
behaviour as without the property?
That would mean that this part is still broken - I think somewhere in
the PHY driver. But this is a generic issue, and not specific to the
V3s, and your patch is just revealing it.
I will try to have a look in the next few days, to find the real
culprit.
Cheers,
Andre
> > > + status = "disabled";
> > > + };
> > > +
> > > + ohci: usb@1c1a400 {
> > > + compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci";
> > > + reg = <0x01c1a400 0x100>;
> > > + interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
> > > + clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>,
> > > + <&ccu CLK_USB_OHCI0>;
> > > + resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
> >
> > ... and here.
> >
> > That would be definitely the right thing to do, but please check
> > whether it still works, especially OTG operation.
> >
> > The addresses, clocks, resets and interrupts match the manual.
> >
> > Cheers,
> > Andre.
> >
> >
> > > + status = "disabled";
> > > + };
> > > +
> > > ccu: clock@1c20000 {
> > > compatible = "allwinner,sun8i-v3s-ccu";
> > > reg = <0x01c20000 0x400>;
> >
>
> Thank you,
> Chris
>
next prev parent reply other threads:[~2023-08-25 21:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 21:25 [PATCH V3 0/8] Add Anbernic RG-Nano Chris Morgan
2023-08-23 21:25 ` [PATCH V3 1/8] dt-bindings: vendor-prefixes: document Saef Technology Chris Morgan
2023-08-24 15:20 ` Conor Dooley
2023-08-23 21:25 ` [PATCH V3 2/8] dt-bindings: display: panel: mipi-dbi-spi: add Saef SF-TC154B Chris Morgan
2023-08-24 15:22 ` Conor Dooley
2023-08-24 20:54 ` Noralf Trønnes
2023-08-23 21:25 ` [PATCH V3 3/8] arm: dts: sun8i: V3s: Add pinctrl for pwm Chris Morgan
2023-08-23 21:25 ` [PATCH V3 4/8] dt-bindings: usb: Add V3s compatible string for EHCI Chris Morgan
2023-08-24 15:21 ` Conor Dooley
2023-08-23 21:25 ` [PATCH V3 5/8] dt-bindings: usb: Add V3s compatible string for OHCI Chris Morgan
2023-08-24 15:19 ` Conor Dooley
2023-08-23 21:25 ` [PATCH V3 6/8] ARM: dts: sun8i: v3s: add EHCI and OHCI to v3s dts Chris Morgan
2023-08-24 21:21 ` Andre Przywara
2023-08-25 15:58 ` Chris Morgan
2023-08-25 21:53 ` Andre Przywara [this message]
2023-08-28 15:17 ` Chris Morgan
2023-08-23 21:25 ` [PATCH V3 7/8] dt-bindings: arm: sunxi: add Anbernic RG-Nano Chris Morgan
2023-08-23 21:25 ` [PATCH V3 8/8] ARM: dts: sunxi: add support for " Chris Morgan
2023-08-25 22:37 ` Andre Przywara
2023-08-26 2:13 ` Chris Morgan
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=20230825225326.613d0052@slackpad.lan \
--to=andre.przywara@arm.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jagan@edgeble.ai \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=macroalpha82@gmail.com \
--cc=macromorgan@hotmail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=noralf@tronnes.org \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=samuel@sholland.org \
--cc=uwu@icenowy.me \
--cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.