1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Endian 4i Edge 200 Board Description
4 * Note: Endian UTM Mini is hardware clone of Endian Edge 200
5 * Copyright 2021-2022 Pawel Dembicki <paweldembicki@gmail.com>
6 */
7
8/dts-v1/;
9
10#include "kirkwood.dtsi"
11#include "kirkwood-6281.dtsi"
12#include <dt-bindings/leds/common.h>
13
14/ {
15	model = "Endian 4i Edge 200";
16	compatible = "endian,4i-edge-200", "marvell,kirkwood-88f6281", "marvell,kirkwood";
17
18	memory {
19		device_type = "memory";
20		reg = <0x00000000 0x20000000>;
21	};
22
23	chosen {
24		bootargs = "console=ttyS0,115200n8";
25		stdout-path = &uart0;
26	};
27
28	leds {
29		compatible = "gpio-leds";
30		pinctrl-0 = <&pmx_led>;
31		pinctrl-names = "default";
32
33		led-1 {
34			function = LED_FUNCTION_SD;
35			color = <LED_COLOR_ID_AMBER>;
36			gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
37			linux,default-trigger = "mmc0";
38		};
39
40		led-2 {
41			function = LED_FUNCTION_STATUS;
42			color = <LED_COLOR_ID_AMBER>;
43			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
44		};
45
46		led-3 {
47			function = LED_FUNCTION_STATUS;
48			color = <LED_COLOR_ID_GREEN>;
49			gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
50		};
51	};
52};
53
54&eth0 {
55	status = "okay";
56};
57
58&eth0port {
59	speed = <1000>;
60	duplex = <1>;
61};
62
63&eth1 {
64	status = "okay";
65};
66
67&eth1port {
68	phy-handle = <&ethphyb>;
69};
70
71&mdio {
72	status = "okay";
73
74	ethphyb: ethernet-phy@b {
75		reg = <0x0b>;
76
77		marvell,reg-init =
78			/* link-activity, bi-color mode 4 */
79			<3 0x10 0xfff0 0xf>; /* Reg 3,16 <- 0xzzzf */
80	};
81
82	switch0: switch@11 {
83		compatible = "marvell,mv88e6085";
84		reg = <0x11>;
85
86		ports {
87			#address-cells = <1>;
88			#size-cells = <0>;
89
90			port@0 {
91				reg = <0>;
92				label = "port1";
93			};
94
95			port@1 {
96				reg = <1>;
97				label = "port2";
98			};
99
100			port@2 {
101				reg = <2>;
102				label = "port3";
103			};
104
105			port@3 {
106				reg = <3>;
107				label = "port4";
108			};
109
110			port@5 {
111				reg = <5>;
112				phy-mode = "rgmii-id";
113				ethernet = <&eth0port>;
114
115				fixed-link {
116					speed = <1000>;
117					full-duplex;
118				};
119			};
120		};
121	};
122};
123
124&nand {
125	status = "okay";
126	pinctrl-0 = <&pmx_nand>;
127	pinctrl-names = "default";
128
129	partition@0 {
130		label = "u-boot";
131		reg = <0x00000000 0x000a0000>;
132		read-only;
133	};
134
135	partition@a0000 {
136		label = "u-boot-env";
137		reg = <0x000a0000 0x00060000>;
138		read-only;
139	};
140
141	partition@100000 {
142		label = "kernel";
143		reg = <0x00100000 0x00400000>;
144	};
145
146	partition@500000 {
147		label = "ubi";
148		reg = <0x00500000 0x1fb00000>;
149	};
150};
151
152&pciec {
153	status = "okay";
154};
155
156&pcie0 {
157	status = "okay";
158};
159
160&pinctrl {
161	pinctrl-0 = <&pmx_sysrst>;
162	pinctrl-names = "default";
163
164	pmx_sysrst: pmx-sysrst {
165		marvell,pins = "mpp6";
166		marvell,function = "sysrst";
167	};
168
169	pmx_sdio_cd: pmx-sdio-cd {
170		marvell,pins = "mpp28";
171		marvell,function = "gpio";
172	};
173
174	pmx_led: pmx-led {
175		marvell,pins = "mpp34", "mpp35", "mpp49";
176		marvell,function = "gpio";
177	};
178};
179
180&rtc {
181	status = "okay";
182};
183
184&sata_phy0 {
185	status = "disabled";
186};
187
188&sata_phy1 {
189	status = "disabled";
190};
191
192&sdio {
193	pinctrl-0 = <&pmx_sdio_cd>;
194	pinctrl-names = "default";
195	status = "okay";
196	cd-gpios = <&gpio0 28 9>;
197};
198
199&uart0 {
200	status = "okay";
201};
202
203&usb0 {
204	status = "okay";
205};
206