blob: 25105ac96d5596cf2a0abf412cccfa2ebfd7d502 [file] [log] [blame]
Neil Armstrong114abfe2018-02-27 12:30:33 +01001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Neil Armstrongc246e9d2016-10-05 10:09:40 +02002/*
3 * Copyright (c) 2016 Andreas Färber
4 * Copyright (c) 2016 BayLibre, Inc.
5 * Author: Neil Armstrong <narmstrong@kernel.org>
Neil Armstrongc246e9d2016-10-05 10:09:40 +02006 */
7
8/dts-v1/;
9
10#include "meson-gxbb.dtsi"
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13
14/ {
15 compatible = "nexbox,a95x", "amlogic,meson-gxbb";
16 model = "NEXBOX A95X";
Jerome Brunet67e76072017-08-31 15:52:20 +020017
Neil Armstrongc246e9d2016-10-05 10:09:40 +020018 aliases {
19 serial0 = &uart_AO;
Jorge Ramirez-Ortiz059a58f2018-01-17 11:56:27 +010020 ethernet0 = &ethmac;
Neil Armstrongc246e9d2016-10-05 10:09:40 +020021 };
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 };
26
27 memory@0 {
28 device_type = "memory";
29 reg = <0x0 0x0 0x0 0x40000000>;
30 };
31
32 leds {
33 compatible = "gpio-leds";
34 blue {
35 label = "a95x:system-status";
36 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
37 linux,default-trigger = "heartbeat";
38 default-state = "off";
39 };
40 };
41
42 gpio-keys-polled {
43 compatible = "gpio-keys-polled";
44 #address-cells = <1>;
45 #size-cells = <0>;
46 poll-interval = <100>;
47
48 button@0 {
49 label = "reset";
50 linux,code = <KEY_RESTART>;
51 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
52 };
53 };
Neil Armstronga776e042016-10-20 13:42:57 +020054
Peter Korsgaarde2f4d742017-10-05 15:21:18 +020055 usb_pwr: regulator-usb-pwrs {
56 compatible = "regulator-fixed";
57
58 regulator-name = "USB_PWR";
59
60 regulator-min-microvolt = <5000000>;
61 regulator-max-microvolt = <5000000>;
62
63 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
64 enable-active-high;
65 };
66
Neil Armstronga776e042016-10-20 13:42:57 +020067 vddio_card: gpio-regulator {
68 compatible = "regulator-gpio";
69
70 regulator-name = "VDDIO_CARD";
71 regulator-min-microvolt = <1800000>;
72 regulator-max-microvolt = <3300000>;
73
74 gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
75 gpios-states = <1>;
76
77 /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
78 states = <1800000 0
79 3300000 1>;
80 };
81
82 vddio_boot: regulator-vddio_boot {
83 compatible = "regulator-fixed";
84 regulator-name = "VDDIO_BOOT";
85 regulator-min-microvolt = <1800000>;
86 regulator-max-microvolt = <1800000>;
87 };
88
89 vddao_3v3: regulator-vddao_3v3 {
90 compatible = "regulator-fixed";
91 regulator-name = "VDDAO_3V3";
92 regulator-min-microvolt = <3300000>;
93 regulator-max-microvolt = <3300000>;
94 };
95
96 vcc_3v3: regulator-vcc_3v3 {
97 compatible = "regulator-fixed";
98 regulator-name = "VCC_3V3";
99 regulator-min-microvolt = <3300000>;
100 regulator-max-microvolt = <3300000>;
101 };
102
103 emmc_pwrseq: emmc-pwrseq {
104 compatible = "mmc-pwrseq-emmc";
105 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
106 };
107
108 wifi32k: wifi32k {
109 compatible = "pwm-clock";
110 #clock-cells = <0>;
111 clock-frequency = <32768>;
112 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
113 };
114
115 sdio_pwrseq: sdio-pwrseq {
116 compatible = "mmc-pwrseq-simple";
117 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
118 clocks = <&wifi32k>;
119 clock-names = "ext_clock";
120 };
Neil Armstrongfafdbdf2016-12-01 10:05:58 +0100121
122 cvbs-connector {
123 compatible = "composite-video-connector";
124
125 port {
126 cvbs_connector_in: endpoint {
127 remote-endpoint = <&cvbs_vdac_out>;
128 };
129 };
130 };
Neil Armstrong6939db72017-03-21 16:25:46 +0100131
132 hdmi-connector {
133 compatible = "hdmi-connector";
134 type = "a";
135
136 port {
137 hdmi_connector_in: endpoint {
138 remote-endpoint = <&hdmi_tx_tmds_out>;
139 };
140 };
141 };
Neil Armstrongc246e9d2016-10-05 10:09:40 +0200142};
143
Andreas Färber82f11342017-05-13 16:33:32 +0200144&cvbs_vdac_port {
145 cvbs_vdac_out: endpoint {
146 remote-endpoint = <&cvbs_connector_in>;
147 };
Neil Armstrongc246e9d2016-10-05 10:09:40 +0200148};
149
Neil Armstrongb16c71c2017-08-04 15:12:13 +0200150&cec_AO {
151 status = "okay";
152 pinctrl-0 = <&ao_cec_pins>;
153 pinctrl-names = "default";
154 hdmi-phandle = <&hdmi_tx>;
155};
156
Neil Armstrongc246e9d2016-10-05 10:09:40 +0200157&ethmac {
158 status = "okay";
Neil Armstrong3be2d9c2016-10-07 16:59:15 +0200159 pinctrl-0 = <&eth_rmii_pins>;
Neil Armstrongc246e9d2016-10-05 10:09:40 +0200160 pinctrl-names = "default";
Martin Blumenstingl67d49f32017-02-19 22:41:44 +0100161
162 phy-handle = <&eth_phy0>;
Neil Armstrong3be2d9c2016-10-07 16:59:15 +0200163 phy-mode = "rmii";
Martin Blumenstingl67d49f32017-02-19 22:41:44 +0100164
165 snps,reset-gpio = <&gpio GPIOZ_14 0>;
166 snps,reset-delays-us = <0 10000 1000000>;
167 snps,reset-active-low;
168
169 mdio {
170 compatible = "snps,dwmac-mdio";
171 #address-cells = <1>;
172 #size-cells = <0>;
173
174 eth_phy0: ethernet-phy@0 {
175 /* IC Plus IP101GR (0x02430c54) */
176 reg = <0>;
177 };
178 };
Neil Armstrongc246e9d2016-10-05 10:09:40 +0200179};
180
Andreas Färber82f11342017-05-13 16:33:32 +0200181&hdmi_tx {
182 status = "okay";
183 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
184 pinctrl-names = "default";
185};
186
187&hdmi_tx_tmds_port {
188 hdmi_tx_tmds_out: endpoint {
189 remote-endpoint = <&hdmi_connector_in>;
190 };
191};
192
Neil Armstrongc246e9d2016-10-05 10:09:40 +0200193&ir {
194 status = "okay";
195 pinctrl-0 = <&remote_input_ao_pins>;
196 pinctrl-names = "default";
197};
Neil Armstronga776e042016-10-20 13:42:57 +0200198
Andreas Färber82f11342017-05-13 16:33:32 +0200199&pwm_ef {
200 status = "okay";
201 pinctrl-0 = <&pwm_e_pins>;
202 pinctrl-names = "default";
203 clocks = <&clkc CLKID_FCLK_DIV4>;
204 clock-names = "clkin0";
205};
206
Neil Armstronga776e042016-10-20 13:42:57 +0200207/* Wireless SDIO Module */
208&sd_emmc_a {
209 status = "okay";
210 pinctrl-0 = <&sdio_pins>;
Jerome Brunet67e76072017-08-31 15:52:20 +0200211 pinctrl-1 = <&sdio_clk_gate_pins>;
212 pinctrl-names = "default", "clk-gate";
Neil Armstronga776e042016-10-20 13:42:57 +0200213 #address-cells = <1>;
214 #size-cells = <0>;
215
216 bus-width = <4>;
217 cap-sd-highspeed;
218 max-frequency = <100000000>;
219
220 non-removable;
221 disable-wp;
222
223 mmc-pwrseq = <&sdio_pwrseq>;
224
225 vmmc-supply = <&vddao_3v3>;
226 vqmmc-supply = <&vddio_boot>;
227};
228
229/* SD card */
230&sd_emmc_b {
231 status = "okay";
232 pinctrl-0 = <&sdcard_pins>;
Jerome Brunet67e76072017-08-31 15:52:20 +0200233 pinctrl-1 = <&sdcard_clk_gate_pins>;
234 pinctrl-names = "default", "clk-gate";
Neil Armstronga776e042016-10-20 13:42:57 +0200235
236 bus-width = <4>;
237 cap-sd-highspeed;
238 max-frequency = <100000000>;
239 disable-wp;
240
Loys Ollivierf29200c2019-01-14 15:44:21 +0100241 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
Neil Armstronga776e042016-10-20 13:42:57 +0200242
243 vmmc-supply = <&vddao_3v3>;
244 vqmmc-supply = <&vddio_card>;
245};
246
247/* eMMC */
248&sd_emmc_c {
249 status = "okay";
Neil Armstrongab36be62017-10-03 17:24:42 +0200250 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
Jerome Brunet67e76072017-08-31 15:52:20 +0200251 pinctrl-1 = <&emmc_clk_gate_pins>;
252 pinctrl-names = "default", "clk-gate";
Neil Armstronga776e042016-10-20 13:42:57 +0200253
254 bus-width = <8>;
Neil Armstronga776e042016-10-20 13:42:57 +0200255 cap-mmc-highspeed;
256 max-frequency = <200000000>;
257 non-removable;
258 disable-wp;
259 mmc-ddr-1_8v;
260 mmc-hs200-1_8v;
261
262 mmc-pwrseq = <&emmc_pwrseq>;
263 vmmc-supply = <&vcc_3v3>;
264 vqmmc-supply = <&vddio_boot>;
265};
266
Andreas Färber82f11342017-05-13 16:33:32 +0200267&uart_AO {
Neil Armstronga776e042016-10-20 13:42:57 +0200268 status = "okay";
Andreas Färber82f11342017-05-13 16:33:32 +0200269 pinctrl-0 = <&uart_ao_a_pins>;
Neil Armstronga776e042016-10-20 13:42:57 +0200270 pinctrl-names = "default";
Neil Armstrong6939db72017-03-21 16:25:46 +0100271};
Peter Korsgaarde2f4d742017-10-05 15:21:18 +0200272
273&usb0_phy {
274 status = "okay";
275 phy-supply = <&usb_pwr>;
276};
277
278&usb1_phy {
279 status = "okay";
280};
281
282&usb0 {
283 status = "okay";
284};
285
286&usb1 {
287 status = "okay";
288};