1// SPDX-License-Identifier: GPL-2.0+ or X11
2/*
3 * Device Tree file for CZ.NIC Turris Mox Board
4 * 2018 by Marek Behun <marek.behun@nic.cz>
5 *
6 * Based on armada-3720-espressobin.dts by:
7 *   Gregory CLEMENT <gregory.clement@free-electrons.com>
8 *   Konstantin Porotchkin <kostap@marvell.com>
9 */
10
11/dts-v1/;
12
13#include <dt-bindings/gpio/gpio.h>
14#include "armada-372x.dtsi"
15
16/ {
17	model = "CZ.NIC Turris Mox Board";
18	compatible = "cznic,turris-mox", "marvell,armada3720",
19		     "marvell,armada3710";
20
21	chosen {
22		stdout-path = "serial0:115200n8";
23	};
24
25	aliases {
26		ethernet0 = &eth0;
27		i2c0 = &i2c0;
28		spi0 = &spi0;
29	};
30
31	memory {
32		device_type = "memory";
33		reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
34	};
35
36	reg_usb3_vbus: usb3_vbus@0 {
37		compatible = "regulator-fixed";
38		regulator-name = "usb3-vbus";
39		regulator-min-microvolt = <5000000>;
40		regulator-max-microvolt = <5000000>;
41		shutdown-delay-us = <1000000>;
42		gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
43		regulator-boot-on;
44	};
45
46	mdio {
47		eth_phy1: ethernet-phy@1 {
48			reg = <1>;
49		};
50	};
51};
52
53&comphy {
54	max-lanes = <3>;
55	phy0 {
56		phy-type = <PHY_TYPE_SGMII1>;
57		phy-speed = <PHY_SPEED_3_125G>;
58	};
59
60	phy1 {
61		phy-type = <PHY_TYPE_PEX0>;
62		phy-speed = <PHY_SPEED_2_5G>;
63	};
64
65	phy2 {
66		phy-type = <PHY_TYPE_USB3_HOST0>;
67		phy-speed = <PHY_SPEED_5G>;
68	};
69};
70
71&eth0 {
72	status = "okay";
73	pinctrl-names = "default";
74	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
75	phy-mode = "rgmii";
76	phy = <&eth_phy1>;
77};
78
79&i2c0 {
80	pinctrl-names = "default";
81	pinctrl-0 = <&i2c1_pins>;
82	status = "okay";
83};
84
85&sdhci1 {
86	bus-width = <4>;
87	status = "okay";
88};
89
90&pinctrl_nb {
91	spi_cs1_pins: spi-cs1-pins {
92		groups = "spi_cs1";
93		function = "spi";
94	};
95};
96
97&spi0 {
98	status = "okay";
99	pinctrl-names = "default";
100	pinctrl-0 = <&spi_cs1_pins>;
101	assigned-clocks = <&nb_periph_clk 7>;
102	assigned-clock-parents = <&tbg 1>;
103	assigned-clock-rates = <20000000>;
104
105	spi-flash@0 {
106		#address-cells = <1>;
107		#size-cells = <1>;
108		compatible = "st,s25fl064l", "spi-flash";
109		reg = <0>;
110		spi-max-frequency = <20000000>;
111		m25p,fast-read;
112	};
113};
114
115&uart0 {
116	pinctrl-names = "default";
117	pinctrl-0 = <&uart1_pins>;
118	status = "okay";
119};
120
121&usb2 {
122	status = "okay";
123};
124
125&usb3 {
126	vbus-supply = <&reg_usb3_vbus>;
127	status = "okay";
128};
129
130&pcie0 {
131	pinctrl-names = "default";
132	pinctrl-0 = <&pcie_pins>;
133	reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
134	status = "disabled";
135};
136