GNU Linux-libre 4.14.251-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         status = "okay";
86 };
87
88 /* J6 */
89 &sata {
90         status = "okay";
91 };
92
93 /* J1 */
94 &sdhci1 {
95         wp-inverted;
96         bus-width = <4>;
97         cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>;
98         marvell,pad-type = "sd";
99         vqmmc-supply = <&vcc_sd_reg1>;
100         status = "okay";
101 };
102
103 /* Exported on the micro USB connector J5 through an FTDI */
104 &uart0 {
105         status = "okay";
106 };
107
108 /* J7 */
109 &usb3 {
110         status = "okay";
111 };
112
113 /* J8 */
114 &usb2 {
115         status = "okay";
116 };
117
118 &mdio {
119         switch0: switch0@1 {
120                 compatible = "marvell,mv88e6085";
121                 #address-cells = <1>;
122                 #size-cells = <0>;
123                 reg = <1>;
124
125                 dsa,member = <0 0>;
126
127                 ports {
128                         #address-cells = <1>;
129                         #size-cells = <0>;
130
131                         port@0 {
132                                 reg = <0>;
133                                 label = "cpu";
134                                 ethernet = <&eth0>;
135                         };
136
137                         port@1 {
138                                 reg = <1>;
139                                 label = "wan";
140                                 phy-handle = <&switch0phy0>;
141                         };
142
143                         port@2 {
144                                 reg = <2>;
145                                 label = "lan0";
146                                 phy-handle = <&switch0phy1>;
147                         };
148
149                         port@3 {
150                                 reg = <3>;
151                                 label = "lan1";
152                                 phy-handle = <&switch0phy2>;
153                         };
154
155                 };
156
157                 mdio {
158                         #address-cells = <1>;
159                         #size-cells = <0>;
160
161                         switch0phy0: switch0phy0@11 {
162                                 reg = <0x11>;
163                         };
164                         switch0phy1: switch0phy1@12 {
165                                 reg = <0x12>;
166                         };
167                         switch0phy2: switch0phy2@13 {
168                                 reg = <0x13>;
169                         };
170                 };
171         };
172 };
173
174 &eth0 {
175         phy-mode = "rgmii-id";
176         status = "okay";
177
178         fixed-link {
179                 speed = <1000>;
180                 full-duplex;
181         };
182 };