From: Cody Eksal <masterr3c0rd@epochal.quest>
To: Andre Przywara <andre.przywara@arm.com>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org, linux-usb@vger.kernel.org,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Parthiban <parthiban@linumiz.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Vinod Koul <vkoul@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Thierry Reding <treding@nvidia.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Maxime Ripard <mripard@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Yangtao Li <tiny.windzz@gmail.com>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH 07/13] arm64: dts: allwinner: a100: add usb related nodes
Date: Mon, 28 Oct 2024 13:31:58 -0300 [thread overview]
Message-ID: <09bc7b6ac779caf7a5e5ebbd7243b165@epochal.quest> (raw)
In-Reply-To: <20241026014444.12c8c99b@minigeek.lan>
On 2024/10/25 9:44 pm, Andre Przywara wrote:
> On Thu, 24 Oct 2024 14:05:25 -0300
> Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> Hi,
>
>> From: Yangtao Li <frank@allwinnertech.com>
>>
>> Allwinner A64 have two HCI USB controllers, a OTG controller and a USB
>> PHY device, let's add nodes on dts.
>>
>> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
>> [masterr3c0rd@epochal.quest: fallback to a33-musb instead of h3-musb]
>> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
>> ---
>> .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 91
>> +++++++++++++++++++
>> 1 file changed, 91 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
>> b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
>> index adb11b26045f..0aee1b578661 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100.dtsi
>> @@ -302,6 +302,97 @@ ths: thermal-sensor@5070400 {
>> #thermal-sensor-cells = <1>;
>> };
>>
>> + usbphy: phy@5100400 {
>> + #phy-cells = <1>;
>
> Please keep the compatible string first, and move #phy-cells to the
> end.
Will be done in V2
>> + compatible = "allwinner,sun50i-a100-usb-phy";
>> + reg = <0x05100400 0x14>,
>> + <0x05101800 0x4>,
>> + <0x05200800 0x4>;
>
> We need at least 0x24 for the phy_ctrl and 0x14 for the PMUs. But I
> wonder if we should use 0x100 for all of them, like for the D1, as
> there
> are more registers. The fact that the Linux driver doesn't use more
> shouldn't prevent the DT from describing them.
This as well.
>> + reg-names = "phy_ctrl",
>> + "pmu0",
>> + "pmu1";
>> + clocks = <&ccu CLK_USB_PHY0>,
>> + <&ccu CLK_USB_PHY1>;
>> + clock-names = "usb0_phy",
>> + "usb1_phy";
>> + resets = <&ccu RST_USB_PHY0>,
>> + <&ccu RST_USB_PHY1>;
>> + reset-names = "usb0_reset",
>> + "usb1_reset";
>> + status = "disabled";
>> + };
>> +
>> + ehci0: usb@5101000 {
>
> The nodes are ordered by their MMIO base address, so please move them
> around accordingly.
I double checked; the only note that wasn't in order was MUSB, which
fits above the USB PHY in the memory map. I've moved those up.
>> + compatible = "allwinner,sun50i-a100-ehci",
>> + "generic-ehci";
>> + reg = <0x05101000 0x100>;
>> + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
>> + clocks = <&ccu CLK_BUS_OHCI0>,
>> + <&ccu CLK_BUS_EHCI0>,
>> + <&ccu CLK_USB_OHCI0>;
>> + resets = <&ccu RST_BUS_OHCI0>,
>> + <&ccu RST_BUS_EHCI0>;
>> + phys = <&usbphy 0>;
>> + phy-names = "usb";
>> + status = "disabled";
>> + };
>> +
>> + ohci0: usb@5101400 {
>> + compatible = "allwinner,sun50i-a100-ohci",
>> + "generic-ohci";
>> + reg = <0x05101400 0x100>;
>> + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
>> + clocks = <&ccu CLK_BUS_OHCI0>,
>> + <&ccu CLK_USB_OHCI0>;
>> + resets = <&ccu RST_BUS_OHCI0>;
>> + phys = <&usbphy 0>;
>> + phy-names = "usb";
>> + status = "disabled";
>> + };
>> +
>> + usb_otg: usb@5100000 {
>> + compatible = "allwinner,sun50i-a100-musb",
>> + "allwinner,sun8i-a33-musb";
>> + reg = <0x05100000 0x0400>;
>> + clocks = <&ccu CLK_BUS_OTG>;
>> + resets = <&ccu RST_BUS_OTG>;
>> + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
>> + interrupt-names = "mc";
>> + phys = <&usbphy 0>;
>> + phy-names = "usb";
>> + extcon = <&usbphy 0>;
>> + dr_mode = "otg";
>
> dr_mode should be set in the board .dts, so please remove that line
> from here.
Done, and updated the Perf1 DTS to reflect this
> For the records: I checked the MMIO base addresses, clock and reset
> names and the IRQs against the manual: they all match.
Thanks again!
- Cody
> Cheers,
> Andre
>
>> + status = "disabled";
>> + };
>> +
next prev parent reply other threads:[~2024-10-28 16:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 17:05 [PATCH 00/13] sunxi: A100/A133 second stage support Cody Eksal
2024-10-24 17:05 ` [PATCH 01/13] arm64: dts: allwinner: A100: Add PMU mode Cody Eksal
2024-10-24 17:05 ` [PATCH 02/13] arm64: dts: allwinner: a100: add watchdog node Cody Eksal
2024-10-24 17:05 ` [PATCH 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible Cody Eksal
2024-10-27 21:11 ` Rob Herring (Arm)
2024-10-28 16:40 ` Cody Eksal
2024-10-24 17:05 ` [PATCH 04/13] dt-bindings: usb: Add A100 compatible string Cody Eksal
2024-10-25 10:09 ` Andre Przywara
2024-10-27 21:12 ` Rob Herring (Arm)
2024-10-27 21:22 ` Rob Herring
2024-10-28 16:02 ` Cody Eksal
2024-10-24 17:05 ` [PATCH 05/13] dt-bindings: usb: sunxi-musb: " Cody Eksal
2024-10-27 20:47 ` Krzysztof Kozlowski
2024-10-28 16:06 ` Cody Eksal
2024-10-24 17:05 ` [PATCH 06/13] phy: sun4i-usb: add support for A100 USB PHY Cody Eksal
2024-10-24 19:22 ` Andre Przywara
2024-10-28 16:15 ` Cody Eksal
2024-10-24 17:05 ` [PATCH 07/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
2024-10-26 0:44 ` Andre Przywara
2024-10-28 16:31 ` Cody Eksal [this message]
2024-10-26 1:29 ` Chen-Yu Tsai
2024-10-28 16:35 ` Cody Eksal
2024-10-24 17:05 ` [PATCH 08/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Cody Eksal
2024-10-24 17:05 ` [PATCH 09/13] arm64: allwinner: a100: Add MMC related nodes Cody Eksal
2024-10-24 17:05 ` [PATCH 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Cody Eksal
2024-10-24 17:05 ` [PATCH 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
2024-10-27 20:47 ` Krzysztof Kozlowski
2024-10-27 21:13 ` Cody Eksal
2024-10-27 21:17 ` Krzysztof Kozlowski
2024-10-28 16:18 ` Cody Eksal
2024-10-24 17:05 ` [PATCH 12/13] cpufreq: sun50i: add a100 cpufreq support Cody Eksal
2024-10-24 17:05 ` [PATCH 13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table Cody Eksal
2024-10-25 12:27 ` Andre Przywara
2024-10-28 16:42 ` Cody Eksal
2024-10-25 13:55 ` [PATCH 00/13] sunxi: A100/A133 second stage support Rob Herring (Arm)
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=09bc7b6ac779caf7a5e5ebbd7243b165@epochal.quest \
--to=masterr3c0rd@epochal.quest \
--cc=andre.przywara@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=jernej.skrabec@gmail.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-usb@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=nm@ti.com \
--cc=parthiban@linumiz.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=tiny.windzz@gmail.com \
--cc=treding@nvidia.com \
--cc=vireshk@kernel.org \
--cc=vkoul@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).