xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-g12b-odroid.dtsi (revision 0cd4430a9320c916a84617b6bbf400f5c64a09c7)
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};
229
230&cpu1 {
231	cpu-supply = <&vddcpu_b>;
232};
233
234&cpu100 {
235	cpu-supply = <&vddcpu_a>;
236};
237
238&cpu101 {
239	cpu-supply = <&vddcpu_a>;
240};
241
242&cpu102 {
243	cpu-supply = <&vddcpu_a>;
244};
245
246&cpu103 {
247	cpu-supply = <&vddcpu_a>;
248};
249
250&cpu_thermal {
251	trips {
252		cpu_active: cpu-active {
253			temperature = <60000>; /* millicelsius */
254			hysteresis = <2000>; /* millicelsius */
255			type = "active";
256		};
257	};
258
259	cooling-maps {
260		map {
261			trip = <&cpu_active>;
262			cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
263		};
264	};
265};
266
267&ddr_thermal {
268	trips {
269		ddr_active: ddr-active {
270			temperature = <60000>; /* millicelsius */
271			hysteresis = <2000>; /* millicelsius */
272			type = "active";
273		};
274	};
275
276	cooling-maps {
277		map {
278			trip = <&ddr_active>;
279			cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
280		};
281	};
282};
283
284&frddr_a {
285	status = "okay";
286};
287
288&frddr_b {
289	status = "okay";
290};
291
292&frddr_c {
293	status = "okay";
294};
295
296&hdmi_tx {
297	status = "okay";
298	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
299	pinctrl-names = "default";
300	hdmi-supply = <&vcc_5v>;
301};
302
303&hdmi_tx_tmds_port {
304	hdmi_tx_tmds_out: endpoint {
305		remote-endpoint = <&hdmi_connector_in>;
306	};
307};
308
309&pwm_ab {
310	pinctrl-0 = <&pwm_a_e_pins>;
311	pinctrl-names = "default";
312	status = "okay";
313};
314
315&pwm_AO_cd {
316	pinctrl-0 = <&pwm_ao_d_e_pins>;
317	pinctrl-names = "default";
318	status = "okay";
319};
320
321&saradc {
322	status = "okay";
323	vref-supply = <&vddao_1v8>;
324};
325
326/* SD card */
327&sd_emmc_b {
328	status = "okay";
329	pinctrl-0 = <&sdcard_c_pins>;
330	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
331	pinctrl-names = "default", "clk-gate";
332
333	bus-width = <4>;
334	cap-sd-highspeed;
335	max-frequency = <50000000>;
336	disable-wp;
337
338	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
339	vmmc-supply = <&tflash_vdd>;
340	vqmmc-supply = <&tf_io>;
341
342};
343
344/* eMMC */
345&sd_emmc_c {
346	status = "okay";
347	pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
348	pinctrl-1 = <&emmc_clk_gate_pins>;
349	pinctrl-names = "default", "clk-gate";
350
351	bus-width = <8>;
352	cap-mmc-highspeed;
353	mmc-ddr-1_8v;
354	mmc-hs200-1_8v;
355	max-frequency = <200000000>;
356	disable-wp;
357
358	mmc-pwrseq = <&emmc_pwrseq>;
359	vmmc-supply = <&vcc_3v3>;
360	vqmmc-supply = <&flash_1v8>;
361};
362
363&tdmif_b {
364	status = "okay";
365};
366
367&tdmif_c {
368	status = "okay";
369};
370
371&tdmin_a {
372	status = "okay";
373};
374
375&tdmin_b {
376	status = "okay";
377};
378
379&tdmin_c {
380	status = "okay";
381};
382
383&tdmin_lb {
384	status = "okay";
385};
386
387&tdmout_b {
388	status = "okay";
389};
390
391&tdmout_c {
392	status = "okay";
393};
394
395&tohdmitx {
396	status = "okay";
397};
398
399&toddr_a {
400	status = "okay";
401};
402
403&toddr_b {
404	status = "okay";
405};
406
407&toddr_c {
408	status = "okay";
409};
410
411&uart_AO {
412	status = "okay";
413	pinctrl-0 = <&uart_ao_a_pins>;
414	pinctrl-names = "default";
415};
416
417&usb {
418	status = "okay";
419};
420
421&usb2_phy0 {
422	phy-supply = <&vcc_5v>;
423};
424