kirkwood: kernel: refresh 6.1 patches
[openwrt/openwrt.git] / target / linux / kirkwood / patches-6.1 / 003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
1 From 5668d088ee4ea05db9daaae0645d1d1f579b20f9 Mon Sep 17 00:00:00 2001
2 From: Pawel Dembicki <paweldembicki@gmail.com>
3 Date: Mon, 3 Oct 2022 09:34:43 +0200
4 Subject: ARM: dts: kirkwood: Add Endian 4i Edge 200 board
5
6 Add Endian 4i Edge 200 is 5-port firewall.
7 It have also clone: Endian UTM Mini (The same hardware, with added WLAN
8 card).
9
10 Hardware:
11 - SoC: Marvell 88F6281-A1 ARMv5TE Processor 1.2GHz
12 - Ram: 512MB (4x Nanya NT5TU128M8GE-AC)
13 - NAND Flash: 512MB (Micron 29F4G08AAC)
14 - Lan 1-4: 4x GBE (Marvell 88E6171R-TFJ2)
15 - Lan 5: 1x GBE (Marvell 88E1116R-NNC1)
16 - Storage: MicroSD Slot
17 - MCPIE: MiniPCIe Slot present [fitted with SparkLan WPEA-110N/E
18 (Atheros AR9280 chipset) in Endian UTM Mini WLAN only]
19 - USB: 1x USB 2.0 port
20 - Console: RJ-45 port
21 - LEDs: 3x GPIO controlled
22
23 Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
24 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
25 Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
26 ---
27 arch/arm/boot/dts/Makefile | 1 +
28 arch/arm/boot/dts/kirkwood-4i-edge-200.dts | 205 +++++++++++++++++++++++++++++
29 2 files changed, 206 insertions(+)
30 create mode 100644 arch/arm/boot/dts/kirkwood-4i-edge-200.dts
31
32 --- a/arch/arm/boot/dts/Makefile
33 +++ b/arch/arm/boot/dts/Makefile
34 @@ -300,6 +300,7 @@ dtb-$(CONFIG_ARCH_KEYSTONE) += \
35 keystone-k2g-evm.dtb \
36 keystone-k2g-ice.dtb
37 dtb-$(CONFIG_MACH_KIRKWOOD) += \
38 + kirkwood-4i-edge-200.dtb \
39 kirkwood-b3.dtb \
40 kirkwood-blackarmor-nas220.dtb \
41 kirkwood-c200-v1.dtb \
42 --- /dev/null
43 +++ b/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
44 @@ -0,0 +1,205 @@
45 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
46 +/*
47 + * Endian 4i Edge 200 Board Description
48 + * Note: Endian UTM Mini is hardware clone of Endian Edge 200
49 + * Copyright 2021-2022 Pawel Dembicki <paweldembicki@gmail.com>
50 + */
51 +
52 +/dts-v1/;
53 +
54 +#include "kirkwood.dtsi"
55 +#include "kirkwood-6281.dtsi"
56 +#include <dt-bindings/leds/common.h>
57 +
58 +/ {
59 + model = "Endian 4i Edge 200";
60 + compatible = "endian,4i-edge-200", "marvell,kirkwood-88f6281", "marvell,kirkwood";
61 +
62 + memory {
63 + device_type = "memory";
64 + reg = <0x00000000 0x20000000>;
65 + };
66 +
67 + chosen {
68 + bootargs = "console=ttyS0,115200n8";
69 + stdout-path = &uart0;
70 + };
71 +
72 + leds {
73 + compatible = "gpio-leds";
74 + pinctrl-0 = <&pmx_led>;
75 + pinctrl-names = "default";
76 +
77 + led-1 {
78 + function = LED_FUNCTION_SD;
79 + color = <LED_COLOR_ID_AMBER>;
80 + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
81 + linux,default-trigger = "mmc0";
82 + };
83 +
84 + led-2 {
85 + function = LED_FUNCTION_STATUS;
86 + color = <LED_COLOR_ID_AMBER>;
87 + gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
88 + };
89 +
90 + led-3 {
91 + function = LED_FUNCTION_STATUS;
92 + color = <LED_COLOR_ID_GREEN>;
93 + gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
94 + };
95 + };
96 +};
97 +
98 +&eth0 {
99 + status = "okay";
100 +};
101 +
102 +&eth0port {
103 + speed = <1000>;
104 + duplex = <1>;
105 +};
106 +
107 +&eth1 {
108 + status = "okay";
109 +};
110 +
111 +&eth1port {
112 + phy-handle = <&ethphyb>;
113 +};
114 +
115 +&mdio {
116 + status = "okay";
117 +
118 + ethphyb: ethernet-phy@b {
119 + reg = <0x0b>;
120 +
121 + marvell,reg-init =
122 + /* link-activity, bi-color mode 4 */
123 + <3 0x10 0xfff0 0xf>; /* Reg 3,16 <- 0xzzzf */
124 + };
125 +
126 + switch0: switch@11 {
127 + compatible = "marvell,mv88e6085";
128 + reg = <0x11>;
129 +
130 + ports {
131 + #address-cells = <1>;
132 + #size-cells = <0>;
133 +
134 + port@0 {
135 + reg = <0>;
136 + label = "port1";
137 + };
138 +
139 + port@1 {
140 + reg = <1>;
141 + label = "port2";
142 + };
143 +
144 + port@2 {
145 + reg = <2>;
146 + label = "port3";
147 + };
148 +
149 + port@3 {
150 + reg = <3>;
151 + label = "port4";
152 + };
153 +
154 + port@5 {
155 + reg = <5>;
156 + phy-mode = "rgmii-id";
157 + ethernet = <&eth0port>;
158 +
159 + fixed-link {
160 + speed = <1000>;
161 + full-duplex;
162 + };
163 + };
164 + };
165 + };
166 +};
167 +
168 +&nand {
169 + status = "okay";
170 + pinctrl-0 = <&pmx_nand>;
171 + pinctrl-names = "default";
172 +
173 + partition@0 {
174 + label = "u-boot";
175 + reg = <0x00000000 0x000a0000>;
176 + read-only;
177 + };
178 +
179 + partition@a0000 {
180 + label = "u-boot-env";
181 + reg = <0x000a0000 0x00060000>;
182 + read-only;
183 + };
184 +
185 + partition@100000 {
186 + label = "kernel";
187 + reg = <0x00100000 0x00400000>;
188 + };
189 +
190 + partition@500000 {
191 + label = "ubi";
192 + reg = <0x00500000 0x1fb00000>;
193 + };
194 +};
195 +
196 +&pciec {
197 + status = "okay";
198 +};
199 +
200 +&pcie0 {
201 + status = "okay";
202 +};
203 +
204 +&pinctrl {
205 + pinctrl-0 = <&pmx_sysrst>;
206 + pinctrl-names = "default";
207 +
208 + pmx_sysrst: pmx-sysrst {
209 + marvell,pins = "mpp6";
210 + marvell,function = "sysrst";
211 + };
212 +
213 + pmx_sdio_cd: pmx-sdio-cd {
214 + marvell,pins = "mpp28";
215 + marvell,function = "gpio";
216 + };
217 +
218 + pmx_led: pmx-led {
219 + marvell,pins = "mpp34", "mpp35", "mpp49";
220 + marvell,function = "gpio";
221 + };
222 +};
223 +
224 +&rtc {
225 + status = "okay";
226 +};
227 +
228 +&sata_phy0 {
229 + status = "disabled";
230 +};
231 +
232 +&sata_phy1 {
233 + status = "disabled";
234 +};
235 +
236 +&sdio {
237 + pinctrl-0 = <&pmx_sdio_cd>;
238 + pinctrl-names = "default";
239 + status = "okay";
240 + cd-gpios = <&gpio0 28 9>;
241 +};
242 +
243 +&uart0 {
244 + status = "okay";
245 +};
246 +
247 +&usb0 {
248 + status = "okay";
249 +};