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
10/ {
11	compatible = "amlogic,s400", "amlogic,a113d", "amlogic,meson-axg";
12	model = "Amlogic Meson AXG S400 Development Board";
13
14	aliases {
15		serial0 = &uart_AO;
16		serial1 = &uart_A;
17	};
18
19	main_12v: regulator-main_12v {
20		compatible = "regulator-fixed";
21		regulator-name = "12V";
22		regulator-min-microvolt = <12000000>;
23		regulator-max-microvolt = <12000000>;
24	};
25
26	vddio_boot: regulator-vddio_boot {
27		compatible = "regulator-fixed";
28		regulator-name = "VDDIO_BOOT";
29		regulator-min-microvolt = <1800000>;
30		regulator-max-microvolt = <1800000>;
31	};
32
33	vddao_3v3: regulator-vddao_3v3 {
34		compatible = "regulator-fixed";
35		regulator-name = "VDDAO_3V3";
36		regulator-min-microvolt = <3300000>;
37		regulator-max-microvolt = <3300000>;
38	};
39
40	vddio_ao18: regulator-vddio_ao18 {
41		compatible = "regulator-fixed";
42		regulator-name = "VDDIO_AO18";
43		regulator-min-microvolt = <1800000>;
44		regulator-max-microvolt = <1800000>;
45	};
46
47	vcc_3v3: regulator-vcc_3v3 {
48		compatible = "regulator-fixed";
49		regulator-name = "VCC_3V3";
50		regulator-min-microvolt = <3300000>;
51		regulator-max-microvolt = <3300000>;
52	};
53
54	emmc_pwrseq: emmc-pwrseq {
55		compatible = "mmc-pwrseq-emmc";
56		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
57	};
58
59	sdio_pwrseq: sdio-pwrseq {
60		compatible = "mmc-pwrseq-simple";
61		reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
62		clocks = <&wifi32k>;
63		clock-names = "ext_clock";
64	};
65
66	wifi32k: wifi32k {
67		compatible = "pwm-clock";
68		#clock-cells = <0>;
69		clock-frequency = <32768>;
70		pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
71	};
72
73	speaker-leds {
74		compatible = "gpio-leds";
75
76		aled1 {
77			label = "speaker:aled1";
78			gpios = <&gpio_speaker 7 0>;
79		};
80
81		aled2 {
82			label = "speaker:aled2";
83			gpios = <&gpio_speaker 6 0>;
84		};
85
86		aled3 {
87			label = "speaker:aled3";
88			gpios = <&gpio_speaker 5 0>;
89		};
90
91		aled4 {
92			label = "speaker:aled4";
93			gpios = <&gpio_speaker 4 0>;
94		};
95
96		aled5 {
97			label = "speaker:aled5";
98			gpios = <&gpio_speaker 3 0>;
99		};
100
101		aled6 {
102			label = "speaker:aled6";
103			gpios = <&gpio_speaker 2 0>;
104		};
105	};
106};
107
108&ethmac {
109	status = "okay";
110	phy-mode = "rgmii";
111	pinctrl-0 = <&eth_rgmii_y_pins>;
112	pinctrl-names = "default";
113};
114
115&uart_A {
116	status = "okay";
117	pinctrl-0 = <&uart_a_pins>;
118	pinctrl-names = "default";
119};
120
121&uart_AO {
122	status = "okay";
123	pinctrl-0 = <&uart_ao_a_pins>;
124	pinctrl-names = "default";
125};
126
127&ir {
128	status = "okay";
129	pinctrl-0 = <&remote_input_ao_pins>;
130	pinctrl-names = "default";
131};
132
133&i2c1 {
134	status = "okay";
135	pinctrl-0 = <&i2c1_z_pins>;
136	pinctrl-names = "default";
137
138	speaker_amp1: audio-codec@1b {
139		compatible = "ti,tas5707";
140		reg = <0x1b>;
141		reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
142		#sound-dai-cells = <0>;
143		AVDD-supply = <&vcc_3v3>;
144		DVDD-supply = <&vcc_3v3>;
145		PVDD_A-supply = <&main_12v>;
146		PVDD_B-supply = <&main_12v>;
147		PVDD_C-supply = <&main_12v>;
148		PVDD_D-supply = <&main_12v>;
149	};
150};
151
152&i2c_AO {
153	status = "okay";
154	pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>;
155	pinctrl-names = "default";
156
157	gpio_speaker: gpio-controller@1f {
158		compatible = "nxp,pca9557";
159		reg = <0x1f>;
160		gpio-controller;
161		#gpio-cells = <2>;
162		vcc-supply = <&vddao_3v3>;
163	};
164};
165
166&pwm_ab {
167	status = "okay";
168	pinctrl-0 = <&pwm_a_x20_pins>;
169	pinctrl-names = "default";
170};
171
172/* emmc storage */
173&sd_emmc_c {
174	status = "okay";
175	pinctrl-0 = <&emmc_pins>;
176	pinctrl-1 = <&emmc_clk_gate_pins>;
177	pinctrl-names = "default", "clk-gate";
178
179	bus-width = <8>;
180	cap-sd-highspeed;
181	cap-mmc-highspeed;
182	max-frequency = <180000000>;
183	non-removable;
184	disable-wp;
185	mmc-ddr-1_8v;
186	mmc-hs200-1_8v;
187
188	vmmc-supply = <&vcc_3v3>;
189	vqmmc-supply = <&vddio_boot>;
190};
191
192/* wifi module */
193&sd_emmc_b {
194	status = "okay";
195	#address-cells = <1>;
196	#size-cells = <0>;
197
198	pinctrl-0 = <&sdio_pins>;
199	pinctrl-1 = <&sdio_clk_gate_pins>;
200	pinctrl-names = "default", "clk-gate";
201
202	bus-width = <4>;
203	cap-sd-highspeed;
204	max-frequency = <100000000>;
205	non-removable;
206	disable-wp;
207
208	mmc-pwrseq = <&sdio_pwrseq>;
209
210	vmmc-supply = <&vddao_3v3>;
211	vqmmc-supply = <&vddio_boot>;
212
213	brcmf: wifi@1 {
214		reg = <1>;
215		compatible = "brcm,bcm4329-fmac";
216	};
217};
218