BCM2708: Add core Device Tree support
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / fbtft-overlay.dts
1 /*
2  * Device Tree overlay for fbtft drivers
3  */
4
5 /dts-v1/;
6 /plugin/;
7
8 / {
9         compatible = "brcm,bcm2835";
10
11         /* adafruit18 */
12         fragment@0 {
13                 target = <&display>;
14                 __dormant__ {
15                         compatible = "sitronix,st7735r";
16                         spi-max-frequency = <32000000>;
17                         gamma = "02 1c 07 12 37 32 29 2d 29 25 2B 39 00 01 03 10\n03 1d 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10";
18                 };
19         };
20
21         /* adafruit22 */
22         fragment@1 {
23                 target = <&display>;
24                 __dormant__ {
25                         compatible = "himax,hx8340bn";
26                         spi-max-frequency = <32000000>;
27                         buswidth = <9>;
28                         bgr;
29                 };
30         };
31
32         /* adafruit22a */
33         fragment@2 {
34                 target = <&display>;
35                 __dormant__ {
36                         compatible = "ilitek,ili9340";
37                         spi-max-frequency = <32000000>;
38                         bgr;
39                 };
40         };
41
42         /* adafruit28 */
43         fragment@3 {
44                 target = <&display>;
45                 __dormant__ {
46                         compatible = "ilitek,ili9341";
47                         spi-max-frequency = <32000000>;
48                         bgr;
49                 };
50         };
51
52         /* adafruit13m */
53         fragment@4 {
54                 target = <&display>;
55                 __dormant__ {
56                         compatible = "solomon,ssd1306";
57                         spi-max-frequency = <16000000>;
58                 };
59         };
60
61         /* admatec_c-berry28 */
62         fragment@5 {
63                 target = <&display>;
64                 __dormant__ {
65                         compatible = "sitronix,st7789v";
66                         spi-max-frequency = <48000000>;
67                         init = <0x01000011
68                                 0x02000078
69                                 0x0100003A 0x05
70                                 0x010000B2 0x0C 0x0C 0x00 0x33 0x33
71                                 0x010000B7 0x35
72                                 0x010000C2 0x01 0xFF
73                                 0x010000C3 0x17
74                                 0x010000C4 0x20
75                                 0x010000BB 0x17
76                                 0x010000C5 0x20
77                                 0x010000D0 0xA4 0xA1
78                                 0x01000029>;
79                         gamma = "D0 00 14 15 13 2C 42 43 4E 09 16 14 18 21\nD0 00 14 15 13 0B 43 55 53 0C 17 14 23 20";
80                 };
81         };
82
83         /* dogs102 */
84         fragment@6 {
85                 target = <&display>;
86                 __dormant__ {
87                         compatible = "UltraChip,uc1701";
88                         spi-max-frequency = <8000000>;
89                         bgr;
90                 };
91         };
92
93         /* er_tftm050_2 */
94         fragment@7 {
95                 target = <&display>;
96                 __dormant__ {
97                         compatible = "raio,ra8875";
98                         spi-max-frequency = <5000000>;
99                         spi-cpha;
100                         spi-cpol;
101                         width = <480>;
102                         height = <272>;
103                         bgr;
104                 };
105         };
106
107         /* er_tftm070_5 */
108         fragment@8 {
109                 target = <&display>;
110                 __dormant__ {
111                         compatible = "raio,ra8875";
112                         spi-max-frequency = <5000000>;
113                         spi-cpha;
114                         spi-cpol;
115                         width = <800>;
116                         height = <480>;
117                         bgr;
118                 };
119         };
120
121         /* ew24ha0 */
122         fragment@9 {
123                 target = <&display>;
124                 __dormant__ {
125                         compatible = "ultrachip,uc1611";
126                         spi-max-frequency = <32000000>;
127                         spi-cpha;
128                         spi-cpol;
129                 };
130         };
131
132         /* ew24ha0_9bit */
133         fragment@10 {
134                 target = <&display>;
135                 __dormant__ {
136                         compatible = "ultrachip,uc1611";
137                         spi-max-frequency = <32000000>;
138                         spi-cpha;
139                         spi-cpol;
140                         buswidth = <9>;
141                 };
142         };
143
144         /* freetronicsoled128 */
145         fragment@11 {
146                 target = <&display>;
147                 __dormant__ {
148                         compatible = "solomon,ssd1351";
149                         spi-max-frequency = <20000000>;
150                         backlight = <2>; /* FBTFT_ONBOARD_BACKLIGHT */
151                         bgr;
152                 };
153         };
154
155         /* hy28a */
156         fragment@12 {
157                 target = <&display>;
158                 __dormant__ {
159                         compatible = "ilitek,ili9320";
160                         spi-max-frequency = <32000000>;
161                         spi-cpha;
162                         spi-cpol;
163                         startbyte = <0x70>;
164                         bgr;
165                 };
166         };
167
168         /* hy28b */
169         fragment@13 {
170                 target = <&display>;
171                 __dormant__ {
172                         compatible = "ilitek,ili9325";
173                         spi-max-frequency = <48000000>;
174                         spi-cpha;
175                         spi-cpol;
176                         init = <0x010000e7 0x0010
177                                 0x01000000 0x0001
178                                 0x01000001 0x0100
179                                 0x01000002 0x0700
180                                 0x01000003 0x1030
181                                 0x01000004 0x0000
182                                 0x01000008 0x0207
183                                 0x01000009 0x0000
184                                 0x0100000a 0x0000
185                                 0x0100000c 0x0001
186                                 0x0100000d 0x0000
187                                 0x0100000f 0x0000
188                                 0x01000010 0x0000
189                                 0x01000011 0x0007
190                                 0x01000012 0x0000
191                                 0x01000013 0x0000
192                                 0x02000032
193                                 0x01000010 0x1590
194                                 0x01000011 0x0227
195                                 0x02000032
196                                 0x01000012 0x009c
197                                 0x02000032
198                                 0x01000013 0x1900
199                                 0x01000029 0x0023
200                                 0x0100002b 0x000e
201                                 0x02000032
202                                 0x01000020 0x0000
203                                 0x01000021 0x0000
204                                 0x02000032
205                                 0x01000050 0x0000
206                                 0x01000051 0x00ef
207                                 0x01000052 0x0000
208                                 0x01000053 0x013f
209                                 0x01000060 0xa700
210                                 0x01000061 0x0001
211                                 0x0100006a 0x0000
212                                 0x01000080 0x0000
213                                 0x01000081 0x0000
214                                 0x01000082 0x0000
215                                 0x01000083 0x0000
216                                 0x01000084 0x0000
217                                 0x01000085 0x0000
218                                 0x01000090 0x0010
219                                 0x01000092 0x0000
220                                 0x01000093 0x0003
221                                 0x01000095 0x0110
222                                 0x01000097 0x0000
223                                 0x01000098 0x0000
224                                 0x01000007 0x0133
225                                 0x01000020 0x0000
226                                 0x01000021 0x0000
227                                 0x02000064>;
228                         startbyte = <0x70>;
229                         bgr;
230                         fps = <50>;
231                         gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";
232                 };
233         };
234
235         /* itdb28_spi */
236         fragment@14 {
237                 target = <&display>;
238                 __dormant__ {
239                         compatible = "ilitek,ili9325";
240                         spi-max-frequency = <32000000>;
241                         bgr;
242                 };
243         };
244
245         /* mi0283qt-2 */
246         fragment@15 {
247                 target = <&display>;
248                 __dormant__ {
249                         compatible = "himax,hx8347d";
250                         spi-max-frequency = <32000000>;
251                         startbyte = <0x70>;
252                         bgr;
253                 };
254         };
255
256         /* mi0283qt-9a */
257         fragment@16 {
258                 target = <&display>;
259                 __dormant__ {
260                         compatible = "ilitek,ili9341";
261                         spi-max-frequency = <32000000>;
262                         buswidth = <9>;
263                         bgr;
264                 };
265         };
266
267         /* nokia3310 */
268         fragment@17 {
269                 target = <&display>;
270                 __dormant__ {
271                         compatible = "philips,pcd8544";
272                         spi-max-frequency = <400000>;
273                 };
274         };
275
276         /* nokia3310a */
277         fragment@18 {
278                 target = <&display>;
279                 __dormant__ {
280                         compatible = "teralane,tls8204";
281                         spi-max-frequency = <1000000>;
282                 };
283         };
284
285         /* nokia5110 */
286         fragment@19 {
287                 target = <&display>;
288                 __dormant__ {
289                         compatible = "ilitek,ili9163";
290                         spi-max-frequency = <12000000>;
291                         bgr;
292                 };
293         };
294
295         /* piscreen */
296         fragment@20 {
297                 target = <&display>;
298                 __dormant__ {
299                         compatible = "ilitek,ili9486";
300                         spi-max-frequency = <32000000>;
301                         regwidth = <16>;
302                         bgr;
303                 };
304         };
305
306         /* pitft */
307         fragment@21 {
308                 target = <&display>;
309                 __dormant__ {
310                         compatible = "ilitek,ili9340";
311                         spi-max-frequency = <32000000>;
312                         init = <0x01000001
313                                 0x02000005
314                                 0x01000028
315                                 0x010000EF 0x03 0x80 0x02
316                                 0x010000CF 0x00 0xC1 0x30
317                                 0x010000ED 0x64 0x03 0x12 0x81
318                                 0x010000E8 0x85 0x00 0x78
319                                 0x010000CB 0x39 0x2C 0x00 0x34 0x02
320                                 0x010000F7 0x20
321                                 0x010000EA 0x00 0x00
322                                 0x010000C0 0x23
323                                 0x010000C1 0x10
324                                 0x010000C5 0x3E 0x28
325                                 0x010000C7 0x86
326                                 0x0100003A 0x55
327                                 0x010000B1 0x00 0x18
328                                 0x010000B6 0x08 0x82 0x27
329                                 0x010000F2 0x00
330                                 0x01000026 0x01
331                                 0x010000E0 0x0F 0x31 0x2B 0x0C 0x0E 0x08 0x4E 0xF1 0x37 0x07 0x10 0x03 0x0E 0x09 0x00
332                                 0x010000E1 0x00 0x0E 0x14 0x03 0x11 0x07 0x31 0xC1 0x48 0x08 0x0F 0x0C 0x31 0x36 0x0F
333                                 0x01000011
334                                 0x02000064
335                                 0x01000029
336                                 0x02000014>;
337                         bgr;
338                 };
339         };
340
341         /* pioled */
342         fragment@22 {
343                 target = <&display>;
344                 __dormant__ {
345                         compatible = "solomon,ssd1351";
346                         spi-max-frequency = <20000000>;
347                         bgr;
348                         gamma = "0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4";
349                 };
350         };
351
352         /* rpi-display */
353         fragment@23 {
354                 target = <&display>;
355                 __dormant__ {
356                         compatible = "ilitek,ili9341";
357                         spi-max-frequency = <32000000>;
358                         bgr;
359                 };
360         };
361
362         /* sainsmart18 */
363         fragment@24 {
364                 target = <&display>;
365                 __dormant__ {
366                         compatible = "sitronix,st7735r";
367                         spi-max-frequency = <32000000>;
368                 };
369         };
370
371         /* sainsmart32_spi */
372         fragment@25 {
373                 target = <&display>;
374                 __dormant__ {
375                         compatible = "solomon,ssd1289";
376                         spi-max-frequency = <16000000>;
377                         bgr;
378                 };
379         };
380
381         /* tinylcd35 */
382         fragment@26 {
383                 target = <&display>;
384                 __dormant__ {
385                         compatible = "neosec,tinylcd";
386                         spi-max-frequency = <32000000>;
387                         bgr;
388                 };
389         };
390
391         /* tm022hdh26 */
392         fragment@27 {
393                 target = <&display>;
394                 __dormant__ {
395                         compatible = "ilitek,ili9341";
396                         spi-max-frequency = <32000000>;
397                         bgr;
398                 };
399         };
400
401         /* tontec35_9481 - boards before 02 July 2014 */
402         fragment@28 {
403                 target = <&display>;
404                 __dormant__ {
405                         compatible = "ilitek,ili9481";
406                         spi-max-frequency = <128000000>;
407                         spi-cpha;
408                         spi-cpol;
409                         bgr;
410                 };
411         };
412
413         /* tontec35_9486 - boards after 02 July 2014 */
414         fragment@29 {
415                 target = <&display>;
416                 __dormant__ {
417                         compatible = "ilitek,ili9486";
418                         spi-max-frequency = <128000000>;
419                         spi-cpha;
420                         spi-cpol;
421                         bgr;
422                 };
423         };
424
425         /* waveshare32b */
426         fragment@30 {
427                 target = <&display>;
428                 __dormant__ {
429                         compatible = "ilitek,ili9340";
430                         spi-max-frequency = <48000000>;
431                         init = <0x010000CB 0x39 0x2C 0x00 0x34 0x02
432                                 0x010000CF 0x00 0xC1 0x30
433                                 0x010000E8 0x85 0x00 0x78
434                                 0x010000EA 0x00 0x00
435                                 0x010000ED 0x64 0x03 0x12 0x81
436                                 0x010000F7 0x20
437                                 0x010000C0 0x23
438                                 0x010000C1 0x10
439                                 0x010000C5 0x3E 0x28
440                                 0x010000C7 0x86
441                                 0x01000036 0x28
442                                 0x0100003A 0x55
443                                 0x010000B1 0x00 0x18
444                                 0x010000B6 0x08 0x82 0x27
445                                 0x010000F2 0x00
446                                 0x01000026 0x01
447                                 0x010000E0 0x0F 0x31 0x2B 0x0C 0x0E 0x08 0x4E 0xF1 0x37 0x07 0x10 0x03 0x0E 0x09 0x00
448                                 0x010000E1 0x00 0x0E 0x14 0x03 0x11 0x07 0x31 0xC1 0x48 0x08 0x0F 0x0C 0x31 0x36 0x0F
449                                 0x01000011
450                                 0x02000078
451                                 0x01000029
452                                 0x0100002C>;
453                         bgr;
454                 };
455         };
456
457         /* waveshare22 */
458         fragment@31 {
459                 target = <&display>;
460                 __dormant__ {
461                         compatible = "hitachi,bd663474";
462                         spi-max-frequency = <32000000>;
463                         spi-cpha;
464                         spi-cpol;
465                 };
466         };
467
468         spidev_fragment: fragment@100 {
469                 target-path = "spi0/spidev@0";
470                 __overlay__ {
471                         status = "disabled";
472                 };
473         };
474
475         display_fragment: fragment@101 {
476                 target = <&spi0>;
477                 __overlay__ {
478                         /* needed to avoid dtc warning */
479                         #address-cells = <1>;
480                         #size-cells = <0>;
481
482                         status = "okay";
483
484                         display: display@0{
485                                 reg = <0>;
486                                 spi-max-frequency = <32000000>;
487                                 fps = <30>;
488                                 buswidth = <8>;
489                         };
490                 };
491         };
492
493         __overrides__ {
494                 spi0-0        = <&display_fragment>, "target:0=",<&spi0>,
495                                 <&spidev_fragment>, "target-path=spi0/spidev@0",
496                                 <&display>, "reg:0=0";
497                 spi0-1        = <&display_fragment>, "target:0=",<&spi0>,
498                                 <&spidev_fragment>, "target-path=spi0/spidev@1",
499                                 <&display>, "reg:0=1";
500                 spi1-0        = <&display_fragment>, "target:0=",<&spi1>,
501                                 <&spidev_fragment>, "target-path=spi1/spidev@0",
502                                 <&display>, "reg:0=0";
503                 spi1-1        = <&display_fragment>, "target:0=",<&spi1>,
504                                 <&spidev_fragment>, "target-path=spi1/spidev@1",
505                                 <&display>, "reg:0=1";
506                 spi1-2        = <&display_fragment>, "target:0=",<&spi1>,
507                                 <&spidev_fragment>, "target-path=spi1/spidev@2",
508                                 <&display>, "reg:0=2";
509                 spi2-0        = <&display_fragment>, "target:0=",<&spi2>,
510                                 <&spidev_fragment>, "target-path=spi2/spidev@0",
511                                 <&display>, "reg:0=0";
512                 spi2-1        = <&display_fragment>, "target:0=",<&spi2>,
513                                 <&spidev_fragment>, "target-path=spi2/spidev@1",
514                                 <&display>, "reg:0=1";
515                 spi2-2        = <&display_fragment>, "target:0=",<&spi2>,
516                                 <&spidev_fragment>, "target-path=spi2/spidev@2",
517                                 <&display>, "reg:0=2";
518
519                 speed         = <&display>, "spi-max-frequency:0";
520                 cpha          = <&display>, "spi-cpha?";
521                 cpol          = <&display>, "spi-cpol?";
522
523                 /* Displays */
524                 adafruit18    = <0>, "+0";
525                 adafruit22    = <0>, "+1";
526                 adafruit22a   = <0>, "+2";
527                 adafruit28    = <0>, "+3";
528                 adafruit13m   = <0>, "+4";
529                 admatec_c-berry28 = <0>, "+5";
530                 dogs102       = <0>, "+6";
531                 er_tftm050_2  = <0>, "+7";
532                 er_tftm070_5  = <0>, "+8";
533                 ew24ha0       = <0>, "+9";
534                 ew24ha0_9bit  = <0>, "+10";
535                 freetronicsoled128 = <0>, "+11";
536                 hy28a         = <0>, "+12";
537                 hy28b         = <0>, "+13";
538                 itdb28_spi    = <0>, "+14";
539                 mi0283qt-2    = <0>, "+15";
540                 mi0283qt-9a   = <0>, "+16";
541                 nokia3310     = <0>, "+17";
542                 nokia3310a    = <0>, "+18";
543                 nokia5110     = <0>, "+19";
544                 piscreen      = <0>, "+20";
545                 pitft         = <0>, "+21";
546                 pioled        = <0>, "+22";
547                 rpi-display   = <0>, "+23";
548                 sainsmart18   = <0>, "+24";
549                 sainsmart32_spi = <0>, "+25";
550                 tinylcd35     = <0>, "+26";
551                 tm022hdh26    = <0>, "+27";
552                 tontec35_9481 = <0>, "+28";
553                 tontec35_9486 = <0>, "+29";
554                 waveshare32b  = <0>, "+30";
555                 waveshare22   = <0>, "+31";
556
557                 /* Controllers */
558                 bd663474      = <&display>, "compatible=hitachi,bd663474";
559                 hx8340bn      = <&display>, "compatible=himax,hx8340bn";
560                 hx8347d       = <&display>, "compatible=himax,hx8347d";
561                 hx8353d       = <&display>, "compatible=himax,hx8353d";
562                 hx8357d       = <&display>, "compatible=himax,hx8357d";
563                 ili9163       = <&display>, "compatible=ilitek,ili9163";
564                 ili9320       = <&display>, "compatible=ilitek,ili9320";
565                 ili9325       = <&display>, "compatible=ilitek,ili9325";
566                 ili9340       = <&display>, "compatible=ilitek,ili9340";
567                 ili9341       = <&display>, "compatible=ilitek,ili9341";
568                 ili9481       = <&display>, "compatible=ilitek,ili9481";
569                 ili9486       = <&display>, "compatible=ilitek,ili9486";
570                 pcd8544       = <&display>, "compatible=philips,pcd8544";
571                 ra8875        = <&display>, "compatible=raio,ra8875";
572                 s6d02a1       = <&display>, "compatible=samsung,s6d02a1";
573                 s6d1121       = <&display>, "compatible=samsung,s6d1121";
574                 seps525       = <&display>, "compatible=syncoam,seps525";
575                 sh1106        = <&display>, "compatible=sinowealth,sh1106";
576                 ssd1289       = <&display>, "compatible=solomon,ssd1289";
577                 ssd1305       = <&display>, "compatible=solomon,ssd1305";
578                 ssd1306       = <&display>, "compatible=solomon,ssd1306";
579                 ssd1325       = <&display>, "compatible=solomon,ssd1325";
580                 ssd1331       = <&display>, "compatible=solomon,ssd1331";
581                 ssd1351       = <&display>, "compatible=solomon,ssd1351";
582                 st7735r       = <&display>, "compatible=sitronix,st7735r";
583                 st7789v       = <&display>, "compatible=sitronix,st7789v";
584                 tls8204       = <&display>, "compatible=teralane,tls8204";
585                 uc1611        = <&display>, "compatible=ultrachip,uc1611";
586                 uc1701        = <&display>, "compatible=UltraChip,uc1701";
587                 upd161704     = <&display>, "compatible=nec,upd161704";
588
589                 width         = <&display>, "width:0";
590                 height        = <&display>, "height:0";
591                 regwidth      = <&display>, "regwidth:0";
592                 buswidth      = <&display>, "buswidth:0";
593                 debug         = <&display>, "debug:0";
594                 rotate        = <&display>, "rotate:0";
595                 bgr           = <&display>, "bgr?";
596                 fps           = <&display>, "fps:0";
597                 txbuflen      = <&display>, "txbuflen:0";
598                 startbyte     = <&display>, "startbyte:0";
599                 gamma         = <&display>, "gamma";
600
601                 reset_pin     = <&display>, "reset-gpios:0=", <&gpio>,
602                                 <&display>, "reset-gpios:4",
603                                 <&display>, "reset-gpios:8=1"; /* GPIO_ACTIVE_LOW */
604                 dc_pin        = <&display>, "dc-gpios:0=", <&gpio>,
605                                 <&display>, "dc-gpios:4",
606                                 <&display>, "dc-gpios:8=0"; /* GPIO_ACTIVE_HIGH */
607                 led_pin       = <&display>, "led-gpios:0=", <&gpio>,
608                                 <&display>, "led-gpios:4",
609                                 <&display>, "led-gpios:8=0"; /* GPIO_ACTIVE_HIGH */
610         };
611 };