Skip to content

Commit 5705616

Browse files
committed
youyeetoo r1: refactor DSI configuration into separate overlays
Split the monolithic DSI0/DSI1 configuration from rk3588s-yyt-lcd.dtsi into two independent device tree overlays. This allows users to enable either display without recompiling with different preprocessor defines. Changes: - Add youyeetoo-r1-display-dsi0.dts overlay with DSI0 panel, backlight (PWM12), touchscreen (i2c3), and VP2 video pipeline configuration - Add youyeetoo-r1-display-dsi1.dts overlay with DSI1 panel, backlight1 (PWM11), touchscreen (i2c5), and VP3 video pipeline configuration - Remove rk3588s-yyt-lcd.dtsi and its inclusion from main dts - Remove backlight/backlight1 and PWM11/PWM12 definitions from main dts as they are now integrated in respective overlays - Update overlay/Makefile to build new overlay dtbo files
1 parent c08a4c3 commit 5705616

File tree

5 files changed

+445
-373
lines changed

5 files changed

+445
-373
lines changed

arch/arm64/boot/dts/rockchip/overlay/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
8282
yy3568-display-dsi1.dtbo \
8383
yy3568-display-edp.dtbo \
8484
yy3568-sata2.dtbo \
85+
youyeetoo-r1-display-dsi0.dtbo \
86+
youyeetoo-r1-display-dsi1.dtbo \
8587
khadas-edge2-display-dsi0.dtbo \
8688
khadas-edge2-display-dsi1.dtbo \
8789
khadas-edge2-cam1.dtbo \
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/gpio.h>
5+
#include <dt-bindings/pinctrl/rockchip.h>
6+
#include <dt-bindings/display/drm_mipi_dsi.h>
7+
8+
/*
9+
* Youyeetoo R1 - RK3588S
10+
* LCD DSI0 Overlay
11+
*/
12+
13+
/ {
14+
fragment@0 {
15+
target-path = "/";
16+
17+
__overlay__ {
18+
backlight: backlight {
19+
compatible = "pwm-backlight";
20+
brightness-levels = <
21+
0 20 20 21 21 22 22 23
22+
23 24 24 25 25 26 26 27
23+
27 28 28 29 29 30 30 31
24+
31 32 32 33 33 34 34 35
25+
35 36 36 37 37 38 38 39
26+
40 41 42 43 44 45 46 47
27+
48 49 50 51 52 53 54 55
28+
56 57 58 59 60 61 62 63
29+
64 65 66 67 68 69 70 71
30+
72 73 74 75 76 77 78 79
31+
80 81 82 83 84 85 86 87
32+
88 89 90 91 92 93 94 95
33+
96 97 98 99 100 101 102 103
34+
104 105 106 107 108 109 110 111
35+
112 113 114 115 116 117 118 119
36+
120 121 122 123 124 125 126 127
37+
128 129 130 131 132 133 134 135
38+
136 137 138 139 140 141 142 143
39+
144 145 146 147 148 149 150 151
40+
152 153 154 155 156 157 158 159
41+
160 161 162 163 164 165 166 167
42+
168 169 170 171 172 173 174 175
43+
176 177 178 179 180 181 182 183
44+
184 185 186 187 188 189 190 191
45+
192 193 194 195 196 197 198 199
46+
200 201 202 203 204 205 206 207
47+
208 209 210 211 212 213 214 215
48+
216 217 218 219 220 221 222 223
49+
224 225 226 227 228 229 230 231
50+
232 233 234 235 236 237 238 239
51+
240 241 242 243 244 245 246 247
52+
248 249 250 251 252 253 254 255
53+
>;
54+
default-brightness-level = <200>;
55+
pwms = <&pwm12 0 25000 0>;
56+
status = "okay";
57+
power-supply = <&vcc5v0_sys>;
58+
};
59+
};
60+
};
61+
62+
fragment@1 {
63+
target = <&pwm12>;
64+
65+
__overlay__ {
66+
status = "okay";
67+
pinctrl-names = "active";
68+
pinctrl-0 = <&pwm12m1_pins>;
69+
};
70+
};
71+
72+
fragment@2 {
73+
target = <&dsi0>;
74+
75+
__overlay__ {
76+
status = "okay";
77+
rockchip,lane-rate = <1000>;
78+
79+
dsi0_panel: panel@0 {
80+
status = "okay";
81+
compatible = "simple-panel-dsi";
82+
reg = <0>;
83+
backlight = <&backlight>;
84+
reset-delay-ms = <60>;
85+
enable-delay-ms = <60>;
86+
prepare-delay-ms = <60>;
87+
unprepare-delay-ms = <60>;
88+
disable-delay-ms = <60>;
89+
dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
90+
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET)>;
91+
dsi,format = <MIPI_DSI_FMT_RGB888>;
92+
dsi,lanes = <4>;
93+
94+
panel-init-sequence = [
95+
15 00 02 80 ac
96+
15 00 02 81 b8
97+
15 00 02 82 09
98+
15 00 02 83 78
99+
15 00 02 84 7f
100+
15 00 02 85 bb
101+
15 00 02 86 70
102+
];
103+
104+
panel-exit-sequence = [
105+
05 00 01 28
106+
05 00 01 10
107+
];
108+
109+
disp_timings0:display-timings {
110+
native-mode = <&dsi0_timing0>;
111+
dsi0_timing0: timing0 {
112+
clock-frequency = <51668640>;
113+
hactive = <1024>;
114+
vactive = <600>;
115+
hfront-porch = <160>;
116+
hback-porch = <160>;
117+
hsync-len = <10>;
118+
vfront-porch = <12>;
119+
vsync-len = <10>;
120+
vback-porch = <23>;
121+
hsync-active = <0>;
122+
vsync-active = <0>;
123+
de-active = <1>;
124+
pixelclk-active = <0>;
125+
};
126+
};
127+
128+
ports {
129+
#address-cells = <1>;
130+
#size-cells = <0>;
131+
132+
port@0 {
133+
reg = <0>;
134+
panel_in_dsi: endpoint {
135+
remote-endpoint = <&dsi_out_panel>;
136+
};
137+
};
138+
};
139+
};
140+
141+
ports {
142+
#address-cells = <1>;
143+
#size-cells = <0>;
144+
145+
port@1 {
146+
reg = <1>;
147+
dsi_out_panel: endpoint {
148+
remote-endpoint = <&panel_in_dsi>;
149+
};
150+
};
151+
};
152+
};
153+
};
154+
155+
fragment@3 {
156+
target = <&route_dsi0>;
157+
158+
__overlay__ {
159+
status = "okay";
160+
connect = <&vp2_out_dsi0>;
161+
};
162+
};
163+
164+
fragment@4 {
165+
target = <&dsi0_in_vp2>;
166+
167+
__overlay__ {
168+
status = "okay";
169+
};
170+
};
171+
172+
fragment@5 {
173+
target = <&dsi0_in_vp3>;
174+
175+
__overlay__ {
176+
status = "disabled";
177+
};
178+
};
179+
180+
fragment@6 {
181+
target = <&dsi0_panel>;
182+
183+
__overlay__ {
184+
power-supply = <&vcc3v3_lcd_n>;
185+
reset-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
186+
enable-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
187+
pinctrl-names = "default";
188+
pinctrl-0 = <&lcd_rst_gpio>;
189+
};
190+
};
191+
192+
fragment@7 {
193+
target = <&i2c3>;
194+
195+
__overlay__ {
196+
status = "okay";
197+
pinctrl-names = "default";
198+
pinctrl-0 = <&i2c3m2_xfer>;
199+
200+
gt9xx: gt9xx@5d {
201+
compatible = "goodix,gt9xx";
202+
reg = <0x5d>;
203+
touch-gpio = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
204+
reset-gpio = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
205+
max-x = <1024>;
206+
max-y = <600>;
207+
tp-size = <911>;
208+
pinctrl-names = "default";
209+
pinctrl-0 = <&touch_gpio>;
210+
status = "okay";
211+
};
212+
};
213+
};
214+
215+
fragment@8 {
216+
target = <&mipi_dcphy0>;
217+
218+
__overlay__ {
219+
status = "okay";
220+
};
221+
};
222+
};

0 commit comments

Comments
 (0)