1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2/*
3 * Broadcom BCM470X / BCM5301X ARM platform code.
4 * DTS for Meraki MR26 / Codename: Venom
5 *
6 * Copyright (C) 2022 Christian Lamparter <[email protected]>
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,mr26", "brcm,bcm53015", "brcm,bcm4708";
17	model = "Meraki MR26";
18
19	memory@0 {
20		reg = <0x00000000 0x08000000>;
21		device_type = "memory";
22	};
23
24	leds {
25		compatible = "gpio-leds";
26
27		led-0 {
28			function = LED_FUNCTION_FAULT;
29			color = <LED_COLOR_ID_AMBER>;
30			gpios = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
31			panic-indicator;
32		};
33		led-1 {
34			function = LED_FUNCTION_INDICATOR;
35			color = <LED_COLOR_ID_WHITE>;
36			gpios = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
37		};
38	};
39
40	keys {
41		compatible = "gpio-keys";
42
43		key-restart {
44			label = "Reset";
45			linux,code = <KEY_RESTART>;
46			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
47		};
48	};
49};
50
51&uart0 {
52	clock-frequency = <50000000>;
53	/delete-property/ clocks;
54};
55
56&uart1 {
57	status = "disabled";
58};
59
60&gmac0 {
61	status = "okay";
62
63	nvmem-cells = <&macaddr_board_config_66>;
64	nvmem-cell-names = "mac-address";
65};
66
67&gmac1 {
68	status = "disabled";
69};
70&gmac2 {
71	status = "disabled";
72};
73&gmac3 {
74	status = "disabled";
75};
76
77&nandcs {
78	partitions {
79		compatible = "fixed-partitions";
80		#address-cells = <0x1>;
81		#size-cells = <0x1>;
82
83		partition@0 {
84			label = "u-boot";
85			reg = <0x0 0x200000>;
86			read-only;
87		};
88
89		partition@200000 {
90			label = "u-boot-env";
91			reg = <0x200000 0x200000>;
92			/* empty */
93		};
94
95		partition@400000 {
96			label = "u-boot-backup";
97			reg = <0x400000 0x200000>;
98			/* empty */
99		};
100
101		partition@600000 {
102			label = "u-boot-env-backup";
103			reg = <0x600000 0x200000>;
104			/* empty */
105		};
106
107		partition@800000 {
108			compatible = "linux,ubi";
109			label = "ubi";
110			reg = <0x800000 0x7780000>;
111
112			volumes {
113				ubi-volume-board-config {
114					volname = "board-config";
115
116					nvmem-layout {
117						compatible = "fixed-layout";
118						#address-cells = <1>;
119						#size-cells = <1>;
120
121						macaddr_board_config_66: macaddr@66 {
122							reg = <0x66 0x6>;
123						};
124					};
125				};
126			};
127		};
128	};
129};
130
131&srab {
132	status = "okay";
133
134	ports {
135		port@0 {
136			label = "poe";
137		};
138
139		port@5 {
140			label = "cpu";
141
142			fixed-link {
143				speed = <1000>;
144				full-duplex;
145			};
146		};
147
148		port@7 {
149			status = "disabled";
150		};
151
152		port@8 {
153			status = "disabled";
154		};
155	};
156};
157
158&i2c0 {
159	status = "okay";
160
161	pinctrl-names = "default";
162	pinctrl-0 = <&pinmux_i2c>;
163
164	clock-frequency = <100000>;
165
166	ina219@40 {
167		compatible = "ti,ina219"; /* PoE power */
168		reg = <0x40>;
169		shunt-resistor = <60000>; /* = 60 mOhms */
170	};
171
172	eeprom@56 {
173		compatible = "atmel,24c64";
174		reg = <0x56>;
175		pagesize = <32>;
176		read-only;
177		#address-cells = <1>;
178		#size-cells = <1>;
179
180		/* it's empty */
181	};
182};
183
184&thermal {
185	status = "disabled";
186	/* does not work, reads 418 degree Celsius */
187};
188