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