rk2023 dtsi patch cleanup after transfer to source

This commit is contained in:
sydarn
2026-01-09 20:55:09 +01:00
parent f799d43791
commit c2eeef8d39
7 changed files with 5 additions and 1390 deletions

View File

@@ -5,9 +5,8 @@ Subject: [PATCH] arm64: dts: rockchip: fix wifi sdio errors
---
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 3 +++
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 3 +++
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts | 3 +++
3 files changed, 9 insertions(+)
2 files changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi
index 233eade30f21..c9d24cada41a 100644
@@ -23,20 +22,6 @@ index 233eade30f21..c9d24cada41a 100644
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
index bd332714a023..18b9e60b6f3c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -776,6 +776,9 @@ &sdmmc2 {
pinctrl-names = "default";
vmmc-supply = <&vcc_wifi>;
vqmmc-supply = <&vcca1v8_pmu>;
+ no-mmc;
+ no-sd;
+ sd-uhs-sdr50;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts
index 5a648db41f35..0f26b8789c40 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts

View File

@@ -1,327 +0,0 @@
From f878598a9fe6b5ce3c96483faba43115c45b5a36 Mon Sep 17 00:00:00 2001
From: brooksytech <1673861+brooksytech@users.noreply.github.com>
Date: Sun, 24 Mar 2024 11:35:49 +0000
Subject: [PATCH] arm64: dts: rockchip: fixup powkiddy controls
---
.../dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 265 +++++++++---------
1 file changed, 128 insertions(+), 137 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
index 18b9e60b6f3c..3ac13af34219 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -18,61 +18,6 @@ aliases {
mmc3 = &sdmmc2;
};
- adc-joystick {
- compatible = "adc-joystick";
- io-channels = <&adc_mux 0>,
- <&adc_mux 1>,
- <&adc_mux 2>,
- <&adc_mux 3>;
- pinctrl-0 = <&joy_mux_en>;
- pinctrl-names = "default";
- poll-interval = <60>;
- #address-cells = <1>;
- #size-cells = <0>;
-
- axis@0 {
- reg = <0>;
- abs-flat = <32>;
- abs-fuzz = <32>;
- abs-range = <1023 15>;
- linux,code = <ABS_X>;
- };
-
- axis@1 {
- reg = <1>;
- abs-flat = <32>;
- abs-fuzz = <32>;
- abs-range = <15 1023>;
- linux,code = <ABS_RX>;
- };
-
- axis@2 {
- reg = <2>;
- abs-flat = <32>;
- abs-fuzz = <32>;
- abs-range = <15 1023>;
- linux,code = <ABS_Y>;
- };
-
- axis@3 {
- reg = <3>;
- abs-flat = <32>;
- abs-fuzz = <32>;
- abs-range = <1023 15>;
- linux,code = <ABS_RY>;
- };
- };
-
- adc_mux: adc-mux {
- compatible = "io-channel-mux";
- channels = "left_x", "right_x", "left_y", "right_y";
- #io-channel-cells = <1>;
- io-channels = <&saradc 3>;
- io-channel-names = "parent";
- mux-controls = <&gpio_mux>;
- settle-time-us = <100>;
- };
-
backlight: backlight {
compatible = "pwm-backlight";
power-supply = <&vcc_sys>;
@@ -98,106 +43,159 @@ battery: battery {
<3400000 0>;
};
- gpio_keys_control: gpio-keys-control {
- compatible = "gpio-keys";
- pinctrl-0 = <&btn_pins_ctrl>;
+ joypad: rocknix-singleadc-joypad {
+ compatible = "rocknix-singleadc-joypad";
+
+ joypad-name = "retrogame_joypad";
+ joypad-product = <0x1101>;
+ joypad-revision = <0x0100>;
+ joypad-vendor = <0x484B>;
+
+ status = "okay";
+
+ /* gpio pincontrol setup */
pinctrl-names = "default";
+ pinctrl-0 = <&btn_pins_ctrl>;
- button-a {
- gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
- label = "EAST";
- linux,code = <BTN_EAST>;
- };
+ /* Analog mux define */
+ io-channel-names = "amux_adc";
+ io-channels = <&saradc 3>;
- button-b {
- gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
- label = "SOUTH";
- linux,code = <BTN_SOUTH>;
+ /* adc mux channel count */
+ amux-count = <4>;
+ /* adc mux select(a,b) gpio */
+ amux-a-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
+ amux-b-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
+ /* adc mux enable gpio */
+ amux-en-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_LOW>;
+
+ /* adc calculate scale */
+ button-adc-scale = <2>;
+
+
+ /* adc deadzone range */
+ button-adc-deadzone = <64>;
+
+ /*
+ specifies fuzz value that is used to filter noise from
+ the event stream.
+ */
+ button-adc-fuzz = <32>;
+ button-adc-flat = <32>;
+
+ /*
+ Analog Stick data tuning value(precent)
+ p = positive direction, n = negative direction
+ report value = (real_adc_data * tuning_value) / 100
+ */
+ abs_x-p-tuning = <245>;
+ abs_x-n-tuning = <245>;
+
+ abs_y-p-tuning = <245>;
+ abs_y-n-tuning = <245>;
+
+ abs_rx-p-tuning = <245>;
+ abs_rx-n-tuning = <245>;
+
+ abs_ry-p-tuning = <245>;
+ abs_ry-n-tuning = <245>;
+
+ /* poll device interval (ms), adc read interval */
+ poll-interval = <10>;
+
+ /* required to invert x/y */
+ invert-absx;
+ invert-absy;
+
+ /* gpio button auto repeat set value : default disable */
+ /*
+ autorepeat;
+ */
+ sw1 {
+ gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
+ label = "GPIO DPAD-UP";
+ linux,code = <BTN_DPAD_UP>;
};
-
- button-down {
+ sw2 {
gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
- label = "DPAD-DOWN";
+ label = "GPIO DPAD-DOWN";
linux,code = <BTN_DPAD_DOWN>;
};
-
- button-l1 {
- gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
- label = "TL";
- linux,code = <BTN_TL>;
- };
-
- button-l2 {
- gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
- label = "TL2";
- linux,code = <BTN_TL2>;
- };
-
- button-left {
+ sw3 {
gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
- label = "DPAD-LEFT";
+ label = "GPIO DPAD-LEFT";
linux,code = <BTN_DPAD_LEFT>;
};
-
- button-r1 {
- gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
- label = "TR";
- linux,code = <BTN_TR>;
- };
-
- button-r2 {
- gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
- label = "TR2";
- linux,code = <BTN_TR2>;
- };
-
- button-right {
+ sw4 {
gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
- label = "DPAD-RIGHT";
+ label = "GPIO DPAD-RIGHT";
linux,code = <BTN_DPAD_RIGHT>;
};
-
- button-select {
+ sw5 {
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
+ label = "GPIO KEY BTN-A";
+ linux,code = <BTN_SOUTH>;
+ };
+ sw6 {
+ gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-B";
+ linux,code = <BTN_EAST>;
+ };
+ sw7 {
+ gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-X";
+ linux,code = <BTN_NORTH>;
+ };
+ sw8 {
+ gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN-Y";
+ linux,code = <BTN_WEST>;
+ };
+ sw9 {
gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
- label = "SELECT";
+ label = "GPIO BTN_SELECT";
linux,code = <BTN_SELECT>;
};
-
- button-start {
+ sw10 {
gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
- label = "START";
+ label = "GPIO BTN_START";
linux,code = <BTN_START>;
};
-
- button-thumbl {
+ sw11 {
+ gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN_F";
+ linux,code = <BTN_MODE>;
+ };
+ sw12 {
+ gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN_TL";
+ linux,code = <BTN_TL>;
+ };
+ sw13 {
+ gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN_TR";
+ linux,code = <BTN_TR>;
+ };
+ sw14 {
+ gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN_TL2";
+ linux,code = <BTN_TL2>;
+ };
+ sw15 {
+ gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
+ label = "GPIO BTN_TR2";
+ linux,code = <BTN_TR2>;
+ };
+ sw16 {
gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
- label = "THUMBL";
+ label = "GPIO BTN_THUMBL";
linux,code = <BTN_THUMBL>;
};
-
- button-thumbr {
+ sw17 {
gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
- label = "THUMBR";
+ label = "GPIO BTN_THUMBR";
linux,code = <BTN_THUMBR>;
};
-
- button-up {
- gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
- label = "DPAD-UP";
- linux,code = <BTN_DPAD_UP>;
- };
-
- button-x {
- gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
- label = "NORTH";
- linux,code = <BTN_NORTH>;
- };
-
- button-y {
- gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
- label = "WEST";
- linux,code = <BTN_WEST>;
- };
};
gpio_keys_vol: gpio-keys-vol {
@@ -219,13 +217,6 @@ button-vol-up {
};
};
- gpio_mux: mux-controller {
- compatible = "gpio-mux";
- mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
- <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
- #mux-control-cells = <0>;
- };
-
hdmi-con {
compatible = "hdmi-connector";
ddc-i2c-bus = <&i2c5>;
--
2.34.1

View File

@@ -7,9 +7,8 @@ Subject: [PATCH] arm64: dts: rockchip: use linear backlight levels to improve
---
.../dts/rockchip/rk3566-anbernic-rg-arc.dtsi | 34 +++++++++++++++++++
.../dts/rockchip/rk3566-anbernic-rg353x.dtsi | 34 +++++++++++++++++++
.../dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 34 +++++++++++++++++++
.../boot/dts/rockchip/rk3566-powkiddy-x55.dts | 34 +++++++++++++++++++
4 files changed, 136 insertions(+)
4 files changed, 97 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg-arc.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg-arc.dtsi
index 8f77b5cbc379..162467db439e 100644
@@ -101,51 +100,6 @@ index 13c679e84446..687199430d84 100644
};
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
index 3ac13af34219..8fbe36dad7b1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -22,6 +22,40 @@ backlight: backlight {
compatible = "pwm-backlight";
power-supply = <&vcc_sys>;
pwms = <&pwm4 0 25000 0>;
+ brightness-levels = <
+ 0 1 2 3 4 5 6 7
+ 8 9 10 11 12 13 14 15
+ 16 17 18 19 20 21 22 23
+ 24 25 26 27 28 29 30 31
+ 32 33 34 35 36 37 38 39
+ 40 41 42 43 44 45 46 47
+ 48 49 50 51 52 53 54 55
+ 56 57 58 59 60 61 62 63
+ 64 65 66 67 68 69 70 71
+ 72 73 74 75 76 77 78 79
+ 80 81 82 83 84 85 86 87
+ 88 89 90 91 92 93 94 95
+ 96 97 98 99 100 101 102 103
+ 104 105 106 107 108 109 110 111
+ 112 113 114 115 116 117 118 119
+ 120 121 122 123 124 125 126 127
+ 128 129 130 131 132 133 134 135
+ 136 137 138 139 140 141 142 143
+ 144 145 146 147 148 149 150 151
+ 152 153 154 155 156 157 158 159
+ 160 161 162 163 164 165 166 167
+ 168 169 170 171 172 173 174 175
+ 176 177 178 179 180 181 182 183
+ 184 185 186 187 188 189 190 191
+ 192 193 194 195 196 197 198 199
+ 200 201 202 203 204 205 206 207
+ 208 209 210 211 212 213 214 215
+ 216 217 218 219 220 221 222 223
+ 224 225 226 227 228 229 230 231
+ 232 233 234 235 236 237 238 239
+ 240 241 242 243 244 245 246 247
+ 248 249 250 251 252 253 254 255>;
+ default-brightness-level = <77>;
};
battery: battery {
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts
index f0becd04e070..85893fe88789 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-x55.dts

View File

@@ -5,31 +5,17 @@ Subject: [PATCH] arm64: dts: rockchip: add system power controller attribute
---
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
1 file changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi
index 123fc681b44e..67cb89162a89 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi
@@ -212,7 +212,7 @@ rk817: pmic@20 {
@@ -212,7 +212,8 @@ rk817: pmic@20 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
- wakeup-source;
+ system-power-controller;
vcc1-supply = <&vcc_sys>;
vcc2-supply = <&vcc_sys>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
index 8fbe36dad7b1..c3268ff998cd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -450,7 +450,7 @@ rk817: pmic@20 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
- wakeup-source;
wakeup-source;
+ system-power-controller;
vcc1-supply = <&vcc_sys>;

View File

@@ -1,38 +0,0 @@
From 81dae42d86fac9061fe1b16a1c295c9b942321bc Mon Sep 17 00:00:00 2001
From: sydarn <sydarn@proton.me>
Date: Thu, 10 Oct 2024 18:15:24 +0200
Subject: [PATCH] arm64: dts: rockchip: add uart to powkiddy device tree
---
arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
index c3268ff998cd..fa1fc1661151 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -18,6 +18,10 @@ aliases {
mmc3 = &sdmmc2;
};
+ chosen: chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
backlight: backlight {
compatible = "pwm-backlight";
power-supply = <&vcc_sys>;
@@ -827,6 +831,10 @@ bluetooth: bluetooth {
};
};
+&uart2 {
+ status = "okay";
+};
+
&usb_host0_xhci {
dr_mode = "peripheral";
phys = <&usb2phy0_otg>;
--
2.34.1

View File

@@ -10,15 +10,3 @@ index 233eade30f21..54616b26fb1b 100644
cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
disable-wp;
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
index bd332714a023..cdaa88c5f2da 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-powkiddy-rk2023.dtsi
@@ -755,6 +755,7 @@ &sdmmc0 {
&sdmmc1 {
bus-width = <4>;
cap-sd-highspeed;
+ card-detect-delay = <800>;
cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
disable-wp;
pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;