1/* 2 * Copyright (c) 2022, Kumar Gala <galak@kernel.org> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Application overlay for testing driver builds 7 * 8 * Names in this file should be chosen in a way that won't conflict 9 * with real-world devicetree nodes, to allow these tests to run on 10 * (and be extended to test) real hardware. 11 */ 12 13#include <zephyr/dt-bindings/led/led.h> 14#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> 15 16/ { 17 test { 18 #address-cells = <1>; 19 #size-cells = <1>; 20 21 test_gpio: gpio@deadbeef { 22 compatible = "vnd,gpio"; 23 gpio-controller; 24 reg = <0xdeadbeef 0x1000>; 25 #gpio-cells = <0x2>; 26 status = "okay"; 27 }; 28 29 test_mipi_dbi { 30 compatible = "zephyr,mipi-dbi-spi"; 31 status = "okay"; 32 dc-gpios = <&test_gpio 0 0>; 33 spi-dev = <&test_spi>; 34 #address-cells = <1>; 35 #size-cells = <0>; 36 37 test_mipi_dbi_ili9342c: ili9342c@0 { 38 compatible = "ilitek,ili9342c"; 39 reg = <0>; 40 mipi-max-frequency = <25000000>; 41 pixel-format = <0>; 42 rotation = <270>; 43 width = <320>; 44 height = <240>; 45 }; 46 47 test_mipi_dbi_st7796s: st7796s@1 { 48 compatible = "sitronix,st7796s"; 49 reg = <1>; 50 mipi-max-frequency = <25000000>; 51 height = <320>; 52 width = <480>; 53 /* Use dummy values for PCG and NGC, 54 * As this won't drive a real panel 55 */ 56 pgc = [F0 06 0B 07 06 05 2E 33 47 3A 17 16 2E 31]; 57 ngc = [F0 09 0D 09 08 23 2E 33 46 38 13 13 2C 32]; 58 }; 59 60 test_mipi_dbi_st7735r: st7735t@2 { 61 compatible = "sitronix,st7735r"; 62 mipi-max-frequency = <250000000>; 63 mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE"; 64 reg = <2>; 65 /* Arbitrary values */ 66 x-offset = <0>; 67 y-offset = <0>; 68 gamctrp1 = [10 0E 02 03 0E 07 02 07 0A 12 27 37 00 0D 0E 10]; 69 gamctrn1 = [10 0E 03 03 0F 06 02 08 0A 13 26 36 00 0D 0E 10]; 70 width = <160>; 71 height = <128>; 72 }; 73 74 test_st7789v: st7789v@3 { 75 compatible = "sitronix,st7789v"; 76 reg = <3>; 77 mipi-max-frequency = <25000000>; 78 79 width = <128>; 80 height = <128>; 81 /* Arbiratry values */ 82 x-offset = <0>; 83 y-offset = <0>; 84 vcom = <0x28>; 85 gctrl = <0x35>; 86 vrhs = <0x10>; 87 vdvs = <0x20>; 88 mdac = <0x00>; 89 gamma = <0x01>; 90 colmod = <0x55>; 91 lcm = <0x0c>; 92 porch-param = [0c 0c 00 33 33]; 93 cmd2en-param = [5a 69 02 00]; 94 pwctrl1-param = [a4 a1]; 95 pvgam-param = [d0 00 02 07 0a 28 32 44 42 06 0e 12 14 17]; 96 nvgam-param = [d0 00 02 07 0a 28 31 54 47 0e 1c 17 1b 1e]; 97 ram-param = [00 E0]; 98 rgb-param = [40 02 14]; 99 mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE"; 100 }; 101 102 test_mipi_dbi_ssd1680: ssd1680@4 { 103 compatible = "gooddisplay,gdey0213b74", "solomon,ssd1680"; 104 mipi-max-frequency = <4000000>; 105 reg = <4>; 106 width = <250>; 107 height = <122>; 108 busy-gpios = <&test_gpio 0 0>; 109 }; 110 111 test_uc8176_waveshare_epaper_gdew042t2: uc8176@5 { 112 compatible = "ultrachip,uc8176"; 113 mipi-max-frequency = <4000000>; 114 reg = <5>; 115 width = <400>; 116 height = <300>; 117 busy-gpios = <&test_gpio 0 0>; 118 119 /* Arbirary settings */ 120 softstart = [17 17 17]; 121 122 full { 123 pwr = [03 00 26 26 09]; 124 cdi = <0xd7>; 125 tcon = <0x22>; 126 }; 127 }; 128 129 test_spi_gc9x01x: gc9x01x@6 { 130 compatible = "galaxycore,gc9x01x"; 131 reg = <6>; 132 mipi-max-frequency = <100000000>; 133 pixel-format = <16>; 134 135 width = <240>; 136 height = <240>; 137 }; 138 139 test_spi_ssd1327fb: ssd1327fb@7 { 140 compatible = "solomon,ssd1327fb"; 141 reg = <7>; 142 mipi-max-frequency = <100000000>; 143 144 width = <240>; 145 height = <240>; 146 oscillator-freq = <0>; 147 display-offset = <0>; 148 start-line = <0>; 149 multiplex-ratio = <0>; 150 prechargep = <0>; 151 remap-value = <0>; 152 }; 153 154 test_mipi_dbi_ssd1322: ssd1322@9 { 155 compatible = "solomon,ssd1322"; 156 reg = <9>; 157 mipi-max-frequency = <16000000>; 158 width = <128>; 159 height = <64>; 160 column-offset = <28>; 161 }; 162 }; 163 164 test_mipi_dbi_xfr_16bit_write_only { 165 compatible = "zephyr,mipi-dbi-spi"; 166 status = "okay"; 167 dc-gpios = <&test_gpio 0 0>; 168 spi-dev = <&test_spi>; 169 #address-cells = <1>; 170 #size-cells = <0>; 171 xfr-min-bits = <MIPI_DBI_SPI_XFR_16BIT>; 172 write-only; 173 174 test_mipi_dbi_xfr_16bit_ili9342c: ili9342c@0 { 175 compatible = "ilitek,ili9342c"; 176 reg = <0>; 177 mipi-max-frequency = <25000000>; 178 mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE"; 179 pixel-format = <0>; 180 rotation = <270>; 181 width = <320>; 182 height = <240>; 183 }; 184 }; 185 186 test_mipi_dsi { 187 compatible = "vnd,mipi-dsi"; 188 #address-cells = <1>; 189 #size-cells = <0>; 190 status = "okay"; 191 192 test_hx8394: hx8394@0 { 193 status = "okay"; 194 compatible = "himax,hx8394"; 195 reg = <0x0>; 196 reset-gpios = <&test_gpio 0 0>; 197 data-lanes = <2>; 198 width = <720>; 199 height = <1280>; 200 pixel-format = <0>; 201 }; 202 203 test_nt35510: nt35510@1 { 204 status = "okay"; 205 compatible = "frida,nt35510"; 206 reg = <0x1>; 207 height = <800>; 208 width = <480>; 209 reset-gpios = <&test_gpio 0 0>; 210 bl-gpios = <&test_gpio 0 0>; 211 data-lanes = <2>; 212 pixel-format = <0>; 213 rotation = <90>; 214 }; 215 216 test_otm8009a: otm8009a@2 { 217 status = "okay"; 218 compatible = "orisetech,otm8009a"; 219 reg = <0x2>; 220 height = <800>; 221 width = <480>; 222 reset-gpios = <&test_gpio 0 0>; 223 bl-gpios = <&test_gpio 0 0>; 224 data-lanes = <2>; 225 pixel-format = <0>; 226 rotation = <90>; 227 }; 228 229 test_rm67162: rm67162@3 { 230 status = "okay"; 231 compatible = "raydium,rm67162"; 232 reg = <0x3>; 233 reset-gpios = <&test_gpio 0 0>; 234 bl-gpios = <&test_gpio 0 0>; 235 te-gpios = <&test_gpio 0 0>; 236 data-lanes = <1>; 237 width = <400>; 238 height = <392>; 239 pixel-format = <0>; 240 }; 241 242 test_rm68200: rm68200@4 { 243 status = "okay"; 244 compatible = "raydium,rm68200"; 245 reg = <0x4>; 246 reset-gpios = <&test_gpio 0 0>; 247 data-lanes = <2>; 248 width = <720>; 249 height = <1280>; 250 pixel-format = <0>; 251 }; 252 }; 253 254 test_spi: spi@33334444 { 255 #address-cells = <1>; 256 #size-cells = <0>; 257 compatible = "vnd,spi"; 258 reg = <0x33334444 0x1000>; 259 status = "okay"; 260 clock-frequency = <2000000>; 261 262 /* one entry for every device. Note that this must 263 * include MIPI DBI devices as well. 264 */ 265 cs-gpios = <&test_gpio 0 0 &test_gpio 0 1 &test_gpio 0 2 266 &test_gpio 0 3 &test_gpio 0 4 &test_gpio 0 5 267 &test_gpio 0 6 &test_gpio 0 7 &test_gpio 0 8 268 &test_gpio 0 9>; 269 270 test_led_strip_0: lpd8806@0 { 271 compatible = "greeled,lpd8806"; 272 reg = <0>; 273 spi-max-frequency = <2000000>; 274 chain-length = <1>; 275 color-mapping = <LED_COLOR_ID_RED 276 LED_COLOR_ID_GREEN 277 LED_COLOR_ID_BLUE>; 278 }; 279 280 test_led_strip_1: ws2812_spi@1 { 281 compatible = "worldsemi,ws2812-spi"; 282 reg = <1>; 283 spi-max-frequency = <2000000>; 284 spi-one-frame = <1>; 285 spi-zero-frame = <1>; 286 chain-length = <256>; 287 color-mapping = <0 1 2>; 288 reset-delay = <280>; 289 }; 290 291 test_ls0xx: ls0xx@7 { 292 compatible = "sharp,ls0xx"; 293 spi-max-frequency = <2000000>; 294 reg = <0x7>; 295 width = <128>; 296 height = <128>; 297 extcomin-gpios = <&test_gpio 0 0>; 298 extcomin-frequency = <60>; 299 disp-en-gpios = <&test_gpio 0 0>; 300 }; 301 302 test_max7219: max7219@8 { 303 compatible = "maxim,max7219"; 304 reg = <0x8>; 305 spi-max-frequency = <1000000>; 306 num-cascading = <1>; 307 intensity = <0>; 308 scan-limit = <7>; 309 }; 310 }; 311 312 test_led_strip_matrix { 313 compatible = "led-strip-matrix"; 314 status = "okay"; 315 316 led-strips = <&test_led_strip_0>, <&test_led_strip_1>; 317 chain-lengths = <256>, <256>; 318 width = <32>; 319 height = <16>; 320 horizontal-modules = <2>; 321 vertical-modules = <1>; 322 circulative; 323 start-from-right; 324 }; 325 326 test_i2c:i2c@60013000{ 327 #address-cells = <1>; 328 #size-cells = <0>; 329 compatible="vnd,i2c"; 330 reg = <0x60013000 0x1000>; 331 status="okay"; 332 clock-frequency=<100000>; 333 334 test_ist3931:ist3931@0 { 335 reg=<0x0>; 336 width=<64>; 337 height=<32>; 338 compatible = "istech,ist3931"; 339 reset-gpios =<&test_gpio 1 0>; 340 x-offset=<0>; 341 y-offset=<32>; 342 voltage-converter; 343 voltage-follower; 344 lcd-bias=<3>; 345 lcd-ct=<223>; 346 duty-ratio=<64>; 347 frame-control=<400>; 348 reverse-com-output; 349 }; 350 351 test_ssd1306: ssd1306@1 { 352 compatible = "solomon,ssd1306fb"; 353 reg = <0x1>; 354 width = <128>; 355 height = <64>; 356 segment-offset = <0>; 357 page-offset = <0>; 358 display-offset = <0>; 359 multiplex-ratio = <63>; 360 segment-remap; 361 com-invdir; 362 prechargep = <0x22>; 363 }; 364 }; 365 }; 366}; 367