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