-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathwaveshare32b.dts
More file actions
92 lines (80 loc) · 1.83 KB
/
waveshare32b.dts
File metadata and controls
92 lines (80 loc) · 1.83 KB
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
/*
* Device Tree overlay for waveshare 3.2inch TFT 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__ {
waveshare32b_pins: waveshare32b_pins {
brcm,pins = <17 27 22>;
brcm,function = <0 0 0>; /* in in in */
};
};
};
fragment@4 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
waveshare32b: waveshare32b@0{
compatible = "ilitek,ili9340";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&waveshare32b_pins>;
spi-max-frequency = <16000000>;
txbuflen = <32768>;
rotate = <0>;
fps = <25>;
bgr = <0>;
buswidth = <8>;
reset-gpios = <&gpio 27 1>;
dc-gpios = <&gpio 22 0>;
debug = <0>;
};
waveshare32b_ts: waveshare32b-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 = <&waveshare32b>,"spi-max-frequency:0";
txbuflen = <&waveshare32b>,"txbuflen:0";
rotate = <&waveshare32b>,"rotate:0";
fps = <&waveshare32b>,"fps:0";
bgr = <&waveshare32b>,"bgr:0";
debug = <&waveshare32b>,"debug:0";
invertx = <&waveshare32b_ts>,"touchscreen-inverted-x?";
inverty = <&waveshare32b_ts>,"touchscreen-inverted-y?";
swapxy = <&waveshare32b_ts>,"touchscreen-swapped-x-y?";
};
};