Skip to content

Commit 02c74f2

Browse files
committed
Sync Rock5B, 5B-Plus, 5T DT's with Radxa (armbian#381)
* Sync Rock5B, 5B-Plus, 5T DT's From Radxa's Kernel fork: https://github.com/radxa/kernel/blob/linux-6.1-stan-rkr5.1/arch/arm64/boot/dts/rockchip/ * Keep Armbian's soc_thermal for fan speed on Rock5B
1 parent babf2e4 commit 02c74f2

File tree

3 files changed

+84
-109
lines changed

3 files changed

+84
-109
lines changed

arch/arm64/boot/dts/rockchip/rk3588-radxa-rock-5b+.dts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
compatible = "pwm-fan";
3131
#cooling-cells = <2>;
3232
cooling-levels = <0 64 128 192 255>;
33-
pwms = <&pwm1 0 10000 0>;
33+
pwms = <&pwm1 0 60000 0>;
3434
};
3535

3636
vcc12v_dcin: vcc12v-dcin {
@@ -149,8 +149,6 @@
149149
vcc5v0_host: vcc5v0-host-regulator {
150150
compatible = "regulator-fixed";
151151
regulator-name = "vcc5v0_host";
152-
regulator-boot-on;
153-
regulator-always-on;
154152
regulator-min-microvolt = <5000000>;
155153
regulator-max-microvolt = <5000000>;
156154
enable-active-high;
@@ -256,10 +254,6 @@
256254
status = "okay";
257255
};
258256

259-
&avsd {
260-
status = "okay";
261-
};
262-
263257
&cpu_l0 {
264258
cpu-supply = <&vdd_cpu_lit_s0>;
265259
mem-supply = <&vdd_cpu_lit_mem_s0>;
@@ -723,6 +717,7 @@
723717
};
724718

725719
&u2phy1_otg {
720+
vbus-supply = <&vcc5v0_host>;
726721
status = "okay";
727722
};
728723

@@ -774,6 +769,7 @@
774769
compatible = "usb-c-connector";
775770
label = "USB-C";
776771
data-role = "dual";
772+
faster-pd-negotiation;
777773
power-role = "dual";
778774
try-power-role = "sink";
779775
op-sink-microwatt = <1000000>;
@@ -1284,4 +1280,4 @@
12841280
"", "", "", "",
12851281
/* GPIO4_D4-D7 */
12861282
"", "", "", "";
1287-
};
1283+
};

arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts

Lines changed: 79 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
22
/*
3-
* Copyright (c) 2022 Rockchip Electronics Co., Ltd.
4-
* Copyright (c) 2022 Radxa Limited
3+
* Copyright (c) 2024 Rockchip Electronics Co., Ltd.
4+
* Copyright (c) 2024 Radxa Computer (Shenzhen) Co., Ltd.
55
*
66
*/
77

@@ -26,6 +26,13 @@
2626

2727
/delete-node/ chosen;
2828

29+
fan0: pwm-fan {
30+
compatible = "pwm-fan";
31+
#cooling-cells = <2>;
32+
cooling-levels = <0 64 128 192 255>;
33+
pwms = <&pwm1 0 60000 0>;
34+
};
35+
2936
vcc12v_dcin: vcc12v-dcin {
3037
compatible = "regulator-fixed";
3138
regulator-name = "vcc12v_dcin";
@@ -45,20 +52,20 @@
4552
vin-supply = <&vcc12v_dcin>;
4653
};
4754

