Merge tag 'drm-next-2020-04-08' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp157a-avenger96.dts
1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2 /*
3  * Copyright (C) Linaro Ltd 2019 - All Rights Reserved
4  * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
5  */
6
7 /dts-v1/;
8
9 #include "stm32mp157.dtsi"
10 #include "stm32mp15-pinctrl.dtsi"
11 #include "stm32mp15xxac-pinctrl.dtsi"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/mfd/st,stpmic1.h>
14
15 / {
16         model = "Arrow Electronics STM32MP157A Avenger96 board";
17         compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
18
19         aliases {
20                 ethernet0 = &ethernet0;
21                 mmc0 = &sdmmc1;
22                 serial0 = &uart4;
23                 serial1 = &uart7;
24         };
25
26         chosen {
27                 stdout-path = "serial0:115200n8";
28         };
29
30         memory@c0000000 {
31                 device_type = "memory";
32                 reg = <0xc0000000 0x40000000>;
33         };
34
35         led {
36                 compatible = "gpio-leds";
37                 led1 {
38                         label = "green:user1";
39                         gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
40                         linux,default-trigger = "heartbeat";
41                         default-state = "off";
42                 };
43
44                 led2 {
45                         label = "green:user2";
46                         gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
47                         linux,default-trigger = "mmc0";
48                         default-state = "off";
49                 };
50
51                 led3 {
52                         label = "green:user3";
53                         gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
54                         linux,default-trigger = "mmc1";
55                         default-state = "off";
56                 };
57
58                 led4 {
59                         label = "green:user3";
60                         gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
61                         linux,default-trigger = "none";
62                         default-state = "off";
63                         panic-indicator;
64                 };
65
66                 led5 {
67                         label = "yellow:wifi";
68                         gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
69                         linux,default-trigger = "phy0tx";
70                         default-state = "off";
71                 };
72
73                 led6 {
74                         label = "blue:bt";
75                         gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
76                         linux,default-trigger = "bluetooth-power";
77                         default-state = "off";
78                 };
79         };
80 };
81
82 &ethernet0 {
83         status = "okay";
84         pinctrl-0 = <&ethernet0_rgmii_pins_a>;
85         pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
86         pinctrl-names = "default", "sleep";
87         phy-mode = "rgmii";
88         max-speed = <1000>;
89         phy-handle = <&phy0>;
90
91         mdio0 {
92                 #address-cells = <1>;
93                 #size-cells = <0>;
94                 compatible = "snps,dwmac-mdio";
95                 phy0: ethernet-phy@7 {
96                         reg = <7>;
97                 };
98         };
99 };
100
101 &i2c1 {
102         pinctrl-names = "default";
103         pinctrl-0 = <&i2c1_pins_b>;
104         i2c-scl-rising-time-ns = <185>;
105         i2c-scl-falling-time-ns = <20>;
106         status = "okay";
107         /delete-property/dmas;
108         /delete-property/dma-names;
109 };
110
111 &i2c2 {
112         pinctrl-names = "default";
113         pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
114         i2c-scl-rising-time-ns = <185>;
115         i2c-scl-falling-time-ns = <20>;
116         status = "okay";
117         /delete-property/dmas;
118         /delete-property/dma-names;
119 };
120
121 &i2c4 {
122         pinctrl-names = "default";
123         pinctrl-0 = <&i2c4_pins_a>;
124         i2c-scl-rising-time-ns = <185>;
125         i2c-scl-falling-time-ns = <20>;
126         status = "okay";
127         /delete-property/dmas;
128         /delete-property/dma-names;
129
130         pmic: stpmic@33 {
131                 compatible = "st,stpmic1";
132                 reg = <0x33>;
133                 interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;
134                 interrupt-controller;
135                 #interrupt-cells = <2>;
136                 status = "okay";
137
138                 regulators {
139                         compatible = "st,stpmic1-regulators";
140
141                         ldo1-supply = <&v3v3>;
142                         ldo2-supply = <&v3v3>;
143                         ldo3-supply = <&vdd_ddr>;
144                         ldo5-supply = <&v3v3>;
145                         ldo6-supply = <&v3v3>;
146                         pwr_sw1-supply = <&bst_out>;
147                         pwr_sw2-supply = <&bst_out>;
148
149                         vddcore: buck1 {
150                                 regulator-name = "vddcore";
151                                 regulator-min-microvolt = <1200000>;
152                                 regulator-max-microvolt = <1350000>;
153                                 regulator-always-on;
154                                 regulator-initial-mode = <0>;
155                                 regulator-over-current-protection;
156                         };
157
158                         vdd_ddr: buck2 {
159                                 regulator-name = "vdd_ddr";
160                                 regulator-min-microvolt = <1350000>;
161                                 regulator-max-microvolt = <1350000>;
162                                 regulator-always-on;
163                                 regulator-initial-mode = <0>;
164                                 regulator-over-current-protection;
165                         };
166
167                         vdd: buck3 {
168                                 regulator-name = "vdd";
169                                 regulator-min-microvolt = <3300000>;
170                                 regulator-max-microvolt = <3300000>;
171                                 regulator-always-on;
172                                 regulator-initial-mode = <0>;
173                                 regulator-over-current-protection;
174                         };
175
176                         v3v3: buck4 {
177                                 regulator-name = "v3v3";
178                                 regulator-min-microvolt = <3300000>;
179                                 regulator-max-microvolt = <3300000>;
180                                 regulator-always-on;
181                                 regulator-over-current-protection;
182                                 regulator-initial-mode = <0>;
183                         };
184
185                         vdda: ldo1 {
186                                 regulator-name = "vdda";
187                                 regulator-min-microvolt = <2900000>;
188                                 regulator-max-microvolt = <2900000>;
189                                 interrupts = <IT_CURLIM_LDO1 0>;
190                                 interrupt-parent = <&pmic>;
191                         };
192
193                         v2v8: ldo2 {
194                                 regulator-name = "v2v8";
195                                 regulator-min-microvolt = <2800000>;
196                                 regulator-max-microvolt = <2800000>;
197                                 interrupts = <IT_CURLIM_LDO2 0>;
198                                 interrupt-parent = <&pmic>;
199                         };
200
201                         vtt_ddr: ldo3 {
202                                 regulator-name = "vtt_ddr";
203                                 regulator-min-microvolt = <500000>;
204                                 regulator-max-microvolt = <750000>;
205                                 regulator-always-on;
206                                 regulator-over-current-protection;
207                         };
208
209                         vdd_usb: ldo4 {
210                                 regulator-name = "vdd_usb";
211                                 interrupts = <IT_CURLIM_LDO4 0>;
212                                 interrupt-parent = <&pmic>;
213                         };
214
215                         vdd_sd: ldo5 {
216                                 regulator-name = "vdd_sd";
217                                 regulator-min-microvolt = <2900000>;
218                                 regulator-max-microvolt = <2900000>;
219                                 interrupts = <IT_CURLIM_LDO5 0>;
220                                 interrupt-parent = <&pmic>;
221                                 regulator-boot-on;
222                         };
223
224                         v1v8: ldo6 {
225                                 regulator-name = "v1v8";
226                                 regulator-min-microvolt = <1800000>;
227                                 regulator-max-microvolt = <1800000>;
228                                 interrupts = <IT_CURLIM_LDO6 0>;
229                                 interrupt-parent = <&pmic>;
230                                 regulator-enable-ramp-delay = <300000>;
231                         };
232
233                         vref_ddr: vref_ddr {
234                                 regulator-name = "vref_ddr";
235                                 regulator-always-on;
236                         };
237
238                         bst_out: boost {
239                                 regulator-name = "bst_out";
240                                 interrupts = <IT_OCP_BOOST 0>;
241                                 interrupt-parent = <&pmic>;
242                         };
243
244                         vbus_otg: pwr_sw1 {
245                                 regulator-name = "vbus_otg";
246                                 interrupts = <IT_OCP_OTG 0>;
247                                 interrupt-parent = <&pmic>;
248                         };
249
250                         vbus_sw: pwr_sw2 {
251                                 regulator-name = "vbus_sw";
252                                 interrupts = <IT_OCP_SWOUT 0>;
253                                 interrupt-parent = <&pmic>;
254                                 regulator-active-discharge = <1>;
255                         };
256                 };
257
258                 onkey {
259                         compatible = "st,stpmic1-onkey";
260                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
261                         interrupt-names = "onkey-falling", "onkey-rising";
262                         status = "okay";
263                 };
264
265                 watchdog {
266                         compatible = "st,stpmic1-wdt";
267                         status = "disabled";
268                 };
269         };
270 };
271
272 &iwdg2 {
273         timeout-sec = <32>;
274         status = "okay";
275 };
276
277 &pwr_regulators {
278         vdd-supply = <&vdd>;
279         vdd_3v3_usbfs-supply = <&vdd_usb>;
280 };
281
282 &rng1 {
283         status = "okay";
284 };
285
286 &rtc {
287         status = "okay";
288 };
289
290 &sdmmc1 {
291         pinctrl-names = "default", "opendrain", "sleep";
292         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
293         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
294         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
295         cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
296         disable-wp;
297         st,sig-dir;
298         st,neg-edge;
299         st,use-ckin;
300         bus-width = <4>;
301         vmmc-supply = <&vdd_sd>;
302         status = "okay";
303 };
304
305 &uart4 {
306         /* On Low speed expansion header */
307         label = "LS-UART1";
308         pinctrl-names = "default";
309         pinctrl-0 = <&uart4_pins_b>;
310         status = "okay";
311 };
312
313 &uart7 {
314         /* On Low speed expansion header */
315         label = "LS-UART0";
316         pinctrl-names = "default";
317         pinctrl-0 = <&uart7_pins_a>;
318         status = "okay";
319 };