GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm64 / boot / dts / amlogic / meson-gxbb-wetek.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2016 Andreas Färber
4  * Copyright (c) 2016 BayLibre, Inc.
5  * Author: Kevin Hilman <khilman@kernel.org>
6  */
7
8 #include "meson-gxbb.dtsi"
9 #include <dt-bindings/gpio/gpio.h>
10
11 / {
12         aliases {
13                 serial0 = &uart_AO;
14                 ethernet0 = &ethmac;
15         };
16
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
20
21         memory@0 {
22                 device_type = "memory";
23                 reg = <0x0 0x0 0x0 0x40000000>;
24         };
25
26         leds {
27                 compatible = "gpio-leds";
28
29                 system {
30                         label = "wetek-play:system-status";
31                         gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
32                         default-state = "on";
33                         panic-indicator;
34                 };
35         };
36
37         usb_pwr: regulator-usb-pwrs {
38                 compatible = "regulator-fixed";
39
40                 regulator-name = "USB_PWR";
41
42                 regulator-min-microvolt = <5000000>;
43                 regulator-max-microvolt = <5000000>;
44
45                 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
46                 enable-active-high;
47         };
48
49         vddio_boot: regulator-vddio_boot {
50                 compatible = "regulator-fixed";
51                 regulator-name = "VDDIO_BOOT";
52                 regulator-min-microvolt = <1800000>;
53                 regulator-max-microvolt = <1800000>;
54         };
55
56         vddao_3v3: regulator-vddao_3v3 {
57                 compatible = "regulator-fixed";
58                 regulator-name = "VDDAO_3V3";
59                 regulator-min-microvolt = <3300000>;
60                 regulator-max-microvolt = <3300000>;
61         };
62
63         vcc_3v3: regulator-vcc_3v3 {
64                 compatible = "regulator-fixed";
65                 regulator-name = "VCC_3V3";
66                 regulator-min-microvolt = <3300000>;
67                 regulator-max-microvolt = <3300000>;
68         };
69
70         emmc_pwrseq: emmc-pwrseq {
71                 compatible = "mmc-pwrseq-emmc";
72                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
73         };
74
75         wifi32k: wifi32k {
76                 compatible = "pwm-clock";
77                 #clock-cells = <0>;
78                 clock-frequency = <32768>;
79                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
80         };
81
82         sdio_pwrseq: sdio-pwrseq {
83                 compatible = "mmc-pwrseq-simple";
84                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
85                 clocks = <&wifi32k>;
86                 clock-names = "ext_clock";
87         };
88
89         cvbs-connector {
90                 compatible = "composite-video-connector";
91
92                 port {
93                         cvbs_connector_in: endpoint {
94                                 remote-endpoint = <&cvbs_vdac_out>;
95                         };
96                 };
97         };
98
99         hdmi-connector {
100                 compatible = "hdmi-connector";
101                 type = "a";
102
103                 port {
104                         hdmi_connector_in: endpoint {
105                                 remote-endpoint = <&hdmi_tx_tmds_out>;
106                         };
107                 };
108         };
109 };
110
111 &cec_AO {
112         status = "okay";
113         pinctrl-0 = <&ao_cec_pins>;
114         pinctrl-names = "default";
115         hdmi-phandle = <&hdmi_tx>;
116 };
117
118 &cvbs_vdac_port {
119         cvbs_vdac_out: endpoint {
120                 remote-endpoint = <&cvbs_connector_in>;
121         };
122 };
123
124 &ethmac {
125         status = "okay";
126         pinctrl-0 = <&eth_rgmii_pins>;
127         pinctrl-names = "default";
128
129         phy-handle = <&eth_phy0>;
130         phy-mode = "rgmii";
131
132         amlogic,tx-delay-ns = <2>;
133
134         snps,reset-gpio = <&gpio GPIOZ_14 0>;
135         snps,reset-delays-us = <0 10000 1000000>;
136         snps,reset-active-low;
137
138         mdio {
139                 compatible = "snps,dwmac-mdio";
140                 #address-cells = <1>;
141                 #size-cells = <0>;
142
143                 eth_phy0: ethernet-phy@0 {
144                         /* Realtek RTL8211F (0x001cc916) */
145                         reg = <0>;
146                         eee-broken-1000t;
147                 };
148         };
149 };
150
151 &hdmi_tx {
152         status = "okay";
153         pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
154         pinctrl-names = "default";
155 };
156
157 &hdmi_tx_tmds_port {
158         hdmi_tx_tmds_out: endpoint {
159                 remote-endpoint = <&hdmi_connector_in>;
160         };
161 };
162
163 &ir {
164         status = "okay";
165         pinctrl-0 = <&remote_input_ao_pins>;
166         pinctrl-names = "default";
167 };
168
169 &pwm_ef {
170         status = "okay";
171         pinctrl-0 = <&pwm_e_pins>;
172         pinctrl-names = "default";
173         clocks = <&clkc CLKID_FCLK_DIV4>;
174         clock-names = "clkin0";
175 };
176
177 /* Wireless SDIO Module */
178 &sd_emmc_a {
179         status = "okay";
180         pinctrl-0 = <&sdio_pins>;
181         pinctrl-1 = <&sdio_clk_gate_pins>;
182         pinctrl-names = "default", "clk-gate";
183         #address-cells = <1>;
184         #size-cells = <0>;
185
186         bus-width = <4>;
187         cap-sd-highspeed;
188         max-frequency = <100000000>;
189
190         non-removable;
191         disable-wp;
192
193         mmc-pwrseq = <&sdio_pwrseq>;
194
195         vmmc-supply = <&vddao_3v3>;
196         vqmmc-supply = <&vddio_boot>;
197
198         brcmf: wifi@1 {
199                 reg = <1>;
200                 compatible = "brcm,bcm4329-fmac";
201         };
202 };
203
204 /* SD card */
205 &sd_emmc_b {
206         status = "okay";
207         pinctrl-0 = <&sdcard_pins>;
208         pinctrl-1 = <&sdcard_clk_gate_pins>;
209         pinctrl-names = "default", "clk-gate";
210
211         bus-width = <4>;
212         cap-sd-highspeed;
213         max-frequency = <100000000>;
214         disable-wp;
215
216         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
217         cd-inverted;
218
219         vmmc-supply = <&vddao_3v3>;
220         vqmmc-supply = <&vcc_3v3>;
221 };
222
223 /* eMMC */
224 &sd_emmc_c {
225         status = "okay";
226         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
227         pinctrl-1 = <&emmc_clk_gate_pins>;
228         pinctrl-names = "default", "clk-gate";
229
230         bus-width = <8>;
231         cap-mmc-highspeed;
232         max-frequency = <200000000>;
233         non-removable;
234         disable-wp;
235         mmc-ddr-1_8v;
236         mmc-hs200-1_8v;
237
238         mmc-pwrseq = <&emmc_pwrseq>;
239         vmmc-supply = <&vcc_3v3>;
240         vqmmc-supply = <&vddio_boot>;
241 };
242
243 /* This UART is brought out to the DB9 connector */
244 &uart_AO {
245         status = "okay";
246         pinctrl-0 = <&uart_ao_a_pins>;
247         pinctrl-names = "default";
248 };
249
250 &usb0_phy {
251         status = "okay";
252         phy-supply = <&usb_pwr>;
253 };
254
255 &usb0 {
256         status = "okay";
257 };