1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
26e18675eSCarlo Caione/*
36e18675eSCarlo Caione * Copyright (c) 2017 Carlo Caione
46e18675eSCarlo Caione * Copyright (c) 2016 BayLibre, Inc.
56e18675eSCarlo Caione * Author: Neil Armstrong <narmstrong@kernel.org>
66e18675eSCarlo Caione */
76e18675eSCarlo Caione
86e18675eSCarlo Caione/dts-v1/;
96e18675eSCarlo Caione
106e18675eSCarlo Caione#include "meson-gxl-s905x.dtsi"
116e18675eSCarlo Caione
126e18675eSCarlo Caione/ {
136e18675eSCarlo Caione	compatible = "hwacom,amazetv", "amlogic,s905x", "amlogic,meson-gxl";
146e18675eSCarlo Caione	model = "Hwacom AmazeTV (S905X)";
156e18675eSCarlo Caione
166e18675eSCarlo Caione	aliases {
176e18675eSCarlo Caione		serial0 = &uart_AO;
18059a58fcSJorge Ramirez-Ortiz		ethernet0 = &ethmac;
196e18675eSCarlo Caione	};
206e18675eSCarlo Caione
216e18675eSCarlo Caione	chosen {
226e18675eSCarlo Caione		stdout-path = "serial0:115200n8";
236e18675eSCarlo Caione	};
246e18675eSCarlo Caione
256e18675eSCarlo Caione	memory@0 {
266e18675eSCarlo Caione		device_type = "memory";
276e18675eSCarlo Caione		reg = <0x0 0x0 0x0 0x80000000>;
286e18675eSCarlo Caione	};
296e18675eSCarlo Caione
306e18675eSCarlo Caione	vddio_card: gpio-regulator {
316e18675eSCarlo Caione		compatible = "regulator-gpio";
326e18675eSCarlo Caione
336e18675eSCarlo Caione		regulator-name = "VDDIO_CARD";
346e18675eSCarlo Caione		regulator-min-microvolt = <1800000>;
356e18675eSCarlo Caione		regulator-max-microvolt = <3300000>;
366e18675eSCarlo Caione
376e18675eSCarlo Caione		gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
386e18675eSCarlo Caione		gpios-states = <1>;
396e18675eSCarlo Caione
406e18675eSCarlo Caione		/* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
41f9717178SNeil Armstrong		states = <1800000 0>,
42f9717178SNeil Armstrong			 <3300000 1>;
436e18675eSCarlo Caione	};
446e18675eSCarlo Caione
456e18675eSCarlo Caione	vddio_boot: regulator-vddio_boot {
466e18675eSCarlo Caione		compatible = "regulator-fixed";
476e18675eSCarlo Caione		regulator-name = "VDDIO_BOOT";
486e18675eSCarlo Caione		regulator-min-microvolt = <1800000>;
496e18675eSCarlo Caione		regulator-max-microvolt = <1800000>;
506e18675eSCarlo Caione	};
516e18675eSCarlo Caione
526e18675eSCarlo Caione	vddao_3v3: regulator-vddao_3v3 {
536e18675eSCarlo Caione		compatible = "regulator-fixed";
546e18675eSCarlo Caione		regulator-name = "VDDAO_3V3";
556e18675eSCarlo Caione		regulator-min-microvolt = <3300000>;
566e18675eSCarlo Caione		regulator-max-microvolt = <3300000>;
576e18675eSCarlo Caione	};
586e18675eSCarlo Caione
596e18675eSCarlo Caione	vcc_3v3: regulator-vcc_3v3 {
606e18675eSCarlo Caione		compatible = "regulator-fixed";
616e18675eSCarlo Caione		regulator-name = "VCC_3V3";
626e18675eSCarlo Caione		regulator-min-microvolt = <3300000>;
636e18675eSCarlo Caione		regulator-max-microvolt = <3300000>;
646e18675eSCarlo Caione	};
656e18675eSCarlo Caione
666e18675eSCarlo Caione	emmc_pwrseq: emmc-pwrseq {
676e18675eSCarlo Caione		compatible = "mmc-pwrseq-emmc";
686e18675eSCarlo Caione		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
696e18675eSCarlo Caione	};
706e18675eSCarlo Caione
716e18675eSCarlo Caione	wifi32k: wifi32k {
726e18675eSCarlo Caione		compatible = "pwm-clock";
736e18675eSCarlo Caione		#clock-cells = <0>;
746e18675eSCarlo Caione		clock-frequency = <32768>;
756e18675eSCarlo Caione		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
766e18675eSCarlo Caione	};
776e18675eSCarlo Caione
786e18675eSCarlo Caione	sdio_pwrseq: sdio-pwrseq {
796e18675eSCarlo Caione		compatible = "mmc-pwrseq-simple";
806e18675eSCarlo Caione		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
816e18675eSCarlo Caione		clocks = <&wifi32k>;
826e18675eSCarlo Caione		clock-names = "ext_clock";
836e18675eSCarlo Caione	};
846e18675eSCarlo Caione
856e18675eSCarlo Caione	cvbs-connector {
866e18675eSCarlo Caione		compatible = "composite-video-connector";
876e18675eSCarlo Caione
886e18675eSCarlo Caione		port {
896e18675eSCarlo Caione			cvbs_connector_in: endpoint {
906e18675eSCarlo Caione				remote-endpoint = <&cvbs_vdac_out>;
916e18675eSCarlo Caione			};
926e18675eSCarlo Caione		};
936e18675eSCarlo Caione	};
946e18675eSCarlo Caione};
956e18675eSCarlo Caione
966e18675eSCarlo Caione&cvbs_vdac_port {
976e18675eSCarlo Caione	cvbs_vdac_out: endpoint {
986e18675eSCarlo Caione		remote-endpoint = <&cvbs_connector_in>;
996e18675eSCarlo Caione	};
1006e18675eSCarlo Caione};
1016e18675eSCarlo Caione
1026e18675eSCarlo Caione&ethmac {
1036e18675eSCarlo Caione	status = "okay";
1046e18675eSCarlo Caione	phy-mode = "rmii";
1056e18675eSCarlo Caione	phy-handle = <&internal_phy>;
1066e18675eSCarlo Caione};
1076e18675eSCarlo Caione
1086e18675eSCarlo Caione&ir {
1096e18675eSCarlo Caione	status = "okay";
1106e18675eSCarlo Caione	pinctrl-0 = <&remote_input_ao_pins>;
1116e18675eSCarlo Caione	pinctrl-names = "default";
1126e18675eSCarlo Caione};
1136e18675eSCarlo Caione
1146e18675eSCarlo Caione&pwm_ef {
1156e18675eSCarlo Caione	status = "okay";
1166e18675eSCarlo Caione	pinctrl-0 = <&pwm_e_pins>;
1176e18675eSCarlo Caione	pinctrl-names = "default";
1186e18675eSCarlo Caione	clocks = <&clkc CLKID_FCLK_DIV4>;
1196e18675eSCarlo Caione	clock-names = "clkin0";
1206e18675eSCarlo Caione};
1216e18675eSCarlo Caione
1226e18675eSCarlo Caione/* SD card */
1236e18675eSCarlo Caione&sd_emmc_b {
1246e18675eSCarlo Caione	status = "okay";
1256e18675eSCarlo Caione	pinctrl-0 = <&sdcard_pins>;
12667e7607fSJerome Brunet	pinctrl-1 = <&sdcard_clk_gate_pins>;
12767e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
1286e18675eSCarlo Caione
1296e18675eSCarlo Caione	bus-width = <4>;
1306e18675eSCarlo Caione	cap-sd-highspeed;
1316e18675eSCarlo Caione	max-frequency = <100000000>;
1326e18675eSCarlo Caione	disable-wp;
1336e18675eSCarlo Caione
134f29200c8SLoys Ollivier	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
1356e18675eSCarlo Caione
1366e18675eSCarlo Caione	vmmc-supply = <&vddao_3v3>;
1376e18675eSCarlo Caione	vqmmc-supply = <&vddio_card>;
1386e18675eSCarlo Caione};
1396e18675eSCarlo Caione
1406e18675eSCarlo Caione/* eMMC */
1416e18675eSCarlo Caione&sd_emmc_c {
1426e18675eSCarlo Caione	status = "okay";
143ab36be66SNeil Armstrong	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
14467e7607fSJerome Brunet	pinctrl-1 = <&emmc_clk_gate_pins>;
14567e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
1466e18675eSCarlo Caione
1476e18675eSCarlo Caione	bus-width = <8>;
1486e18675eSCarlo Caione	cap-mmc-highspeed;
1496e18675eSCarlo Caione	max-frequency = <100000000>;
1506e18675eSCarlo Caione	non-removable;
1516e18675eSCarlo Caione	disable-wp;
1526e18675eSCarlo Caione	mmc-ddr-1_8v;
1536e18675eSCarlo Caione	mmc-hs200-1_8v;
1546e18675eSCarlo Caione
1556e18675eSCarlo Caione	mmc-pwrseq = <&emmc_pwrseq>;
1566e18675eSCarlo Caione	vmmc-supply = <&vcc_3v3>;
1576e18675eSCarlo Caione	vqmmc-supply = <&vddio_boot>;
1586e18675eSCarlo Caione};
1596e18675eSCarlo Caione
1606e18675eSCarlo Caione&uart_AO {
1616e18675eSCarlo Caione	status = "okay";
1626e18675eSCarlo Caione	pinctrl-0 = <&uart_ao_a_pins>;
1636e18675eSCarlo Caione	pinctrl-names = "default";
1646e18675eSCarlo Caione};
165