Merge branches 'pm-domains', 'pm-sleep' and 'pm-cpufreq'
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / amlogic / meson-gxbb-vega-s95.dtsi
1 /*
2  * Copyright (c) 2016 Andreas Färber
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This library is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This library is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 #include "meson-gxbb.dtsi"
44
45 / {
46         compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
47
48         aliases {
49                 serial0 = &uart_AO;
50         };
51
52         chosen {
53                 stdout-path = "serial0:115200n8";
54         };
55
56         leds {
57                 compatible = "gpio-leds";
58
59                 blue {
60                         label = "vega-s95:blue:on";
61                         gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
62                         default-state = "on";
63                         panic-indicator;
64                 };
65         };
66
67         usb_vbus: regulator-usb0-vbus {
68                 compatible = "regulator-fixed";
69
70                 regulator-name = "USB0_VBUS";
71
72                 regulator-min-microvolt = <5000000>;
73                 regulator-max-microvolt = <5000000>;
74
75                 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
76                 enable-active-high;
77         };
78
79         vcc_3v3: regulator-vcc_3v3 {
80                 compatible = "regulator-fixed";
81                 regulator-name = "VCC_3V3";
82                 regulator-min-microvolt = <3300000>;
83                 regulator-max-microvolt = <3300000>;
84         };
85
86         vcc_1v8: regulator-vcc_1v8 {
87                 compatible = "regulator-fixed";
88                 regulator-name = "VCC_1V8";
89                 regulator-min-microvolt = <1800000>;
90                 regulator-max-microvolt = <1800000>;
91         };
92
93         emmc_pwrseq: emmc-pwrseq {
94                 compatible = "mmc-pwrseq-emmc";
95                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
96         };
97
98         wifi32k: wifi32k {
99                 compatible = "pwm-clock";
100                 #clock-cells = <0>;
101                 clock-frequency = <32768>;
102                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
103         };
104
105         sdio_pwrseq: sdio-pwrseq {
106                 compatible = "mmc-pwrseq-simple";
107                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>,
108                                 <&gpio GPIOX_20 GPIO_ACTIVE_LOW>;
109                 clocks = <&wifi32k>;
110                 clock-names = "ext_clock";
111         };
112 };
113
114 &uart_AO {
115         status = "okay";
116         pinctrl-0 = <&uart_ao_a_pins>;
117         pinctrl-names = "default";
118 };
119
120 &ir {
121         status = "okay";
122         pinctrl-0 = <&remote_input_ao_pins>;
123         pinctrl-names = "default";
124 };
125
126 &ethmac {
127         status = "okay";
128         pinctrl-0 = <&eth_rgmii_pins>;
129         pinctrl-names = "default";
130
131         phy-handle = <&eth_phy0>;
132         phy-mode = "rgmii";
133
134         amlogic,tx-delay-ns = <2>;
135
136         snps,reset-gpio = <&gpio GPIOZ_14 0>;
137         snps,reset-delays-us = <0 10000 1000000>;
138         snps,reset-active-low;
139
140         mdio {
141                 compatible = "snps,dwmac-mdio";
142                 #address-cells = <1>;
143                 #size-cells = <0>;
144
145                 eth_phy0: ethernet-phy@0 {
146                         /* Realtek RTL8211F (0x001cc916) */
147                         reg = <0>;
148                 };
149         };
150 };
151
152 &usb0_phy {
153         status = "okay";
154         phy-supply = <&usb_vbus>;
155 };
156
157 &usb1_phy {
158         status = "okay";
159 };
160
161 &usb0 {
162         status = "okay";
163 };
164
165 &usb1 {
166         status = "okay";
167 };
168
169 /* Wireless SDIO Module */
170 &sd_emmc_a {
171         status = "okay";
172         pinctrl-0 = <&sdio_pins &sdio_irq_pins>;
173         pinctrl-names = "default";
174         #address-cells = <1>;
175         #size-cells = <0>;
176
177         bus-width = <4>;
178         cap-sd-highspeed;
179         max-frequency = <100000000>;
180
181         non-removable;
182         disable-wp;
183
184         mmc-pwrseq = <&sdio_pwrseq>;
185
186         vmmc-supply = <&vcc_3v3>;
187         vqmmc-supply = <&vcc_1v8>;
188
189         brcmf: bcrmf@1 {
190                 reg = <1>;
191                 compatible = "brcm,bcm4329-fmac";
192         };
193 };
194
195 /* SD card */
196 &sd_emmc_b {
197         status = "okay";
198         pinctrl-0 = <&sdcard_pins>;
199         pinctrl-names = "default";
200
201         bus-width = <4>;
202         cap-sd-highspeed;
203         max-frequency = <100000000>;
204         disable-wp;
205
206         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
207         cd-inverted;
208
209         vmmc-supply = <&vcc_3v3>;
210 };
211
212 /* eMMC */
213 &sd_emmc_c {
214         status = "okay";
215         pinctrl-0 = <&emmc_pins>;
216         pinctrl-names = "default";
217
218         bus-width = <8>;
219         cap-sd-highspeed;
220         cap-mmc-highspeed;
221         max-frequency = <200000000>;
222         non-removable;
223         disable-wp;
224         mmc-ddr-1_8v;
225         mmc-hs200-1_8v;
226
227         mmc-pwrseq = <&emmc_pwrseq>;
228         vmmc-supply = <&vcc_3v3>;
229         vmmcq-sumpply = <&vcc_1v8>;
230 };
231
232 &pwm_ef {
233         status = "okay";
234         pinctrl-0 = <&pwm_e_pins>;
235         pinctrl-names = "default";
236         clocks = <&clkc CLKID_FCLK_DIV4>;
237         clock-names = "clkin0";
238 };