1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Device tree for the uDPU board.
4 * Based on Marvell Armada 3720 development board (DB-88F3720-DDR3)
5 * Copyright (C) 2016 Marvell
6 * Copyright (C) 2019 Methode Electronics
7 * Copyright (C) 2019 Telus
8 *
9 * Vladimir Vid <vladimir.vid@sartura.hr>
10 */
11
12/dts-v1/;
13
14#include <dt-bindings/gpio/gpio.h>
15#include "armada-372x.dtsi"
16
17/ {
18	model = "Methode uDPU Board";
19	compatible = "methode,udpu", "marvell,armada3720", "marvell,armada3710";
20
21	chosen {
22		stdout-path = "serial0:115200n8";
23	};
24
25	memory@0 {
26		device_type = "memory";
27		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
28	};
29
30	leds {
31		compatible = "gpio-leds";
32
33		led-power1 {
34			label = "udpu:green:power";
35			gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
36		};
37
38		led-power2 {
39			label = "udpu:red:power";
40			gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
41		};
42
43		led-network1 {
44			label = "udpu:green:network";
45			gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
46		};
47
48		led-network2 {
49			label = "udpu:red:network";
50			gpios = <&gpionb 14 GPIO_ACTIVE_LOW>;
51		};
52
53		led-alarm1 {
54			label = "udpu:green:alarm";
55			gpios = <&gpionb 15 GPIO_ACTIVE_LOW>;
56		};
57
58		led-alarm2 {
59			label = "udpu:red:alarm";
60			gpios = <&gpionb 16 GPIO_ACTIVE_LOW>;
61		};
62	};
63
64	sfp_eth0: sfp-eth0 {
65		compatible = "sff,sfp";
66		i2c-bus = <&i2c0>;
67		los-gpios = <&gpiosb 2 GPIO_ACTIVE_HIGH>;
68		mod-def0-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
69		tx-disable-gpios = <&gpiosb 4 GPIO_ACTIVE_HIGH>;
70		tx-fault-gpios = <&gpiosb 5 GPIO_ACTIVE_HIGH>;
71		maximum-power-milliwatt = <3000>;
72	};
73
74	sfp_eth1: sfp-eth1 {
75		compatible = "sff,sfp";
76		i2c-bus = <&i2c1>;
77		los-gpios = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
78		mod-def0-gpios = <&gpiosb 8 GPIO_ACTIVE_LOW>;
79		tx-disable-gpios = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
80		tx-fault-gpios = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
81		maximum-power-milliwatt = <3000>;
82	};
83};
84
85&sdhci0 {
86	status = "okay";
87	bus-width = <8>;
88	mmc-ddr-1_8v;
89	mmc-hs400-1_8v;
90	marvell,pad-type = "fixed-1-8v";
91	non-removable;
92	no-sd;
93	no-sdio;
94};
95
96&spi0 {
97	status = "okay";
98	pinctrl-names = "default";
99	pinctrl-0 = <&spi_quad_pins>;
100
101	flash@0 {
102		compatible = "jedec,spi-nor";
103		reg = <0>;
104		spi-max-frequency = <54000000>;
105
106		partitions {
107			compatible = "fixed-partitions";
108			#address-cells = <1>;
109			#size-cells = <1>;
110
111			partition@0 {
112				label = "firmware";
113				reg = <0x0 0x180000>;
114			};
115
116			partition@180000 {
117				label = "u-boot-env";
118				reg = <0x180000 0x10000>;
119			};
120		};
121	};
122};
123
124&pinctrl_nb {
125	i2c1_recovery_pins: i2c1-recovery-pins {
126		groups = "i2c1";
127		function = "gpio";
128	};
129
130	i2c2_recovery_pins: i2c2-recovery-pins {
131		groups = "i2c2";
132		function = "gpio";
133	};
134};
135
136&i2c0 {
137	status = "okay";
138	pinctrl-names = "default", "recovery";
139	pinctrl-0 = <&i2c1_pins>;
140	pinctrl-1 = <&i2c1_recovery_pins>;
141	/delete-property/mrvl,i2c-fast-mode;
142	scl-gpios = <&gpionb 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
143	sda-gpios = <&gpionb 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
144};
145
146&i2c1 {
147	status = "okay";
148	pinctrl-names = "default", "recovery";
149	pinctrl-0 = <&i2c2_pins>;
150	pinctrl-1 = <&i2c2_recovery_pins>;
151	/delete-property/mrvl,i2c-fast-mode;
152	scl-gpios = <&gpionb 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
153	sda-gpios = <&gpionb 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
154
155	temp-sensor@48 {
156		compatible = "ti,tmp75c";
157		reg = <0x48>;
158	};
159
160	temp-sensor@49 {
161		compatible = "ti,tmp75c";
162		reg = <0x49>;
163	};
164};
165
166&eth0 {
167	phy-mode = "sgmii";
168	status = "okay";
169	managed = "in-band-status";
170	phys = <&comphy1 0>;
171	sfp = <&sfp_eth0>;
172};
173
174&eth1 {
175	phy-mode = "sgmii";
176	status = "okay";
177	managed = "in-band-status";
178	phys = <&comphy0 1>;
179	sfp = <&sfp_eth1>;
180};
181
182&usb3 {
183	status = "okay";
184	phys = <&usb2_utmi_otg_phy>;
185	phy-names = "usb2-utmi-otg-phy";
186};
187
188&uart0 {
189	status = "okay";
190};
191