Skip to content

Commit 8602a3f

Browse files
committed
Merge pull request #853 from notro/fbtft-overlay
dts: overlay: add support for various displays
2 parents 0aa653a + 025bcc9 commit 8602a3f

File tree

5 files changed

+408
-0
lines changed

5 files changed

+408
-0
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ dtb-$(RPI_DT_OVERLAYS) += hifiberry-dac-overlay.dtb
7171
dtb-$(RPI_DT_OVERLAYS) += hifiberry-dacplus-overlay.dtb
7272
dtb-$(RPI_DT_OVERLAYS) += hifiberry-digi-overlay.dtb
7373
dtb-$(RPI_DT_OVERLAYS) += hifiberry-amp-overlay.dtb
74+
dtb-$(RPI_DT_OVERLAYS) += hy28a-overlay.dtb
75+
dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb
7476
dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb
7577
dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb
7678
dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb
7779
dtb-$(RPI_DT_OVERLAYS) += pcf2127-rtc-overlay.dtb
7880
dtb-$(RPI_DT_OVERLAYS) += pcf8523-rtc-overlay.dtb
81+
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
7982
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
83+
dtb-$(RPI_DT_OVERLAYS) += rpi-display-overlay.dtb
8084
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
8185
dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
8286
dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb

arch/arm/boot/dts/hy28a-overlay.dts

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Device Tree overlay for HY28A display
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+
spidev@0{
18+
status = "disabled";
19+
};
20+
21+
spidev@1{
22+
status = "disabled";
23+
};
24+
};
25+
};
26+
27+
fragment@1 {
28+
target = <&gpio>;
29+
__overlay__ {
30+
hy28a_pins: hy28a_pins {
31+
brcm,pins = <17 25 18>;
32+
brcm,function = <0 1 1>; /* in out out */
33+
};
34+
};
35+
};
36+
37+
fragment@2 {
38+
target = <&spi0>;
39+
__overlay__ {
40+
/* needed to avoid dtc warning */
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
hy28a: hy28a@0{
45+
compatible = "ilitek,ili9320";
46+
reg = <0>;
47+
pinctrl-names = "default";
48+
pinctrl-0 = <&hy28a_pins>;
49+
50+
spi-max-frequency = <32000000>;
51+
spi-cpol;
52+
spi-cpha;
53+
rotate = <270>;
54+
bgr;
55+
fps = <50>;
56+
buswidth = <8>;
57+
startbyte = <0x70>;
58+
reset-gpios = <&gpio 25 0>;
59+
led-gpios = <&gpio 18 1>;
60+
debug = <0>;
61+
};
62+
63+
hy28a_ts: hy28a-ts@1 {
64+
compatible = "ti,ads7846";
65+
reg = <1>;
66+
67+
spi-max-frequency = <2000000>;
68+
interrupts = <17 2>; /* high-to-low edge triggered */
69+
interrupt-parent = <&gpio>;
70+
pendown-gpio = <&gpio 17 0>;
71+
ti,x-plate-ohms = /bits/ 16 <100>;
72+
ti,pressure-max = /bits/ 16 <255>;
73+
};
74+
};
75+
};
76+
__overrides__ {
77+
speed = <&hy28a>,"spi-max-frequency:0";
78+
rotate = <&hy28a>,"rotate:0";
79+
fps = <&hy28a>,"fps:0";
80+
debug = <&hy28a>,"debug:0";
81+
xohms = <&hy28a_ts>,"ti,x-plate-ohms;0";
82+
resetgpio = <&hy28a>,"reset-gpios:4",
83+
<&hy28a_pins>, "brcm,pins:1";
84+
ledgpio = <&hy28a>,"led-gpios:4",
85+
<&hy28a_pins>, "brcm,pins:2";
86+
};
87+
};

