brcm2708: update linux 4.4 patches to latest version
[oweals/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0500-overlays-Add-dpi18-overlay-1634.patch
1 From 654ea8a724a4abaf000841788cec8f90756682a7 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <pelwell@users.noreply.github.com>
3 Date: Mon, 12 Sep 2016 13:46:56 +0100
4 Subject: [PATCH] overlays: Add dpi18 overlay (#1634)
5
6 Add support for 18-bit DPI displays. Although the dpi24 overlay could
7 be used, this overlay leaves GPIOs 22-27 free for other uses.
8 ---
9  arch/arm/boot/dts/overlays/Makefile          |  1 +
10  arch/arm/boot/dts/overlays/README            |  8 +++++++
11  arch/arm/boot/dts/overlays/dpi18-overlay.dts | 31 ++++++++++++++++++++++++++++
12  3 files changed, 40 insertions(+)
13  create mode 100644 arch/arm/boot/dts/overlays/dpi18-overlay.dts
14
15 --- a/arch/arm/boot/dts/overlays/Makefile
16 +++ b/arch/arm/boot/dts/overlays/Makefile
17 @@ -22,6 +22,7 @@ dtbo-$(RPI_DT_OVERLAYS) += audremap.dtbo
18  dtbo-$(RPI_DT_OVERLAYS) += bmp085_i2c-sensor.dtbo
19  dtbo-$(RPI_DT_OVERLAYS) += dht11.dtbo
20  dtbo-$(RPI_DT_OVERLAYS) += dionaudio-loco.dtbo
21 +dtbo-$(RPI_DT_OVERLAYS) += dpi18.dtbo
22  dtbo-$(RPI_DT_OVERLAYS) += dpi24.dtbo
23  dtbo-$(RPI_DT_OVERLAYS) += dwc-otg.dtbo
24  dtbo-$(RPI_DT_OVERLAYS) += dwc2.dtbo
25 --- a/arch/arm/boot/dts/overlays/README
26 +++ b/arch/arm/boot/dts/overlays/README
27 @@ -283,6 +283,14 @@ Load:   dtoverlay=dionaudio-loco
28  Params: <None>
29  
30  
31 +Name:   dpi18
32 +Info:   Overlay for a generic 18-bit DPI display
33 +        This uses GPIOs 0-21 (so no I2C, uart etc.), and activates the output
34 +        2-3 seconds after the kernel has started.
35 +Load:   dtoverlay=dpi18
36 +Params: <None>
37 +
38 +
39  Name:   dpi24
40  Info:   Overlay for a generic 24-bit DPI display
41          This uses GPIOs 0-27 (so no I2C, uart etc.), and activates the output
42 --- /dev/null
43 +++ b/arch/arm/boot/dts/overlays/dpi18-overlay.dts
44 @@ -0,0 +1,31 @@
45 +/dts-v1/;
46 +/plugin/;
47 +
48 +/{
49 +       compatible = "brcm,bcm2708";
50 +
51 +       // There is no DPI driver module, but we need a platform device
52 +       // node (that doesn't already use pinctrl) to hang the pinctrl
53 +       // reference on - leds will do
54 +
55 +       fragment@0 {
56 +               target = <&leds>;
57 +               __overlay__ {
58 +                       pinctrl-names = "default";
59 +                       pinctrl-0 = <&dpi18_pins>;
60 +               };
61 +       };
62 +
63 +       fragment@1 {
64 +               target = <&gpio>;
65 +               __overlay__ {
66 +                       dpi18_pins: dpi18_pins {
67 +                               brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11
68 +                                            12 13 14 15 16 17 18 19 20
69 +                                            21>;
70 +                               brcm,function = <6>; /* alt2 */
71 +                               brcm,pull = <0>; /* no pull */
72 +                       };
73 +               };
74 +       };
75 +};