From nobody Thu Dec 18 05:58:41 2025 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACC24142900 for ; Tue, 23 Jul 2024 19:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721764553; cv=none; b=MgwL61Cyn8QX4ijBJXAKGiARqSLyZLYEtKpHym25jSPfTdds2NyxEmMf05Ymk6UyB8ty/ww5zSws7+v41WwU2emyTqpuM0JCqBIzDAACuWS9qImy58WNYoj4jqEyVNl69J2ZJ/58/NWkwfMn90i43wxxJRJ+B151brCifPj8PFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721764553; c=relaxed/simple; bh=siaa5Dl6YfAWE2fQw0Zx8GINVmj/HUSZMirEio531vU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=gYIMRN4Val1hSceryX0Sf5FoOundLFJMmWSzTzFdqhGq0fb//231lSiYJiWHYb2GHritJOQclh5dk9fMtwkpdmWVFOWPAJDNw4j+bzVA6SDql584CUPAIzROxymPAxM291AZe5yfNRv2nSxUqTsvIs+gyPPAhjsGKFEcD/xcGdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Received: from i5e860cd3.versanet.de ([94.134.12.211] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWLbs-0005iD-Vv; Tue, 23 Jul 2024 21:55:45 +0200 From: Heiko Stuebner 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 v3 04/14] arm64: dts: rockchip: enable usb ports on Qnap-TS433 Date: Tue, 23 Jul 2024 21:55:28 +0200 Message-Id: <20240723195538.1133436-5-heiko@sntech.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240723195538.1133436-1-heiko@sntech.de> References: <20240723195538.1133436-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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. Tested-by: Uwe Kleine-K=C3=B6nig Signed-off-by: Heiko Stuebner --- .../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/arm6= 4/boot/dts/rockchip/rk3568-qnap-ts433.dts index bc26f2e98c185..da735c4764f4d 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 =3D <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; vin-supply =3D <&dc_12v>; }; + + vcc5v0_host: regulator-vcc5v0-host { + compatible =3D "regulator-fixed"; + enable-active-high; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&vcc5v0_host_en>; + gpio =3D <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; + regulator-name =3D "vcc5v0_host"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&vcc5v0_usb>; + }; + + vcc5v0_otg: regulator-vcc5v0-otg { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&vcc5v0_otg_en>; + regulator-name =3D "vcc5v0_otg"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&vcc5v0_usb>; + }; + + vcc5v0_usb: regulator-vcc5v0-usb { + compatible =3D "regulator-fixed"; + regulator-name =3D "vcc5v0_usb"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&dc_12v>; + }; +}; + +/* connected to usb_host0_xhci */ +&combphy0 { + status =3D "okay"; }; =20 &gmac0 { @@ -97,6 +140,18 @@ &pcie3x2 { status =3D "okay"; }; =20 +&pinctrl { + usb { + vcc5v0_host_en: vcc5v0-host-en { + rockchip,pins =3D <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + vcc5v0_otg_en: vcc5v0-otg-en { + rockchip,pins =3D <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + &sdhci { bus-width =3D <8>; max-frequency =3D <200000000>; @@ -121,3 +176,53 @@ &uart0 { &uart2 { status =3D "okay"; }; + +&usb2phy0 { + status =3D "okay"; +}; + +/* connected to usb_host0_xhci */ +&usb2phy0_otg { + phy-supply =3D <&vcc5v0_otg>; + status =3D "okay"; +}; + +&usb2phy1 { + status =3D "okay"; +}; + +/* connected to usb_host1_ehci/ohci */ +&usb2phy1_host { + phy-supply =3D <&vcc5v0_host>; + status =3D "okay"; +}; + +/* connected to usb_host0_ehci/ohci */ +&usb2phy1_otg { + phy-supply =3D <&vcc5v0_host>; + status =3D "okay"; +}; + +/* right port backside */ +&usb_host0_ehci { + status =3D "okay"; +}; + +&usb_host0_ohci { + status =3D "okay"; +}; + +/* front port */ +&usb_host0_xhci { + dr_mode =3D "host"; + status =3D "okay"; +}; + +/* left port backside */ +&usb_host1_ehci { + status =3D "okay"; +}; + +&usb_host1_ohci { + status =3D "okay"; +}; --=20 2.39.2