GNU Linux-libre 5.4.274-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         vddio_ao18: regulator-vddio_ao18 {
64                 compatible = "regulator-fixed";
65                 regulator-name = "VDDIO_AO18";
66                 regulator-min-microvolt = <1800000>;
67                 regulator-max-microvolt = <1800000>;
68                 regulator-always-on;
69         };
70
71         vcc_3v3: regulator-vcc_3v3 {
72                 compatible = "regulator-fixed";
73                 regulator-name = "VCC_3V3";
74                 regulator-min-microvolt = <3300000>;
75                 regulator-max-microvolt = <3300000>;
76         };
77
78         emmc_pwrseq: emmc-pwrseq {
79                 compatible = "mmc-pwrseq-emmc";
80                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
81         };
82
83         wifi32k: wifi32k {
84                 compatible = "pwm-clock";
85                 #clock-cells = <0>;
86                 clock-frequency = <32768>;
87                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
88         };
89
90         sdio_pwrseq: sdio-pwrseq {
91                 compatible = "mmc-pwrseq-simple";
92                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
93                 clocks = <&wifi32k>;
94                 clock-names = "ext_clock";
95         };
96
97         cvbs-connector {
98                 compatible = "composite-video-connector";
99
100                 port {
101                         cvbs_connector_in: endpoint {
102                                 remote-endpoint = <&cvbs_vdac_out>;
103                         };
104                 };
105         };
106
107         hdmi-connector {
108                 compatible = "hdmi-connector";
109                 type = "a";
110
111                 port {
112                         hdmi_connector_in: endpoint {
113                                 remote-endpoint = <&hdmi_tx_tmds_out>;
114                         };
115                 };
116         };
117 };
118
119 &cec_AO {
120         status = "okay";
121         pinctrl-0 = <&ao_cec_pins>;
122         pinctrl-names = "default";
123         hdmi-phandle = <&hdmi_tx>;
124 };
125
126 &cvbs_vdac_port {
127         cvbs_vdac_out: endpoint {
128                 remote-endpoint = <&cvbs_connector_in>;
129         };
130 };
131
132 &ethmac {
133         status = "okay";
134         pinctrl-0 = <&eth_rgmii_pins>;
135         pinctrl-names = "default";
136
137         phy-handle = <&eth_phy0>;
138         phy-mode = "rgmii";
139
140         amlogic,tx-delay-ns = <2>;
141
142         mdio {
143                 compatible = "snps,dwmac-mdio";
144                 #address-cells = <1>;
145                 #size-cells = <0>;
146
147                 eth_phy0: ethernet-phy@0 {
148                         /* Realtek RTL8211F (0x001cc916) */
149                         reg = <0>;
150
151                         reset-assert-us = <10000>;
152                         reset-deassert-us = <80000>;
153                         reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
154                 };
155         };
156 };
157
158 &hdmi_tx {
159         status = "okay";
160         pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
161         pinctrl-names = "default";
162         hdmi-supply = <&vddio_ao18>;
163 };
164
165 &hdmi_tx_tmds_port {
166         hdmi_tx_tmds_out: endpoint {
167                 remote-endpoint = <&hdmi_connector_in>;
168         };
169 };
170
171 &ir {
172         status = "okay";
173         pinctrl-0 = <&remote_input_ao_pins>;
174         pinctrl-names = "default";
175 };
176
177 &pwm_ef {
178         status = "okay";
179         pinctrl-0 = <&pwm_e_pins>;
180         pinctrl-names = "default";
181         clocks = <&clkc CLKID_FCLK_DIV4>;
182         clock-names = "clkin0";
183 };
184
185 &saradc {
186         status = "okay";
187         vref-supply = <&vddio_ao18>;
188 };
189
190 /* Wireless SDIO Module */
191 &sd_emmc_a {
192         status = "okay";
193         pinctrl-0 = <&sdio_pins>;
194         pinctrl-1 = <&sdio_clk_gate_pins>;
195         pinctrl-names = "default", "clk-gate";
196         #address-cells = <1>;
197         #size-cells = <0>;
198
199         bus-width = <4>;
200         cap-sd-highspeed;
201         max-frequency = <50000000>;
202
203         non-removable;
204         disable-wp;
205
206         mmc-pwrseq = <&sdio_pwrseq>;
207
208         vmmc-supply = <&vddao_3v3>;
209         vqmmc-supply = <&vddio_boot>;
210
211         brcmf: wifi@1 {
212                 reg = <1>;
213                 compatible = "brcm,bcm4329-fmac";
214         };
215 };
216
217 /* SD card */
218 &sd_emmc_b {
219         status = "okay";
220         pinctrl-0 = <&sdcard_pins>;
221         pinctrl-1 = <&sdcard_clk_gate_pins>;
222         pinctrl-names = "default", "clk-gate";
223
224         bus-width = <4>;
225         cap-sd-highspeed;
226         max-frequency = <50000000>;
227         disable-wp;
228
229         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
230
231         vmmc-supply = <&vddao_3v3>;
232         vqmmc-supply = <&vcc_3v3>;
233 };
234
235 /* eMMC */
236 &sd_emmc_c {
237         status = "okay";
238         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
239         pinctrl-1 = <&emmc_clk_gate_pins>;
240         pinctrl-names = "default", "clk-gate";
241
242         bus-width = <8>;
243         cap-mmc-highspeed;
244         max-frequency = <200000000>;
245         non-removable;
246         disable-wp;
247         mmc-ddr-1_8v;
248         mmc-hs200-1_8v;
249
250         mmc-pwrseq = <&emmc_pwrseq>;
251         vmmc-supply = <&vcc_3v3>;
252         vqmmc-supply = <&vddio_boot>;
253 };
254
255 /* This is connected to the Bluetooth module: */
256 &uart_A {
257         status = "okay";
258         pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
259         pinctrl-names = "default";
260         uart-has-rtscts;
261
262         bluetooth {
263                 compatible = "brcm,bcm43438-bt";
264                 shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
265         };
266 };
267
268 /* This UART is brought out to the DB9 connector */
269 &uart_AO {
270         status = "okay";
271         pinctrl-0 = <&uart_ao_a_pins>;
272         pinctrl-names = "default";
273 };
274
275 &usb0_phy {
276         status = "okay";
277         phy-supply = <&usb_pwr>;
278 };
279
280 &usb0 {
281         status = "okay";
282 };