1 From 417aea4436bb658d8c5c4dcd0e3c255931d0ee96 Mon Sep 17 00:00:00 2001
2 From: SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
3 Date: Fri, 22 Apr 2022 00:10:54 +0900
4 Subject: [PATCH] ARM: dts: BCM5301X: Add DT for WZR-1166DHP,DHP2
6 Buffalo WZR-1166DHP/WZR-1166DHP2 wireless router with
10 - 2T2R 11ac/a/b/g/n Wi-Fi
11 - 4x 10/100/1000M ethernet switch
14 WZR-1166DHP and WZR-1166DHP2 have different memory capacity.
22 These hardware components are very similar to the WZR-1750DHP
23 except for the number of antennas.
25 Signed-off-by: SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
26 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
28 arch/arm/boot/dts/Makefile | 2 +
29 .../bcm4708-buffalo-wzr-1166dhp-common.dtsi | 192 ++++++++++++++++++
30 .../boot/dts/bcm4708-buffalo-wzr-1166dhp.dts | 26 +++
31 .../boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts | 26 +++
32 4 files changed, 246 insertions(+)
33 create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi
34 create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp.dts
35 create mode 100644 arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts
37 --- a/arch/arm/boot/dts/Makefile
38 +++ b/arch/arm/boot/dts/Makefile
39 @@ -98,6 +98,8 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
40 bcm4708-asus-rt-ac56u.dtb \
41 bcm4708-asus-rt-ac68u.dtb \
42 bcm4708-buffalo-wzr-1750dhp.dtb \
43 + bcm4708-buffalo-wzr-1166dhp.dtb \
44 + bcm4708-buffalo-wzr-1166dhp2.dtb \
45 bcm4708-linksys-ea6300-v1.dtb \
46 bcm4708-linksys-ea6500-v2.dtb \
47 bcm4708-luxul-xap-1510.dtb \
49 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi
51 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
53 + * Broadcom BCM470X / BCM5301X ARM platform code.
54 + * DTS for Buffalo WZR-1166DHP and WZR-1166DHP2
56 + * Copyright (C) 2014 Rafał Miłecki <zajec5@gmail.com>
57 + * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
61 +#include "bcm4708.dtsi"
62 +#include "bcm5301x-nand-cs0-bch8.dtsi"
63 +#include <dt-bindings/leds/common.h>
67 + compatible = "spi-gpio";
68 + num-chipselects = <1>;
69 + gpio-sck = <&chipcommon 7 0>;
70 + gpio-mosi = <&chipcommon 4 0>;
71 + cs-gpios = <&chipcommon 6 0>;
72 + #address-cells = <1>;
76 + compatible = "fairchild,74hc595";
78 + registers-number = <1>;
79 + spi-max-frequency = <100000>;
88 + compatible = "gpio-leds";
91 + /* label = "bcm53xx:blue:usb"; */
92 + function = LED_FUNCTION_USB;
93 + color = <LED_COLOR_ID_BLUE>;
94 + gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
95 + trigger-sources = <&ohci_port1>, <&ehci_port1>,
96 + <&xhci_port1>, <&ohci_port2>,
98 + linux,default-trigger = "usbport";
102 + /* label = "bcm53xx:red:power"; */
103 + function = LED_FUNCTION_FAULT;
104 + color = <LED_COLOR_ID_RED>;
105 + gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
109 + /* label = "bcm53xx:white:power"; */
110 + function = LED_FUNCTION_POWER;
111 + color = <LED_COLOR_ID_WHITE>;
112 + gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
113 + linux,default-trigger = "default-on";
117 + /* label = "bcm53xx:blue:router"; */
118 + function = LED_FUNCTION_STATUS;
119 + color = <LED_COLOR_ID_BLUE>;
120 + gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
121 + linux,default-trigger = "default-on";
125 + /* label = "bcm53xx:amber:router"; */
126 + function = LED_FUNCTION_STATUS;
127 + color = <LED_COLOR_ID_AMBER>;
128 + gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
132 + /* label = "bcm53xx:blue:wan"; */
133 + function = LED_FUNCTION_WAN;
134 + color = <LED_COLOR_ID_BLUE>;
135 + gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
136 + linux,default-trigger = "default-on";
140 + /* label = "bcm53xx:blue:wireless"; */
141 + function = LED_FUNCTION_WLAN;
142 + color = <LED_COLOR_ID_BLUE>;
143 + gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
147 + /* label = "bcm53xx:amber:wireless"; */
148 + function = LED_FUNCTION_WLAN;
149 + color = <LED_COLOR_ID_AMBER>;
150 + gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
155 + compatible = "gpio-keys";
159 + linux,code = <KEY_RESTART>;
160 + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
165 + linux,code = <KEY_WPS_BUTTON>;
166 + gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
169 + /* Commit mode set by switch? */
172 + linux,code = <KEY_SETUP>;
173 + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
176 + /* Switch: AP mode */
179 + linux,code = <BTN_0>;
180 + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
184 + label = "USB eject";
185 + linux,code = <KEY_EJECTCD>;
186 + gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
192 + vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
196 + vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>;
239 + ethernet = <&gmac0>;
244 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp.dts
246 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
248 + * Device Tree Bindigs for Buffalo WZR-1166DHP
250 + * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
255 +#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi"
258 + compatible = "buffalo,wzr-1166dhp", "brcm,bcm4708";
259 + model = "Buffalo WZR-1166DHP";
262 + bootargs = "console=ttyS0,115200";
266 + device_type = "memory";
267 + reg = <0x00000000 0x08000000>,
268 + <0x88000000 0x18000000>;
273 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp2.dts
275 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
277 + * Device Tree Bindigs for Buffalo WZR-1166DHP2
279 + * Copyright (C) 2022 SHIMAMOTO Takayoshi <takayoshi.shimamoto.360@gmail.com>
284 +#include "bcm4708-buffalo-wzr-1166dhp-common.dtsi"
287 + compatible = "buffalo,wzr-1166dhp2", "brcm,bcm4708";
288 + model = "Buffalo WZR-1166DHP2";
291 + bootargs = "console=ttyS0,115200";
295 + device_type = "memory";
296 + reg = <0x00000000 0x08000000>,
297 + <0x88000000 0x08000000>;