Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
| 2 | /* |
| 3 | * Broadcom BCM470X / BCM5301X ARM platform code. |
| 4 | * DTS for Meraki MR32 / Codename: Espresso |
| 5 | * |
| 6 | * Copyright (C) 2018-2020 Christian Lamparter <chunkeey@gmail.com> |
| 7 | */ |
| 8 | |
| 9 | /dts-v1/; |
| 10 | |
| 11 | #include "bcm4708.dtsi" |
| 12 | #include "bcm5301x-nand-cs0-bch8.dtsi" |
| 13 | #include <dt-bindings/leds/common.h> |
| 14 | |
| 15 | / { |
| 16 | compatible = "meraki,mr32", "brcm,bcm53016", "brcm,bcm4708"; |
| 17 | model = "Meraki MR32"; |
| 18 | |
| 19 | chosen { |
| 20 | bootargs = " console=ttyS0,115200n8 earlycon"; |
| 21 | }; |
| 22 | |
| 23 | memory@0 { |
| 24 | reg = <0x00000000 0x08000000>; |
| 25 | device_type = "memory"; |
| 26 | }; |
| 27 | |
| 28 | aliases { |
| 29 | serial1 = &uart2; |
| 30 | }; |
| 31 | |
| 32 | leds { |
| 33 | compatible = "gpio-leds"; |
| 34 | |
| 35 | sysled3 { |
| 36 | function = LED_FUNCTION_FAULT; |
| 37 | color = <LED_COLOR_ID_AMBER>; |
| 38 | gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>; |
| 39 | panic-indicator; |
| 40 | }; |
| 41 | sysled2 { |
| 42 | function = LED_FUNCTION_INDICATOR; |
| 43 | color = <LED_COLOR_ID_WHITE>; |
| 44 | gpios = <&chipcommon 19 GPIO_ACTIVE_HIGH>; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | keys { |
| 49 | compatible = "gpio-keys"; |
| 50 | |
| 51 | button-restart { |
| 52 | label = "Reset"; |
| 53 | linux,code = <KEY_RESTART>; |
| 54 | gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>; |
| 55 | }; |
| 56 | }; |
| 57 | |
| 58 | pwm-leds { |
| 59 | compatible = "pwm-leds"; |
| 60 | |
| 61 | led-0 { |
| 62 | /* SYS-LED 1 - Tricolor */ |
| 63 | function = LED_FUNCTION_INDICATOR; |
| 64 | color = <LED_COLOR_ID_RED>; |
| 65 | pwms = <&pwm 0 50000 0>; |
| 66 | max-brightness = <255>; |
| 67 | }; |
| 68 | |
| 69 | led-1 { |
| 70 | /* SYS-LED 1 - Tricolor */ |
| 71 | function = LED_FUNCTION_POWER; |
| 72 | color = <LED_COLOR_ID_GREEN>; |
| 73 | pwms = <&pwm 1 50000 0>; |
| 74 | max-brightness = <255>; |
| 75 | }; |
| 76 | |
| 77 | led-2 { |
| 78 | /* SYS-LED 1 - Tricolor */ |
| 79 | function = LED_FUNCTION_INDICATOR; |
| 80 | color = <LED_COLOR_ID_BLUE>; |
| 81 | pwms = <&pwm 2 50000 0>; |
| 82 | max-brightness = <255>; |
| 83 | }; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | &uart0 { |
| 88 | clock-frequency = <62500000>; |
| 89 | /delete-property/ clocks; |
| 90 | }; |
| 91 | |
| 92 | &uart1 { |
| 93 | status = "disabled"; |
| 94 | }; |
| 95 | |
| 96 | &uart2 { |
| 97 | status = "okay"; |
| 98 | /* |
| 99 | * bluetooth-le { |
| 100 | * compatible = "brcm,bcm20732"; |
| 101 | * enable-gpios = <&chipcommon 20 GPIO_ACTIVE_HIGH>; |
| 102 | *}; |
| 103 | */ |
| 104 | }; |
| 105 | |
| 106 | &gmac0 { |
| 107 | nvmem-cell-names = "mac-address"; |
| 108 | nvmem-cells = <&mac_address>; |
| 109 | }; |
| 110 | |
| 111 | &gmac1 { |
| 112 | status = "disabled"; |
| 113 | }; |
| 114 | &gmac2 { |
| 115 | status = "disabled"; |
| 116 | }; |
| 117 | &gmac3 { |
| 118 | status = "disabled"; |
| 119 | }; |
| 120 | |
| 121 | &pwm { |
| 122 | status = "okay"; |
| 123 | pinctrl-names = "default"; |
| 124 | pinctrl-0 = <&pinmux_pwm>; |
| 125 | }; |
| 126 | |
| 127 | &nandcs { |
| 128 | partitions { |
| 129 | /* |
| 130 | * The partition autodetection does not work for this device. |
| 131 | * It will only detect the "nvram" partition with an incorrect size. |
| 132 | * [ 1.721667] 1 bcm47xxpart partitions found on MTD device brcmnand.0 |
| 133 | * [ 1.727962] Creating 1 MTD partitions on "brcmnand.0": |
| 134 | * [ 1.733117] 0x000000400000-0x000008000000 : "nvram" |
| 135 | */ |
| 136 | |
| 137 | compatible = "fixed-partitions"; |
| 138 | #address-cells = <0x1>; |
| 139 | #size-cells = <0x1>; |
| 140 | |
| 141 | partition@0 { |
| 142 | label = "u-boot"; |
| 143 | reg = <0x0 0x100000>; |
| 144 | read-only; |
| 145 | }; |
| 146 | |
| 147 | partition@100000 { |
| 148 | label = "bootkernel1"; |
| 149 | reg = <0x100000 0x300000>; |
| 150 | read-only; |
| 151 | }; |
| 152 | |
| 153 | partition@400000 { |
| 154 | label = "nvram"; |
| 155 | reg = <0x400000 0x100000>; |
| 156 | read-only; |
| 157 | }; |
| 158 | |
| 159 | partition@500000 { |
| 160 | label = "bootkernel2"; |
| 161 | reg = <0x500000 0x300000>; |
| 162 | read-only; |
| 163 | }; |
| 164 | |
| 165 | partition@800000 { |
| 166 | label = "ubi"; |
| 167 | reg = <0x800000 0x7780000>; |
| 168 | }; |
| 169 | }; |
| 170 | }; |
| 171 | |
| 172 | &srab { |
| 173 | status = "okay"; |
| 174 | |
| 175 | ports { |
| 176 | port@0 { |
| 177 | label = "poe"; |
| 178 | }; |
| 179 | |
| 180 | port@5 { |
| 181 | label = "cpu"; |
| 182 | |
| 183 | fixed-link { |
| 184 | speed = <1000>; |
| 185 | full-duplex; |
| 186 | }; |
| 187 | }; |
| 188 | |
| 189 | port@7 { |
| 190 | status = "disabled"; |
| 191 | }; |
| 192 | |
| 193 | port@8 { |
| 194 | status = "disabled"; |
| 195 | }; |
| 196 | }; |
| 197 | }; |
| 198 | |
| 199 | &i2c0 { |
| 200 | status = "okay"; |
| 201 | |
| 202 | pinctrl-names = "default"; |
| 203 | pinctrl-0 = <&pinmux_i2c>; |
| 204 | |
| 205 | clock-frequency = <100000>; |
| 206 | |
| 207 | current_sense: ina219@45 { |
| 208 | compatible = "ti,ina219"; |
| 209 | reg = <0x45>; |
| 210 | shunt-resistor = <60000>; /* = 60 mOhms */ |
| 211 | }; |
| 212 | |
| 213 | eeprom: eeprom@50 { |
| 214 | compatible = "atmel,24c64"; |
| 215 | reg = <0x50>; |
| 216 | pagesize = <32>; |
| 217 | read-only; |
Tom Rini | 9c8af15 | 2024-12-24 12:03:04 -0600 | [diff] [blame^] | 218 | |
| 219 | nvmem-layout { |
| 220 | compatible = "fixed-layout"; |
| 221 | #address-cells = <1>; |
| 222 | #size-cells = <1>; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 223 | |
Tom Rini | 9c8af15 | 2024-12-24 12:03:04 -0600 | [diff] [blame^] | 224 | mac_address: mac-address@66 { |
| 225 | reg = <0x66 0x6>; |
| 226 | }; |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 227 | }; |
| 228 | }; |
| 229 | }; |