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;
18e8e7037cSNeil Armstrong		ethernet0 = &ethmac;
19d3aa4ce8SKevin Hilman	};
20d3aa4ce8SKevin Hilman	chosen {
21d3aa4ce8SKevin Hilman		stdout-path = "serial0:115200n8";
22d3aa4ce8SKevin Hilman	};
23d3aa4ce8SKevin Hilman	memory@0 {
24d3aa4ce8SKevin Hilman		device_type = "memory";
25d3aa4ce8SKevin Hilman		reg = <0x0 0x0 0x0 0x40000000>;
26d3aa4ce8SKevin Hilman	};
27c9206b42SGuillaume La Roque
28b0be9616SNeil Armstrong	cvbs-connector {
29b0be9616SNeil Armstrong		compatible = "composite-video-connector";
30b0be9616SNeil Armstrong
31b0be9616SNeil Armstrong		port {
32b0be9616SNeil Armstrong			cvbs_connector_in: endpoint {
33b0be9616SNeil Armstrong				remote-endpoint = <&cvbs_vdac_out>;
34b0be9616SNeil Armstrong			};
35b0be9616SNeil Armstrong		};
36b0be9616SNeil Armstrong	};
37b0be9616SNeil Armstrong
38b0be9616SNeil Armstrong	hdmi-connector {
39b0be9616SNeil Armstrong		compatible = "hdmi-connector";
40b0be9616SNeil Armstrong		type = "a";
41b0be9616SNeil Armstrong
42b0be9616SNeil Armstrong		port {
43b0be9616SNeil Armstrong			hdmi_connector_in: endpoint {
44b0be9616SNeil Armstrong				remote-endpoint = <&hdmi_tx_tmds_out>;
45b0be9616SNeil Armstrong			};
46b0be9616SNeil Armstrong		};
47b0be9616SNeil Armstrong	};
48b0be9616SNeil Armstrong
49c9206b42SGuillaume La Roque	flash_1v8: regulator-flash_1v8 {
50c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
51c9206b42SGuillaume La Roque		regulator-name = "FLASH_1V8";
52c9206b42SGuillaume La Roque		regulator-min-microvolt = <1800000>;
53c9206b42SGuillaume La Roque		regulator-max-microvolt = <1800000>;
54c9206b42SGuillaume La Roque		vin-supply = <&vcc_3v3>;
55c9206b42SGuillaume La Roque		regulator-always-on;
56c9206b42SGuillaume La Roque	};
57c9206b42SGuillaume La Roque
58c9206b42SGuillaume La Roque	dc_in: regulator-dc_in {
59c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
60c9206b42SGuillaume La Roque		regulator-name = "DC_IN";
61c9206b42SGuillaume La Roque		regulator-min-microvolt = <5000000>;
62c9206b42SGuillaume La Roque		regulator-max-microvolt = <5000000>;
63c9206b42SGuillaume La Roque		regulator-always-on;
64c9206b42SGuillaume La Roque	};
65c9206b42SGuillaume La Roque
66c9206b42SGuillaume La Roque	vcc_1v8: regulator-vcc_1v8 {
67c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
68c9206b42SGuillaume La Roque		regulator-name = "VCC_1V8";
69c9206b42SGuillaume La Roque		regulator-min-microvolt = <1800000>;
70c9206b42SGuillaume La Roque		regulator-max-microvolt = <1800000>;
71c9206b42SGuillaume La Roque		vin-supply = <&vcc_3v3>;
72c9206b42SGuillaume La Roque		regulator-always-on;
73c9206b42SGuillaume La Roque	};
74c9206b42SGuillaume La Roque
75c9206b42SGuillaume La Roque	vcc_3v3: regulator-vcc_3v3 {
76c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
77c9206b42SGuillaume La Roque		regulator-name = "VCC_3V3";
78c9206b42SGuillaume La Roque		regulator-min-microvolt = <3300000>;
79c9206b42SGuillaume La Roque		regulator-max-microvolt = <3300000>;
80c9206b42SGuillaume La Roque		vin-supply = <&vddao_3v3>;
81c9206b42SGuillaume La Roque		regulator-always-on;
82c9206b42SGuillaume La Roque		/* FIXME: actually controlled by VDDCPU_B_EN */
83c9206b42SGuillaume La Roque	};
84c9206b42SGuillaume La Roque
85c9206b42SGuillaume La Roque	vcc_5v: regulator-vcc_5v {
86c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
87c9206b42SGuillaume La Roque		regulator-name = "VCC_5V";
88c9206b42SGuillaume La Roque		regulator-min-microvolt = <5000000>;
89c9206b42SGuillaume La Roque		regulator-max-microvolt = <5000000>;
90c9206b42SGuillaume La Roque		vin-supply = <&dc_in>;
91c9206b42SGuillaume La Roque
92c9206b42SGuillaume La Roque		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
93c9206b42SGuillaume La Roque		enable-active-low;
94c9206b42SGuillaume La Roque	};
95c9206b42SGuillaume La Roque
96c9206b42SGuillaume La Roque	vddao_1v8: regulator-vddao_1v8 {
97c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
98c9206b42SGuillaume La Roque		regulator-name = "VDDAO_1V8";
99c9206b42SGuillaume La Roque		regulator-min-microvolt = <1800000>;
100c9206b42SGuillaume La Roque		regulator-max-microvolt = <1800000>;
101c9206b42SGuillaume La Roque		vin-supply = <&vddao_3v3>;
102c9206b42SGuillaume La Roque		regulator-always-on;
103c9206b42SGuillaume La Roque	};
104c9206b42SGuillaume La Roque
105c9206b42SGuillaume La Roque	vddao_3v3: regulator-vddao_3v3 {
106c9206b42SGuillaume La Roque		compatible = "regulator-fixed";
107c9206b42SGuillaume La Roque		regulator-name = "VDDAO_3V3";
108c9206b42SGuillaume La Roque		regulator-min-microvolt = <3300000>;
109c9206b42SGuillaume La Roque		regulator-max-microvolt = <3300000>;
110c9206b42SGuillaume La Roque		vin-supply = <&dc_in>;
111c9206b42SGuillaume La Roque		regulator-always-on;
112c9206b42SGuillaume La Roque	};
113d3aa4ce8SKevin Hilman};
114d3aa4ce8SKevin Hilman
115b0be9616SNeil Armstrong&cec_AO {
116b0be9616SNeil Armstrong	pinctrl-0 = <&cec_ao_a_h_pins>;
117b0be9616SNeil Armstrong	pinctrl-names = "default";
118b0be9616SNeil Armstrong	status = "disabled";
119b0be9616SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
120b0be9616SNeil Armstrong};
121b0be9616SNeil Armstrong
122b0be9616SNeil Armstrong&cecb_AO {
123b0be9616SNeil Armstrong	pinctrl-0 = <&cec_ao_b_h_pins>;
124b0be9616SNeil Armstrong	pinctrl-names = "default";
125b0be9616SNeil Armstrong	status = "okay";
126b0be9616SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
127b0be9616SNeil Armstrong};
128b0be9616SNeil Armstrong
129b0be9616SNeil Armstrong&cvbs_vdac_port {
130b0be9616SNeil Armstrong	cvbs_vdac_out: endpoint {
131b0be9616SNeil Armstrong		remote-endpoint = <&cvbs_connector_in>;
132b0be9616SNeil Armstrong	};
133b0be9616SNeil Armstrong};
134b0be9616SNeil Armstrong
135b0be9616SNeil Armstrong&hdmi_tx {
136b0be9616SNeil Armstrong	status = "okay";
137b0be9616SNeil Armstrong	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
138b0be9616SNeil Armstrong	pinctrl-names = "default";
139b0be9616SNeil Armstrong	hdmi-supply = <&vcc_5v>;
140b0be9616SNeil Armstrong};
141b0be9616SNeil Armstrong
142b0be9616SNeil Armstrong&hdmi_tx_tmds_port {
143b0be9616SNeil Armstrong	hdmi_tx_tmds_out: endpoint {
144b0be9616SNeil Armstrong		remote-endpoint = <&hdmi_connector_in>;
145b0be9616SNeil Armstrong	};
146b0be9616SNeil Armstrong};
147b0be9616SNeil Armstrong
148fff6e9d3SNeil Armstrong&ir {
149fff6e9d3SNeil Armstrong	status = "okay";
150fff6e9d3SNeil Armstrong	pinctrl-0 = <&remote_input_ao_pins>;
151fff6e9d3SNeil Armstrong	pinctrl-names = "default";
152fff6e9d3SNeil Armstrong};
153fff6e9d3SNeil Armstrong
154e8e7037cSNeil Armstrong&ext_mdio {
155e8e7037cSNeil Armstrong	external_phy: ethernet-phy@0 {
156e8e7037cSNeil Armstrong		/* Realtek RTL8211F (0x001cc916) */
157e8e7037cSNeil Armstrong		reg = <0>;
158e8e7037cSNeil Armstrong		max-speed = <1000>;
159e8e7037cSNeil Armstrong		eee-broken-1000t;
160e8e7037cSNeil Armstrong	};
161e8e7037cSNeil Armstrong};
162e8e7037cSNeil Armstrong
163e8e7037cSNeil Armstrong&ethmac {
164e8e7037cSNeil Armstrong	pinctrl-0 = <&eth_pins>, <&eth_rgmii_pins>;
165e8e7037cSNeil Armstrong	pinctrl-names = "default";
166e8e7037cSNeil Armstrong	status = "okay";
167e8e7037cSNeil Armstrong	phy-mode = "rgmii";
168e8e7037cSNeil Armstrong	phy-handle = <&external_phy>;
169e8e7037cSNeil Armstrong	amlogic,tx-delay-ns = <2>;
170e8e7037cSNeil Armstrong	snps,reset-gpio = <&gpio GPIOZ_14 0>;
171e8e7037cSNeil Armstrong	snps,reset-delays-us = <0 10000 1000000>;
172e8e7037cSNeil Armstrong	snps,reset-active-low;
173e8e7037cSNeil Armstrong};
174e8e7037cSNeil Armstrong
175c5c9c7cfSNeil Armstrong&uart_A {
176c5c9c7cfSNeil Armstrong	status = "okay";
177c5c9c7cfSNeil Armstrong	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
178c5c9c7cfSNeil Armstrong	pinctrl-names = "default";
179c5c9c7cfSNeil Armstrong	uart-has-rtscts;
180c5c9c7cfSNeil Armstrong
181c5c9c7cfSNeil Armstrong	bluetooth {
182c5c9c7cfSNeil Armstrong		compatible = "brcm,bcm43438-bt";
183c5c9c7cfSNeil Armstrong		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
184c5c9c7cfSNeil Armstrong	};
185c5c9c7cfSNeil Armstrong};
186c5c9c7cfSNeil Armstrong
187d3aa4ce8SKevin Hilman&uart_AO {
188d3aa4ce8SKevin Hilman	status = "okay";
1890b7aed33SNeil Armstrong	pinctrl-0 = <&uart_ao_a_pins>;
1900b7aed33SNeil Armstrong	pinctrl-names = "default";
191d3aa4ce8SKevin Hilman};
19245b72126SNeil Armstrong
19345b72126SNeil Armstrong&usb {
19445b72126SNeil Armstrong	status = "okay";
19545b72126SNeil Armstrong	dr_mode = "host";
19645b72126SNeil Armstrong};
197