arch/arm/boot/dts/hy28b-overlay.dts

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/*
2+
* Device Tree overlay for HY28b display shield by Texy
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+
spidev@0{
18+
status = "disabled";
19+
};
20+
21+
spidev@1{
22+
status = "disabled";
23+
};
24+
};
25+
};
26+
27+
fragment@1 {
28+
target = <&gpio>;
29+
__overlay__ {
30+
hy28b_pins: hy28b_pins {
31+
brcm,pins = <17 25 18>;
32+
brcm,function = <0 1 1>; /* in out out */
33+
};
34+
};
35+
};
36+
37+
fragment@2 {
38+
target = <&spi0>;
39+
__overlay__ {
40+
/* needed to avoid dtc warning */
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
hy28b: hy28b@0{
45+
compatible = "ilitek,ili9325";
46+
reg = <0>;
47+
pinctrl-names = "default";
48+
pinctrl-0 = <&hy28b_pins>;
49+
50+
spi-max-frequency = <48000000>;
51+
spi-cpol;
52+
spi-cpha;
53+
rotate = <270>;
54+
bgr;
55+
fps = <50>;
56+
buswidth = <8>;
57+
startbyte = <0x70>;
58+
reset-gpios = <&gpio 25 0>;
59+
led-gpios = <&gpio 18 1>;
60+
61+
gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";
62+
63+
init = <0x10000e7 0x0010
64+
0x1000000 0x0001
65+
0x1000001 0x0100
66+
0x1000002 0x0700
67+
0x1000003 0x1030
68+
0x1000004 0x0000
69+
0x1000008 0x0207
70+
0x1000009 0x0000
71+
0x100000a 0x0000
72+
0x100000c 0x0001
73+
0x100000d 0x0000
74+
0x100000f 0x0000
75+
0x1000010 0x0000
76+
0x1000011 0x0007
77+
0x1000012 0x0000
78+
0x1000013 0x0000
79+
0x2000032
80+
0x1000010 0x1590
81+
0x1000011 0x0227
82+
0x2000032
83+
0x1000012 0x009c
84+
0x2000032
85+
0x1000013 0x1900
86+
0x1000029 0x0023
87+
0x100002b 0x000e
88+
0x2000032
89+
0x1000020 0x0000
90+
0x1000021 0x0000
91+
0x2000032
92+
0x1000050 0x0000
93+
0x1000051 0x00ef
94+
0x1000052 0x0000
95+
0x1000053 0x013f
96+
0x1000060 0xa700
97+
0x1000061 0x0001
98+
0x100006a 0x0000
99+
0x1000080 0x0000
100+
0x1000081 0x0000
101+
0x1000082 0x0000
102+
0x1000083 0x0000
103+
0x1000084 0x0000
104+
0x1000085 0x0000
105+
0x1000090 0x0010
106+
0x1000092 0x0000
107+
0x1000093 0x0003
108+
0x1000095 0x0110
109+
0x1000097 0x0000
110+
0x1000098 0x0000
111+
0x1000007 0x0133
112+
0x1000020 0x0000
113+
0x1000021 0x0000
114+
0x2000064>;
115+
debug = <0>;
116+
};
117+
118+
hy28b_ts: hy28b-ts@1 {
119+
compatible = "ti,ads7846";
120+
reg = <1>;
121+
122+
spi-max-frequency = <2000000>;
123+
interrupts = <17 2>; /* high-to-low edge triggered */
124+
interrupt-parent = <&gpio>;
125+
pendown-gpio = <&gpio 17 0>;
126+
ti,x-plate-ohms = /bits/ 16 <100>;
127+
ti,pressure-max = /bits/ 16 <255>;
128+
};
129+
};
130+
};
131+
__overrides__ {
132+
speed = <&hy28b>,"spi-max-frequency:0";
133+
rotate = <&hy28b>,"rotate:0";
134+
fps = <&hy28b>,"fps:0";
135+
debug = <&hy28b>,"debug:0";
136+
xohms = <&hy28b_ts>,"ti,x-plate-ohms;0";
137+
resetgpio = <&hy28b>,"reset-gpios:4",
138+
<&hy28b_pins>, "brcm,pins:1";
139+
ledgpio = <&hy28b>,"led-gpios:4",
140+
<&hy28b_pins>, "brcm,pins:2";
141+
};
142+
};
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Device Tree overlay for PiScreen 3.5" display shield by Ozzmaker
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+
spidev@0{
18+
status = "disabled";
19+
};
20+
21+
spidev@1{
22+
status = "disabled";
23+
};
24+
};
25+
};
26+
27+
fragment@1 {
28+
target = <&gpio>;
29+
__overlay__ {
30+
piscreen_pins: piscreen_pins {
31+
brcm,pins = <17 25 24 22>;
32+
brcm,function = <0 1 1 1>; /* in out out out */
33+
};
34+
};
35+
};
36+
37+
fragment@2 {
38+
target = <&spi0>;
39+
__overlay__ {
40+
/* needed to avoid dtc warning */
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
44+
piscreen: piscreen@0{
45+
compatible = "ilitek,ili9486";
46+
reg = <0>;
47+
pinctrl-names = "default";
48+
pinctrl-0 = <&piscreen_pins>;
49+
50+
spi-max-frequency = <32000000>;
51+
rotate = <270>;
52+
bgr;
53+
fps = <30>;
54+
buswidth = <8>;
55+
regwidth = <16>;
56+
reset-gpios = <&gpio 25 0>;
57+
dc-gpios = <&gpio 24 0>;
58+
led-gpios = <&gpio 22 1>;
59+
debug = <0>;
60+
61+
init = <0x10000b0 0x00
62+
0x1000011
63+
0x20000ff
64+
0x100003a 0x55
65+
0x1000036 0x28
66+
0x10000c2 0x44
67+
0x10000c5 0x00 0x00 0x00 0x00
68+
0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00
69+
0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
70+
0x10000e2 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
71+
0x1000011
72+
0x1000029>;
73+
};
74+
75+
piscreen-ts@1 {
76+
compatible = "ti,ads7846";
77+
reg = <1>;
78+
79+
spi-max-frequency = <2000000>;
80+
interrupts = <17 2>; /* high-to-low edge triggered */
81+
interrupt-parent = <&gpio>;
82+
pendown-gpio = <&gpio 17 0>;
83+
ti,x-plate-ohms = /bits/ 16 <100>;
84+
ti,pressure-max = /bits/ 16 <255>;
85+
};
86+
};
87+
};
88+
__overrides__ {
89+
speed = <&piscreen>,"spi-max-frequency:0";
90+
rotate = <&piscreen>,"rotate:0";
91+
fps = <&piscreen>,"fps:0";
92+
debug = <&piscreen>,"debug:0";
93+
};
94+
};

0 commit comments

Comments
 (0)