bcm53xx: add support for Meraki MR26
[openwrt/staging/nbd.git] / target / linux / bcm53xx / patches-5.10 / 081-next-ARM_dts_BCM53015-add-mr26.patch
1 From 935327a73553001f8d81375c76985d05f604507f Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@gmail.com>
3 Date: Sat, 18 Jun 2022 00:00:29 +0200
4 Subject: [PATCH] ARM: dts: BCM5301X: Add DT for Meraki MR26
5
6 Meraki MR26 is an EOL wireless access point featuring a
7 PoE ethernet port and two dual-band 3x3 MIMO 802.11n
8 radios and 1x1 dual-band WIFI dedicated to scanning.
9
10 Thank you Amir for the unit and PSU.
11
12 Hardware info:
13 SOC : Broadcom BCM53015A1KFEBG (dual-core Cortex-A9 CPU at 800 MHz)
14 RAM : SK Hynix Inc. H5TQ1G63EFR, 1 GBit DDR3 SDRAM = 128 MiB
15 NAND : Spansion S34ML01G100TF100, 1 GBit SLC NAND Flash = 128 MiB
16 ETH : 1 GBit Ethernet Port - PoE (TPS23754 PoE Interface)
17 WIFI0 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn (3x3:3)
18 WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn (3x3:3)
19 WIFI2 : Broadcom BCM43428 "Air Marshal" 802.11 abgn (1x1:1)
20 BUTTON: One reset key behind a small hole next to the Ethernet Port
21 LEDS : One amber (fault), one white (indicator) LED, separate RGB-LED
22 MISC : Atmel AT24C64 8KiB EEPROM i2c
23 : Ti INA219 26V, 12-bit, i2c output current/voltage/power monitor
24
25 SERIAL:
26 WARNING: The serial port needs a TTL/RS-232 3V3 level converter!
27 The Serial setting is 115200-8-N-1. The board has a populated
28 right angle 1x4 0.1" pinheader.
29 The pinout is: VCC (next to J3, has the pin 1 indicator), RX, TX, GND.
30
31 Odd stuff:
32
33 - uboot does not support lzma compression, but gzip'd uImage/DTB work.
34 - uboot claims to support FIT, but fails to pass the DTB to the kernel.
35 Appending the dtb after the kernel image works.
36 - RGB-controller is supported through an external userspace program.
37 - The ubi partition contains a "board-config" volume. It stores the
38 MAC Address (0x66 in binary) and Serial No. (0x7c alpha-numerical).
39 - SoC's temperature sensor always reports that it is on fire.
40 This causes the system to immediately shutdown! Looking at reported
41 "418 degree Celsius" suggests that this sensor is not working.
42
43 WIFI:
44 b43 is able to initialize all three WIFIs @ 802.11bg.
45 | b43-phy0: Broadcom 43431 WLAN found (core revision 29)
46 | bcma-pci-bridge 0000:01:00.0: bus1: Switched to core: 0x812
47 | b43-phy0: Found PHY: Analog 9, Type 7 (HT), Revision 1
48 | b43-phy0: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1
49 | b43-phy0 warning: 5 GHz band is unsupported on this PHY
50 | b43-phy1: Broadcom 43431 WLAN found (core revision 29)
51 | bcma-pci-bridge 0001:01:00.0: bus2: Switched to core: 0x812
52 | b43-phy1: Found PHY: Analog 9, Type 7 (HT), Revision 1
53 | b43-phy1: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1
54 | b43-phy1 warning: 5 GHz band is unsupported on this PHY
55 | b43-phy2: Broadcom 43228 WLAN found (core revision 30)
56 | bcma-pci-bridge 0002:01:00.0: bus3: Switched to core: 0x812
57 | b43-phy2: Found PHY: Analog 9, Type 4 (N), Revision 16
58 | b43-phy2: Found Radio: Manuf 0x17F, ID 0x2057, Revision 9, Version 1
59 | Broadcom 43xx driver loaded [ Features: NL ]
60
61 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
62 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
63 ---
64 --- /dev/null
65 +++ b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
66 @@ -0,0 +1,166 @@
67 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
68 +/*
69 + * Broadcom BCM470X / BCM5301X ARM platform code.
70 + * DTS for Meraki MR26 / Codename: Venom
71 + *
72 + * Copyright (C) 2022 Christian Lamparter <chunkeey@gmail.com>
73 + */
74 +
75 +/dts-v1/;
76 +
77 +#include "bcm4708.dtsi"
78 +#include "bcm5301x-nand-cs0-bch8.dtsi"
79 +#include <dt-bindings/leds/common.h>
80 +
81 +/ {
82 + compatible = "meraki,mr26", "brcm,bcm53015", "brcm,bcm4708";
83 + model = "Meraki MR26";
84 +
85 + memory@0 {
86 + reg = <0x00000000 0x08000000>;
87 + device_type = "memory";
88 + };
89 +
90 + leds {
91 + compatible = "gpio-leds";
92 +
93 + led-0 {
94 + function = LED_FUNCTION_FAULT;
95 + color = <LED_COLOR_ID_AMBER>;
96 + gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
97 + panic-indicator;
98 + };
99 + led-1 {
100 + function = LED_FUNCTION_INDICATOR;
101 + color = <LED_COLOR_ID_WHITE>;
102 + gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
103 + };
104 + };
105 +
106 + keys {
107 + compatible = "gpio-keys";
108 + #address-cells = <1>;
109 + #size-cells = <0>;
110 +
111 + key-restart {
112 + label = "Reset";
113 + linux,code = <KEY_RESTART>;
114 + gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
115 + };
116 + };
117 +};
118 +
119 +&uart0 {
120 + clock-frequency = <50000000>;
121 + /delete-property/ clocks;
122 +};
123 +
124 +&uart1 {
125 + status = "disabled";
126 +};
127 +
128 +&gmac0 {
129 + status = "okay";
130 +};
131 +
132 +&gmac1 {
133 + status = "disabled";
134 +};
135 +&gmac2 {
136 + status = "disabled";
137 +};
138 +&gmac3 {
139 + status = "disabled";
140 +};
141 +
142 +&nandcs {
143 + nand-ecc-algo = "hw";
144 +
145 + partitions {
146 + compatible = "fixed-partitions";
147 + #address-cells = <0x1>;
148 + #size-cells = <0x1>;
149 +
150 + partition@0 {
151 + label = "u-boot";
152 + reg = <0x0 0x200000>;
153 + read-only;
154 + };
155 +
156 + partition@200000 {
157 + label = "u-boot-env";
158 + reg = <0x200000 0x200000>;
159 + /* empty */
160 + };
161 +
162 + partition@400000 {
163 + label = "u-boot-backup";
164 + reg = <0x400000 0x200000>;
165 + /* empty */
166 + };
167 +
168 + partition@600000 {
169 + label = "u-boot-env-backup";
170 + reg = <0x600000 0x200000>;
171 + /* empty */
172 + };
173 +
174 + partition@800000 {
175 + label = "ubi";
176 + reg = <0x800000 0x7780000>;
177 + };
178 + };
179 +};
180 +
181 +&srab {
182 + status = "okay";
183 +
184 + ports {
185 + port@0 {
186 + reg = <0>;
187 + label = "poe";
188 + };
189 +
190 + port@5 {
191 + reg = <5>;
192 + label = "cpu";
193 + ethernet = <&gmac0>;
194 +
195 + fixed-link {
196 + speed = <1000>;
197 + duplex-full;
198 + };
199 + };
200 + };
201 +};
202 +
203 +&i2c0 {
204 + status = "okay";
205 +
206 + pinctrl-names = "default";
207 + pinctrl-0 = <&pinmux_i2c>;
208 +
209 + clock-frequency = <100000>;
210 +
211 + ina219@40 {
212 + compatible = "ti,ina219"; /* PoE power */
213 + reg = <0x40>;
214 + shunt-resistor = <60000>; /* = 60 mOhms */
215 + };
216 +
217 + eeprom@56 {
218 + compatible = "atmel,24c64";
219 + reg = <0x56>;
220 + pagesize = <32>;
221 + read-only;
222 + #address-cells = <1>;
223 + #size-cells = <1>;
224 +
225 + /* it's empty */
226 + };
227 +};
228 +
229 +&thermal {
230 + status = "disabled";
231 + /* does not work, reads 418 degree Celsius */
232 +};
233 --- a/arch/arm/boot/dts/Makefile
234 +++ b/arch/arm/boot/dts/Makefile
235 @@ -129,6 +129,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
236 bcm47094-luxul-xwr-3150-v1.dtb \
237 bcm47094-netgear-r8500.dtb \
238 bcm47094-phicomm-k3.dtb \
239 + bcm53015-meraki-mr26.dtb \
240 bcm53016-meraki-mr32.dtb \
241 bcm94708.dtb \
242 bcm94709.dtb \