Skip to content

Commit

Permalink
WIP: arch: arm64 board: youyeetoo r1 v3 add rewrited dts code.
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperKali authored and amazingfate committed Aug 21, 2024
1 parent b126dbe commit a9b22e5
Show file tree
Hide file tree
Showing 4 changed files with 1,341 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb3-lp4x-v10-sii9022-bt1120-to-hdmi.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb4-lp4x-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb4-lp4x-v10-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-evb8-lp4x-v10.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-youyeetoo-r1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-9tripod-linux.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-lubancat-4.dtb
Expand Down
196 changes: 196 additions & 0 deletions arch/arm64/boot/dts/rockchip/rk3588s-youyeetoo-r1.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
*
*/

/dts-v1/;

#include "rk3588s-yyt-common.dtsi"
#include "rk3588s-yyt-lcd.dtsi"

/ {
model = "Youyeetoo R1";
compatible = "youyeetoo,r1", "rockchip,rk3588";

/* AUDIO */

es8388_sound: es8388-sound {
status = "okay";
compatible = "rockchip,multicodecs-card";
rockchip,card-name = "rockchip-es8388";
hp-det-gpio = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>;
io-channels = <&saradc 3>;
io-channel-names = "adc-detect";
keyup-threshold-microvolt = <1800000>;
poll-interval = <100>;
rockchip,format = "i2s";
rockchip,mclk-fs = <256>;
rockchip,cpu = <&i2s0_8ch>;
rockchip,codec = <&es8388>;
rockchip,audio-routing =
"Headphone", "LOUT1",
"Headphone", "ROUT1",
"Speaker", "LOUT1",
"Speaker", "ROUT1",
"Headphone", "Headphone Power",
"Headphone", "Headphone Power",
"Speaker", "Speaker Power",
"Speaker", "Speaker Power",
"LINPUT1", "Main Mic",
"LINPUT2", "Main Mic",
"RINPUT1", "Main Mic",
"RINPUT2", "Main Mic";
pinctrl-names = "default";
pinctrl-0 = <&hp_det>;
play-pause-key {
label = "playpause";
linux,code = <KEY_PLAYPAUSE>;
press-threshold-microvolt = <2000>;
};
};

backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm12 0 25000 0>;
brightness-levels = <
0 20 20 21 21 22 22 23
23 24 24 25 25 26 26 27
27 28 28 29 29 30 30 31
31 32 32 33 33 34 34 35
35 36 36 37 37 38 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 = <200>;
};

backlight1: backlight1 {
compatible = "pwm-backlight";
pwms = <&pwm11 0 25000 0>;
brightness-levels = <
0 20 20 21 21 22 22 23
23 24 24 25 25 26 26 27
27 28 28 29 29 30 30 31
31 32 32 33 33 34 34 35
35 36 36 37 37 38 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 = <200>;
};

/* FAN */
fan: gpio-fan {
compatible = "gpio-fan";
gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; /* Using GPIO0_C7 */
#cooling-cells = <2>;
cooling-levels = <0 50 100 150 200 255>;
gpio-fan,speed-map = <
0 0
1 50
2 100
3 150
4 200
5 255
>;
rockchip,temp-trips = <
50000 1
55000 2
60000 3
65000 4
70000 5
>;
status = "okay";
};

usb30_power_ver1 {
compatible = "lylx,xgpio";
gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
def_val = <1>;
status = "okay";
};

usb30_power {
compatible = "lylx,xgpio";
gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
def_val = <1>;
status = "okay";
};
};

/* AUDIO */
&i2s0_8ch {
status = "okay";
pinctrl-0 = <&i2s0_lrck
&i2s0_sclk
&i2s0_sdi0
&i2s0_sdo0>;
};

&pwm7{
pinctrl-0 = <&pwm7m0_pins>;
status = "okay";
};

&pwm11 {
pinctrl-0 = <&pwm11m1_pins>;
pinctrl-names = "active";
status = "okay";
};

&pwm12 {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm12m1_pins>;
};
Loading

0 comments on commit a9b22e5

Please sign in to comment.