GNU Linux-libre 4.14.266-gnu1
[releases.git] / arch / arm64 / boot / dts / marvell / armada-3720-espressobin.dts
1 /*
2  * Device Tree file for Globalscale Marvell ESPRESSOBin Board
3  * Copyright (C) 2016 Marvell
4  *
5  * Romain Perier <romain.perier@free-electrons.com>
6  *
7  * This file is dual-licensed: you can use it either under the terms
8  * of the GPL or the X11 license, at your option. Note that this dual
9  * licensing only applies to this file, and not this project as a
10  * whole.
11  *
12  *  a) This file is free software; you can redistribute it and/or
13  *     modify it under the terms of the GNU General Public License as
14  *     published by the Free Software Foundation; either version 2 of the
15  *     License, or (at your option) any later version.
16  *
17  *     This file is distributed in the hope that it will be useful,
18  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  *     GNU General Public License for more details.
21  *
22  * Or, alternatively,
23  *
24  *  b) Permission is hereby granted, free of charge, to any person
25  *     obtaining a copy of this software and associated documentation
26  *     files (the "Software"), to deal in the Software without
27  *     restriction, including without limitation the rights to use,
28  *     copy, modify, merge, publish, distribute, sublicense, and/or
29  *     sell copies of the Software, and to permit persons to whom the
30  *     Software is furnished to do so, subject to the following
31  *     conditions:
32  *
33  *     The above copyright notice and this permission notice shall be
34  *     included in all copies or substantial portions of the Software.
35  *
36  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43  *     OTHER DEALINGS IN THE SOFTWARE.
44  */
45
46 /dts-v1/;
47
48 #include <dt-bindings/gpio/gpio.h>
49 #include "armada-372x.dtsi"
50
51 / {
52         model = "Globalscale Marvell ESPRESSOBin Board";
53         compatible = "globalscale,espressobin", "marvell,armada3720", "marvell,armada3710";
54
55         aliases {
56                 ethernet0 = &eth0;
57         };
58
59         chosen {
60                 stdout-path = "serial0:115200n8";
61         };
62
63         memory@0 {
64                 device_type = "memory";
65                 reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
66         };
67
68         vcc_sd_reg1: regulator {
69                 compatible = "regulator-gpio";
70                 regulator-name = "vcc_sd1";
71                 regulator-min-microvolt = <1800000>;
72                 regulator-max-microvolt = <3300000>;
73                 regulator-boot-on;
74
75                 gpios = <&gpionb 4 GPIO_ACTIVE_HIGH>;
76                 gpios-states = <0>;
77                 states = <1800000 0x1
78                           3300000 0x0>;
79                 enable-active-high;
80         };
81 };
82
83 /* J9 */
84 &pcie0 {
85         pinctrl-names = "default";
86         pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
87         reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
88         status = "okay";
89 };
90
91 /* J6 */
92 &sata {
93         status = "okay";
94 };
95
96 /* J1 */
97 &sdhci1 {
98         wp-inverted;
99         bus-width = <4>;
100         cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
101         marvell,pad-type = "sd";
102         vqmmc-supply = <&vcc_sd_reg1>;
103         status = "okay";
104 };
105
106 /* Exported on the micro USB connector J5 through an FTDI */
107 &uart0 {
108         status = "okay";
109 };
110
111 /* J7 */
112 &usb3 {
113         status = "okay";
114 };
115
116 /* J8 */
117 &usb2 {
118         status = "okay";
119 };
120
121 &mdio {
122         switch0: switch0@1 {
123                 compatible = "marvell,mv88e6085";
124                 #address-cells = <1>;
125                 #size-cells = <0>;
126                 reg = <1>;
127
128                 dsa,member = <0 0>;
129
130                 ports {
131                         #address-cells = <1>;
132                         #size-cells = <0>;
133
134                         port@0 {
135                                 reg = <0>;
136                                 label = "cpu";
137                                 ethernet = <&eth0>;
138                         };
139
140                         port@1 {
141                                 reg = <1>;
142                                 label = "wan";
143                                 phy-handle = <&switch0phy0>;
144                         };
145
146                         port@2 {
147                                 reg = <2>;
148                                 label = "lan0";
149                                 phy-handle = <&switch0phy1>;
150                         };
151
152                         port@3 {
153                                 reg = <3>;
154                                 label = "lan1";
155                                 phy-handle = <&switch0phy2>;
156                         };
157
158                 };
159
160                 mdio {
161                         #address-cells = <1>;
162                         #size-cells = <0>;
163
164                         switch0phy0: switch0phy0@11 {
165                                 reg = <0x11>;
166                         };
167                         switch0phy1: switch0phy1@12 {
168                                 reg = <0x12>;
169                         };
170                         switch0phy2: switch0phy2@13 {
171                                 reg = <0x13>;
172                         };
173                 };
174         };
175 };
176
177 &eth0 {
178         phy-mode = "rgmii-id";
179         status = "okay";
180
181         fixed-link {
182                 speed = <1000>;
183                 full-duplex;
184         };
185 };