Skip to content

Commit

Permalink
add cs003 display
Browse files Browse the repository at this point in the history
  • Loading branch information
Radxa-Alvin committed Apr 26, 2024
1 parent 31042d0 commit 0ca3c9d
Show file tree
Hide file tree
Showing 2 changed files with 240 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ dtb-$(CONFIG_CLK_RK3399) += \
rock-4c-plus-raspi-7inch-touchscreen.dtbo

dtb-$(CONFIG_CPU_RK3399) += \
rk3399-cs003-display.dtbo \
rock-4c-plus-radxa-display-8hd.dtbo \
rock-4c-plus-radxa-display-10fhd.dtbo \
rock-4c-plus-radxa-display-10hd.dtbo \
Expand Down
239 changes: 239 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rk3399-cs003-display.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/pwm/pwm.h>

/ {
metadata {
title = "Enable CS003 Display";
compatible = "unknown";
category = "display";
exclusive = "dsi";
description = "Enable CS003 Display";
};
};

&{/} {
backlight: backlight {
status = "okay";
compatible = "pwm-backlight";
pwms = <&pwm1 0 25000 PWM_POLARITY_INVERTED>;
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>;
enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_backlight_en>;
};
};

&pwm1 {
status = "okay";
};

&dsi {
status = "okay";
dsi1-only;
};

&dsi1 {
status = "okay";
rockchip,dsi-dsi0 = <&dsi>;
#address-cells = <1>;
#size-cells = <0>;

dsi1_panel: panel@0 {
status = "okay";
compatible = "simple-panel-dsi";
reg = <0>;

backlight = <&backlight>;
power-supply = <&vcc3v3_sys>;
vdd-supply = <&vcc3v3_sys>;
vccio-supply = <&vcc_1v8>;

reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
dsi,format = <MIPI_DSI_FMT_RGB888>;
pinctrl-names = "default";
pinctrl-0 = <&lcd_panel_reset>;
dsi,lanes = <4>;
panel-init-sequence = [
15 00 04 B9 FF 83 94
15 00 07 BA 63 03 68 6B B2 C0
15 00 0B B1 48 14 74 09 32 54 71 51 57 3A
15 00 0D B2 00 A0 64 0D 0D 2E 11 40 00 00 C0 18
15 00 16 B4 02 76 02 76 02 76 05 05 88 55 00 1F 73 74 73 74 73 74 05 10 86
15 00 03 B6 20 20
15 00 2C D3 00 00 07 07 40 07 08 08 32 10 08 00 08 32 39 0C 05 0C 02 39 06 05 06 37 33 0B 0B 27 10 07 07 00 00 00 00 17 00 00 00 00 00 00 17
15 00 2D D5 27 26 25 24 07 06 05 04 03 02 01 00 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 21 20 23 22 18 18 18 18
15 00 2D D6 20 21 22 23 00 01 02 03 04 05 06 07 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 26 27 24 25 18 18 18 18
15 00 3B E0 00 03 0E 16 18 1D 21 1F 43 58 69 69 73 87 8D 92 9F A2 9F AD BB 5C 5A 5E 62 64 6A 79 7F 00 03 0E 16 18 1D 21 1F 43 58 69 69 73 87 8D 92 9F A2 9F AD BB 5C 5A 5E 62 64 6A 79 7F
15 00 02 CC 0B
15 00 03 C0 1F 31
15 00 02 D2 88
15 00 02 D4 02
15 00 02 BD 02
15 00 0D D8 FF FF FF FF FF F0 FF FF FF FF FF F0
15 00 02 BD 00
15 00 02 C6 FD
05 78 01 11
05 14 01 29
];

panel-exit-sequence = [
05 00 01 28
05 00 01 10
];

disp_timings0: display-timings {
native-mode = <&dsi0_timing0>;
dsi0_timing0: timing0 {
clock-frequency = <57000000>;
hactive = <600>;
vactive = <1280>;
hsync-len = <28>;
hback-porch = <48>;
hfront-porch = <49>;
vsync-len = <2>;
vback-porch = <13>;
vfront-porch = <15>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
};
};

ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
panel_in_dsi: endpoint {
remote-endpoint = <&dsi_out_panel>;
};
};
};
};

ports {
#address-cells = <1>;
#size-cells = <0>;

port@1 {
reg = <1>;
dsi_out_panel: endpoint {
remote-endpoint = <&panel_in_dsi>;
};
};
};
};

&vopl_out_dsi {
status = "okay";
};

&dsi_in_vopl {
status = "okay";
};

&dsi_in_vopb {
status = "disabled";
};

&route_dsi {
status = "disabled";
connect = <&vopl_out_dsi>;
};

&i2c1 {
status = "okay";
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;

ilitek: ilitek@41 {
compatible = "tchip,ilitek";
reg = <0x41>;

ilitek,irq-gpio = <&gpio1 RK_PD0 IRQ_TYPE_LEVEL_HIGH>;
ilitek,reset-gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;

ilitek,name = "ilitek_i2c";
};
};

&pinctrl {
lcd-panel {
lcd_backlight_en: lcd-backlight-en {
rockchip,pins =
<4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
};

lcd_panel_reset: lcd-panel-reset {
rockchip,pins =
<1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

&hdmi_sound {
status = "disabled";
};

&i2s2 {
status = "disabled";
};

&hdmi {
status = "okay";
};

&hdmi_in_vopb {
status = "okay";
};

&route_hdmi {
status = "okay";
};

&hdmi_sound {
status = "okay";
};

0 comments on commit 0ca3c9d

Please sign in to comment.