1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
27eea6710SKevin Hilman/*
37eea6710SKevin Hilman * Copyright (c) 2016 Andreas Färber
47eea6710SKevin Hilman * Copyright (c) 2016 BayLibre, Inc.
57eea6710SKevin Hilman * Author: Neil Armstrong <narmstrong@kernel.org>
67eea6710SKevin Hilman */
77eea6710SKevin Hilman
87eea6710SKevin Hilman/dts-v1/;
97eea6710SKevin Hilman
107eea6710SKevin Hilman#include "meson-gxl-s905x.dtsi"
117eea6710SKevin Hilman
127eea6710SKevin Hilman/ {
137eea6710SKevin Hilman	compatible = "nexbox,a95x", "amlogic,s905x", "amlogic,meson-gxl";
147eea6710SKevin Hilman	model = "NEXBOX A95X (S905X)";
157eea6710SKevin Hilman
167eea6710SKevin Hilman	aliases {
177eea6710SKevin Hilman		serial0 = &uart_AO;
18059a58fcSJorge Ramirez-Ortiz		ethernet0 = &ethmac;
197eea6710SKevin Hilman	};
207eea6710SKevin Hilman
217eea6710SKevin Hilman	chosen {
227eea6710SKevin Hilman		stdout-path = "serial0:115200n8";
237eea6710SKevin Hilman	};
247eea6710SKevin Hilman
257eea6710SKevin Hilman	memory@0 {
267eea6710SKevin Hilman		device_type = "memory";
277eea6710SKevin Hilman		reg = <0x0 0x0 0x0 0x80000000>;
287eea6710SKevin Hilman	};
297eea6710SKevin Hilman
307eea6710SKevin Hilman	vddio_card: gpio-regulator {
317eea6710SKevin Hilman		compatible = "regulator-gpio";
327eea6710SKevin Hilman
337eea6710SKevin Hilman		regulator-name = "VDDIO_CARD";
347eea6710SKevin Hilman		regulator-min-microvolt = <1800000>;
357eea6710SKevin Hilman		regulator-max-microvolt = <3300000>;
367eea6710SKevin Hilman
377eea6710SKevin Hilman		gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
387eea6710SKevin Hilman		gpios-states = <1>;
397eea6710SKevin Hilman
407eea6710SKevin Hilman		/* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
417eea6710SKevin Hilman		states = <1800000 0
427eea6710SKevin Hilman			  3300000 1>;
437eea6710SKevin Hilman	};
447eea6710SKevin Hilman
457eea6710SKevin Hilman	vddio_boot: regulator-vddio_boot {
467eea6710SKevin Hilman		compatible = "regulator-fixed";
477eea6710SKevin Hilman		regulator-name = "VDDIO_BOOT";
487eea6710SKevin Hilman		regulator-min-microvolt = <1800000>;
497eea6710SKevin Hilman		regulator-max-microvolt = <1800000>;
507eea6710SKevin Hilman	};
517eea6710SKevin Hilman
527eea6710SKevin Hilman	vddao_3v3: regulator-vddao_3v3 {
537eea6710SKevin Hilman		compatible = "regulator-fixed";
547eea6710SKevin Hilman		regulator-name = "VDDAO_3V3";
557eea6710SKevin Hilman		regulator-min-microvolt = <3300000>;
567eea6710SKevin Hilman		regulator-max-microvolt = <3300000>;
577eea6710SKevin Hilman	};
587eea6710SKevin Hilman
597eea6710SKevin Hilman	vcc_3v3: regulator-vcc_3v3 {
607eea6710SKevin Hilman		compatible = "regulator-fixed";
617eea6710SKevin Hilman		regulator-name = "VCC_3V3";
627eea6710SKevin Hilman		regulator-min-microvolt = <3300000>;
637eea6710SKevin Hilman		regulator-max-microvolt = <3300000>;
647eea6710SKevin Hilman	};
657eea6710SKevin Hilman
667eea6710SKevin Hilman	emmc_pwrseq: emmc-pwrseq {
677eea6710SKevin Hilman		compatible = "mmc-pwrseq-emmc";
687eea6710SKevin Hilman		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
697eea6710SKevin Hilman	};
707eea6710SKevin Hilman
717eea6710SKevin Hilman	wifi32k: wifi32k {
727eea6710SKevin Hilman		compatible = "pwm-clock";
737eea6710SKevin Hilman		#clock-cells = <0>;
747eea6710SKevin Hilman		clock-frequency = <32768>;
757eea6710SKevin Hilman		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
767eea6710SKevin Hilman	};
777eea6710SKevin Hilman
787eea6710SKevin Hilman	sdio_pwrseq: sdio-pwrseq {
797eea6710SKevin Hilman		compatible = "mmc-pwrseq-simple";
807eea6710SKevin Hilman		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
817eea6710SKevin Hilman		clocks = <&wifi32k>;
827eea6710SKevin Hilman		clock-names = "ext_clock";
837eea6710SKevin Hilman	};
847eea6710SKevin Hilman
857eea6710SKevin Hilman	cvbs-connector {
867eea6710SKevin Hilman		compatible = "composite-video-connector";
877eea6710SKevin Hilman
887eea6710SKevin Hilman		port {
897eea6710SKevin Hilman			cvbs_connector_in: endpoint {
907eea6710SKevin Hilman				remote-endpoint = <&cvbs_vdac_out>;
917eea6710SKevin Hilman			};
927eea6710SKevin Hilman		};
937eea6710SKevin Hilman	};
946939db7eSNeil Armstrong
956939db7eSNeil Armstrong	hdmi-connector {
966939db7eSNeil Armstrong		compatible = "hdmi-connector";
976939db7eSNeil Armstrong		type = "a";
986939db7eSNeil Armstrong
996939db7eSNeil Armstrong		port {
1006939db7eSNeil Armstrong			hdmi_connector_in: endpoint {
1016939db7eSNeil Armstrong				remote-endpoint = <&hdmi_tx_tmds_out>;
1026939db7eSNeil Armstrong			};
1036939db7eSNeil Armstrong		};
1046939db7eSNeil Armstrong	};
1057eea6710SKevin Hilman};
1067eea6710SKevin Hilman
107b16c71c9SNeil Armstrong&cec_AO {
108b16c71c9SNeil Armstrong	status = "okay";
109b16c71c9SNeil Armstrong	pinctrl-0 = <&ao_cec_pins>;
110b16c71c9SNeil Armstrong	pinctrl-names = "default";
111b16c71c9SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
112b16c71c9SNeil Armstrong};
113b16c71c9SNeil Armstrong
114e02849b9SAndreas Färber&cvbs_vdac_port {
115e02849b9SAndreas Färber	cvbs_vdac_out: endpoint {
116e02849b9SAndreas Färber		remote-endpoint = <&cvbs_connector_in>;
117e02849b9SAndreas Färber	};
1187eea6710SKevin Hilman};
1197eea6710SKevin Hilman
1207eea6710SKevin Hilman&ethmac {
1217eea6710SKevin Hilman	status = "okay";
1227eea6710SKevin Hilman	phy-mode = "rmii";
1237eea6710SKevin Hilman	phy-handle = <&internal_phy>;
1247eea6710SKevin Hilman};
1257eea6710SKevin Hilman
126e02849b9SAndreas Färber&hdmi_tx {
127e02849b9SAndreas Färber	status = "okay";
128e02849b9SAndreas Färber	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
129e02849b9SAndreas Färber	pinctrl-names = "default";
130e02849b9SAndreas Färber};
131e02849b9SAndreas Färber
132e02849b9SAndreas Färber&hdmi_tx_tmds_port {
133e02849b9SAndreas Färber	hdmi_tx_tmds_out: endpoint {
134e02849b9SAndreas Färber		remote-endpoint = <&hdmi_connector_in>;
135e02849b9SAndreas Färber	};
136e02849b9SAndreas Färber};
137e02849b9SAndreas Färber
1387eea6710SKevin Hilman&ir {
1397eea6710SKevin Hilman	status = "okay";
1407eea6710SKevin Hilman	pinctrl-0 = <&remote_input_ao_pins>;
1417eea6710SKevin Hilman	pinctrl-names = "default";
1427eea6710SKevin Hilman};
1437eea6710SKevin Hilman
144e02849b9SAndreas Färber&pwm_ef {
145e02849b9SAndreas Färber	status = "okay";
146e02849b9SAndreas Färber	pinctrl-0 = <&pwm_e_pins>;
147e02849b9SAndreas Färber	pinctrl-names = "default";
148e02849b9SAndreas Färber	clocks = <&clkc CLKID_FCLK_DIV4>;
149e02849b9SAndreas Färber	clock-names = "clkin0";
150e02849b9SAndreas Färber};
151e02849b9SAndreas Färber
1527eea6710SKevin Hilman/* Wireless SDIO Module */
1537eea6710SKevin Hilman&sd_emmc_a {
1547eea6710SKevin Hilman	status = "okay";
1557eea6710SKevin Hilman	pinctrl-0 = <&sdio_pins>;
15667e7607fSJerome Brunet	pinctrl-1 = <&sdio_clk_gate_pins>;
15767e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
1587eea6710SKevin Hilman	#address-cells = <1>;
1597eea6710SKevin Hilman	#size-cells = <0>;
1607eea6710SKevin Hilman
1617eea6710SKevin Hilman	bus-width = <4>;
1627eea6710SKevin Hilman	cap-sd-highspeed;
1637eea6710SKevin Hilman	max-frequency = <100000000>;
1647eea6710SKevin Hilman
1657eea6710SKevin Hilman	non-removable;
1667eea6710SKevin Hilman	disable-wp;
1677eea6710SKevin Hilman
1687eea6710SKevin Hilman	mmc-pwrseq = <&sdio_pwrseq>;
1697eea6710SKevin Hilman
1707eea6710SKevin Hilman	vmmc-supply = <&vddao_3v3>;
1717eea6710SKevin Hilman	vqmmc-supply = <&vddio_boot>;
1727eea6710SKevin Hilman};
1737eea6710SKevin Hilman
1747eea6710SKevin Hilman/* SD card */
1757eea6710SKevin Hilman&sd_emmc_b {
1767eea6710SKevin Hilman	status = "okay";
1777eea6710SKevin Hilman	pinctrl-0 = <&sdcard_pins>;
17867e7607fSJerome Brunet	pinctrl-1 = <&sdcard_clk_gate_pins>;
17967e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
1807eea6710SKevin Hilman
1817eea6710SKevin Hilman	bus-width = <4>;
1827eea6710SKevin Hilman	cap-sd-highspeed;
1837eea6710SKevin Hilman	max-frequency = <100000000>;
1847eea6710SKevin Hilman	disable-wp;
1857eea6710SKevin Hilman
1867eea6710SKevin Hilman	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
1877eea6710SKevin Hilman	cd-inverted;
1887eea6710SKevin Hilman
1897eea6710SKevin Hilman	vmmc-supply = <&vddao_3v3>;
1907eea6710SKevin Hilman	vqmmc-supply = <&vddio_card>;
1917eea6710SKevin Hilman};
1927eea6710SKevin Hilman
1937eea6710SKevin Hilman/* eMMC */
1947eea6710SKevin Hilman&sd_emmc_c {
1957eea6710SKevin Hilman	status = "okay";
196ab36be66SNeil Armstrong	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
19767e7607fSJerome Brunet	pinctrl-1 = <&emmc_clk_gate_pins>;
19867e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
1997eea6710SKevin Hilman
2007eea6710SKevin Hilman	bus-width = <8>;
2017eea6710SKevin Hilman	cap-mmc-highspeed;
2027eea6710SKevin Hilman	max-frequency = <200000000>;
2037eea6710SKevin Hilman	non-removable;
2047eea6710SKevin Hilman	disable-wp;
2057eea6710SKevin Hilman	mmc-ddr-1_8v;
2067eea6710SKevin Hilman	mmc-hs200-1_8v;
2077eea6710SKevin Hilman
2087eea6710SKevin Hilman	mmc-pwrseq = <&emmc_pwrseq>;
2097eea6710SKevin Hilman	vmmc-supply = <&vcc_3v3>;
2107eea6710SKevin Hilman	vqmmc-supply = <&vddio_boot>;
2117eea6710SKevin Hilman};
2127eea6710SKevin Hilman
213e02849b9SAndreas Färber&uart_AO {
2147eea6710SKevin Hilman	status = "okay";
215e02849b9SAndreas Färber	pinctrl-0 = <&uart_ao_a_pins>;
2167eea6710SKevin Hilman	pinctrl-names = "default";
2176939db7eSNeil Armstrong};
21855ef3224SMartin Blumenstingl
21955ef3224SMartin Blumenstingl&usb0 {
22055ef3224SMartin Blumenstingl	status = "okay";
22155ef3224SMartin Blumenstingl};
222