blob: 9e714c33e906994d00e44fe8af85c7c7d1383da8 [file] [log] [blame]
Luka Kovacicc1d45302020-08-29 00:35:50 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2016 Marvell International Ltd.
4 * Copyright (C) 2020 Sartura Ltd.
5 */
6
7#include "armada-8040.dtsi" /* include SoC device tree */
8
9/ {
10 model = "iEi-Puzzle-M801";
11 compatible = "marvell,armada8040-puzzle-m801",
12 "marvell,armada8040";
13
14 chosen {
15 stdout-path = "serial0:115200n8";
16 };
17
18 aliases {
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020019 i2c0 = &ap_i2c0;
20 i2c1 = &cp0_i2c0;
21 i2c2 = &cp0_i2c1;
Luka Kovacicc1d45302020-08-29 00:35:50 +020022 i2c3 = &i2c_switch;
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020023 spi0 = &ap_spi0;
Luka Kovacicc1d45302020-08-29 00:35:50 +020024 gpio0 = &ap_gpio0;
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020025 gpio1 = &cp0_gpio0;
26 gpio2 = &cp0_gpio1;
Luka Kovacicc1d45302020-08-29 00:35:50 +020027 gpio3 = &sfpplus_gpio;
28 };
29
30 memory@00000000 {
31 device_type = "memory";
32 reg = <0x0 0x0 0x0 0x80000000>;
33 };
34
35 simple-bus {
36 compatible = "simple-bus";
37 #address-cells = <1>;
38 #size-cells = <0>;
39
40 reg_usb3h0_vbus: usb3-vbus0 {
41 compatible = "regulator-fixed";
42 pinctrl-names = "default";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020043 pinctrl-0 = <&cp0_xhci_vbus_pins>;
Luka Kovacicc1d45302020-08-29 00:35:50 +020044 regulator-name = "reg-usb3h0-vbus";
45 regulator-min-microvolt = <5000000>;
46 regulator-max-microvolt = <5000000>;
47 startup-delay-us = <500000>;
48 enable-active-high;
49 regulator-always-on;
50 regulator-boot-on;
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020051 gpio = <&cp0_gpio1 15 GPIO_ACTIVE_HIGH>; /* GPIO[47] */
Luka Kovacicc1d45302020-08-29 00:35:50 +020052 };
53 };
54};
55
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020056&ap_i2c0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +020057 status = "okay";
58 clock-frequency = <100000>;
59
60 rtc@32 {
61 compatible = "epson,rx8010";
62 reg = <0x32>;
63 };
64};
65
66&uart0 {
67 status = "okay";
68};
69
70&ap_pinctl {
71 /*
72 * MPP Bus:
73 * AP SPI0 [0-3]
74 * AP I2C [4-5]
75 * AP GPIO [6]
76 * AP UART 1 RX/TX [7-8]
77 * AP GPIO [9-10]
78 * AP GPIO [12]
79 * UART0 [11,19]
80 */
81 /* 0 1 2 3 4 5 6 7 8 9 */
82 pin-func = < 3 3 3 3 3 3 3 3 3 0
83 0 3 0 0 0 0 0 0 0 3 >;
84};
85
Konstantin Porotchkin7134b352021-01-17 17:19:49 +020086&cp0_pinctl {
Luka Kovacicc1d45302020-08-29 00:35:50 +020087 /*
88 * MPP Bus:
89 * [0-31] = 0xff: Keep default CP0_shared_pins:
90 * [11] CLKOUT_MPP_11 (out)
91 * [23] LINK_RD_IN_CP2CP (in)
92 * [25] CLKOUT_MPP_25 (out)
93 * [29] AVS_FB_IN_CP2CP (in)
94 * [32,34] SMI
95 * [33] MSS power down
96 * [35-38] CP0 I2C1 and I2C0
97 * [39] MSS CKE Enable
98 * [40,41] CP0 UART1 TX/RX
99 * [42,43] XSMI (controls two 10G phys)
100 * [47] USB VBUS EN
101 * [48] FAN PWM
102 * [49] 10G port 1 interrupt
103 * [50] 10G port 0 interrupt
104 * [51] 2.5G SFP TX fault
105 * [52] PCIe reset out
106 * [53] 2.5G SFP mode
107 * [54] 2.5G SFP LOS
108 * [55] Micro SD card detect
109 * [56-61] Micro SD
110 * [62] CP1 SFI SFP FAULT
111 */
112 /* 0 1 2 3 4 5 6 7 8 9 */
113 pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
114 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
115 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
116 0xff 0 7 0xa 7 2 2 2 2 0xa
117 7 7 8 8 0 0 0 0 0 0
118 0 0 0 0 0 0 0xe 0xe 0xe 0xe
119 0xe 0xe 0 >;
120
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200121 cp0_xhci_vbus_pins: cpm-xhci-vbus-pins {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200122 marvell,pins = < 47 >;
123 marvell,function = <0>;
124 };
125
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200126 cp0_pcie_reset_pins: cpm-pcie-reset-pins {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200127 marvell,pins = < 52 >;
128 marvell,function = <0>;
129 };
130};
131
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200132&cp0_sdhci0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200133 pinctrl-names = "default";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200134 pinctrl-0 = <&cp0_sdhci_pins>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200135 bus-width= <4>;
136 status = "okay";
137};
138
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200139&cp0_pcie0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200140 num-lanes = <1>;
141 pinctrl-names = "default";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200142 pinctrl-0 = <&cp0_pcie_reset_pins>;
143 marvell,reset-gpio = <&cp0_gpio1 20 GPIO_ACTIVE_LOW>; /* GPIO[52] */
Luka Kovacicc1d45302020-08-29 00:35:50 +0200144 status = "okay";
145};
146
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200147&cp0_i2c0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200148 pinctrl-names = "default";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200149 pinctrl-0 = <&cp0_i2c0_pins>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200150 status = "okay";
151 clock-frequency = <100000>;
152
153 sfpplus_gpio: gpio@21 {
154 compatible = "nxp,pca9555";
155 reg = <0x21>;
156 gpio-controller;
157 #gpio-cells = <2>;
158 };
159};
160
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200161&cp0_i2c1 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200162 pinctrl-names = "default";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200163 pinctrl-0 = <&cp0_i2c1_pins>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200164 status = "okay";
165 clock-frequency = <100000>;
166
167 i2c_switch: i2c-switch@70 {
168 compatible = "nxp,pca9544";
169 #address-cells = <1>;
170 #size-cells = <0>;
171 reg = <0x70>;
172 };
173};
174
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200175&cp0_sata0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200176 status = "okay";
177};
178
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200179&cp0_ethernet {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200180 pinctrl-names = "default";
181 status = "okay";
182};
183
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200184&cp0_mdio {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200185 status = "okay";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200186 cp0_ge_phy0: ethernet-phy@1 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200187 reg = <0>;
188 };
189
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200190 cp0_ge_phy1: ethernet-phy@2 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200191 reg = <1>;
192 };
193};
194
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200195&cp0_eth0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200196 status = "okay";
197 phy-mode = "sfi";
198};
199
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200200&cp0_eth1 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200201 status = "okay";
202 phy-mode = "sgmii";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200203 phy = <&cp0_ge_phy0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200204};
205
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200206&cp0_eth2 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200207 status = "okay";
208 phy-mode = "sgmii";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200209 phy = <&cp0_ge_phy1>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200210};
211
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200212&cp0_comphy {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200213 /*
214 * CP0 Serdes Configuration:
215 * Lane 0: PCIe0 (x1)
216 * Lane 1: SGMII2
217 * Lane 2: SATA0
218 * Lane 3: SGMII1
219 * Lane 4: SFI (10G)
220 * Lane 5: SATA1
221 */
222 phy0 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300223 phy-type = <COMPHY_TYPE_PEX0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200224 };
225 phy1 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300226 phy-type = <COMPHY_TYPE_SGMII2>;
227 phy-speed = <COMPHY_SPEED_1_25G>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200228 };
229 phy2 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300230 phy-type = <COMPHY_TYPE_SATA0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200231 };
232 phy3 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300233 phy-type = <COMPHY_TYPE_SGMII1>;
234 phy-speed = <COMPHY_SPEED_1_25G>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200235 };
236 phy4 {
Igal Libermand7297e32018-05-14 11:20:54 +0300237 phy-type = <COMPHY_TYPE_SFI0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200238 };
239 phy5 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300240 phy-type = <COMPHY_TYPE_SATA1>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200241 };
242};
243
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200244&cp1_mdio {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200245 status = "okay";
Robert Marko8b8c4ee2021-10-04 15:12:53 +0200246 pinctrl-names = "default";
247 pinctrl-0 = <&cp1_smi_pins>;
248
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200249 cp1_ge_phy0: ethernet-phy@3 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200250 reg = <1>;
251 };
252
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200253 cp1_ge_phy1: ethernet-phy@4 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200254 reg = <0>;
255 };
256};
257
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200258&cp1_pcie0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200259 num-lanes = <2>;
260 pinctrl-names = "default";
261 status = "okay";
262};
263
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200264&cp1_usb3_0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200265 vbus-supply = <&reg_usb3h0_vbus>;
266 status = "okay";
267};
268
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200269&cp1_utmi0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200270 status = "okay";
271};
272
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200273&cp1_ethernet {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200274 status = "okay";
275};
276
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200277&cp1_eth0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200278 status = "okay";
279 phy-mode = "sfi";
280};
281
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200282&cp1_eth1 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200283 status = "okay";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200284 phy = <&cp1_ge_phy0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200285 phy-mode = "sgmii";
286};
287
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200288&cp1_eth2 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200289 status = "okay";
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200290 phy = <&cp1_ge_phy1>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200291 phy-mode = "sgmii";
292};
293
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200294&cp1_pinctl {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200295 /*
296 * MPP Bus:
297 * [0-5] TDM
Robert Marko8b8c4ee2021-10-04 15:12:53 +0200298 * [27-28] SMI
299 * [29-30] CP1 MSS I2C
300 * [6-26, 31] GPIO
Luka Kovacicc1d45302020-08-29 00:35:50 +0200301 * [32-62] = 0xff: Keep default CP1_shared_pins:
302 */
303 /* 0 1 2 3 4 5 6 7 8 9 */
Robert Marko8b8c4ee2021-10-04 15:12:53 +0200304 pin-func = < 0x4 0x4 0x4 0x4 0x4 0x4 0x0 0x0 0x0 0x0
305 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
306 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x8 0x8 0x8
307 0x8 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
Luka Kovacicc1d45302020-08-29 00:35:50 +0200308 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
309 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
310 0xff 0xff 0xff>;
Robert Marko8b8c4ee2021-10-04 15:12:53 +0200311
312 cp1_smi_pins: cp1-smi-pins {
313 marvell,pins = < 27 28 >;
314 marvell,function = <8>;
315 };
Luka Kovacicc1d45302020-08-29 00:35:50 +0200316};
317
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200318&ap_spi0 {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200319 status = "okay";
320
321 spi-flash@0 {
322 #address-cells = <1>;
323 #size-cells = <1>;
324 compatible = "jedec,spi-nor";
325 reg = <0>;
326 spi-max-frequency = <10000000>;
327
328 partitions {
329 compatible = "fixed-partitions";
330 #address-cells = <1>;
331 #size-cells = <1>;
332
333 partition@u-boot {
334 reg = <0x00000000 0x001f0000>;
335 label = "u-boot";
336 };
337 partition@u-boot-env {
338 reg = <0x001f0000 0x00010000>;
339 label = "u-boot-env";
340 };
341 partition@ubi1 {
342 reg = <0x00200000 0x03f00000>;
343 label = "ubi1";
344 };
345 partition@ubi2 {
346 reg = <0x04100000 0x03f00000>;
347 label = "ubi2";
348 };
349 };
350 };
351};
352
Konstantin Porotchkin7134b352021-01-17 17:19:49 +0200353&cp1_comphy {
Luka Kovacicc1d45302020-08-29 00:35:50 +0200354 /*
355 * CP1 Serdes Configuration:
356 * Lane 0: PCIe0 (x2)
357 * Lane 1: PCIe0 (x2)
358 * Lane 2: USB HOST 0
359 * Lane 3: SGMII1
360 * Lane 4: SFI (10G)
361 * Lane 5: SGMII2
362 */
363 phy0 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300364 phy-type = <COMPHY_TYPE_PEX0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200365 };
366 phy1 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300367 phy-type = <COMPHY_TYPE_PEX0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200368 };
369 phy2 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300370 phy-type = <COMPHY_TYPE_USB3_HOST0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200371 };
372 phy3 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300373 phy-type = <COMPHY_TYPE_SGMII1>;
374 phy-speed = <COMPHY_SPEED_1_25G>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200375 };
376 phy4 {
Igal Libermand7297e32018-05-14 11:20:54 +0300377 phy-type = <COMPHY_TYPE_SFI0>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200378 };
379 phy5 {
Igal Libermanffd5d2f2017-04-26 15:40:00 +0300380 phy-type = <COMPHY_TYPE_SGMII2>;
381 phy-speed = <COMPHY_SPEED_1_25G>;
Luka Kovacicc1d45302020-08-29 00:35:50 +0200382 };
383};