1 From d8b1f87438596cebc2b8e896c2d1a7c58cb14ca1 Mon Sep 17 00:00:00 2001
2 From: mwilliams03 <mark.mwilliams@gmail.com>
3 Date: Sun, 18 Oct 2015 17:07:24 -0700
4 Subject: [PATCH 107/304] New overlay for PiScreen2r
7 arch/arm/boot/dts/overlays/Makefile | 1 +
8 arch/arm/boot/dts/overlays/README | 14 +++
9 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts | 100 ++++++++++++++++++++++
10 3 files changed, 115 insertions(+)
11 create mode 100644 arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
13 --- a/arch/arm/boot/dts/overlays/Makefile
14 +++ b/arch/arm/boot/dts/overlays/Makefile
15 @@ -35,6 +35,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can1-o
16 dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
17 dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
18 dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
19 +dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
20 dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
21 dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
22 dtb-$(RPI_DT_OVERLAYS) += pwm-overlay.dtb
23 --- a/arch/arm/boot/dts/overlays/README
24 +++ b/arch/arm/boot/dts/overlays/README
25 @@ -425,6 +425,20 @@ Params: speed Display
26 xohms Touchpanel sensitivity (X-plate resistance)
30 +Info: PiScreen 2 with resistive TP display by OzzMaker.com
31 +Load: dtoverlay=piscreen2r,<param>=<val>
32 +Params: speed Display SPI bus speed
34 + rotate Display rotation {0,90,180,270}
36 + fps Delay between frame updates
38 + debug Debug output level {0-7}
40 + xohms Touchpanel sensitivity (X-plate resistance)
43 Name: pitft28-resistive
44 Info: Adafruit PiTFT 2.8" resistive touch screen
45 Load: dtoverlay=pitft28-resistive,<param>=<val>
47 +++ b/arch/arm/boot/dts/overlays/piscreen2r-overlay.dts
50 + * Device Tree overlay for PiScreen2 3.5" TFT with resistive touch by Ozzmaker.com
58 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
66 + status = "disabled";
70 + status = "disabled";
78 + piscreen2_pins: piscreen2_pins {
79 + brcm,pins = <17 25 24 22>;
80 + brcm,function = <0 1 1 1>; /* in out out out */
88 + /* needed to avoid dtc warning */
89 + #address-cells = <1>;
92 + piscreen2: piscreen2@0{
93 + compatible = "ilitek,ili9486";
95 + pinctrl-names = "default";
96 + pinctrl-0 = <&piscreen2_pins>;
98 + spi-max-frequency = <64000000>;
103 + txbuflen = <32768>;
104 + reset-gpios = <&gpio 25 0>;
105 + dc-gpios = <&gpio 24 0>;
106 + led-gpios = <&gpio 22 1>;
109 + init = <0x10000b0 0x00
114 + 0x10000c0 0x11 0x09
116 + 0x10000c5 0x00 0x00 0x00 0x00
117 + 0x10000b6 0x00 0x02
118 + 0x10000f7 0xa9 0x51 0x2c 0x2
119 + 0x10000be 0x00 0x04
126 + piscreen2_ts: piscreen2-ts@1 {
127 + compatible = "ti,ads7846";
130 + spi-max-frequency = <2000000>;
131 + interrupts = <17 2>; /* high-to-low edge triggered */
132 + interrupt-parent = <&gpio>;
133 + pendown-gpio = <&gpio 17 0>;
135 + ti,x-plate-ohms = /bits/ 16 <100>;
136 + ti,pressure-max = /bits/ 16 <255>;
141 + speed = <&piscreen2>,"spi-max-frequency:0";
142 + rotate = <&piscreen2>,"rotate:0";
143 + fps = <&piscreen2>,"fps:0";
144 + debug = <&piscreen2>,"debug:0";
145 + xohms = <&piscreen2_ts>,"ti,x-plate-ohms;0";