Merge branch 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / amlogic / meson-axg-s400.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
4  */
5
6 /dts-v1/;
7
8 #include "meson-axg.dtsi"
9 #include <dt-bindings/input/input.h>
10
11 / {
12         compatible = "amlogic,s400", "amlogic,a113d", "amlogic,meson-axg";
13         model = "Amlogic Meson AXG S400 Development Board";
14
15         adc_keys {
16                 compatible = "adc-keys";
17                 io-channels = <&saradc 0>;
18                 io-channel-names = "buttons";
19                 keyup-threshold-microvolt = <1800000>;
20
21                 button-next {
22                         label = "Next";
23                         linux,code = <KEY_NEXT>;
24                         press-threshold-microvolt = <1116000>; /* 62% */
25                 };
26
27                 button-prev {
28                         label = "Previous";
29                         linux,code = <KEY_PREVIOUS>;
30                         press-threshold-microvolt = <900000>; /* 50% */
31                 };
32
33                 button-wifi {
34                         label = "Wifi";
35                         linux,code = <KEY_WLAN>;
36                         press-threshold-microvolt = <684000>; /* 38% */
37                 };
38
39                 button-up {
40                         label = "Volume Up";
41                         linux,code = <KEY_VOLUMEUP>;
42                         press-threshold-microvolt = <468000>; /* 26% */
43                 };
44
45                 button-down {
46                         label = "Volume Down";
47                         linux,code = <KEY_VOLUMEDOWN>;
48                         press-threshold-microvolt = <252000>; /* 14% */
49                 };
50
51                 button-voice {
52                         label = "Voice";
53                         linux,code = <KEY_VOICECOMMAND>;
54                         press-threshold-microvolt = <0>; /* 0% */
55                 };
56         };
57
58         aliases {
59                 serial0 = &uart_AO;
60                 serial1 = &uart_A;
61         };
62
63         main_12v: regulator-main_12v {
64                 compatible = "regulator-fixed";
65                 regulator-name = "12V";
66                 regulator-min-microvolt = <12000000>;
67                 regulator-max-microvolt = <12000000>;
68                 regulator-always-on;
69         };
70
71         vddio_boot: regulator-vddio_boot {
72                 compatible = "regulator-fixed";
73                 regulator-name = "VDDIO_BOOT";
74                 regulator-min-microvolt = <1800000>;
75                 regulator-max-microvolt = <1800000>;
76                 vin-supply = <&vddao_3v3>;
77                 regulator-always-on;
78         };
79
80         vddao_3v3: regulator-vddao_3v3 {
81                 compatible = "regulator-fixed";
82                 regulator-name = "VDDAO_3V3";
83                 regulator-min-microvolt = <3300000>;
84                 regulator-max-microvolt = <3300000>;
85                 vin-supply = <&main_12v>;
86                 regulator-always-on;
87         };
88
89         vddio_ao18: regulator-vddio_ao18 {
90                 compatible = "regulator-fixed";
91                 regulator-name = "VDDIO_AO18";
92                 regulator-min-microvolt = <1800000>;
93                 regulator-max-microvolt = <1800000>;
94                 vin-supply = <&vddao_3v3>;
95                 regulator-always-on;
96         };
97
98         vcc_3v3: regulator-vcc_3v3 {
99                 compatible = "regulator-fixed";
100                 regulator-name = "VCC_3V3";
101                 regulator-min-microvolt = <3300000>;
102                 regulator-max-microvolt = <3300000>;
103                 vin-supply = <&vddao_3v3>;
104                 regulator-always-on;
105         };
106
107         vcc_5v: regulator-vcc_5v {
108                 compatible = "regulator-fixed";
109                 regulator-name = "VCC5V";
110                 regulator-min-microvolt = <5000000>;
111                 regulator-max-microvolt = <5000000>;
112                 vin-supply = <&main_12v>;
113
114                 gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
115                 enable-active-high;
116         };
117
118         usb_pwr: regulator-usb_pwr {
119                 compatible = "regulator-fixed";
120                 regulator-name = "USB_PWR";
121                 regulator-min-microvolt = <5000000>;
122                 regulator-max-microvolt = <5000000>;
123                 vin-supply = <&vcc_5v>;
124
125                 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
126                 enable-active-high;
127         };
128
129         emmc_pwrseq: emmc-pwrseq {
130                 compatible = "mmc-pwrseq-emmc";
131                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
132         };
133
134         sdio_pwrseq: sdio-pwrseq {
135                 compatible = "mmc-pwrseq-simple";
136                 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
137                 clocks = <&wifi32k>;
138                 clock-names = "ext_clock";
139         };
140
141         wifi32k: wifi32k {
142                 compatible = "pwm-clock";
143                 #clock-cells = <0>;
144                 clock-frequency = <32768>;
145                 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
146         };
147
148         speaker-leds {
149                 compatible = "gpio-leds";
150
151                 aled1 {
152                         label = "speaker:aled1";
153                         gpios = <&gpio_speaker 7 0>;
154                 };
155
156                 aled2 {
157                         label = "speaker:aled2";
158                         gpios = <&gpio_speaker 6 0>;
159                 };
160
161                 aled3 {
162                         label = "speaker:aled3";
163                         gpios = <&gpio_speaker 5 0>;
164                 };
165
166                 aled4 {
167                         label = "speaker:aled4";
168                         gpios = <&gpio_speaker 4 0>;
169                 };
170
171                 aled5 {
172                         label = "speaker:aled5";
173                         gpios = <&gpio_speaker 3 0>;
174                 };
175
176                 aled6 {
177                         label = "speaker:aled6";
178                         gpios = <&gpio_speaker 2 0>;
179                 };
180         };
181
182         linein: audio-codec@0 {
183                 #sound-dai-cells = <0>;
184                 compatible = "everest,es7241";
185                 VDDA-supply = <&vcc_3v3>;
186                 VDDP-supply = <&vcc_3v3>;
187                 VDDD-supply = <&vcc_3v3>;
188                 status = "okay";
189                 sound-name-prefix = "Linein";
190         };
191
192         lineout: audio-codec@1 {
193                 #sound-dai-cells = <0>;
194                 compatible = "everest,es7154";
195                 VDD-supply = <&vcc_3v3>;
196                 PVDD-supply = <&vcc_5v>;
197                 status = "okay";
198                 sound-name-prefix = "Lineout";
199         };
200
201         spdif_dit: audio-codec@2 {
202                 #sound-dai-cells = <0>;
203                 compatible = "linux,spdif-dit";
204                 status = "okay";
205                 sound-name-prefix = "DIT";
206         };
207 };
208
209 &ethmac {
210         status = "okay";
211         pinctrl-0 = <&eth_rgmii_y_pins>;
212         pinctrl-names = "default";
213         phy-handle = <&eth_phy0>;
214         phy-mode = "rgmii";
215
216         mdio {
217                 compatible = "snps,dwmac-mdio";
218                 #address-cells = <1>;
219                 #size-cells = <0>;
220
221                 eth_phy0: ethernet-phy@0 {
222                         /* Realtek RTL8211F (0x001cc916) */
223                         reg = <0>;
224                         eee-broken-1000t;
225                 };
226         };
227 };
228
229 &uart_A {
230         status = "okay";
231         pinctrl-0 = <&uart_a_pins>;
232         pinctrl-names = "default";
233 };
234
235 &uart_AO {
236         status = "okay";
237         pinctrl-0 = <&uart_ao_a_pins>;
238         pinctrl-names = "default";
239 };
240
241 &ir {
242         status = "okay";
243         pinctrl-0 = <&remote_input_ao_pins>;
244         pinctrl-names = "default";
245 };
246
247 &i2c1 {
248         status = "okay";
249         pinctrl-0 = <&i2c1_z_pins>;
250         pinctrl-names = "default";
251
252         speaker_amp1: audio-codec@1b {
253                 compatible = "ti,tas5707";
254                 reg = <0x1b>;
255                 reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
256                 #sound-dai-cells = <0>;
257                 AVDD-supply = <&vcc_3v3>;
258                 DVDD-supply = <&vcc_3v3>;
259                 PVDD_A-supply = <&main_12v>;
260                 PVDD_B-supply = <&main_12v>;
261                 PVDD_C-supply = <&main_12v>;
262                 PVDD_D-supply = <&main_12v>;
263         };
264 };
265
266 &i2c_AO {
267         status = "okay";
268         pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>;
269         pinctrl-names = "default";
270
271         gpio_speaker: gpio-controller@1f {
272                 compatible = "nxp,pca9557";
273                 reg = <0x1f>;
274                 gpio-controller;
275                 #gpio-cells = <2>;
276                 vcc-supply = <&vddao_3v3>;
277         };
278 };
279
280 &pwm_ab {
281         status = "okay";
282         pinctrl-0 = <&pwm_a_x20_pins>;
283         pinctrl-names = "default";
284 };
285
286 /* emmc storage */
287 &sd_emmc_c {
288         status = "okay";
289         pinctrl-0 = <&emmc_pins>;
290         pinctrl-1 = <&emmc_clk_gate_pins>;
291         pinctrl-names = "default", "clk-gate";
292
293         bus-width = <8>;
294         cap-sd-highspeed;
295         cap-mmc-highspeed;
296         max-frequency = <180000000>;
297         non-removable;
298         disable-wp;
299         mmc-ddr-1_8v;
300         mmc-hs200-1_8v;
301
302         vmmc-supply = <&vcc_3v3>;
303         vqmmc-supply = <&vddio_boot>;
304 };
305
306 /* wifi module */
307 &sd_emmc_b {
308         status = "okay";
309         #address-cells = <1>;
310         #size-cells = <0>;
311
312         pinctrl-0 = <&sdio_pins>;
313         pinctrl-1 = <&sdio_clk_gate_pins>;
314         pinctrl-names = "default", "clk-gate";
315
316         bus-width = <4>;
317         cap-sd-highspeed;
318         max-frequency = <100000000>;
319         non-removable;
320         disable-wp;
321
322         mmc-pwrseq = <&sdio_pwrseq>;
323
324         vmmc-supply = <&vddao_3v3>;
325         vqmmc-supply = <&vddio_boot>;
326
327         brcmf: wifi@1 {
328                 reg = <1>;
329                 compatible = "brcm,bcm4329-fmac";
330         };
331 };
332
333 &saradc {
334         status = "okay";
335         vref-supply = <&vddio_ao18>;
336 };