Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git] / arch / arm / boot / dts / meson8m2-mxiii-plus.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Copyright (c) 2018 Oleg Ivanov <balbes-150@yandex.ru>
4  * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
5  */
6
7 /dts-v1/;
8
9 #include "meson8m2.dtsi"
10
11 #include <dt-bindings/gpio/gpio.h>
12 #include <dt-bindings/input/input.h>
13
14 / {
15         model = "Tronsmart MXIII Plus";
16         compatible = "tronsmart,mxiii-plus", "amlogic,meson8m2";
17
18         aliases {
19                 ethernet0 = &ethmac;
20                 i2c0 = &i2c_AO;
21                 serial0 = &uart_AO;
22                 serial1 = &uart_A;
23                 mmc0 = &sd_card_slot;
24         };
25
26         chosen {
27                 stdout-path = "serial0:115200n8";
28         };
29
30         memory {
31                 device_type = "memory";
32                 reg = <0x40000000 0x80000000>;
33         };
34
35         adc-keys {
36                 compatible = "adc-keys";
37                 io-channels = <&saradc 0>;
38                 io-channel-names = "buttons";
39                 keyup-threshold-microvolt = <1710000>;
40
41                 button-function {
42                         label = "Function";
43                         linux,code = <KEY_FN>;
44                         press-threshold-microvolt = <10000>;
45                 };
46         };
47
48         iio-hwmon {
49                 compatible = "iio-hwmon";
50                 io-channels = <&saradc 8>;
51         };
52
53         vcc_3v3: regulator-vcc3v3 {
54                 compatible = "regulator-fixed";
55                 regulator-name = "VCC3V3";
56                 regulator-min-microvolt = <3300000>;
57                 regulator-max-microvolt = <3300000>;
58         };
59 };
60
61 &cpu0 {
62         cpu-supply = <&vcck>;
63 };
64
65 &ethmac {
66         status = "okay";
67
68         pinctrl-0 = <&eth_rgmii_pins>;
69         pinctrl-names = "default";
70
71         phy-handle = <&eth_phy0>;
72         phy-mode = "rgmii";
73
74         amlogic,tx-delay-ns = <4>;
75
76         mdio {
77                 compatible = "snps,dwmac-mdio";
78                 #address-cells = <1>;
79                 #size-cells = <0>;
80
81                 eth_phy0: ethernet-phy@0 {
82                         /* Realtek RTL8211F (0x001cc916) */
83                         reg = <0>;
84
85                         reset-assert-us = <10000>;
86                         reset-deassert-us = <30000>;
87                         reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
88                 };
89         };
90 };
91
92 &ir_receiver {
93         status = "okay";
94         pinctrl-0 = <&ir_recv_pins>;
95         pinctrl-names = "default";
96 };
97
98 &i2c_AO {
99         status = "okay";
100         pinctrl-0 = <&i2c_ao_pins>;
101         pinctrl-names = "default";
102
103         pmic@32 {
104                 compatible = "ricoh,rn5t618";
105                 reg = <0x32>;
106                 system-power-controller;
107
108                 regulators {
109                         vcck: DCDC1 {
110                                 regulator-name = "VCCK";
111                                 regulator-min-microvolt = <825000>;
112                                 regulator-max-microvolt = <1150000>;
113                                 regulator-boot-on;
114                                 regulator-always-on;
115                         };
116
117                         vddee: DCDC2 {
118                                 /* the output is also used as VDDAO */
119                                 regulator-name = "VDD_EE";
120                                 regulator-min-microvolt = <950000>;
121                                 regulator-max-microvolt = <1150000>;
122                                 regulator-boot-on;
123                                 regulator-always-on;
124                         };
125
126                         DCDC3 {
127                                 regulator-name = "VDD_DDR";
128                                 regulator-min-microvolt = <1500000>;
129                                 regulator-max-microvolt = <1500000>;
130                                 regulator-boot-on;
131                                 regulator-always-on;
132                         };
133
134                         LDO1 {
135                                 regulator-name = "VDDIO_AO28";
136                                 regulator-min-microvolt = <2900000>;
137                                 regulator-max-microvolt = <2900000>;
138                                 regulator-boot-on;
139                                 regulator-always-on;
140                         };
141
142                         vddio_ao1v8: LDO2 {
143                                 regulator-name = "VDDIO_AO18";
144                                 regulator-min-microvolt = <1800000>;
145                                 regulator-max-microvolt = <1800000>;
146                                 regulator-boot-on;
147                                 regulator-always-on;
148                         };
149
150                         LDO3 {
151                                 regulator-name = "VCC1V8";
152                                 regulator-min-microvolt = <1800000>;
153                                 regulator-max-microvolt = <1800000>;
154                                 regulator-boot-on;
155                                 regulator-always-on;
156                         };
157
158                         LDO4 {
159                                 regulator-name = "VCC2V8";
160                                 regulator-min-microvolt = <2850000>;
161                                 regulator-max-microvolt = <2850000>;
162                                 regulator-boot-on;
163                                 regulator-always-on;
164                         };
165
166                         LDO5 {
167                                 regulator-name = "AVDD1V8";
168                                 regulator-min-microvolt = <1800000>;
169                                 regulator-max-microvolt = <1800000>;
170                                 regulator-boot-on;
171                                 regulator-always-on;
172                         };
173
174                         LDORTC1 {
175                                 regulator-name = "VDD_LDO";
176                                 regulator-min-microvolt = <2700000>;
177                                 regulator-max-microvolt = <2700000>;
178                                 regulator-boot-on;
179                                 regulator-always-on;
180                         };
181
182                         LDORTC2 {
183                                 regulator-name = "RTC_0V9";
184                                 regulator-min-microvolt = <900000>;
185                                 regulator-max-microvolt = <900000>;
186                                 regulator-boot-on;
187                                 regulator-always-on;
188                         };
189                 };
190         };
191 };
192
193 &mali {
194         mali-supply = <&vddee>;
195 };
196
197 &saradc {
198         status = "okay";
199         vref-supply = <&vddio_ao1v8>;
200 };
201
202 &sdio {
203         status = "okay";
204
205         pinctrl-0 = <&sd_b_pins>;
206         pinctrl-names = "default";
207
208         /* SD card */
209         sd_card_slot: slot@1 {
210                 compatible = "mmc-slot";
211                 reg = <1>;
212                 status = "okay";
213
214                 bus-width = <4>;
215                 no-sdio;
216                 cap-mmc-highspeed;
217                 cap-sd-highspeed;
218                 disable-wp;
219
220                 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
221
222                 vmmc-supply = <&vcc_3v3>;
223         };
224 };
225
226 /* connected to the Bluetooth module */
227 &uart_A {
228         status = "okay";
229         pinctrl-0 = <&uart_a1_pins>, <&uart_a1_cts_rts_pins>;
230         pinctrl-names = "default";
231         uart-has-rtscts;
232 };
233
234 &uart_AO {
235         status = "okay";
236         pinctrl-0 = <&uart_ao_a_pins>;
237         pinctrl-names = "default";
238 };
239
240 &usb0 {
241         status = "okay";
242 };
243
244 &usb1 {
245         status = "okay";
246 };
247
248 &usb0_phy {
249         status = "okay";
250 };
251
252 &usb1_phy {
253         status = "okay";
254 };