WIP FPC-III support
[linux/fpc-iii.git] / arch / arm64 / boot / dts / amlogic / meson-axg-s400.dts
blob359589d1dfa935686d0397b002069bf54ddc89b8
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
4  */
6 /dts-v1/;
8 #include "meson-axg.dtsi"
9 #include <dt-bindings/input/input.h>
11 / {
12         compatible = "amlogic,s400", "amlogic,a113d", "amlogic,meson-axg";
13         model = "Amlogic Meson AXG S400 Development Board";
15         adc_keys {
16                 compatible = "adc-keys";
17                 io-channels = <&saradc 0>;
18                 io-channel-names = "buttons";
19                 keyup-threshold-microvolt = <1800000>;
21                 button-next {
22                         label = "Next";
23                         linux,code = <KEY_NEXT>;
24                         press-threshold-microvolt = <1116000>; /* 62% */
25                 };
27                 button-prev {
28                         label = "Previous";
29                         linux,code = <KEY_PREVIOUS>;
30                         press-threshold-microvolt = <900000>; /* 50% */
31                 };
33                 button-wifi {
34                         label = "Wifi";
35                         linux,code = <KEY_WLAN>;
36                         press-threshold-microvolt = <684000>; /* 38% */
37                 };
39                 button-up {
40                         label = "Volume Up";
41                         linux,code = <KEY_VOLUMEUP>;
42                         press-threshold-microvolt = <468000>; /* 26% */
43                 };
45                 button-down {
46                         label = "Volume Down";
47                         linux,code = <KEY_VOLUMEDOWN>;
48                         press-threshold-microvolt = <252000>; /* 14% */
49                 };
51                 button-voice {
52                         label = "Voice";
53                         linux,code = <KEY_VOICECOMMAND>;
54                         press-threshold-microvolt = <0>; /* 0% */
55                 };
56         };
58         aliases {
59                 serial0 = &uart_AO;
60                 serial1 = &uart_A;
61         };
63         linein: audio-codec-0 {
64                 #sound-dai-cells = <0>;
65                 compatible = "everest,es7241";
66                 VDDA-supply = <&vcc_3v3>;
67                 VDDP-supply = <&vcc_3v3>;
68                 VDDD-supply = <&vcc_3v3>;
69                 status = "okay";
70                 sound-name-prefix = "Linein";
71         };
73         lineout: audio-codec-1 {
74                 #sound-dai-cells = <0>;
75                 compatible = "everest,es7154";
76                 VDD-supply = <&vcc_3v3>;
77                 PVDD-supply = <&vcc_5v>;
78                 status = "okay";
79                 sound-name-prefix = "Lineout";
80         };
82         spdif_dit: audio-codec-2 {
83                 #sound-dai-cells = <0>;
84                 compatible = "linux,spdif-dit";
85                 status = "okay";
86                 sound-name-prefix = "DIT";
87         };
89         dmics: audio-codec-3 {
90                 #sound-dai-cells = <0>;
91                 compatible = "dmic-codec";
92                 num-channels = <7>;
93                 wakeup-delay-ms = <50>;
94                 status = "okay";
95                 sound-name-prefix = "MIC";
96         };
98         spdif_dir: audio-codec-4 {
99                 #sound-dai-cells = <0>;
100                 compatible = "linux,spdif-dir";
101                 status = "okay";
102                 sound-name-prefix = "DIR";
103         };
105         emmc_pwrseq: emmc-pwrseq {
106                 compatible = "mmc-pwrseq-emmc";
107                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
108         };
110         chosen {
111                 stdout-path = "serial0:115200n8";
112         };
114         memory@0 {
115                 device_type = "memory";
116                 reg = <0x0 0x0 0x0 0x40000000>;
117         };
119         main_12v: regulator-main_12v {
120                 compatible = "regulator-fixed";
121                 regulator-name = "12V";
122                 regulator-min-microvolt = <12000000>;
123                 regulator-max-microvolt = <12000000>;
124                 regulator-always-on;
125         };
127         vcc_3v3: regulator-vcc_3v3 {
128                 compatible = "regulator-fixed";
129                 regulator-name = "VCC_3V3";
130                 regulator-min-microvolt = <3300000>;
131                 regulator-max-microvolt = <3300000>;
132                 vin-supply = <&vddao_3v3>;
133                 regulator-always-on;
134         };
136         vcc_5v: regulator-vcc_5v {
137                 compatible = "regulator-fixed";
138                 regulator-name = "VCC5V";
139                 regulator-min-microvolt = <5000000>;
140                 regulator-max-microvolt = <5000000>;
141                 vin-supply = <&main_12v>;
143                 gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
144                 enable-active-high;
145         };
147         vddao_3v3: regulator-vddao_3v3 {
148                 compatible = "regulator-fixed";
149                 regulator-name = "VDDAO_3V3";
150                 regulator-min-microvolt = <3300000>;
151                 regulator-max-microvolt = <3300000>;
152                 vin-supply = <&main_12v>;
153                 regulator-always-on;
154         };
156         vddio_ao18: regulator-vddio_ao18 {
157                 compatible = "regulator-fixed";
158                 regulator-name = "VDDIO_AO18";
159                 regulator-min-microvolt = <1800000>;
160                 regulator-max-microvolt = <1800000>;
161                 vin-supply = <&vddao_3v3>;
162                 regulator-always-on;
163         };
165         vddio_boot: regulator-vddio_boot {
166                 compatible = "regulator-fixed";
167                 regulator-name = "VDDIO_BOOT";
168                 regulator-min-microvolt = <1800000>;
169                 regulator-max-microvolt = <1800000>;
170                 vin-supply = <&vddao_3v3>;
171                 regulator-always-on;
172         };
174         usb_pwr: regulator-usb_pwr {
175                 compatible = "regulator-fixed";
176                 regulator-name = "USB_PWR";
177                 regulator-min-microvolt = <5000000>;
178                 regulator-max-microvolt = <5000000>;
179                 vin-supply = <&vcc_5v>;
181                 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
182                 enable-active-high;
183         };
185         sdio_pwrseq: sdio-pwrseq {
186                 compatible = "mmc-pwrseq-simple";
187                 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
188                 clocks = <&wifi32k>;
189                 clock-names = "ext_clock";
190         };
192         speaker-leds {
193                 compatible = "gpio-leds";
195                 aled1 {
196                         label = "speaker:aled1";
197                         gpios = <&gpio_speaker 7 0>;
198                 };
200                 aled2 {
201                         label = "speaker:aled2";
202                         gpios = <&gpio_speaker 6 0>;
203                 };
205                 aled3 {
206                         label = "speaker:aled3";
207                         gpios = <&gpio_speaker 5 0>;
208                 };
210                 aled4 {
211                         label = "speaker:aled4";
212                         gpios = <&gpio_speaker 4 0>;
213                 };
215                 aled5 {
216                         label = "speaker:aled5";
217                         gpios = <&gpio_speaker 3 0>;
218                 };
220                 aled6 {
221                         label = "speaker:aled6";
222                         gpios = <&gpio_speaker 2 0>;
223                 };
224         };
226         sound {
227                 compatible = "amlogic,axg-sound-card";
228                 model = "AXG-S400";
229                 audio-aux-devs = <&tdmin_a>, <&tdmin_b>,  <&tdmin_c>,
230                                  <&tdmin_lb>, <&tdmout_c>;
231                 audio-widgets = "Line", "Lineout",
232                                 "Line", "Linein",
233                                 "Speaker", "Speaker1 Left",
234                                 "Speaker", "Speaker1 Right";
235                 audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
236                                 "SPDIFOUT IN 0", "FRDDR_A OUT 3",
237                                 "TDMOUT_C IN 1", "FRDDR_B OUT 2",
238                                 "SPDIFOUT IN 1", "FRDDR_B OUT 3",
239                                 "TDMOUT_C IN 2", "FRDDR_C OUT 2",
240                                 "SPDIFOUT IN 2", "FRDDR_C OUT 3",
241                                 "TDM_C Playback", "TDMOUT_C OUT",
242                                 "TDMIN_A IN 2", "TDM_C Capture",
243                                 "TDMIN_A IN 5", "TDM_C Loopback",
244                                 "TDMIN_B IN 2", "TDM_C Capture",
245                                 "TDMIN_B IN 5", "TDM_C Loopback",
246                                 "TDMIN_C IN 2", "TDM_C Capture",
247                                 "TDMIN_C IN 5", "TDM_C Loopback",
248                                 "TDMIN_LB IN 2", "TDM_C Loopback",
249                                 "TDMIN_LB IN 5", "TDM_C Capture",
250                                 "TODDR_A IN 0", "TDMIN_A OUT",
251                                 "TODDR_B IN 0", "TDMIN_A OUT",
252                                 "TODDR_C IN 0", "TDMIN_A OUT",
253                                 "TODDR_A IN 1", "TDMIN_B OUT",
254                                 "TODDR_B IN 1", "TDMIN_B OUT",
255                                 "TODDR_C IN 1", "TDMIN_B OUT",
256                                 "TODDR_A IN 2", "TDMIN_C OUT",
257                                 "TODDR_B IN 2", "TDMIN_C OUT",
258                                 "TODDR_C IN 2", "TDMIN_C OUT",
259                                 "TODDR_A IN 3", "SPDIFIN Capture",
260                                 "TODDR_B IN 3", "SPDIFIN Capture",
261                                 "TODDR_C IN 3", "SPDIFIN Capture",
262                                 "TODDR_A IN 4", "PDM Capture",
263                                 "TODDR_B IN 4", "PDM Capture",
264                                 "TODDR_C IN 4", "PDM Capture",
265                                 "TODDR_A IN 6", "TDMIN_LB OUT",
266                                 "TODDR_B IN 6", "TDMIN_LB OUT",
267                                 "TODDR_C IN 6", "TDMIN_LB OUT",
268                                 "Lineout", "Lineout AOUTL",
269                                 "Lineout", "Lineout AOUTR",
270                                 "Speaker1 Left", "SPK1 OUT_A",
271                                 "Speaker1 Left", "SPK1 OUT_B",
272                                 "Speaker1 Right", "SPK1 OUT_C",
273                                 "Speaker1 Right", "SPK1 OUT_D",
274                                 "Linein AINL", "Linein",
275                                 "Linein AINR", "Linein";
276                 assigned-clocks = <&clkc CLKID_HIFI_PLL>,
277                                   <&clkc CLKID_MPLL0>,
278                                   <&clkc CLKID_MPLL1>;
279                 assigned-clock-parents = <0>, <0>, <0>;
280                 assigned-clock-rates = <589824000>,
281                                        <270950400>,
282                                        <393216000>;
283                 status = "okay";
285                 dai-link-0 {
286                         sound-dai = <&frddr_a>;
287                 };
289                 dai-link-1 {
290                         sound-dai = <&frddr_b>;
291                 };
293                 dai-link-2 {
294                         sound-dai = <&frddr_c>;
295                 };
297                 dai-link-3 {
298                         sound-dai = <&toddr_a>;
299                 };
301                 dai-link-4 {
302                         sound-dai = <&toddr_b>;
303                 };
305                 dai-link-5 {
306                         sound-dai = <&toddr_c>;
307                 };
309                 dai-link-6 {
310                         sound-dai = <&tdmif_c>;
311                         dai-format = "i2s";
312                         dai-tdm-slot-tx-mask-2 = <1 1>;
313                         dai-tdm-slot-rx-mask-1 = <1 1>;
314                         mclk-fs = <256>;
316                         codec-0 {
317                                 sound-dai = <&lineout>;
318                         };
320                         codec-1 {
321                                 sound-dai = <&speaker_amp1>;
322                         };
324                         codec-2 {
325                                 sound-dai = <&linein>;
326                         };
328                 };
330                 dai-link-7 {
331                         sound-dai = <&spdifout>;
333                         codec {
334                                 sound-dai = <&spdif_dit>;
335                         };
336                 };
338                 dai-link-8 {
339                         sound-dai = <&spdifin>;
341                         codec {
342                                 sound-dai = <&spdif_dir>;
343                         };
344                 };
346                 dai-link-9 {
347                         sound-dai = <&pdm>;
349                         codec {
350                                 sound-dai = <&dmics>;
351                         };
352                 };
353         };
355         wifi32k: wifi32k {
356                 compatible = "pwm-clock";
357                 #clock-cells = <0>;
358                 clock-frequency = <32768>;
359                 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
360         };
363 &ethmac {
364         status = "okay";
365         pinctrl-0 = <&eth_rgmii_y_pins>;
366         pinctrl-names = "default";
367         phy-handle = <&eth_phy0>;
368         phy-mode = "rgmii";
370         mdio {
371                 compatible = "snps,dwmac-mdio";
372                 #address-cells = <1>;
373                 #size-cells = <0>;
375                 eth_phy0: ethernet-phy@0 {
376                         /* Realtek RTL8211F (0x001cc916) */
377                         reg = <0>;
378                         interrupt-parent = <&gpio_intc>;
379                         interrupts = <98 IRQ_TYPE_LEVEL_LOW>;
380                         eee-broken-1000t;
381                 };
382         };
385 &frddr_a {
386         status = "okay";
389 &frddr_b {
390         status = "okay";
393 &frddr_c {
394         status = "okay";
397 &ir {
398         status = "okay";
399         pinctrl-0 = <&remote_input_ao_pins>;
400         pinctrl-names = "default";
403 &i2c1 {
404         status = "okay";
405         pinctrl-0 = <&i2c1_z_pins>;
406         pinctrl-names = "default";
408         speaker_amp1: audio-codec@1b {
409                 compatible = "ti,tas5707";
410                 reg = <0x1b>;
411                 reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
412                 #sound-dai-cells = <0>;
413                 AVDD-supply = <&vcc_3v3>;
414                 DVDD-supply = <&vcc_3v3>;
415                 PVDD_A-supply = <&main_12v>;
416                 PVDD_B-supply = <&main_12v>;
417                 PVDD_C-supply = <&main_12v>;
418                 PVDD_D-supply = <&main_12v>;
419                 sound-name-prefix = "SPK1";
420         };
423 &i2c_AO {
424         status = "okay";
425         pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>;
426         pinctrl-names = "default";
428         gpio_speaker: gpio-controller@1f {
429                 compatible = "nxp,pca9557";
430                 reg = <0x1f>;
431                 gpio-controller;
432                 #gpio-cells = <2>;
433                 vcc-supply = <&vddao_3v3>;
434         };
437 &pdm {
438         pinctrl-0 = <&pdm_dclk_a14_pins>, <&pdm_din0_pins>,
439                     <&pdm_din1_pins>, <&pdm_din2_pins>, <&pdm_din3_pins>;
440         pinctrl-names = "default";
441         status = "okay";
444 &pcieA {
445         reset-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>;
446         status = "okay";
449 &pcieB {
450         reset-gpios = <&gpio GPIOZ_10 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
451         status = "okay";
454 &pwm_ab {
455         status = "okay";
456         pinctrl-0 = <&pwm_a_x20_pins>;
457         pinctrl-names = "default";
460 &saradc {
461         status = "okay";
462         vref-supply = <&vddio_ao18>;
465 /* wifi module */
466 &sd_emmc_b {
467         status = "okay";
468         #address-cells = <1>;
469         #size-cells = <0>;
471         pinctrl-0 = <&sdio_pins>;
472         pinctrl-1 = <&sdio_clk_gate_pins>;
473         pinctrl-names = "default", "clk-gate";
475         bus-width = <4>;
476         cap-sd-highspeed;
477         sd-uhs-sdr104;
478         max-frequency = <200000000>;
479         non-removable;
480         disable-wp;
482         mmc-pwrseq = <&sdio_pwrseq>;
484         vmmc-supply = <&vddao_3v3>;
485         vqmmc-supply = <&vddio_boot>;
487         brcmf: wifi@1 {
488                 reg = <1>;
489                 compatible = "brcm,bcm4329-fmac";
490         };
493 /* emmc storage */
494 &sd_emmc_c {
495         status = "okay";
496         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
497         pinctrl-1 = <&emmc_clk_gate_pins>;
498         pinctrl-names = "default", "clk-gate";
500         bus-width = <8>;
501         cap-mmc-highspeed;
502         max-frequency = <200000000>;
503         non-removable;
504         disable-wp;
505         mmc-ddr-1_8v;
506         mmc-hs200-1_8v;
508         mmc-pwrseq = <&emmc_pwrseq>;
510         vmmc-supply = <&vcc_3v3>;
511         vqmmc-supply = <&vddio_boot>;
514 &spdifin {
515         pinctrl-0 = <&spdif_in_a19_pins>;
516         pinctrl-names = "default";
517         status = "okay";
520 &spdifout {
521         pinctrl-0 = <&spdif_out_a20_pins>;
522         pinctrl-names = "default";
523         status = "okay";
526 &tdmif_a {
527         pinctrl-0 = <&tdma_sclk_pins>, <&tdma_fs_pins>,
528                     <&tdma_din0_pins>, <&tdma_dout0_x15_pins>;
529         pinctrl-names = "default";
530         status = "okay";
533 &tdmif_b {
534         pinctrl-0 = <&tdmb_sclk_pins>, <&tdmb_fs_pins>,
535                     <&tdmb_din3_pins>, <&mclk_b_pins>;
536         pinctrl-names = "default";
537         status = "okay";
540 &tdmif_c {
541         pinctrl-0 = <&tdmc_sclk_pins>, <&tdmc_fs_pins>,
542                     <&tdmc_din1_pins>, <&tdmc_dout2_pins>,
543                     <&mclk_c_pins>;
544         pinctrl-names = "default";
545         status = "okay";
548 &tdmin_a {
549         status = "okay";
552 &tdmin_b {
553         status = "okay";
556 &tdmin_c {
557         status = "okay";
560 &tdmin_lb {
561         status = "okay";
564 &tdmout_c {
565         status = "okay";
568 &toddr_a {
569         status = "okay";
572 &toddr_b {
573         status = "okay";
576 &toddr_c {
577         status = "okay";
580 &uart_A {
581         status = "okay";
582         pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
583         pinctrl-names = "default";
584         uart-has-rtscts;
586         bluetooth {
587                 compatible = "brcm,bcm43438-bt";
588                 shutdown-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;
589         };
592 &uart_AO {
593         status = "okay";
594         pinctrl-0 = <&uart_ao_a_pins>;
595         pinctrl-names = "default";
598 &usb {
599         status = "okay";
600         dr_mode = "otg";
601         vbus-supply = <&usb_pwr>;