* [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs
@ 2021-05-04 8:36 Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 1/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock64 Chen-Yu Tsai
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-05-04 8:36 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Chen-Yu Tsai, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel
From: Chen-Yu Tsai <wens@csie.org>
Hi everyone,
Here are some patches that enable USB3 on RK3328 SBCs that I own. The
changes are quite straightforward, except for the NanoPi R2S, which
has a USB3 Ethernet chip attached. I am aware that there's already a
patch [1] for that. This is my spin on things using the USB device
binding, with comments on how the USB ports are arranged, that I had
done but couldn't find the time to send out.
The last patch also results in some warnings from checkpatch.pl:
WARNING: DT compatible string "usbbda,8153" appears un-documented --
check ./Documentation/devicetree/bindings/
#88: FILE: arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts:398:
+ compatible = "usbbda,8153";
WARNING: DT compatible string vendor "usbbda" appears un-documented --
check ./Documentation/devicetree/bindings/vendor-prefixes.yaml
#88: FILE: arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts:398:
+ compatible = "usbbda,8153";
At least the first warning should be covered by the USB device binding
Documentation/devicetree/bindings/usb/usb-device.yaml
while we probably should add an exception to vendor-prefixes.yaml for
the second warning.
Please let me know what you think.
Regards
ChenYu
[1] https://lore.kernel.org/linux-rockchip/20210405093423.16149-1-cnsztl@gmail.com/
Cameron Nemo (1):
arm64: dts: rockchip: rk3328: Enable USB3 for Rock64
Chen-Yu Tsai (3):
arm64: dts: rockchip: rk3328: Enable USB3 for ROC-RK3328-CC
arm64: dts: rockchip: rk3328: Enable USB3 for Rock Pi E
arm64: dts: rockchip: rk3328: Enable USB3 Ethernet on NanoPi R2S
.../boot/dts/rockchip/rk3328-nanopi-r2s.dts | 32 +++++++++++++++++++
.../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 5 +++
.../boot/dts/rockchip/rk3328-rock-pi-e.dts | 5 +++
.../arm64/boot/dts/rockchip/rk3328-rock64.dts | 5 +++
4 files changed, 47 insertions(+)
--
2.31.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock64
2021-05-04 8:36 [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Chen-Yu Tsai
@ 2021-05-04 8:36 ` Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 2/4] arm64: dts: rockchip: rk3328: Enable USB3 for ROC-RK3328-CC Chen-Yu Tsai
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-05-04 8:36 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Cameron Nemo, devicetree, linux-rockchip, linux-arm-kernel,
linux-kernel, Chen-Yu Tsai
From: Cameron Nemo <cnemo@tutanota.com>
Enable USB3 nodes for the rk3328-based PINE Rock64 board.
The separate power regulator is not added as it is controlled by the
same GPIO line as the existing VBUS regulators, so it is already
enabled. Also there is no port representation to tie the regulator to.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
[wens@csie.org: Rewrote commit message]
[wens@csie.org: Rebased onto v5.12]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 3bef1f39bc6e..1b0f7e4551ea 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -381,6 +381,11 @@ &usb20_otg {
status = "okay";
};
+&usbdrd3 {
+ dr_mode = "host";
+ status = "okay";
+};
+
&usb_host0_ehci {
status = "okay";
};
--
2.31.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] arm64: dts: rockchip: rk3328: Enable USB3 for ROC-RK3328-CC
2021-05-04 8:36 [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 1/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock64 Chen-Yu Tsai
@ 2021-05-04 8:36 ` Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 3/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock Pi E Chen-Yu Tsai
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-05-04 8:36 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Chen-Yu Tsai, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel
From: Chen-Yu Tsai <wens@csie.org>
Enable USB3 nodes for the ROC-RK3328-CC board.
The separate power regulator is not added as it is controlled by the
same GPIO line as the existing VBUS regulators, so it is already
enabled. Also there is no port representation to tie the regulator to.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index a05732b59f38..bdf0ca07eae9 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -363,6 +363,11 @@ &usb20_otg {
status = "okay";
};
+&usbdrd3 {
+ dr_mode = "host";
+ status = "okay";
+};
+
&usb_host0_ehci {
status = "okay";
};
--
2.31.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock Pi E
2021-05-04 8:36 [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 1/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock64 Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 2/4] arm64: dts: rockchip: rk3328: Enable USB3 for ROC-RK3328-CC Chen-Yu Tsai
@ 2021-05-04 8:36 ` Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 4/4] arm64: dts: rockchip: rk3328: Enable USB3 Ethernet on NanoPi R2S Chen-Yu Tsai
2021-05-09 23:55 ` [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Heiko Stuebner
4 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-05-04 8:36 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Chen-Yu Tsai, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel
From: Chen-Yu Tsai <wens@csie.org>
Enable USB3 nodes for the Rock Pi E board.
The VBUS regulator device node was added when the board was first
introduced.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
index c02059c0a954..018a3a5075c7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
@@ -380,6 +380,11 @@ &uart2 {
status = "okay";
};
+&usbdrd3 {
+ dr_mode = "host";
+ status = "okay";
+};
+
&usb_host0_ehci {
status = "okay";
};
--
2.31.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] arm64: dts: rockchip: rk3328: Enable USB3 Ethernet on NanoPi R2S
2021-05-04 8:36 [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Chen-Yu Tsai
` (2 preceding siblings ...)
2021-05-04 8:36 ` [PATCH 3/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock Pi E Chen-Yu Tsai
@ 2021-05-04 8:36 ` Chen-Yu Tsai
2021-05-09 23:55 ` [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Heiko Stuebner
4 siblings, 0 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2021-05-04 8:36 UTC (permalink / raw)
To: Rob Herring, Heiko Stuebner
Cc: Chen-Yu Tsai, devicetree, linux-rockchip, linux-arm-kernel, linux-kernel
From: Chen-Yu Tsai <wens@csie.org>
The NanoPi R2S has a Realtek RTL8153B USB 3.0 Ethernet chip connected
to the USB 3.0 pins of the RK3328 SoC. Power to the chip is controlled
by a GPIO line toggled transistor switch, which is not a full-blown
voltage regulator.
At least in Linux, the USB 3.0 XHCI controller has two ports: the first
port is for legacy USB 2.0 and slower, while the second port is for USB
3.0. Since the Ethernet chip supports USB 3.0, it should be described
as connected to the second port.
Add the device nodes for the power switch and Ethernet chip, and enable
the USB 3.0 controller. The USB device node follows the standard USB
device binding.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
.../boot/dts/rockchip/rk3328-nanopi-r2s.dts | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
index f807bc066ccb..64cf07ee3d10 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
@@ -14,6 +14,7 @@ / {
compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
aliases {
+ ethernet1 = &rtl8153;
mmc0 = &sdmmc;
};
@@ -101,6 +102,18 @@ vdd_5v: vdd-5v {
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
+
+ vdd_5v_lan: vdd-5v-lan {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&lan_vdd_pin>;
+ pinctrl-names = "default";
+ regulator-name = "vdd_5v_lan";
+ regulator-always-on;
+ regulator-boot-on;
+ vin-supply = <&vdd_5v>;
+ };
};
&cpu0 {
@@ -309,6 +322,12 @@ wan_led_pin: wan-led-pin {
};
};
+ lan {
+ lan_vdd_pin: lan-vdd-pin {
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
pmic {
pmic_int_l: pmic-int-l {
rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -368,6 +387,19 @@ &usb20_otg {
dr_mode = "host";
};
+&usbdrd3 {
+ dr_mode = "host";
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Second port is for USB 3.0 */
+ rtl8153: device@2 {
+ compatible = "usbbda,8153";
+ reg = <2>;
+ };
+};
+
&usb_host0_ehci {
status = "okay";
};
--
2.31.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs
2021-05-04 8:36 [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Chen-Yu Tsai
` (3 preceding siblings ...)
2021-05-04 8:36 ` [PATCH 4/4] arm64: dts: rockchip: rk3328: Enable USB3 Ethernet on NanoPi R2S Chen-Yu Tsai
@ 2021-05-09 23:55 ` Heiko Stuebner
4 siblings, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2021-05-09 23:55 UTC (permalink / raw)
To: Chen-Yu Tsai, Rob Herring
Cc: Heiko Stuebner, linux-kernel, devicetree, linux-rockchip,
Chen-Yu Tsai, linux-arm-kernel
On Tue, 4 May 2021 16:36:12 +0800, Chen-Yu Tsai wrote:
> Here are some patches that enable USB3 on RK3328 SBCs that I own. The
> changes are quite straightforward, except for the NanoPi R2S, which
> has a USB3 Ethernet chip attached. I am aware that there's already a
> patch [1] for that. This is my spin on things using the USB device
> binding, with comments on how the USB ports are arranged, that I had
> done but couldn't find the time to send out.
>
> [...]
Applied, thanks!
[1/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock64
commit: bbac8bd65f5402281cb7b0452c1c5f367387b459
[2/4] arm64: dts: rockchip: rk3328: Enable USB3 for ROC-RK3328-CC
commit: 75f95927334dea863f16f4ecd29cc709edc3c6ad
[3/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock Pi E
commit: bf340c8084d2932936f385ebf48c4734b2911457
[4/4] arm64: dts: rockchip: rk3328: Enable USB3 Ethernet on NanoPi R2S
commit: d49f120e27dc1689e11a14e9714e63a390dd4520
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-09 23:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 8:36 [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 1/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock64 Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 2/4] arm64: dts: rockchip: rk3328: Enable USB3 for ROC-RK3328-CC Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 3/4] arm64: dts: rockchip: rk3328: Enable USB3 for Rock Pi E Chen-Yu Tsai
2021-05-04 8:36 ` [PATCH 4/4] arm64: dts: rockchip: rk3328: Enable USB3 Ethernet on NanoPi R2S Chen-Yu Tsai
2021-05-09 23:55 ` [PATCH 0/4] arm64: dts: rockchip: rk3328: Enable USB3 on some SBCs Heiko Stuebner
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).