Skip to content

Commit 780e681

Browse files
committed
Merge pull request #874 from notro/overlays
dts: overlay: add mz61581, fix piscreen and rpi-display
2 parents d8a7f3b + 14d23ce commit 780e681

File tree

4 files changed

+112
-1
lines changed

4 files changed

+112
-1
lines changed

arch/arm/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ dtb-$(RPI_DT_OVERLAYS) += hy28b-overlay.dtb
7777
dtb-$(RPI_DT_OVERLAYS) += iqaudio-dac-overlay.dtb
7878
dtb-$(RPI_DT_OVERLAYS) += iqaudio-dacplus-overlay.dtb
7979
dtb-$(RPI_DT_OVERLAYS) += lirc-rpi-overlay.dtb
80+
dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
8081
dtb-$(RPI_DT_OVERLAYS) += pcf2127-rtc-overlay.dtb
8182
dtb-$(RPI_DT_OVERLAYS) += pcf8523-rtc-overlay.dtb
8283
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb

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

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*
2+
* Device Tree overlay for MZ61581-PI-EXT 2014.12.28 by Tontec
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+
mz61581_pins: mz61581_pins {
31+
brcm,pins = <4 15 18 25>;
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+
mz61581: mz61581@0{
45+
compatible = "samsung,s6d02a1";
46+
reg = <0>;
47+
pinctrl-names = "default";
48+
pinctrl-0 = <&mz61581_pins>;
49+
50+
spi-max-frequency = <128000000>;
51+
spi-cpol;
52+
spi-cpha;
53+
54+
width = <320>;
55+
height = <480>;
56+
rotate = <270>;
57+
bgr;
58+
fps = <30>;
59+
buswidth = <8>;
60+
61+
reset-gpios = <&gpio 15 0>;
62+
dc-gpios = <&gpio 25 0>;
63+
led-gpios = <&gpio 18 0>;
64+
65+
init = <0x10000b0 00
66+
0x1000011
67+
0x20000ff
68+
0x10000b3 0x02 0x00 0x00 0x00
69+
0x10000c0 0x13 0x3b 0x00 0x02 0x00 0x01 0x00 0x43
70+
0x10000c1 0x08 0x16 0x08 0x08
71+
0x10000c4 0x11 0x07 0x03 0x03
72+
0x10000c6 0x00
73+
0x10000c8 0x03 0x03 0x13 0x5c 0x03 0x07 0x14 0x08 0x00 0x21 0x08 0x14 0x07 0x53 0x0c 0x13 0x03 0x03 0x21 0x00
74+
0x1000035 0x00
75+
0x1000036 0xa0
76+
0x100003a 0x55
77+
0x1000044 0x00 0x01
78+
0x10000d0 0x07 0x07 0x1d 0x03
79+
0x10000d1 0x03 0x30 0x10
80+
0x10000d2 0x03 0x14 0x04
81+
0x1000029
82+
0x100002c>;
83+
84+
/* This is a workaround to make sure the init sequence slows down and doesn't fail */
85+
debug = <3>;
86+
};
87+
88+
mz61581_ts: mz61581_ts@1 {
89+
compatible = "ti,ads7846";
90+
reg = <1>;
91+
92+
spi-max-frequency = <2000000>;
93+
interrupts = <4 2>; /* high-to-low edge triggered */
94+
interrupt-parent = <&gpio>;
95+
pendown-gpio = <&gpio 4 0>;
96+
97+
ti,x-plate-ohms = /bits/ 16 <60>;
98+
ti,pressure-max = /bits/ 16 <255>;
99+
};
100+
};
101+
};
102+
__overrides__ {
103+
speed = <&mz61581>, "spi-max-frequency:0";
104+
rotate = <&mz61581>, "rotate:0";
105+
fps = <&mz61581>, "fps:0";
106+
debug = <&mz61581>, "debug:0";
107+
xohms = <&mz61581_ts>,"ti,x-plate-ohms;0";
108+
};
109+
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
pinctrl-names = "default";
4848
pinctrl-0 = <&piscreen_pins>;
4949

50-
spi-max-frequency = <32000000>;
50+
spi-max-frequency = <24000000>;
5151
rotate = <270>;
5252
bgr;
5353
fps = <30>;

arch/arm/boot/dts/rpi-display-overlay.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
rpi_display_pins: rpi_display_pins {
3131
brcm,pins = <18 23 24 25>;
3232
brcm,function = <1 1 1 0>; /* out out out in */
33+
brcm,pull = <0 0 0 2>; /* - - - up */
3334
};
3435
};
3536
};

0 commit comments

Comments
 (0)