e16d39b4237fcc8c7ab10b54f922023d11cf8106
[openwrt.git] / target / linux / bcm53xx / patches-4.1 / 059-ARM-BCM5301X-Add-DT-for-Buffalo-WXR-1900DHP.patch
1 From 35eecd10ee57b9d4f31e12598296b235ed2b34ae Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@openwrt.org>
3 Date: Wed, 13 May 2015 09:10:52 +0200
4 Subject: [PATCH] ARM: BCM5301X: Add DT for Buffalo WXR-1900DHP
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
11 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
12 ---
13  arch/arm/boot/dts/Makefile                        |   1 +
14  arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 127 ++++++++++++++++++++++
15  2 files changed, 128 insertions(+)
16  create mode 100644 arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
17
18 --- a/arch/arm/boot/dts/Makefile
19 +++ b/arch/arm/boot/dts/Makefile
20 @@ -63,6 +63,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
21         bcm47081-asus-rt-n18u.dtb \
22         bcm47081-buffalo-wzr-600dhp2.dtb \
23         bcm47081-buffalo-wzr-900dhp.dtb \
24 +       bcm4709-buffalo-wxr-1900dhp.dtb \
25         bcm4709-netgear-r8000.dtb
26  dtb-$(CONFIG_ARCH_BCM_63XX) += \
27         bcm963138dvt.dtb
28 --- /dev/null
29 +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
30 @@ -0,0 +1,127 @@
31 +/*
32 + * Broadcom BCM470X / BCM5301X ARM platform code.
33 + * DTS for Buffalo WXR-1900DHP
34 + *
35 + * Copyright (C) 2015 Felix Fietkau <nbd@openwrt.org>
36 + *
37 + * Licensed under the GNU/GPL. See COPYING for details.
38 + */
39 +
40 +/dts-v1/;
41 +
42 +#include "bcm4708.dtsi"
43 +
44 +/ {
45 +       compatible = "buffalo,wxr-1900dhp", "brcm,bcm4709", "brcm,bcm4708";
46 +       model = "Buffalo WXR-1900DHP";
47 +
48 +       chosen {
49 +               bootargs = "console=ttyS0,115200";
50 +       };
51 +
52 +       memory {
53 +               reg = <0x00000000 0x08000000>;
54 +       };
55 +
56 +       leds {
57 +               compatible = "gpio-leds";
58 +
59 +               usb {
60 +                       label = "bcm53xx:green:usb";
61 +                       gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
62 +                       linux,default-trigger = "default-off";
63 +               };
64 +
65 +               power-amber {
66 +                       label = "bcm53xx:amber:power";
67 +                       gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
68 +                       linux,default-trigger = "default-off";
69 +               };
70 +
71 +               power-white {
72 +                       label = "bcm53xx:white:power";
73 +                       gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
74 +                       linux,default-trigger = "default-on";
75 +               };
76 +
77 +               router-amber {
78 +                       label = "bcm53xx:amber:router";
79 +                       gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
80 +                       linux,default-trigger = "default-off";
81 +               };
82 +
83 +               router-white {
84 +                       label = "bcm53xx:white:router";
85 +                       gpios = <&chipcommon 8 GPIO_ACTIVE_HIGH>;
86 +                       linux,default-trigger = "default-off";
87 +               };
88 +
89 +               wan-amber {
90 +                       label = "bcm53xx:amber:wan";
91 +                       gpios = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
92 +                       linux,default-trigger = "default-off";
93 +               };
94 +
95 +               wan-white {
96 +                       label = "bcm53xx:white:wan";
97 +                       gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
98 +                       linux,default-trigger = "default-off";
99 +               };
100 +
101 +               wireless-amber {
102 +                       label = "bcm53xx:amber:wireless";
103 +                       gpios = <&chipcommon 11 GPIO_ACTIVE_HIGH>;
104 +                       linux,default-trigger = "default-off";
105 +               };
106 +
107 +               wireless-white {
108 +                       label = "bcm53xx:white:wireless";
109 +                       gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
110 +                       linux,default-trigger = "default-off";
111 +               };
112 +       };
113 +
114 +       gpio-keys {
115 +               compatible = "gpio-keys";
116 +               #address-cells = <1>;
117 +               #size-cells = <0>;
118 +
119 +               power {
120 +                       label = "Power";
121 +                       linux,code = <KEY_POWER>;
122 +                       gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
123 +               };
124 +
125 +               restart {
126 +                       label = "Reset";
127 +                       linux,code = <KEY_RESTART>;
128 +                       gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
129 +               };
130 +
131 +               aoss {
132 +                       label = "AOSS";
133 +                       linux,code = <KEY_WPS_BUTTON>;
134 +                       gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
135 +               };
136 +
137 +               /* Commit mode set by switch? */
138 +               mode {
139 +                       label = "Mode";
140 +                       linux,code = <KEY_SETUP>;
141 +                       gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
142 +               };
143 +
144 +               /* Switch: AP mode */
145 +               sw_ap {
146 +                       label = "AP";
147 +                       linux,code = <BTN_0>;
148 +                       gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
149 +               };
150 +
151 +               eject {
152 +                       label = "USB eject";
153 +                       linux,code = <KEY_EJECTCD>;
154 +                       gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
155 +               };
156 +       };
157 +};