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