0001 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
0002 /*
0003 * Broadcom BCM470X / BCM5301X ARM platform code.
0004 * DTS for Meraki MR32 / Codename: Espresso
0005 *
0006 * Copyright (C) 2018-2020 Christian Lamparter <chunkeey@gmail.com>
0007 */
0008
0009 /dts-v1/;
0010
0011 #include "bcm4708.dtsi"
0012 #include "bcm5301x-nand-cs0-bch8.dtsi"
0013 #include <dt-bindings/leds/common.h>
0014
0015 / {
0016 compatible = "meraki,mr32", "brcm,bcm53016", "brcm,bcm4708";
0017 model = "Meraki MR32";
0018
0019 chosen {
0020 bootargs = " console=ttyS0,115200n8 earlycon";
0021 };
0022
0023 memory@0 {
0024 reg = <0x00000000 0x08000000>;
0025 device_type = "memory";
0026 };
0027
0028 aliases {
0029 serial1 = &uart2;
0030 };
0031
0032 leds {
0033 compatible = "gpio-leds";
0034
0035 sysled3 {
0036 function = LED_FUNCTION_FAULT;
0037 color = <LED_COLOR_ID_AMBER>;
0038 gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
0039 panic-indicator;
0040 };
0041 sysled2 {
0042 function = LED_FUNCTION_INDICATOR;
0043 color = <LED_COLOR_ID_WHITE>;
0044 gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>;
0045 };
0046 };
0047
0048 keys {
0049 compatible = "gpio-keys";
0050
0051 button-restart {
0052 label = "Reset";
0053 linux,code = <KEY_RESTART>;
0054 gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
0055 };
0056 };
0057
0058 pwm-leds {
0059 compatible = "pwm-leds";
0060
0061 red {
0062 /* SYS-LED 1 - Tricolor */
0063 function = LED_FUNCTION_INDICATOR;
0064 color = <LED_COLOR_ID_RED>;
0065 pwms = <&pwm 0 50000 0>;
0066 max-brightness = <255>;
0067 };
0068
0069 green {
0070 /* SYS-LED 1 - Tricolor */
0071 function = LED_FUNCTION_POWER;
0072 color = <LED_COLOR_ID_GREEN>;
0073 pwms = <&pwm 1 50000 0>;
0074 max-brightness = <255>;
0075 };
0076
0077 blue {
0078 /* SYS-LED 1 - Tricolor */
0079 function = LED_FUNCTION_INDICATOR;
0080 color = <LED_COLOR_ID_BLUE>;
0081 pwms = <&pwm 2 50000 0>;
0082 max-brightness = <255>;
0083 };
0084 };
0085 };
0086
0087 &uart0 {
0088 clock-frequency = <62500000>;
0089 /delete-property/ clocks;
0090 };
0091
0092 &uart1 {
0093 status = "disabled";
0094 };
0095
0096 &uart2 {
0097 status = "okay";
0098 /*
0099 * bluetooth-le {
0100 * compatible = "brcm,bcm20732";
0101 * enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>;
0102 *};
0103 */
0104 };
0105
0106 &gmac0 {
0107 nvmem-cell-names = "mac-address";
0108 nvmem-cells = <&mac_address>;
0109 };
0110
0111 &gmac1 {
0112 status = "disabled";
0113 };
0114 &gmac2 {
0115 status = "disabled";
0116 };
0117 &gmac3 {
0118 status = "disabled";
0119 };
0120
0121 &pwm {
0122 status = "okay";
0123 pinctrl-names = "default";
0124 pinctrl-0 = <&pinmux_pwm>;
0125 };
0126
0127 &nandcs {
0128 nand-ecc-algo = "hw";
0129
0130 partitions {
0131 /*
0132 * The partition autodetection does not work for this device.
0133 * It will only detect the "nvram" partition with an incorrect size.
0134 * [ 1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0
0135 * [ 1.727962] Creating 1 MTD partitions on "brcmnand.0":
0136 * [ 1.733117] 0x000000400000-0x000008000000 : "nvram"
0137 */
0138
0139 compatible = "fixed-partitions";
0140 #address-cells = <0x1>;
0141 #size-cells = <0x1>;
0142
0143 partition0@0 {
0144 label = "u-boot";
0145 reg = <0x0 0x100000>;
0146 read-only;
0147 };
0148
0149 partition1@100000 {
0150 label = "bootkernel1";
0151 reg = <0x100000 0x300000>;
0152 read-only;
0153 };
0154
0155 partition2@400000 {
0156 label = "nvram";
0157 reg = <0x400000 0x100000>;
0158 read-only;
0159 };
0160
0161 partition3@500000 {
0162 label = "bootkernel2";
0163 reg = <0x500000 0x300000>;
0164 read-only;
0165 };
0166
0167 partition4@800000 {
0168 label = "ubi";
0169 reg = <0x800000 0x7780000>;
0170 };
0171 };
0172 };
0173
0174 &srab {
0175 status = "okay";
0176
0177 ports {
0178 port@0 {
0179 reg = <0>;
0180 label = "poe";
0181 };
0182
0183 port@5 {
0184 reg = <5>;
0185 label = "cpu";
0186 ethernet = <&gmac0>;
0187
0188 fixed-link {
0189 speed = <1000>;
0190 duplex-full;
0191 };
0192 };
0193 };
0194 };
0195
0196 &i2c0 {
0197 status = "okay";
0198
0199 pinctrl-names = "default";
0200 pinctrl-0 = <&pinmux_i2c>;
0201
0202 clock-frequency = <100000>;
0203
0204 current_sense: ina219@45 {
0205 compatible = "ti,ina219";
0206 reg = <0x45>;
0207 shunt-resistor = <60000>; /* = 60 mOhms */
0208 };
0209
0210 eeprom: eeprom@50 {
0211 compatible = "atmel,24c64";
0212 reg = <0x50>;
0213 pagesize = <32>;
0214 read-only;
0215 #address-cells = <1>;
0216 #size-cells = <1>;
0217
0218 mac_address: mac-address@66 {
0219 reg = <0x66 0x6>;
0220 };
0221 };
0222 };