]>
Commit | Line | Data |
---|---|---|
0a7ba7e9 | 1 | /* |
2 | * Device Tree overlay for PiScreen2 3.5" TFT with resistive touch by Ozzmaker.com | |
3 | * | |
4 | */ | |
5 | ||
6 | /dts-v1/; | |
7 | /plugin/; | |
8 | ||
9 | / { | |
10 | compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; | |
11 | ||
12 | fragment@0 { | |
13 | target = <&spi0>; | |
14 | __overlay__ { | |
15 | status = "okay"; | |
16 | }; | |
17 | }; | |
18 | ||
19 | fragment@1 { | |
20 | target = <&spidev0>; | |
21 | __overlay__ { | |
22 | status = "disabled"; | |
23 | }; | |
24 | }; | |
25 | ||
26 | fragment@2 { | |
27 | target = <&spidev1>; | |
28 | __overlay__ { | |
29 | status = "disabled"; | |
30 | }; | |
31 | }; | |
32 | ||
33 | fragment@3 { | |
34 | target = <&gpio>; | |
35 | __overlay__ { | |
36 | piscreen2_pins: piscreen2_pins { | |
37 | brcm,pins = <17 25 24 22>; | |
38 | brcm,function = <0 1 1 1>; /* in out out out */ | |
39 | }; | |
40 | }; | |
41 | }; | |
42 | ||
43 | fragment@4 { | |
44 | target = <&spi0>; | |
45 | __overlay__ { | |
46 | /* needed to avoid dtc warning */ | |
47 | #address-cells = <1>; | |
48 | #size-cells = <0>; | |
49 | ||
50 | piscreen2: piscreen2@0{ | |
51 | compatible = "ilitek,ili9486"; | |
52 | reg = <0>; | |
53 | pinctrl-names = "default"; | |
54 | pinctrl-0 = <&piscreen2_pins>; | |
55 | bgr; | |
56 | spi-max-frequency = <64000000>; | |
57 | rotate = <90>; | |
58 | fps = <30>; | |
59 | buswidth = <8>; | |
60 | regwidth = <16>; | |
61 | txbuflen = <32768>; | |
62 | reset-gpios = <&gpio 25 0>; | |
63 | dc-gpios = <&gpio 24 0>; | |
64 | led-gpios = <&gpio 22 1>; | |
65 | debug = <0>; | |
66 | ||
67 | init = <0x10000b0 0x00 | |
68 | 0x1000011 | |
69 | 0x20000ff | |
70 | 0x100003a 0x55 | |
71 | 0x1000036 0x28 | |
72 | 0x10000c0 0x11 0x09 | |
73 | 0x10000c1 0x41 | |
74 | 0x10000c5 0x00 0x00 0x00 0x00 | |
75 | 0x10000b6 0x00 0x02 | |
76 | 0x10000f7 0xa9 0x51 0x2c 0x2 | |
77 | 0x10000be 0x00 0x04 | |
78 | 0x10000e9 0x00 | |
79 | 0x1000011 | |
80 | 0x1000029>; | |
81 | ||
82 | }; | |
83 | ||
84 | piscreen2_ts: piscreen2-ts@1 { | |
85 | compatible = "ti,ads7846"; | |
86 | reg = <1>; | |
87 | ||
88 | spi-max-frequency = <2000000>; | |
89 | interrupts = <17 2>; /* high-to-low edge triggered */ | |
90 | interrupt-parent = <&gpio>; | |
91 | pendown-gpio = <&gpio 17 0>; | |
92 | ti,swap-xy; | |
93 | ti,x-plate-ohms = /bits/ 16 <100>; | |
94 | ti,pressure-max = /bits/ 16 <255>; | |
95 | }; | |
96 | }; | |
97 | }; | |
98 | __overrides__ { | |
99 | speed = <&piscreen2>,"spi-max-frequency:0"; | |
100 | rotate = <&piscreen2>,"rotate:0"; | |
101 | fps = <&piscreen2>,"fps:0"; | |
102 | debug = <&piscreen2>,"debug:0"; | |
103 | xohms = <&piscreen2_ts>,"ti,x-plate-ohms;0"; | |
104 | }; | |
105 | }; | |
106 |