48-
wifi_disable: wifi-diable-gpio-regulator {
55+
bt_wake: bt-wake-gpio-regulator {
4956
compatible = "regulator-fixed";
50-
regulator-name = "wifi_disable";
57+
regulator-name = "bt_wake";
5158
enable-active-high;
52-
gpio = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
59+
gpio = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
5360
regulator-boot-on;
5461
regulator-always-on;
5562
};
5663

57-
bt_wake: bt-wake-gpio-regulator {
64+
wifi_disable: wifi-diable-gpio-regulator {
5865
compatible = "regulator-fixed";
59-
regulator-name = "bt_wake";
66+
regulator-name = "wifi_disable";
6067
enable-active-high;
61-
gpio = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
68+
gpio = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
6269
regulator-boot-on;
6370
regulator-always-on;
6471
};
@@ -114,7 +121,7 @@
114121
dp0_sound: dp0-sound {
115122
status = "okay";
116123
compatible = "rockchip,hdmi";
117-
rockchip,card-name = "rockchip-dp0";
124+
rockchip,card-name= "rockchip-hdmi2";
118125
rockchip,mclk-fs = <512>;
119126
rockchip,cpu = <&spdif_tx2>;
120127
rockchip,codec = <&dp0 1>;
@@ -127,7 +134,7 @@
127134
rockchip,card-name = "rockchip-es8316";
128135
rockchip,format = "i2s";
129136
rockchip,mclk-fs = <256>;
130-
rockchip,cpu = <&i2s0_8ch >;
137+
rockchip,cpu = <&i2s0_8ch>;
131138
rockchip,codec = <&es8316>;
132139
poll-interval = <100>;
133140
io-channels = <&saradc 3>;
@@ -146,8 +153,6 @@
146153
vcc5v0_host: vcc5v0-host-regulator {
147154
compatible = "regulator-fixed";
148155
regulator-name = "vcc5v0_host";
149-
regulator-boot-on;
150-
regulator-always-on;
151156
regulator-min-microvolt = <5000000>;
152157
regulator-max-microvolt = <5000000>;
153158
enable-active-high;
@@ -190,17 +195,6 @@
190195
vin-supply = <&vcc5v0_sys>;
191196
};
192197

193-
gpio-leds {
194-
compatible = "gpio-leds";
195-
pinctrl-names = "default";
196-
197-
user-led2 {
198-
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
199-
linux,default-trigger = "heartbeat";
200-
default-state = "on";
201-
};
202-
};
203-
204198
/* If hdmirx node is disabled, delete the reserved-memory node here. */
205199
reserved-memory {
206200
#address-cells = <2>;
@@ -217,22 +211,27 @@
217211
};
218212

219213
hdmiin-sound {
214+
status = "okay";
220215
compatible = "rockchip,hdmi";
221216
rockchip,mclk-fs = <128>;
222217
rockchip,format = "i2s";
223218
rockchip,bitclock-master = <&hdmirx_ctrler>;
224219
rockchip,frame-master = <&hdmirx_ctrler>;
225-
rockchip,card-name = "rockchip-hdmiin";
220+
rockchip,card-name = "rockchip,hdmiin";
226221
rockchip,cpu = <&i2s7_8ch>;
227222
rockchip,codec = <&hdmirx_ctrler 0>;
228223
rockchip,jack-det;
229224
};
230225

231-
fan0: pwm-fan {
232-
compatible = "pwm-fan";
233-
#cooling-cells = <2>;
234-
cooling-levels = <72 94 117 139 162 184 207 229 255>;
235-
pwms = <&pwm1 0 10000 0>;
226+
gpio-leds {
227+
compatible = "gpio-leds";
228+
pinctrl-names = "default";
229+
230+
user-led2 {
231+
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
232+
linux,default-trigger = "heartbeat";
233+
default-state = "on";
234+
};
236235
};
237236
};
238237

@@ -244,10 +243,6 @@
244243
status = "okay";
245244
};
246245

247-
&avsd {
248-
status = "okay";
249-
};
250-
251246
&cpu_l0 {
252247
cpu-supply = <&vdd_cpu_lit_s0>;
253248
mem-supply = <&vdd_cpu_lit_mem_s0>;
@@ -489,6 +484,7 @@
489484
max-frequency = <200000000>;
490485
mmc-hs400-1_8v;
491486
mmc-hs400-enhanced-strobe;
487+
mmc-hs200-1_8v;
492488
status = "okay";
493489
};
494490

@@ -639,26 +635,6 @@
639635
&display_subsystem {
640636
clocks = <&hdptxphy_hdmi0>, <&hdptxphy_hdmi1>;
641637
clock-names = "hdmi0_phy_pll", "hdmi1_phy_pll";
642-
643-
route {
644-
route_hdmi0: route-hdmi0 {
645-
status = "okay";
646-
logo,uboot = "logo.bmp";
647-
logo,kernel = "logo_kernel.bmp";
648-
logo,mode = "center";
649-
charge_logo,mode = "center";
650-
connect = <&vp0_out_hdmi0>;
651-
};
652-
653-
route_hdmi1: route-hdmi1 {
654-
status = "okay";
655-
logo,uboot = "logo.bmp";
656-
logo,kernel = "logo_kernel.bmp";
657-
logo,mode = "center";
658-
charge_logo,mode = "center";
659-
connect = <&vp1_out_hdmi1>;
660-
};
661-
};
662638
};
663639

664640
&hdptxphy_hdmi0 {
@@ -671,7 +647,8 @@
671647

672648
&hdmi0 {
673649
status = "okay";
674-
cec-enable = "true";
650+
cec-enable = "true";
651+
enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
675652
};
676653

677654
&hdmi0_in_vp0 {
@@ -694,7 +671,8 @@
694671
status = "okay";
695672
pinctrl-names = "default";
696673
pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd &hdmim1_tx1_scl &hdmim1_tx1_sda>;
697-
cec-enable = "true";
674+
cec-enable = "true";
675+
enable-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
698676
};
699677

700678
&hdmi1_in_vp0 {
@@ -713,25 +691,24 @@
713691
status = "okay";
714692
};
715693

694+
&hdptxphy_hdmi0 {
695+
status = "okay";
696+
};
697+
698+
&hdptxphy_hdmi1 {
699+
status = "okay";
700+
};
701+
716702
/* Should work with at least 128MB cma reserved above. */
717703
&hdmirx_ctrler {
718704
status = "okay";
719705

720-
#sound-dai-cells = <1>;
721706
/* Effective level used to trigger HPD: 0-low, 1-high */
722707
hpd-trigger-level = <1>;
723708
hdmirx-det-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
724-
725709
pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_det>;
726710
pinctrl-names = "default";
727-
};
728-
729-
&hdptxphy_hdmi0 {
730-
status = "okay";
731-
};
732-
733-
&hdptxphy_hdmi1 {
734-
status = "okay";
711+
#sound-dai-cells = <1>;
735712
};
736713

737714
&i2s5_8ch {
@@ -832,6 +809,7 @@
832809
};
833810

834811
&u2phy1_otg {
812+
vbus-supply = <&vcc5v0_host>;
835813
status = "okay";
836814
};
837815

@@ -1058,6 +1036,8 @@
10581036
reg = <0x11>;
10591037
clocks = <&mclkout_i2s0>;
10601038
clock-names = "mclk";
1039+
assigned-clocks = <&mclkout_i2s0>;
1040+
assigned-clock-rates = <12288000>;
10611041
pinctrl-names = "default";
10621042
pinctrl-0 = <&i2s0_mclk>;
10631043
#sound-dai-cells = <0>;
@@ -1071,40 +1051,9 @@
10711051
#sound-dai-cells = <0>;
10721052
pinctrl-names = "default";
10731053
pinctrl-0 = <&i2s0_lrck
1074-
&i2s0_sclk
1075-
&i2s0_sdi0
1076-
&i2s0_sdo0>;
1077-
};
1078-
1079-
&sfc {
1080-
status = "okay";
1081-
max-freq = <50000000>;
1082-
#address-cells = <1>;
1083-
#size-cells = <0>;
1084-
pinctrl-names = "default";
1085-
pinctrl-0 = <&fspim2_pins>;
1086-
1087-
spi_flash: spi-flash@0 {
1088-
#address-cells = <1>;
1089-
#size-cells = <0>;
1090-
compatible = "jedec,spi-nor";
1091-
reg = <0x0>;
1092-
spi-max-frequency = <50000000>;
1093-
spi-tx-bus-width = <1>;
1094-
spi-rx-bus-width = <4>;
1095-
status = "okay";
1096-
1097-
partitions {
1098-
compatible = "fixed-partitions";
1099-
#address-cells = <1>;
1100-
#size-cells = <1>;
1101-
1102-
loader@0 {
1103-
label = "loader";
1104-
reg = <0x0 0x1000000>;
1105-
};
1106-
};
1107-
};
1054+
&i2s0_sclk
1055+
&i2s0_sdi0
1056+
&i2s0_sdo0>;
11081057
};
11091058

11101059
&rockchip_suspend {
@@ -1166,6 +1115,37 @@
11661115
};
11671116
};
11681117

1118+
&sfc {
1119+
status = "okay";
1120+
max-freq = <50000000>;
1121+
#address-cells = <1>;
1122+
#size-cells = <0>;
1123+
pinctrl-names = "default";
1124+
pinctrl-0 = <&fspim2_pins>;
1125+
1126+
spi_flash: spi-flash@0 {
1127+
#address-cells = <1>;
1128+
#size-cells = <0>;
1129+
compatible = "jedec,spi-nor";
1130+
reg = <0x0>;
1131+
spi-max-frequency = <50000000>;
1132+
spi-tx-bus-width = <1>;
1133+
spi-rx-bus-width = <4>;
1134+
status = "okay";
1135+
1136+
partitions {
1137+
compatible = "fixed-partitions";
1138+
#address-cells = <1>;
1139+
#size-cells = <1>;
1140+
1141+
loader@0 {
1142+
label = "loader";
1143+
reg = <0x0 0x1000000>;
1144+
};
1145+
};
1146+
};
1147+
};
1148+
11691149
&pinctrl {
11701150
usb {
11711151
vcc5v0_host_en: vcc5v0-host-en {

arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@
149149
vcc5v0_host: vcc5v0-host-regulator {
150150
compatible = "regulator-fixed";
151151
regulator-name = "vcc5v0_host";
152-
regulator-boot-on;
153-
regulator-always-on;
154152
regulator-min-microvolt = <5000000>;
155153
regulator-max-microvolt = <5000000>;
156154
enable-active-high;
@@ -722,6 +720,7 @@
722720
};
723721

724722
&u2phy1_otg {
723+
vbus-supply = <&vcc5v0_host>;
725724
status = "okay";
726725
};
727726

0 commit comments

Comments
 (0)