Add DT overlay to operate RK3308 OTG USB port in Host mode (#8642)

Also remove DT overlays that existed only to support unsupported legacy kernels
and fix a typo in a comment in rk3308-emmc.dtso
This commit is contained in:
brentr
2025-09-15 22:08:20 -07:00
committed by GitHub
parent 0a7f461e57
commit 428d467087
14 changed files with 50 additions and 134 deletions

View File

@@ -1,11 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
hinlink-h88k-240x135-lcd.dtbo \
rk3308-otg-host.dtbo \
rk3308-s0-ext-antenna.dtbo \
rk3308-b@1.3ghz.dtbo \
rk3308-bs.dtbo rk3308-bs@1.3ghz.dtbo \
rk3308-emmc.dtbo \
rk3308-sdio@10mhz.dtbo rk3308-sdio@4mhz.dtbo \
rockchip-sakurapi-rk3308b-ws2812.dtbo \
rockchip-rockpi4cplus-usb-host.dtbo \
rockchip-rockpro64-lcd.dtbo \

View File

@@ -209,8 +209,17 @@ wifi + bt chip and clones.
Enable additional cpu "high-speed" bins up to 1.3ghz
**********************************
Details for Rock Pi-S overlays (2 Mar 2024):
RK3308 OTG USB mode (14 Sep 2025):
Most Armbian RK3308 kernels configured the OTG port to operate in peripheral mode by default
To configure the OTG USB port as an additional host port:
### rk3308-otg-host
**********************************
Details for Rock Pi-S overlays (14 Sep 2025):
Older V1.1 and V1.2 boards use the B variant of the RK3308.
Some V1.3 boards manufactured after October 2023 also use the B variant.
@@ -235,28 +244,6 @@ unstable operation due to undervolting.
Applying the rk3308-b@1.3ghz to a BS variant chip consumes more power and
has the potential to damage the SOC due to overvolting.
===== For Older Kernels ======
Install the following overlays only on older (unpatched) mainline kernels:
Older mainline kernels disable the Rock Pi S built-in SDNAND (EMMC)
### rk3308-emmc
enables your SDNAND chip. It is OK to install for boards that lack the SDNAND.
The legacy 4.4 and this mainline kernel drive the SDIO clock at 50Mhz to provide
maximum WiFi throughput. However...
Older versions of the Mainline kernel drive the SDIO clock at only 1Mhz
This reduces WiFi throughput to < 500kB/s !
### rk3308-sdio@10mhz
increases the SDIO clock to 10Mhz, providing about 2.4MB/s WiFi throughput.
### rk3308-sdio@4mhz
increases the SDIO clock to only 4Mhz, providing about 1MB/s WiFi throughput.
use this only if 10Mhz SDIO clock is unstable
Note that older mainline kernels cannot drive the SDIO clock faster than 10Mhz.
**********************************
Details for Rock S0 overlays (10 Apr 2024):

View File

@@ -1,6 +1,6 @@
//Overclock the Rockchip RK3308-B suffix SOC to 1.3 Ghz
// THIS SHOULD NOT BE APPLIED to RK3308-B-S suffix chips
// because is will overvolt them
// because it will overvolt them
/dts-v1/;
/plugin/;

View File

@@ -1,13 +0,0 @@
//For RockPI-S: enable SDnand chip
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&emmc>;
__overlay__ {
status = "okay";
};
};
};

View File

@@ -0,0 +1,13 @@
//Configure the OTG USB port as a USB host
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&usb20_otg>;
__overlay__ {
dr_mode = "host";
};
};
};

View File

@@ -1,14 +0,0 @@
//For RockPI-S: Increase SDIO Max Frequency from 1Mhz to 10Mhz
//Increases RTL8723-BS WiFi's throughput from 300KB/s to 2.4MB/s
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&sdio>;
__overlay__ {
max-frequency = <10000000>;
};
};
};

View File

@@ -1,14 +0,0 @@
//For RockPI-S: Increase SDIO Max Frequency from 1Mhz to 4Mhz
//Increases RTL8723-BS WiFi's throughput from 300KB/s to 1MB/s
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&sdio>;
__overlay__ {
max-frequency = <4000000>;
};
};
};

