brcm2708: add linux 4.1 support
[openwrt.git] / target / linux / brcm2708 / patches-4.1 / 0107-BCM270X_DT-Overlay-for-the-Fen-Logic-VGA666-board.patch
1 From 265838d467aedd75abf2949373d889cfec090168 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Tue, 30 Jun 2015 09:10:36 +0100
4 Subject: [PATCH 107/121] BCM270X_DT: Overlay for the Fen Logic VGA666 board
5
6 The VGA666 board requires GPIOs 2-21 (so no I2C or UART). Using the
7 overlay (instead of a custom dt-blob.bin) has the advantage that it will
8 reserve those pins and stop other devices using them (except for GPIO),
9 but it does delay the point at which the output becomes valid until 2-3
10 seconds after the kernel has started.
11 ---
12  arch/arm/boot/dts/overlays/Makefile           |  1 +
13  arch/arm/boot/dts/overlays/README             |  8 +++++++
14  arch/arm/boot/dts/overlays/vga666-overlay.dts | 30 +++++++++++++++++++++++++++
15  3 files changed, 39 insertions(+)
16  create mode 100644 arch/arm/boot/dts/overlays/vga666-overlay.dts
17
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -43,6 +43,7 @@ dtb-$(RPI_DT_OVERLAYS) += spi-bcm2708-ov
21  dtb-$(RPI_DT_OVERLAYS) += spi-bcm2835-overlay.dtb
22  dtb-$(RPI_DT_OVERLAYS) += tinylcd35-overlay.dtb
23  dtb-$(RPI_DT_OVERLAYS) += uart1-overlay.dtb
24 +dtb-$(RPI_DT_OVERLAYS) += vga666-overlay.dtb
25  dtb-$(RPI_DT_OVERLAYS) += w1-gpio-overlay.dtb
26  dtb-$(RPI_DT_OVERLAYS) += w1-gpio-pullup-overlay.dtb
27  
28 --- a/arch/arm/boot/dts/overlays/README
29 +++ b/arch/arm/boot/dts/overlays/README
30 @@ -497,6 +497,14 @@ Params: txd1_pin                 GPIO pi
31          rxd1_pin                 GPIO pin for RXD1 (15, 33 or 41 - default 15)
32  
33  
34 +Name:   vga666
35 +Info:   Overlay for the Fen Logic VGA666 board
36 +        This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds
37 +        after the kernel has started.
38 +Load:   dtoverlay=vga666
39 +Params: <None>
40 +
41 +
42  Name:   w1-gpio
43  Info:   Configures the w1-gpio Onewire interface module.
44          Use this overlay if you *don't* need a GPIO to drive an external pullup.
45 --- /dev/null
46 +++ b/arch/arm/boot/dts/overlays/vga666-overlay.dts
47 @@ -0,0 +1,30 @@
48 +/dts-v1/;
49 +/plugin/;
50 +
51 +/{
52 +       compatible = "brcm,bcm2708";
53 +
54 +       // There is no VGA driver module, but we need a platform device
55 +       // node (that doesn't already use pinctrl) to hang the pinctrl
56 +       // reference on - leds will do
57 +
58 +       fragment@0 {
59 +               target = <&leds>;
60 +               __overlay__ {
61 +                       pinctrl-names = "default";
62 +                       pinctrl-0 = <&vga666_pins>;
63 +               };
64 +       };
65 +
66 +       fragment@1 {
67 +               target = <&gpio>;
68 +               __overlay__ {
69 +                       vga666_pins: vga666_pins {
70 +                               brcm,pins = <2 3 4 5 6 7 8 9 10 11 12
71 +                                            13 14 15 16 17 18 19 20 21>;
72 +                               brcm,function = <6>; /* alt2 */
73 +                               brcm,pull = <0>; /* no pull */
74 +                       };
75 +               };
76 +       };
77 +};