1d3aa4ce8SKevin Hilman// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2d3aa4ce8SKevin Hilman/*
3d3aa4ce8SKevin Hilman * Copyright (c) 2018 BayLibre SAS. All rights reserved.
4d3aa4ce8SKevin Hilman */
5d3aa4ce8SKevin Hilman
6d3aa4ce8SKevin Hilman/dts-v1/;
7d3aa4ce8SKevin Hilman
8d3aa4ce8SKevin Hilman#include "meson-g12a.dtsi"
9c9206b42SGuillaume La Roque#include <dt-bindings/gpio/gpio.h>
10c9206b42SGuillaume La Roque#include <dt-bindings/gpio/meson-g12a-gpio.h>
11d3aa4ce8SKevin Hilman
12d3aa4ce8SKevin Hilman/ {
13d3aa4ce8SKevin Hilman	compatible = "amediatech,x96-max", "amlogic,u200", "amlogic,g12a";
14d3aa4ce8SKevin Hilman	model = "Shenzhen Amediatech Technology Co., Ltd X96 Max";
15d3aa4ce8SKevin Hilman
16d3aa4ce8SKevin Hilman	aliases {
17d3aa4ce8SKevin Hilman		serial0 = &uart_AO;
18d3aa4ce8SKevin Hilman	};
19d3aa4ce8SKevin Hilman	chosen {
20d3aa4ce8SKevin Hilman		stdout-path = "serial0:115200n8";
21d3aa4ce8SKevin Hilman	};
22d3aa4ce8SKevin Hilman	memory@0 {
23d3aa4ce8SKevin Hilman		device_type = "memory";
24d3aa4ce8SKevin Hilman		reg = <0x0 0x0 0x0 0x40000000>;
25d3aa4ce8SKevin Hilman	};
26c9206b42SGuillaume La Roque
27b0be9616SNeil Armstrong	cvbs-connector {
28b0be9616SNeil Armstrong		compatible = "composite-video-connector";
29b0be9616SNeil Armstrong
30b0be9616SNeil Armstrong		port {
31b0be9616SNeil Armstrong			cvbs_connector_in: endpoint {
32b0be9616SNeil Armstrong				remote-endpoint = <&cvbs_vdac_out>;
33b0be9616SNeil Armstrong			};
34b0be9616SNeil Armstrong		};
35b0be9616SNeil Armstrong	};
36b0be9616SNeil Armstrong
37b0be9616SNeil Armstrong	hdmi-connector {
38b0be9616SNeil Armstrong		compatible = "hdmi-connector";
39b0be9616SNeil Armstrong		type = "a";
40b0be9616SNeil Armstrong
41b0be9616SNeil Armstrong		port {
42b0be9616SNeil Armstrong			hdmi_connector_in: endpoint {
43b0be9616SNeil Armstrong				remote-endpoint = <&hdmi_tx_tmds_out>;
44b0be9616SNeil Armstrong			};
45b0be9616SNeil Armstrong		};
46b0be9616SNeil Armstrong	};
47b0be9616SNeil Armstrong
48c9206b42SGuillaume La Roque	flash_1v8: regulator-flash_1v8 {
49c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
50c9206b42SGuillaume La Roque		regulator-name = "FLASH_1V8";
51c9206b42SGuillaume La Roque		regulator-min-microvolt = <1800000>;
52c9206b42SGuillaume La Roque		regulator-max-microvolt = <1800000>;
53c9206b42SGuillaume La Roque		vin-supply = <&vcc_3v3>;
54c9206b42SGuillaume La Roque		regulator-always-on;
55c9206b42SGuillaume La Roque	};
56c9206b42SGuillaume La Roque
57c9206b42SGuillaume La Roque	dc_in: regulator-dc_in {
58c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
59c9206b42SGuillaume La Roque		regulator-name = "DC_IN";
60c9206b42SGuillaume La Roque		regulator-min-microvolt = <5000000>;
61c9206b42SGuillaume La Roque		regulator-max-microvolt = <5000000>;
62c9206b42SGuillaume La Roque		regulator-always-on;
63c9206b42SGuillaume La Roque	};
64c9206b42SGuillaume La Roque
65c9206b42SGuillaume La Roque	vcc_1v8: regulator-vcc_1v8 {
66c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
67c9206b42SGuillaume La Roque		regulator-name = "VCC_1V8";
68c9206b42SGuillaume La Roque		regulator-min-microvolt = <1800000>;
69c9206b42SGuillaume La Roque		regulator-max-microvolt = <1800000>;
70c9206b42SGuillaume La Roque		vin-supply = <&vcc_3v3>;
71c9206b42SGuillaume La Roque		regulator-always-on;
72c9206b42SGuillaume La Roque	};
73c9206b42SGuillaume La Roque
74c9206b42SGuillaume La Roque	vcc_3v3: regulator-vcc_3v3 {
75c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
76c9206b42SGuillaume La Roque		regulator-name = "VCC_3V3";
77c9206b42SGuillaume La Roque		regulator-min-microvolt = <3300000>;
78c9206b42SGuillaume La Roque		regulator-max-microvolt = <3300000>;
79c9206b42SGuillaume La Roque		vin-supply = <&vddao_3v3>;
80c9206b42SGuillaume La Roque		regulator-always-on;
81c9206b42SGuillaume La Roque		/* FIXME: actually controlled by VDDCPU_B_EN */
82c9206b42SGuillaume La Roque	};
83c9206b42SGuillaume La Roque
84c9206b42SGuillaume La Roque	vcc_5v: regulator-vcc_5v {
85c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
86c9206b42SGuillaume La Roque		regulator-name = "VCC_5V";
87c9206b42SGuillaume La Roque		regulator-min-microvolt = <5000000>;
88c9206b42SGuillaume La Roque		regulator-max-microvolt = <5000000>;
89c9206b42SGuillaume La Roque		vin-supply = <&dc_in>;
90c9206b42SGuillaume La Roque
91c9206b42SGuillaume La Roque		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
92c9206b42SGuillaume La Roque		enable-active-low;
93c9206b42SGuillaume La Roque	};
94c9206b42SGuillaume La Roque
95c9206b42SGuillaume La Roque	vddao_1v8: regulator-vddao_1v8 {
96c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
97c9206b42SGuillaume La Roque		regulator-name = "VDDAO_1V8";
98c9206b42SGuillaume La Roque		regulator-min-microvolt = <1800000>;
99c9206b42SGuillaume La Roque		regulator-max-microvolt = <1800000>;
100c9206b42SGuillaume La Roque		vin-supply = <&vddao_3v3>;
101c9206b42SGuillaume La Roque		regulator-always-on;
102c9206b42SGuillaume La Roque	};
103c9206b42SGuillaume La Roque
104c9206b42SGuillaume La Roque	vddao_3v3: regulator-vddao_3v3 {
105c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
106c9206b42SGuillaume La Roque		regulator-name = "VDDAO_3V3";
107c9206b42SGuillaume La Roque		regulator-min-microvolt = <3300000>;
108c9206b42SGuillaume La Roque		regulator-max-microvolt = <3300000>;
109c9206b42SGuillaume La Roque		vin-supply = <&dc_in>;
110c9206b42SGuillaume La Roque		regulator-always-on;
111c9206b42SGuillaume La Roque	};
112d3aa4ce8SKevin Hilman};
113d3aa4ce8SKevin Hilman
114b0be9616SNeil Armstrong&cec_AO {
115b0be9616SNeil Armstrong	pinctrl-0 = <&cec_ao_a_h_pins>;
116b0be9616SNeil Armstrong	pinctrl-names = "default";
117b0be9616SNeil Armstrong	status = "disabled";
118b0be9616SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
119b0be9616SNeil Armstrong};
120b0be9616SNeil Armstrong
121b0be9616SNeil Armstrong&cecb_AO {
122b0be9616SNeil Armstrong	pinctrl-0 = <&cec_ao_b_h_pins>;
123b0be9616SNeil Armstrong	pinctrl-names = "default";
124b0be9616SNeil Armstrong	status = "okay";
125b0be9616SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
126b0be9616SNeil Armstrong};
127b0be9616SNeil Armstrong
128b0be9616SNeil Armstrong&cvbs_vdac_port {
129b0be9616SNeil Armstrong	cvbs_vdac_out: endpoint {
130b0be9616SNeil Armstrong		remote-endpoint = <&cvbs_connector_in>;
131b0be9616SNeil Armstrong	};
132b0be9616SNeil Armstrong};
133b0be9616SNeil Armstrong
134b0be9616SNeil Armstrong&hdmi_tx {
135b0be9616SNeil Armstrong	status = "okay";
136b0be9616SNeil Armstrong	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
137b0be9616SNeil Armstrong	pinctrl-names = "default";
138b0be9616SNeil Armstrong	hdmi-supply = <&vcc_5v>;
139b0be9616SNeil Armstrong};
140b0be9616SNeil Armstrong
141b0be9616SNeil Armstrong&hdmi_tx_tmds_port {
142b0be9616SNeil Armstrong	hdmi_tx_tmds_out: endpoint {
143b0be9616SNeil Armstrong		remote-endpoint = <&hdmi_connector_in>;
144b0be9616SNeil Armstrong	};
145b0be9616SNeil Armstrong};
146b0be9616SNeil Armstrong
147fff6e9d3SNeil Armstrong&ir {
148fff6e9d3SNeil Armstrong	status = "okay";
149fff6e9d3SNeil Armstrong	pinctrl-0 = <&remote_input_ao_pins>;
150fff6e9d3SNeil Armstrong	pinctrl-names = "default";
151fff6e9d3SNeil Armstrong};
152fff6e9d3SNeil Armstrong
153c5c9c7cfSNeil Armstrong&uart_A {
154c5c9c7cfSNeil Armstrong	status = "okay";
155c5c9c7cfSNeil Armstrong	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
156c5c9c7cfSNeil Armstrong	pinctrl-names = "default";
157c5c9c7cfSNeil Armstrong	uart-has-rtscts;
158c5c9c7cfSNeil Armstrong
159c5c9c7cfSNeil Armstrong	bluetooth {
160c5c9c7cfSNeil Armstrong		compatible = "brcm,bcm43438-bt";
161c5c9c7cfSNeil Armstrong		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
162c5c9c7cfSNeil Armstrong	};
163c5c9c7cfSNeil Armstrong};
164c5c9c7cfSNeil Armstrong
165d3aa4ce8SKevin Hilman&uart_AO {
166d3aa4ce8SKevin Hilman	status = "okay";
1670b7aed33SNeil Armstrong	pinctrl-0 = <&uart_ao_a_pins>;
1680b7aed33SNeil Armstrong	pinctrl-names = "default";
169d3aa4ce8SKevin Hilman};
17045b72126SNeil Armstrong
17145b72126SNeil Armstrong&usb {
17245b72126SNeil Armstrong	status = "okay";
17345b72126SNeil Armstrong	dr_mode = "host";
17445b72126SNeil Armstrong};
175