xref: /linux/scripts/dtc/include-prefixes/arm64/amlogic/meson-g12b-odroid.dtsi (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 */
6
7#include <dt-bindings/input/input.h>
8#include <dt-bindings/gpio/meson-g12a-gpio.h>
9#include <dt-bindings/sound/meson-g12a-toacodec.h>
10#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
11
12/ {
13	aliases {
14		serial0 = &uart_AO;
15		ethernet0 = &ethmac;
16		rtc1 = &vrtc;
17	};
18
19	chosen {
20		stdout-path = "serial0:115200n8";
21	};
22
23	memory@0 {
24		device_type = "memory";
25		reg = <0x0 0x0 0x0 0x40000000>;
26	};
27
28	emmc_pwrseq: emmc-pwrseq {
29		compatible = "mmc-pwrseq-emmc";
30		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
31	};
32
33	fan: gpio-fan {
34		compatible = "gpio-fan";
35		gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
36		/* Using Dummy Speed */
37		gpio-fan,speed-map = <0 0>, <1 1>;
38		#cooling-cells = <2>;
39	};
40
41	leds {
42		compatible = "gpio-leds";
43
44		led-blue {
45			label = "n2:blue";
46			gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
47			linux,default-trigger = "heartbeat";
48		};
49	};
50
51	tflash_vdd: regulator-tflash-vdd {
52		compatible = "regulator-fixed";
53
54		regulator-name = "TFLASH_VDD";
55		regulator-min-microvolt = <3300000>;
56		regulator-max-microvolt = <3300000>;
57
58		gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
59		enable-active-high;
60		regulator-always-on;
61	};
62
63	tf_io: gpio-regulator-tf-io {
64		compatible = "regulator-gpio";
65
66		regulator-name = "TF_IO";
67		regulator-min-microvolt = <1800000>;
68		regulator-max-microvolt = <3300000>;
69
70		gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
71		gpios-states = <0>;
72
73		states = <3300000 0>,
74			 <1800000 1>;
75	};
76
77	flash_1v8: regulator-flash-1v8 {
78		compatible = "regulator-fixed";
79		regulator-name = "FLASH_1V8";
80		regulator-min-microvolt = <1800000>;
81		regulator-max-microvolt = <1800000>;
82		vin-supply = <&vcc_3v3>;
83		regulator-always-on;
84	};
85
86	main_12v: regulator-main-12v {
87		compatible = "regulator-fixed";
88		regulator-name = "12V";
89		regulator-min-microvolt = <12000000>;
90		regulator-max-microvolt = <12000000>;
91		regulator-always-on;
92	};
93
94	usb_pwr_en: regulator-usb-pwr-en {
95		compatible = "regulator-fixed";
96		regulator-name = "USB_PWR_EN";
97		regulator-min-microvolt = <5000000>;
98		regulator-max-microvolt = <5000000>;
99		vin-supply = <&vcc_5v>;
100
101		/* Connected to the microUSB port power enable */
102		gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
103		enable-active-high;
104	};
105
106	vcc_5v: regulator-vcc-5v {
107		compatible = "regulator-fixed";
108		regulator-name = "5V";
109		regulator-min-microvolt = <5000000>;
110		regulator-max-microvolt = <5000000>;
111		regulator-always-on;
112		vin-supply = <&main_12v>;
113		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
114		enable-active-high;
115	};
116
117	vcc_1v8: regulator-vcc-1v8 {
118		compatible = "regulator-fixed";
119		regulator-name = "VCC_1V8";
120		regulator-min-microvolt = <1800000>;
121		regulator-max-microvolt = <1800000>;
122		vin-supply = <&vcc_3v3>;
123		regulator-always-on;
124	};
125
126	vcc_3v3: regulator-vcc-3v3 {
127		compatible = "regulator-fixed";
128		regulator-name = "VCC_3V3";
129		regulator-min-microvolt = <3300000>;
130		regulator-max-microvolt = <3300000>;
131		vin-supply = <&vddao_3v3>;
132		regulator-always-on;
133		/* FIXME: actually controlled by VDDCPU_B_EN */
134	};
135
136	vddcpu_a: regulator-vddcpu-a {
137		/*
138		 * MP8756GD Regulator.
139		 */
140		compatible = "pwm-regulator";
141
142		regulator-name = "VDDCPU_A";
143		regulator-min-microvolt = <721000>;
144		regulator-max-microvolt = <1022000>;
145
146		pwm-supply = <&main_12v>;
147
148		pwms = <&pwm_ab 0 1250 0>;
149		pwm-dutycycle-range = <100 0>;
150
151		regulator-boot-on;
152		regulator-always-on;
153	};
154
155	vddcpu_b: regulator-vddcpu-b {
156		/*
157		 * Silergy SY8120B1ABC Regulator.
158		 */
159		compatible = "pwm-regulator";
160
161		regulator-name = "VDDCPU_B";
162		regulator-min-microvolt = <721000>;
163		regulator-max-microvolt = <1022000>;
164
165		pwm-supply = <&main_12v>;
166
167		pwms = <&pwm_AO_cd 1 1250 0>;
168		pwm-dutycycle-range = <100 0>;
169
170		regulator-boot-on;
171		regulator-always-on;
172	};
173
174	vddao_1v8: regulator-vddao-1v8 {
175		compatible = "regulator-fixed";
176		regulator-name = "VDDAO_1V8";
177		regulator-min-microvolt = <1800000>;
178		regulator-max-microvolt = <1800000>;
179		vin-supply = <&vddao_3v3>;
180		regulator-always-on;
181	};
182
183	vddao_3v3: regulator-vddao-3v3 {
184		compatible = "regulator-fixed";
185		regulator-name = "VDDAO_3V3";
186		regulator-min-microvolt = <3300000>;
187		regulator-max-microvolt = <3300000>;
188		vin-supply = <&main_12v>;
189		regulator-always-on;
190	};
191
192	hdmi-connector {
193		compatible = "hdmi-connector";
194		type = "a";
195
196		port {
197			hdmi_connector_in: endpoint {
198				remote-endpoint = <&hdmi_tx_tmds_out>;
199			};
200		};
201	};
202};
203
204&arb {
205	status = "okay";
206};
207
208&cec_AO {
209	pinctrl-0 = <&cec_ao_a_h_pins>;
210	pinctrl-names = "default";
211	status = "disabled";
212	hdmi-phandle = <&hdmi_tx>;
213};
214
215&cecb_AO {
216	pinctrl-0 = <&cec_ao_b_h_pins>;
217	pinctrl-names = "default";
218	status = "okay";
219	hdmi-phandle = <&hdmi_tx>;
220};
221
222&clkc_audio {
223	status = "okay";
224};
225
226&cpu0 {
227	cpu-supply = <&vddcpu_b>;
228	operating-points-v2 = <&cpu_opp_table_0>;
229	clocks = <&clkc CLKID_CPU_CLK>;
230};
231
232&cpu1 {
233	cpu-supply = <&vddcpu_b>;
234	operating-points-v2 = <&cpu_opp_table_0>;
235	clocks = <&clkc CLKID_CPU_CLK>;
236};
237
238&cpu100 {
239	cpu-supply = <&vddcpu_a>;
240	operating-points-v2 = <&cpub_opp_table_1>;
241	clocks = <&clkc CLKID_CPUB_CLK>;
242};
243
244&cpu101 {
245	cpu-supply = <&vddcpu_a>;
246	operating-points-v2 = <&cpub_opp_table_1>;
247	clocks = <&clkc CLKID_CPUB_CLK>;
248};
249
250&cpu102 {
251	cpu-supply = <&vddcpu_a>;
252	operating-points-v2 = <&cpub_opp_table_1>;
253	clocks = <&clkc CLKID_CPUB_CLK>;
254};
255
256&cpu103 {
257	cpu-supply = <&vddcpu_a>;
258	operating-points-v2 = <&cpub_opp_table_1>;
259	clocks = <&clkc CLKID_CPUB_CLK>;
260};
261
262&cpu_thermal {
263	trips {
264		cpu_active: cpu-active {
265			temperature = <60000>; /* millicelsius */
266			hysteresis = <2000>; /* millicelsius */
267			type = "active";
268		};
269	};
270
271	cooling-maps {
272		map {
273			trip = <&cpu_active>;
274			cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
275		};
276	};
277};
278
279&ddr_thermal {
280	trips {
281		ddr_active: ddr-active {
282			temperature = <60000>; /* millicelsius */
283			hysteresis = <2000>; /* millicelsius */
284			type = "active";
285		};
286	};
287
288	cooling-maps {
289		map {
290			trip = <&ddr_active>;
291			cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
292		};
293	};
294};
295
296&frddr_a {
297	status = "okay";
298};
299
300&frddr_b {
301	status = "okay";
302};
303
304&frddr_c {
305	status = "okay";
306};
307
308&hdmi_tx {
309	status = "okay";
310	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
311	pinctrl-names = "default";
312	hdmi-supply = <&vcc_5v>;
313};
314
315&hdmi_tx_tmds_port {
316	hdmi_tx_tmds_out: endpoint {
317		remote-endpoint = <&hdmi_connector_in>;
318	};
319};
320
321&pwm_ab {
322	pinctrl-0 = <&pwm_a_e_pins>;
323	pinctrl-names = "default";
324	status = "okay";
325};
326
327&pwm_AO_cd {
328	pinctrl-0 = <&pwm_ao_d_e_pins>;
329	pinctrl-names = "default";
330	status = "okay";
331};
332
333&saradc {
334	status = "okay";
335	vref-supply = <&vddao_1v8>;
336};
337
338/* SD card */
339&sd_emmc_b {
340	status = "okay";
341	pinctrl-0 = <&sdcard_c_pins>;
342	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
343	pinctrl-names = "default", "clk-gate";
344
345	bus-width = <4>;
346	cap-sd-highspeed;
347	max-frequency = <50000000>;
348	disable-wp;
349
350	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
351	vmmc-supply = <&tflash_vdd>;
352	vqmmc-supply = <&tf_io>;
353
354};
355
356/* eMMC */
357&sd_emmc_c {
358	status = "okay";
359	pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
360	pinctrl-1 = <&emmc_clk_gate_pins>;
361	pinctrl-names = "default", "clk-gate";
362
363	bus-width = <8>;
364	cap-mmc-highspeed;
365	mmc-ddr-1_8v;
366	mmc-hs200-1_8v;
367	max-frequency = <200000000>;
368	disable-wp;
369
370	mmc-pwrseq = <&emmc_pwrseq>;
371	vmmc-supply = <&vcc_3v3>;
372	vqmmc-supply = <&flash_1v8>;
373};
374
375&tdmif_b {
376	status = "okay";
377};
378
379&tdmif_c {
380	status = "okay";
381};
382
383&tdmin_a {
384	status = "okay";
385};
386
387&tdmin_b {
388	status = "okay";
389};
390
391&tdmin_c {
392	status = "okay";
393};
394
395&tdmin_lb {
396	status = "okay";
397};
398
399&tdmout_b {
400	status = "okay";
401};
402
403&tdmout_c {
404	status = "okay";
405};
406
407&tohdmitx {
408	status = "okay";
409};
410
411&toddr_a {
412	status = "okay";
413};
414
415&toddr_b {
416	status = "okay";
417};
418
419&toddr_c {
420	status = "okay";
421};
422
423&uart_AO {
424	status = "okay";
425	pinctrl-0 = <&uart_ao_a_pins>;
426	pinctrl-names = "default";
427};
428
429&usb {
430	status = "okay";
431};
432
433&usb2_phy0 {
434	phy-supply = <&vcc_5v>;
435};
436