bcm53xx: backport BCM5301X earlycon and USB VCC patches
[openwrt.git] / target / linux / bcm53xx / patches-4.4 / 034-ARM-BCM5301X-Add-DT-for-D-Link-DIR-885L.patch
1 From 3ea03a9d512ca19d59315492230e954a1653ff6e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Tue, 26 Jan 2016 23:35:16 +0100
4 Subject: [PATCH] ARM: BCM5301X: Add DT for D-Link DIR-885L
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It's device based on BCM47094 which is quite similar to BCM4709 except
10 for higher CPU frequency. This device has 2 flash memories, it boots
11 from serial one and stores firmware on NAND. Other than that we define
12 standard stuff like LEDs, buttons and UART.
13
14 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
15 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
16 ---
17
18 --- a/arch/arm/boot/dts/Makefile
19 +++ b/arch/arm/boot/dts/Makefile
20 @@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
21         bcm4709-buffalo-wxr-1900dhp.dtb \
22         bcm4709-netgear-r7000.dtb \
23         bcm4709-netgear-r8000.dtb \
24 +       bcm47094-dlink-dir-885l.dtb \
25         bcm94708.dtb \
26         bcm94709.dtb \
27         bcm953012k.dtb
28 --- /dev/null
29 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
30 @@ -0,0 +1,111 @@
31 +/*
32 + * Broadcom BCM470X / BCM5301X ARM platform code.
33 + * DTS for D-Link DIR-885L
34 + *
35 + * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
36 + *
37 + * Licensed under the GNU/GPL. See COPYING for details.
38 + */
39 +
40 +/dts-v1/;
41 +
42 +#include "bcm4708.dtsi"
43 +#include "bcm5301x-nand-cs0-bch8.dtsi"
44 +
45 +/ {
46 +       compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708";
47 +       model = "D-Link DIR-885L";
48 +
49 +       chosen {
50 +               bootargs = "console=ttyS0,115200";
51 +       };
52 +
53 +       memory {
54 +               reg = <0x00000000 0x08000000>;
55 +       };
56 +
57 +       nand: nand@18028000 {
58 +               nandcs@0 {
59 +                       partition@0 {
60 +                               label = "firmware";
61 +                               reg = <0x00000000 0x08000000>;
62 +                       };
63 +               };
64 +       };
65 +
66 +       leds {
67 +               compatible = "gpio-leds";
68 +
69 +               power-white {
70 +                       label = "bcm53xx:white:power";
71 +                       gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
72 +                       linux,default-trigger = "default-on";
73 +               };
74 +
75 +               wan-white {
76 +                       label = "bcm53xx:white:wan";
77 +                       gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
78 +                       linux,default-trigger = "default-off";
79 +               };
80 +
81 +               power-amber {
82 +                       label = "bcm53xx:amber:power";
83 +                       gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
84 +                       linux,default-trigger = "default-off";
85 +               };
86 +
87 +               wan-amber {
88 +                       label = "bcm53xx:amber:wan";
89 +                       gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
90 +                       linux,default-trigger = "default-off";
91 +               };
92 +
93 +               usb3-white {
94 +                       label = "bcm53xx:white:usb3";
95 +                       gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
96 +                       linux,default-trigger = "default-off";
97 +               };
98 +
99 +               2ghz {
100 +                       label = "bcm53xx:white:2ghz";
101 +                       gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
102 +                       linux,default-trigger = "default-off";
103 +               };
104 +
105 +               5ghz {
106 +                       label = "bcm53xx:white:5ghz";
107 +                       gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
108 +                       linux,default-trigger = "default-off";
109 +               };
110 +       };
111 +
112 +       gpio-keys {
113 +               compatible = "gpio-keys";
114 +               #address-cells = <1>;
115 +               #size-cells = <0>;
116 +
117 +               wps {
118 +                       label = "WPS";
119 +                       linux,code = <KEY_WPS_BUTTON>;
120 +                       gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
121 +               };
122 +
123 +               /* Switch: router / extender */
124 +               extender {
125 +                       label = "Extender";
126 +                       linux,code = <BTN_0>;
127 +                       gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
128 +               };
129 +
130 +               restart {
131 +                       label = "Reset";
132 +                       linux,code = <KEY_RESTART>;
133 +                       gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
134 +               };
135 +       };
136 +};
137 +
138 +&uart0 {
139 +       status = "okay";
140 +       clock-frequency = <125000000>;
141 +};