1 From ec88a9c344d9fd8c3b11bff1f99a0b6248ae256d Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@gmail.com>
3 Date: Sat, 22 Aug 2020 18:19:23 +0200
4 Subject: [PATCH] ARM: BCM5301X: Add DT for Meraki MR32
6 add support for the Cisco Meraki MR32.
7 This is a dual-band enterprise class 802.11ac access point.
8 The unit was donated by Chris Blake. Thank you!
10 SoC: Broadcom BCM53016A1 (1 GHz, 2 cores)
12 NAND: 128 MiB Spansion S34ML01G2 (~114 MiB useable)
13 ETH: 1GBit Ethernet Port - PoE
14 WIFI1: Broadcom BCM43520 an+ac (2x2:2 - id: 0x4352)
15 WIFI2: Broadcom BCM43520 bgn (2x2:2 - id: 0x4352)
16 WIFI3: Broadcom BCM43428 abgn (1x1:1 - id: 43428)
18 BLE: Broadcom BCM20732 (ttyS1)
19 LEDS: 1 x Programmable RGB Status LED (driven by a PWM)
21 1 x Orange LED Fault Indicator (GPIO)
22 2 x LAN Activity / Speed LEDs (On the RJ45 Port)
23 BUTTON: one Reset button
24 MISC: AT24C64 8KiB EEPROM (i2c - stores Ethernet MAC)
25 ina219 hardware monitor (i2c)
29 WARNING: The serial port needs a TTL/RS-232 3V3 level converter!
30 The Serial setting is 115200-8-N-1. The board has a populated
31 right angle 1x4 0.1" pinheader.
32 The pinout is: VCC, RX, TX, GND.
35 - uart0 clock frequency is 62.5 MHz.
36 - The LEDs are labeled as SYS-LED1 through SYS-LED3
37 because of the silkscreen on the PCB.
38 - the original u-boot has been compiled with most functions
39 and commands disabled. The u-boot env isn't setup properly
40 either and as a result, the bcm47xxpart probing is not
41 working. Hence, the nand partitions are specified through a
42 "fixed-partition" binding.
43 - The "WICED SMART(TM)" Bluetooth LE 4.0 BCM20732 chip is
44 connected to uart2 of the SoC. The BCM20732 does not
45 provide a HCI. So the linux' bluetooth stack is useless.
46 The mock-up node with the compatible binding and
47 enable-gpios property is provided solely as documentation.
49 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
50 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
52 arch/arm/boot/dts/Makefile | 1 +
53 arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 197 +++++++++++++++++++++
54 2 files changed, 198 insertions(+)
55 create mode 100644 arch/arm/boot/dts/bcm53016-meraki-mr32.dts
57 --- a/arch/arm/boot/dts/Makefile
58 +++ b/arch/arm/boot/dts/Makefile
59 @@ -118,6 +118,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
60 bcm47094-luxul-xwr-3150-v1.dtb \
61 bcm47094-netgear-r8500.dtb \
62 bcm47094-phicomm-k3.dtb \
63 + bcm53016-meraki-mr32.dtb \
68 +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
70 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
72 + * Broadcom BCM470X / BCM5301X ARM platform code.
73 + * DTS for Meraki MR32 / Codename: Espresso
75 + * Copyright (C) 2018-2020 Christian Lamparter <chunkeey@gmail.com>
80 +#include "bcm4708.dtsi"
81 +#include "bcm5301x-nand-cs0-bch8.dtsi"
82 +#include <dt-bindings/leds/common.h>
85 + compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708";
86 + model = "Meraki MR32";
89 + bootargs = " console=ttyS0,115200n8 earlycon";
93 + reg = <0x00000000 0x08000000>;
94 + device_type = "memory";
102 + compatible = "gpio-leds";
105 + function = LED_FUNCTION_FAULT;
106 + color = <LED_COLOR_ID_AMBER>;
107 + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
111 + function = LED_FUNCTION_INDICATOR;
112 + color = <LED_COLOR_ID_WHITE>;
113 + gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
118 + compatible = "gpio-keys";
119 + #address-cells = <1>;
124 + linux,code = <KEY_RESTART>;
125 + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
130 + compatible = "pwm-leds";
133 + /* SYS-LED 1 - Tricolor */
134 + function = LED_FUNCTION_INDICATOR;
135 + color = <LED_COLOR_ID_RED>;
136 + pwms = <&pwm 0 50000 0>;
137 + max-brightness = <255>;
141 + /* SYS-LED 1 - Tricolor */
142 + function = LED_FUNCTION_POWER;
143 + color = <LED_COLOR_ID_GREEN>;
144 + pwms = <&pwm 1 50000 0>;
145 + max-brightness = <255>;
149 + /* SYS-LED 1 - Tricolor */
150 + function = LED_FUNCTION_INDICATOR;
151 + color = <LED_COLOR_ID_BLUE>;
152 + pwms = <&pwm 2 50000 0>;
153 + max-brightness = <255>;
159 + * The platform provided I2C does not budge.
160 + * This is a replacement until I can figure
161 + * out what are the missing bits...
164 + compatible = "i2c-gpio";
165 + sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
166 + scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
167 + i2c-gpio,delay-us = <10>; /* close to 100 kHz */
168 + #address-cells = <1>;
171 + current_sense: ina219@45 {
172 + compatible = "ti,ina219";
174 + shunt-resistor = <60000>; /* = 60 mOhms */
177 + eeprom: eeprom@50 {
178 + compatible = "atmel,24c64";
187 + clock-frequency = <62500000>;
188 + /delete-property/ clocks;
192 + status = "disabled";
199 + * compatible = "brcm,bcm20732";
200 + * enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
206 + status = "disabled";
209 + status = "disabled";
212 + status = "disabled";
217 + pinctrl-names = "default";
218 + pinctrl-0 = <&pinmux_pwm>;
222 + nand-ecc-algo = "hw";
226 + * The partition autodetection does not work for this device.
227 + * It will only detect the "nvram" partition with an incorrect size.
228 + * [ 1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0
229 + * [ 1.727962] Creating 1 MTD partitions on "brcmnand.0":
230 + * [ 1.733117] 0x000000400000-0x000008000000 : "nvram"
233 + compatible = "fixed-partitions";
234 + #address-cells = <0x1>;
235 + #size-cells = <0x1>;
239 + reg = <0x0 0x100000>;
243 + partition1@100000 {
244 + label = "bootkernel1";
245 + reg = <0x100000 0x300000>;
249 + partition2@400000 {
251 + reg = <0x400000 0x100000>;
255 + partition3@500000 {
256 + label = "bootkernel2";
257 + reg = <0x500000 0x300000>;
261 + partition4@800000 {
263 + reg = <0x800000 0x7780000>;