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 --- a/arch/arm/boot/dts/Makefile
53 +++ b/arch/arm/boot/dts/Makefile
54 @@ -119,6 +119,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
55 bcm47094-luxul-xwr-3150-v1.dtb \
56 bcm47094-netgear-r8500.dtb \
57 bcm47094-phicomm-k3.dtb \
58 + bcm53016-meraki-mr32.dtb \
63 +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
65 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
67 + * Broadcom BCM470X / BCM5301X ARM platform code.
68 + * DTS for Meraki MR32 / Codename: Espresso
70 + * Copyright (C) 2018-2020 Christian Lamparter <chunkeey@gmail.com>
75 +#include "bcm4708.dtsi"
76 +#include "bcm5301x-nand-cs0-bch8.dtsi"
77 +#include <dt-bindings/leds/common.h>
80 + compatible = "meraki,mr32", "brcm,brcm53016", "brcm,bcm4708";
81 + model = "Meraki MR32";
84 + bootargs = " console=ttyS0,115200n8 earlycon";
88 + reg = <0x00000000 0x08000000>;
89 + device_type = "memory";
97 + compatible = "gpio-leds";
100 + function = LED_FUNCTION_FAULT;
101 + color = <LED_COLOR_ID_AMBER>;
102 + gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
106 + function = LED_FUNCTION_INDICATOR;
107 + color = <LED_COLOR_ID_WHITE>;
108 + gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
113 + compatible = "gpio-keys";
114 + #address-cells = <1>;
119 + linux,code = <KEY_RESTART>;
120 + gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
125 + compatible = "pwm-leds";
128 + /* SYS-LED 1 - Tricolor */
129 + function = LED_FUNCTION_INDICATOR;
130 + color = <LED_COLOR_ID_RED>;
131 + pwms = <&pwm 0 50000 0>;
132 + max-brightness = <255>;
136 + /* SYS-LED 1 - Tricolor */
137 + function = LED_FUNCTION_POWER;
138 + color = <LED_COLOR_ID_GREEN>;
139 + pwms = <&pwm 1 50000 0>;
140 + max-brightness = <255>;
144 + /* SYS-LED 1 - Tricolor */
145 + function = LED_FUNCTION_INDICATOR;
146 + color = <LED_COLOR_ID_BLUE>;
147 + pwms = <&pwm 2 50000 0>;
148 + max-brightness = <255>;
154 + * The platform provided I2C does not budge.
155 + * This is a replacement until I can figure
156 + * out what are the missing bits...
159 + compatible = "i2c-gpio";
160 + sda-gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
161 + scl-gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
162 + i2c-gpio,delay-us = <10>; /* close to 100 kHz */
163 + #address-cells = <1>;
166 + current_sense: ina219@45 {
167 + compatible = "ti,ina219";
169 + shunt-resistor = <60000>; /* = 60 mOhms */
172 + eeprom: eeprom@50 {
173 + compatible = "atmel,24c64";
182 + clock-frequency = <62500000>;
183 + /delete-property/ clocks;
187 + status = "disabled";
194 + * compatible = "brcm,bcm20732";
195 + * enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
201 + status = "disabled";
204 + status = "disabled";
207 + status = "disabled";
212 + pinctrl-names = "default";
213 + pinctrl-0 = <&pinmux_pwm>;
217 + nand-ecc-algo = "hw";
221 + * The partition autodetection does not work for this device.
222 + * It will only detect the "nvram" partition with an incorrect size.
223 + * [ 1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0
224 + * [ 1.727962] Creating 1 MTD partitions on "brcmnand.0":
225 + * [ 1.733117] 0x000000400000-0x000008000000 : "nvram"
228 + compatible = "fixed-partitions";
229 + #address-cells = <0x1>;
230 + #size-cells = <0x1>;
234 + reg = <0x0 0x100000>;
238 + partition1@100000 {
239 + label = "bootkernel1";
240 + reg = <0x100000 0x300000>;
244 + partition2@400000 {
246 + reg = <0x400000 0x100000>;
250 + partition3@500000 {
251 + label = "bootkernel2";
252 + reg = <0x500000 0x300000>;
256 + partition4@800000 {
258 + reg = <0x800000 0x7780000>;