public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: heiko@sntech.de
Cc: ukleinek@debian.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 04/14] arm64: dts: rockchip: enable usb ports on Qnap-TS433
Date: Sun, 21 Jul 2024 19:37:13 +0200	[thread overview]
Message-ID: <20240721173723.919961-5-heiko@sntech.de> (raw)
In-Reply-To: <20240721173723.919961-1-heiko@sntech.de>

Enable usb controllers and phys and add regulator infrastructure for the
usb ports on the TS433.

Of course there are no schematics available for the device, so the
regulator information comes from the vendor-devicetree with unknown
accuracy.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
index f3ce3cc4598db..3fa1670e596cb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts
@@ -31,6 +31,49 @@ vcc3v3_pcie: regulator-vcc3v3-pcie {
 		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
 		vin-supply = <&dc_12v>;
 	};
+
+	vcc5v0_host: regulator-vcc5v0-host {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_host_en>;
+		gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+		regulator-name = "vcc5v0_host";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
+	vcc5v0_otg: regulator-vcc5v0-otg {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_otg_en>;
+		regulator-name = "vcc5v0_otg";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc5v0_usb>;
+	};
+
+	vcc5v0_usb: regulator-vcc5v0-usb {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc5v0_usb";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_12v>;
+	};
+};
+
+/* connected to usb_host0_xhci */
+&combphy0 {
+	status = "okay";
 };
 
 &gmac0 {
@@ -95,6 +138,18 @@ &pcie3x2 {
 	status = "okay";
 };
 
+&pinctrl {
+	usb {
+		vcc5v0_host_en: vcc5v0-host-en {
+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		vcc5v0_otg_en: vcc5v0-otg-en {
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
+
 &sdhci {
 	bus-width = <8>;
 	max-frequency = <200000000>;
@@ -115,3 +170,53 @@ &uart0 {
 &uart2 {
 	status = "okay";
 };
+
+&usb2phy0 {
+	status = "okay";
+};
+
+/* connected to usb_host0_xhci */
+&usb2phy0_otg {
+	phy-supply = <&vcc5v0_otg>;
+	status = "okay";
+};
+
+&usb2phy1 {
+	status = "okay";
+};
+
+/* connected to usb_host1_ehci/ohci */
+&usb2phy1_host {
+	phy-supply = <&vcc5v0_host>;
+	status = "okay";
+};
+
+/* connected to usb_host0_ehci/ohci */
+&usb2phy1_otg {
+	phy-supply = <&vcc5v0_host>;
+	status = "okay";
+};
+
+/* right port backside */
+&usb_host0_ehci {
+	status = "okay";
+};
+
+&usb_host0_ohci {
+	status = "okay";
+};
+
+/* front port */
+&usb_host0_xhci {
+	dr_mode = "host";
+	status = "okay";
+};
+
+/* left port backside */
+&usb_host1_ehci {
+	status = "okay";
+};
+
+&usb_host1_ohci {
+	status = "okay";
+};
-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2024-07-21 17:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-21 17:37 [PATCH v2 00/14] Expand available features on Qnap TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 01/14] arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 02/14] arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 03/14] arm64: dts: rockchip: enable uart0 on Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` Heiko Stuebner [this message]
2024-07-21 17:37 ` [PATCH v2 05/14] arm64: dts: rockchip: add stdout path " Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 06/14] arm64: dts: rockchip: enable sata1+2 " Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 07/14] arm64: dts: rockchip: add board-aliases for Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 08/14] arm64: dts: rockchip: add hdd leds to Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 09/14] arm64: dts: rockchip: enable the tsadc on the Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 10/14] arm64: dts: rockchip: add gpio-keys to Qnap-TS433 Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 11/14] arm64: dts: rockchip: define cpu-supply on the Qnap-TS433 Heiko Stuebner
2024-07-21 17:44   ` Heiko Stübner
2024-07-21 17:37 ` [PATCH v2 12/14] arm64: dts: rockchip: add missing pmic information on Qnap-TS433 Heiko Stuebner
2024-07-21 17:45   ` Heiko Stübner
2024-07-21 17:37 ` [PATCH v2 13/14] arm64: dts: rockchip: enable gpu " Heiko Stuebner
2024-07-21 17:37 ` [PATCH v2 14/14] arm64: dts: rockchip: add 2 pmu_io_domain supplies for Qnap-TS433 Heiko Stuebner
2024-07-22 15:20 ` [PATCH v2 00/14] Expand available features on Qnap TS433 Uwe Kleine-König
2024-07-23  2:57 ` Rob Herring (Arm)
2024-07-23 10:03   ` Heiko Stübner

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=20240721173723.919961-5-heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=ukleinek@debian.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