blob: a5ccb558ccd678e2b1a2b356f294d2ee79dbe616 [file] [log] [blame]
Marek Behún80af1a92018-04-24 17:21:31 +02001// 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>
Marek Behúne04bf432021-06-07 16:34:46 +020014#include <dt-bindings/input/input.h>
15#include <dt-bindings/leds/common.h>
Marek Behún80af1a92018-04-24 17:21:31 +020016#include "armada-372x.dtsi"
17
18/ {
19 model = "CZ.NIC Turris Mox Board";
20 compatible = "cznic,turris-mox", "marvell,armada3720",
21 "marvell,armada3710";
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 };
26
27 aliases {
28 ethernet0 = &eth0;
Marek Behún3dc2f452018-12-17 16:10:04 +010029 ethernet1 = &eth1;
Marek Behún80af1a92018-04-24 17:21:31 +020030 i2c0 = &i2c0;
31 spi0 = &spi0;
32 };
33
34 memory {
35 device_type = "memory";
36 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
37 };
38
Marek Behúne04bf432021-06-07 16:34:46 +020039 leds {
40 compatible = "gpio-leds";
41
42 led {
43 gpios = <&gpiosb 21 GPIO_ACTIVE_LOW>;
44 color = <LED_COLOR_ID_RED>;
45 function = LED_FUNCTION_ACTIVITY;
46 };
47 };
48
49 gpio-keys {
50 compatible = "gpio-keys";
51
52 reset {
53 compatible = "gpio-keys";
54 label = "reset";
55 linux,code = <KEY_RESTART>;
56 gpios = <&gpiosb 20 GPIO_ACTIVE_LOW>;
57 debounce-interval = <60>;
58 };
59 };
60
Marek Behún80af1a92018-04-24 17:21:31 +020061 reg_usb3_vbus: usb3_vbus@0 {
62 compatible = "regulator-fixed";
63 regulator-name = "usb3-vbus";
64 regulator-min-microvolt = <5000000>;
65 regulator-max-microvolt = <5000000>;
Marek Behún3dc2f452018-12-17 16:10:04 +010066 startup-delay-us = <2000000>;
Marek Behún80af1a92018-04-24 17:21:31 +020067 shutdown-delay-us = <1000000>;
68 gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
Marek Behún9e4cdba2020-04-08 12:02:06 +020069 enable-active-high;
Marek Behún80af1a92018-04-24 17:21:31 +020070 regulator-boot-on;
71 };
72
Marek Behúneddd6f92020-04-08 12:02:04 +020073 vsdc_reg: vsdc-reg {
74 compatible = "regulator-gpio";
75 regulator-name = "vsdc";
76 regulator-min-microvolt = <1800000>;
77 regulator-max-microvolt = <3300000>;
78 regulator-boot-on;
79
80 gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
81 gpios-states = <0>;
82 states = <1800000 0x1
83 3300000 0x0>;
84 enable-active-high;
85 };
86
Marek Behún80af1a92018-04-24 17:21:31 +020087 mdio {
Marek Behún3dc2f452018-12-17 16:10:04 +010088 #address-cells = <1>;
89 #size-cells = <0>;
90
Marek Behún80af1a92018-04-24 17:21:31 +020091 eth_phy1: ethernet-phy@1 {
92 reg = <1>;
93 };
94 };
95};
96
Marek Behún80af1a92018-04-24 17:21:31 +020097&eth0 {
98 status = "okay";
99 pinctrl-names = "default";
100 pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
101 phy-mode = "rgmii";
102 phy = <&eth_phy1>;
103};
104
Pali Rohárd368e102021-11-26 14:57:13 +0100105&eth1 {
106 phy-mode = "2500base-x";
107 phys = <&comphy0 1>;
108};
109
Marek Behún80af1a92018-04-24 17:21:31 +0200110&i2c0 {
111 pinctrl-names = "default";
112 pinctrl-0 = <&i2c1_pins>;
113 status = "okay";
Stefan Roeseac5cd422020-08-10 10:16:56 +0200114 #address-cells = <1>;
115 #size-cells = <0>;
Marek Behún3dc2f452018-12-17 16:10:04 +0100116
117 rtc@6f {
118 compatible = "microchip,mcp7941x";
119 reg = <0x6f>;
120 };
Marek Behún80af1a92018-04-24 17:21:31 +0200121};
122
Pali Rohár9dde7a02022-02-14 11:34:27 +0100123&sdhci0 {
Marek Behúneddd6f92020-04-08 12:02:04 +0200124 wp-inverted;
Marek Behún80af1a92018-04-24 17:21:31 +0200125 bus-width = <4>;
Marek Behúneddd6f92020-04-08 12:02:04 +0200126 cd-gpios = <&gpionb 10 GPIO_ACTIVE_HIGH>;
127 vqmmc-supply = <&vsdc_reg>;
128 marvell,pad-type = "sd";
Marek Behún80af1a92018-04-24 17:21:31 +0200129 status = "okay";
130};
131
132&pinctrl_nb {
133 spi_cs1_pins: spi-cs1-pins {
134 groups = "spi_cs1";
135 function = "spi";
136 };
137};
138
Marek Behún80af1a92018-04-24 17:21:31 +0200139&spi0 {
140 status = "okay";
141 pinctrl-names = "default";
142 pinctrl-0 = <&spi_cs1_pins>;
Marek Behún0f6686e2018-08-17 12:59:01 +0200143 assigned-clocks = <&nb_periph_clk 7>;
144 assigned-clock-parents = <&tbg 1>;
145 assigned-clock-rates = <20000000>;
Marek Behún80af1a92018-04-24 17:21:31 +0200146
147 spi-flash@0 {
148 #address-cells = <1>;
149 #size-cells = <1>;
Neil Armstrongffd4c7c2019-02-10 10:16:20 +0000150 compatible = "st,s25fl064l", "jedec,spi-nor";
Marek Behún80af1a92018-04-24 17:21:31 +0200151 reg = <0>;
152 spi-max-frequency = <20000000>;
153 m25p,fast-read;
Marek Behúnf2213332021-06-07 16:34:50 +0200154
155 partitions {
156 compatible = "fixed-partitions";
157 #address-cells = <1>;
158 #size-cells = <1>;
159
160 partition@0 {
161 label = "secure-firmware";
162 reg = <0x0 0x20000>;
163 };
164
165 partition@20000 {
166 label = "a53-firmware";
167 reg = <0x20000 0x160000>;
168 };
169
170 partition@180000 {
171 label = "u-boot-env";
172 reg = <0x180000 0x10000>;
173 };
174
175 partition@190000 {
176 label = "Rescue system";
177 reg = <0x190000 0x660000>;
178 };
179
180 partition@7f0000 {
181 label = "dtb";
182 reg = <0x7f0000 0x10000>;
183 };
184 };
Marek Behún80af1a92018-04-24 17:21:31 +0200185 };
Marek Behún7dd7c2e2018-12-17 16:10:03 +0100186
187 moxtet@1 {
188 #address-cells = <1>;
189 #size-cells = <0>;
190 compatible = "cznic,moxtet";
191 reg = <1>;
192 reset-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
193 spi-max-frequency = <1000000>;
194 spi-cpol;
195 spi-cpha;
196 };
Marek Behún80af1a92018-04-24 17:21:31 +0200197};
198
199&uart0 {
200 pinctrl-names = "default";
201 pinctrl-0 = <&uart1_pins>;
202 status = "okay";
203};
204
205&usb2 {
206 status = "okay";
207};
208
209&usb3 {
210 vbus-supply = <&reg_usb3_vbus>;
211 status = "okay";
Pali Rohárd368e102021-11-26 14:57:13 +0100212 phys = <&comphy2 0>;
Marek Behún80af1a92018-04-24 17:21:31 +0200213};
Marek Behún863949e2018-08-21 12:22:09 +0200214
215&pcie0 {
216 pinctrl-names = "default";
217 pinctrl-0 = <&pcie_pins>;
Pali Rohár563b85b2020-08-19 15:57:06 +0200218 reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
Marek Behún863949e2018-08-21 12:22:09 +0200219 status = "disabled";
Pali Rohárd368e102021-11-26 14:57:13 +0100220 phys = <&comphy1 0>;
Marek Behún863949e2018-08-21 12:22:09 +0200221};