1 From a3d3b80d8a028e7cec393c02c1a96c5e632e7b30 Mon Sep 17 00:00:00 2001
2 From: Hans-Wilhelm Warlo <5417271+hanswilw@users.noreply.github.com>
3 Date: Tue, 16 Oct 2018 18:20:48 +0200
4 Subject: [PATCH 431/454] Add hy28b 2017 model device tree overlay (#2721)
6 The 2017 version of the hy28b display requires a different
7 initialisation sequence.
9 Signed-off-by: Hans-Wilhelm Warlo <hw@warlo.no>
11 arch/arm/boot/dts/overlays/Makefile | 1 +
12 arch/arm/boot/dts/overlays/README | 19 +++
13 .../boot/dts/overlays/hy28b-2017-overlay.dts | 152 ++++++++++++++++++
14 3 files changed, 172 insertions(+)
15 create mode 100644 arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
17 --- a/arch/arm/boot/dts/overlays/Makefile
18 +++ b/arch/arm/boot/dts/overlays/Makefile
19 @@ -51,6 +51,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
20 hifiberry-digi-pro.dtbo \
27 --- a/arch/arm/boot/dts/overlays/README
28 +++ b/arch/arm/boot/dts/overlays/README
29 @@ -792,6 +792,25 @@ Params: speed Display
30 ledgpio GPIO used to control backlight
34 +Info: HY28B 2017 version - 2.8" TFT LCD Display Module by HAOYU Electronics
35 + Default values match Texy's display shield
36 +Load: dtoverlay=hy28b-2017,<param>=<val>
37 +Params: speed Display SPI bus speed
39 + rotate Display rotation {0,90,180,270}
41 + fps Delay between frame updates
43 + debug Debug output level {0-7}
45 + xohms Touchpanel sensitivity (X-plate resistance)
47 + resetgpio GPIO used to reset controller
49 + ledgpio GPIO used to control backlight
53 Info: Fall back to the i2c_bcm2708 driver for the i2c_arm bus.
54 Load: dtoverlay=i2c-bcm2708
56 +++ b/arch/arm/boot/dts/overlays/hy28b-2017-overlay.dts
59 + * Device Tree overlay for HY28b display shield by Texy.
60 + * Modified for 2017 version with ILI9325 D chip
67 + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
77 + target = <&spidev0>;
79 + status = "disabled";
84 + target = <&spidev1>;
86 + status = "disabled";
93 + hy28b_pins: hy28b_pins {
94 + brcm,pins = <17 25 18>;
95 + brcm,function = <0 1 1>; /* in out out */
103 + /* needed to avoid dtc warning */
104 + #address-cells = <1>;
108 + compatible = "ilitek,ili9325";
110 + pinctrl-names = "default";
111 + pinctrl-0 = <&hy28b_pins>;
113 + spi-max-frequency = <48000000>;
120 + startbyte = <0x70>;
121 + reset-gpios = <&gpio 25 0>;
122 + led-gpios = <&gpio 18 1>;
124 + init = <0x10000e5 0x78F0
185 + hy28b_ts: hy28b-ts@1 {
186 + compatible = "ti,ads7846";
189 + spi-max-frequency = <2000000>;
190 + interrupts = <17 2>; /* high-to-low edge triggered */
191 + interrupt-parent = <&gpio>;
192 + pendown-gpio = <&gpio 17 0>;
193 + ti,x-plate-ohms = /bits/ 16 <100>;
194 + ti,pressure-max = /bits/ 16 <255>;
199 + speed = <&hy28b>,"spi-max-frequency:0";
200 + rotate = <&hy28b>,"rotate:0";
201 + fps = <&hy28b>,"fps:0";
202 + debug = <&hy28b>,"debug:0";
203 + xohms = <&hy28b_ts>,"ti,x-plate-ohms;0";
204 + resetgpio = <&hy28b>,"reset-gpios:4",
205 + <&hy28b_pins>, "brcm,pins:4";
206 + ledgpio = <&hy28b>,"led-gpios:4",
207 + <&hy28b_pins>, "brcm,pins:8";