From: Philippe Simons <simons.philippe@gmail.com>
To: 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>,
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS),
linux-arm-kernel@lists.infradead.org (moderated
list:ARM/Allwinner sunXi SoC support),
linux-sunxi@lists.linux.dev (open list:ARM/Allwinner sunXi SoC
support), linux-kernel@vger.kernel.org (open list)
Cc: Philippe Simons <simons.philippe@gmail.com>
Subject: [RFC PATCH 3/3] arm64: dts: allwinner: h700: Enable USB OTG
Date: Sat, 18 Jan 2025 11:22:06 +0100 [thread overview]
Message-ID: <20250118102207.9339-3-simons.philippe@gmail.com> (raw)
In-Reply-To: <20250118102207.9339-1-simons.philippe@gmail.com>
RG35XX have a GPIO controlled regulator for phy0 vbus, add it.
Enable HCI0s controllers and otg for dr_mode.
Add phy0 properties to descrive id_det, external vbus, and internal vbus
Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
---
.../sun50i-h700-anbernic-rg35xx-2024.dts | 25 +++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
index 80ccab7b5..5a6ae42de 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
@@ -175,6 +175,16 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
+
+ reg_usb0_vbus: regulator-usb0-vbus {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&pio 8 16 GPIO_ACTIVE_HIGH>; /* PI16 */
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-name = "usb0-vbus";
+ vin-supply = <®_boost>;
+ };
};
&cpu0 {
@@ -337,12 +347,23 @@ &uart0 {
status = "okay";
};
-/* the AXP717 has USB type-C role switch functionality, not yet described by the binding */
+/* the AXP717 has USB type-C role switch functionality */
&usbotg {
- dr_mode = "peripheral"; /* USB type-C receptable */
+ dr_mode = "otg"; /* USB type-C receptable */
+ status = "okay";
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ohci0 {
status = "okay";
};
&usbphy {
+ usb0_id_det-gpios = <&pio 8 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PI4 */
+ usb0_vbus_power-supply = <&usb_power>;
+ usb0_vbus-supply = <®_usb0_vbus>;
status = "okay";
};
--
2.47.1
next parent reply other threads:[~2025-01-18 10:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250118102207.9339-1-simons.philippe@gmail.com>
2025-01-18 10:22 ` Philippe Simons [this message]
2025-02-20 20:38 ` [RFC PATCH 3/3] arm64: dts: allwinner: h700: Enable USB OTG Jernej Škrabec
2025-02-21 9:54 ` Philippe Simons
2025-02-21 18:20 ` Jernej Škrabec
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=20250118102207.9339-3-simons.philippe@gmail.com \
--to=simons.philippe@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.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-sunxi@lists.linux.dev \
--cc=robh@kernel.org \
--cc=samuel@sholland.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).