View File

@@ -1,12 +1,11 @@
# SPDX-License-Identifier: GPL-2.0
dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
hinlink-h88k-240x135-lcd.dtbo \
rk3308-otg-host.dtbo \
rk3308-s0-ext-antenna.dtbo \
rk3308-b@1.3ghz.dtbo \
rk3308-bs.dtbo rk3308-bs@1.3ghz.dtbo \
rk3308-emmc.dtbo \
rk3308-pcm5102a.dtbo \
rk3308-sdio@10mhz.dtbo rk3308-sdio@4mhz.dtbo \
rockchip-sakurapi-rk3308b-ws2812.dtbo \
rockchip-rockpi4cplus-usb-host.dtbo \
rockchip-rockpro64-lcd.dtbo \

View File

@@ -196,8 +196,17 @@ wifi + bt chip and clones.
Enable additional cpu "high-speed" bins up to 1.3ghz
**********************************
Details for Rock Pi-S overlays (2 Mar 2024):
RK3308 OTG USB mode (14 Sep 2025):
Most Armbian RK3308 kernels configured the OTG port to operate in peripheral mode by default
To configure the OTG USB port as an additional host port:
### rk3308-otg-host
**********************************
Details for Rock Pi-S overlays (14 Sep 2025):
Older V1.1 and V1.2 boards use the B variant of the RK3308.
Some V1.3 boards manufactured after October 2023 also use the B variant.
@@ -222,28 +231,6 @@ unstable operation due to undervolting.
Applying the rk3308-b@1.3ghz to a BS variant chip consumes more power and
has the potential to damage the SOC due to overvolting.
===== For Older Kernels ======
Install the following overlays only on older (unpatched) mainline kernels:
Older mainline kernels disable the Rock Pi S built-in SDNAND (EMMC)
### rk3308-emmc
enables your SDNAND chip. It is OK to install for boards that lack the SDNAND.
The legacy 4.4 and this mainline kernel drive the SDIO clock at 50Mhz to provide
maximum WiFi throughput. However...
Older versions of the Mainline kernel drive the SDIO clock at only 1Mhz
This reduces WiFi throughput to < 500kB/s !
### rk3308-sdio@10mhz
increases the SDIO clock to 10Mhz, providing about 2.4MB/s WiFi throughput.
### rk3308-sdio@4mhz
increases the SDIO clock to only 4Mhz, providing about 1MB/s WiFi throughput.
use this only if 10Mhz SDIO clock is unstable
Note that older mainline kernels cannot drive the SDIO clock faster than 10Mhz.
**********************************
Details for Rock S0 overlays (10 Apr 2024):

View File

@@ -1,6 +1,6 @@
//Overclock the Rockchip RK3308-B suffix SOC to 1.3 Ghz
// THIS SHOULD NOT BE APPLIED to RK3308-B-S suffix chips
// because is will overvolt them
// because it will overvolt them
/dts-v1/;
/plugin/;

View File

@@ -1,13 +0,0 @@
//For RockPI-S: enable SDnand chip
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&emmc>;
__overlay__ {
status = "okay";
};
};
};

View File

@@ -0,0 +1,13 @@
//Configure the OTG USB port as a USB host
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&usb20_otg>;
__overlay__ {
dr_mode = "host";
};
};
};

View File

@@ -1,14 +0,0 @@
//For RockPI-S: Increase SDIO Max Frequency from 1Mhz to 10Mhz
//Increases RTL8723-BS WiFi's throughput from 300KB/s to 2.4MB/s
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&sdio>;
__overlay__ {
max-frequency = <10000000>;
};
};
};

View File

@@ -1,14 +0,0 @@
//For RockPI-S: Increase SDIO Max Frequency from 1Mhz to 4Mhz
//Increases RTL8723-BS WiFi's throughput from 300KB/s to 1MB/s
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&sdio>;
__overlay__ {
max-frequency = <4000000>;
};
};
};