blob: 4c65c3e32cd4b157ecc0929ef3e870a97b233ce6 [file] [log] [blame]
Marek Behúnf835bed2018-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>
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;
Marek Behún4feafb22018-12-17 16:10:04 +010027 ethernet1 = &eth1;
Marek Behúnf835bed2018-04-24 17:21:31 +020028 i2c0 = &i2c0;
29 spi0 = &spi0;
30 };
31
32 memory {
33 device_type = "memory";
34 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
35 };
36
37 reg_usb3_vbus: usb3_vbus@0 {
38 compatible = "regulator-fixed";
39 regulator-name = "usb3-vbus";
40 regulator-min-microvolt = <5000000>;
41 regulator-max-microvolt = <5000000>;
Marek Behún4feafb22018-12-17 16:10:04 +010042 startup-delay-us = <2000000>;
Marek Behúnf835bed2018-04-24 17:21:31 +020043 shutdown-delay-us = <1000000>;
44 gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
45 regulator-boot-on;
46 };
47
Marek Behúnb78519b2020-04-08 12:02:04 +020048 vsdc_reg: vsdc-reg {
49 compatible = "regulator-gpio";
50 regulator-name = "vsdc";
51 regulator-min-microvolt = <1800000>;
52 regulator-max-microvolt = <3300000>;
53 regulator-boot-on;
54
55 gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
56 gpios-states = <0>;
57 states = <1800000 0x1
58 3300000 0x0>;
59 enable-active-high;
60 };
61
Marek Behúnf835bed2018-04-24 17:21:31 +020062 mdio {
Marek Behún4feafb22018-12-17 16:10:04 +010063 #address-cells = <1>;
64 #size-cells = <0>;
65
Marek Behúnf835bed2018-04-24 17:21:31 +020066 eth_phy1: ethernet-phy@1 {
67 reg = <1>;
68 };
69 };
70};
71
72&comphy {
73 max-lanes = <3>;
74 phy0 {
75 phy-type = <PHY_TYPE_SGMII1>;
76 phy-speed = <PHY_SPEED_3_125G>;
77 };
78
79 phy1 {
80 phy-type = <PHY_TYPE_PEX0>;
Marek Behún4feafb22018-12-17 16:10:04 +010081 phy-speed = <PHY_SPEED_5G>;
Marek Behúnf835bed2018-04-24 17:21:31 +020082 };
83
84 phy2 {
85 phy-type = <PHY_TYPE_USB3_HOST0>;
86 phy-speed = <PHY_SPEED_5G>;
87 };
88};
89
90&eth0 {
91 status = "okay";
92 pinctrl-names = "default";
93 pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
94 phy-mode = "rgmii";
95 phy = <&eth_phy1>;
96};
97
98&i2c0 {
99 pinctrl-names = "default";
100 pinctrl-0 = <&i2c1_pins>;
101 status = "okay";
Marek Behún4feafb22018-12-17 16:10:04 +0100102
103 rtc@6f {
104 compatible = "microchip,mcp7941x";
105 reg = <0x6f>;
106 };
Marek Behúnf835bed2018-04-24 17:21:31 +0200107};
108
109&sdhci1 {
Marek Behúnb78519b2020-04-08 12:02:04 +0200110 wp-inverted;
Marek Behúnf835bed2018-04-24 17:21:31 +0200111 bus-width = <4>;
Marek Behúnb78519b2020-04-08 12:02:04 +0200112 cd-gpios = <&gpionb 10 GPIO_ACTIVE_HIGH>;
113 vqmmc-supply = <&vsdc_reg>;
114 marvell,pad-type = "sd";
Marek Behúnf835bed2018-04-24 17:21:31 +0200115 status = "okay";
116};
117
118&pinctrl_nb {
119 spi_cs1_pins: spi-cs1-pins {
120 groups = "spi_cs1";
121 function = "spi";
122 };
123};
124
Marek Behúnf835bed2018-04-24 17:21:31 +0200125&spi0 {
126 status = "okay";
127 pinctrl-names = "default";
128 pinctrl-0 = <&spi_cs1_pins>;
Marek Behúnf94ec8a2018-08-17 12:59:01 +0200129 assigned-clocks = <&nb_periph_clk 7>;
130 assigned-clock-parents = <&tbg 1>;
131 assigned-clock-rates = <20000000>;
Marek Behúnf835bed2018-04-24 17:21:31 +0200132
133 spi-flash@0 {
134 #address-cells = <1>;
135 #size-cells = <1>;
Neil Armstronga009fa72019-02-10 10:16:20 +0000136 compatible = "st,s25fl064l", "jedec,spi-nor";
Marek Behúnf835bed2018-04-24 17:21:31 +0200137 reg = <0>;
138 spi-max-frequency = <20000000>;
139 m25p,fast-read;
140 };
Marek Behún35b35132018-12-17 16:10:03 +0100141
142 moxtet@1 {
143 #address-cells = <1>;
144 #size-cells = <0>;
145 compatible = "cznic,moxtet";
146 reg = <1>;
147 reset-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>;
148 spi-max-frequency = <1000000>;
149 spi-cpol;
150 spi-cpha;
151 };
Marek Behúnf835bed2018-04-24 17:21:31 +0200152};
153
154&uart0 {
155 pinctrl-names = "default";
156 pinctrl-0 = <&uart1_pins>;
157 status = "okay";
158};
159
160&usb2 {
161 status = "okay";
162};
163
164&usb3 {
165 vbus-supply = <&reg_usb3_vbus>;
166 status = "okay";
167};
Marek Behún9602a8c2018-08-21 12:22:09 +0200168
169&pcie0 {
170 pinctrl-names = "default";
171 pinctrl-0 = <&pcie_pins>;
172 reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>;
173 status = "disabled";
174};