-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathwaveshare35b-v2.dts
107 lines (95 loc) · 2.34 KB
/
waveshare35b-v2.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
/*
* Device Tree overlay for waveshare 3.5inch IPS LCD
*
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
};
};
fragment@1 {
target = <&spidev0>;
__overlay__ {
status = "disabled";
};
};
fragment@2 {
target = <&spidev1>;
__overlay__ {
status = "disabled";
};
};
fragment@3 {
target = <&gpio>;
__overlay__ {
waveshare35b_pins: waveshare35b_pins {
brcm,pins = <17 25 24>;
brcm,function = <0 0 0>; /* in in in */
};
};
};
fragment@4 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
waveshare35b: waveshare35b@0 {
compatible = "ilitek,ili9486";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&waveshare35b_pins>;
spi-max-frequency = <15000000>;
txbuflen = <32768>;
rotate = <0>;
bgr = <0>;
fps = <30>;
buswidth = <8>;
regwidth = <16>;
reset-gpios = <&gpio 25 1>;
dc-gpios = <&gpio 24 0>;
debug = <0>;
init = <0x10000b0 0x0
0x1000011
0x20000ff
0x1000021
0x100003a 0x55
0x10000c2 0x33
0x10000c5 0x0 0x1e 0x80
0x1000036 0x28
0x10000b1 0xb0
0x10000e0 0x0 0x13 0x18 0x4 0xf 0x6 0x3a 0x56 0x4d 0x3 0xa 0x6 0x30 0x3e 0xf
0x10000e1 0x0 0x13 0x18 0x1 0x11 0x6 0x38 0x34 0x4d 0x6 0xd 0xb 0x31 0x37 0xf
0x1000011
0x20000ff
0x1000029>;
};
waveshare35b_ts: waveshare35b-ts@1 {
compatible = "ti,ads7846";
reg = <1>;
spi-max-frequency = <2000000>;
interrupts = <17 2>; /* high-to-low edge triggered */
interrupt-parent = <&gpio>;
pendown-gpio = <&gpio 17 1>;
ti,x-plate-ohms = /bits/ 16 <60>;
touchscreen-max-pressure = <255>;
};
};
};
__overrides__ {
speed = <&waveshare35b>,"spi-max-frequency:0";
txbuflen = <&waveshare35b>,"txbuflen:0";
rotate = <&waveshare35b>,"rotate:0";
fps = <&waveshare35b>,"fps:0";
bgr = <&waveshare35b>,"bgr:0";
debug = <&waveshare35b>,"debug:0";
invertx = <&waveshare35b_ts>,"touchscreen-inverted-x?";
inverty = <&waveshare35b_ts>,"touchscreen-inverted-y?";
swapxy = <&waveshare35b_ts>,"touchscreen-swapped-x-y?";
};
};