Linux 5.6.13
[linux/fpc-iii.git] / arch / arm / boot / dts / stm32mp157a-avenger96.dts
blobcbfa4075907ee934f94209550018d24cd197201f
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  */
7 /dts-v1/;
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>
15 / {
16         model = "Arrow Electronics STM32MP157A Avenger96 board";
17         compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157";
19         aliases {
20                 ethernet0 = &ethernet0;
21                 mmc0 = &sdmmc1;
22                 serial0 = &uart4;
23                 serial1 = &uart7;
24         };
26         chosen {
27                 stdout-path = "serial0:115200n8";
28         };
30         memory@c0000000 {
31                 device_type = "memory";
32                 reg = <0xc0000000 0x40000000>;
33         };
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                 };
44                 led2 {
45                         label = "green:user2";
46                         gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
47                         linux,default-trigger = "mmc0";
48                         default-state = "off";
49                 };
51                 led3 {
52                         label = "green:user3";
53                         gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
54                         linux,default-trigger = "mmc1";
55                         default-state = "off";
56                 };
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                 };
66                 led5 {
67                         label = "yellow:wifi";
68                         gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
69                         linux,default-trigger = "phy0tx";
70                         default-state = "off";
71                 };
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         };
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>;
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         };
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;
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;
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;
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";
138                 st,main-control-register = <0x04>;
139                 st,vin-control-register = <0xc0>;
140                 st,usb-control-register = <0x30>;
142                 regulators {
143                         compatible = "st,stpmic1-regulators";
145                         ldo1-supply = <&v3v3>;
146                         ldo2-supply = <&v3v3>;
147                         ldo3-supply = <&vdd_ddr>;
148                         ldo5-supply = <&v3v3>;
149                         ldo6-supply = <&v3v3>;
150                         pwr_sw1-supply = <&bst_out>;
151                         pwr_sw2-supply = <&bst_out>;
153                         vddcore: buck1 {
154                                 regulator-name = "vddcore";
155                                 regulator-min-microvolt = <1200000>;
156                                 regulator-max-microvolt = <1350000>;
157                                 regulator-always-on;
158                                 regulator-initial-mode = <0>;
159                                 regulator-over-current-protection;
160                         };
162                         vdd_ddr: buck2 {
163                                 regulator-name = "vdd_ddr";
164                                 regulator-min-microvolt = <1350000>;
165                                 regulator-max-microvolt = <1350000>;
166                                 regulator-always-on;
167                                 regulator-initial-mode = <0>;
168                                 regulator-over-current-protection;
169                         };
171                         vdd: buck3 {
172                                 regulator-name = "vdd";
173                                 regulator-min-microvolt = <3300000>;
174                                 regulator-max-microvolt = <3300000>;
175                                 regulator-always-on;
176                                 st,mask_reset;
177                                 regulator-initial-mode = <0>;
178                                 regulator-over-current-protection;
179                         };
181                         v3v3: buck4 {
182                                 regulator-name = "v3v3";
183                                 regulator-min-microvolt = <3300000>;
184                                 regulator-max-microvolt = <3300000>;
185                                 regulator-always-on;
186                                 regulator-over-current-protection;
187                                 regulator-initial-mode = <0>;
188                         };
190                         vdda: ldo1 {
191                                 regulator-name = "vdda";
192                                 regulator-min-microvolt = <2900000>;
193                                 regulator-max-microvolt = <2900000>;
194                                 interrupts = <IT_CURLIM_LDO1 0>;
195                                 interrupt-parent = <&pmic>;
196                         };
198                         v2v8: ldo2 {
199                                 regulator-name = "v2v8";
200                                 regulator-min-microvolt = <2800000>;
201                                 regulator-max-microvolt = <2800000>;
202                                 interrupts = <IT_CURLIM_LDO2 0>;
203                                 interrupt-parent = <&pmic>;
204                         };
206                         vtt_ddr: ldo3 {
207                                 regulator-name = "vtt_ddr";
208                                 regulator-min-microvolt = <500000>;
209                                 regulator-max-microvolt = <750000>;
210                                 regulator-always-on;
211                                 regulator-over-current-protection;
212                         };
214                         vdd_usb: ldo4 {
215                                 regulator-name = "vdd_usb";
216                                 regulator-min-microvolt = <3300000>;
217                                 regulator-max-microvolt = <3300000>;
218                                 interrupts = <IT_CURLIM_LDO4 0>;
219                                 interrupt-parent = <&pmic>;
220                         };
222                         vdd_sd: ldo5 {
223                                 regulator-name = "vdd_sd";
224                                 regulator-min-microvolt = <2900000>;
225                                 regulator-max-microvolt = <2900000>;
226                                 interrupts = <IT_CURLIM_LDO5 0>;
227                                 interrupt-parent = <&pmic>;
228                                 regulator-boot-on;
229                         };
231                         v1v8: ldo6 {
232                                 regulator-name = "v1v8";
233                                 regulator-min-microvolt = <1800000>;
234                                 regulator-max-microvolt = <1800000>;
235                                 interrupts = <IT_CURLIM_LDO6 0>;
236                                 interrupt-parent = <&pmic>;
237                                 regulator-enable-ramp-delay = <300000>;
238                         };
240                         vref_ddr: vref_ddr {
241                                 regulator-name = "vref_ddr";
242                                 regulator-always-on;
243                                 regulator-over-current-protection;
244                         };
246                         bst_out: boost {
247                                 regulator-name = "bst_out";
248                                 interrupts = <IT_OCP_BOOST 0>;
249                                 interrupt-parent = <&pmic>;
250                         };
252                         vbus_otg: pwr_sw1 {
253                                 regulator-name = "vbus_otg";
254                                 interrupts = <IT_OCP_OTG 0>;
255                                 interrupt-parent = <&pmic>;
256                         };
258                         vbus_sw: pwr_sw2 {
259                                 regulator-name = "vbus_sw";
260                                 interrupts = <IT_OCP_SWOUT 0>;
261                                 interrupt-parent = <&pmic>;
262                                 regulator-active-discharge = <1>;
263                         };
264                 };
266                 onkey {
267                         compatible = "st,stpmic1-onkey";
268                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
269                         interrupt-names = "onkey-falling", "onkey-rising";
270                         status = "okay";
271                 };
273                 watchdog {
274                         compatible = "st,stpmic1-wdt";
275                         status = "disabled";
276                 };
277         };
280 &iwdg2 {
281         timeout-sec = <32>;
282         status = "okay";
285 &pwr_regulators {
286         vdd-supply = <&vdd>;
287         vdd_3v3_usbfs-supply = <&vdd_usb>;
290 &rng1 {
291         status = "okay";
294 &rtc {
295         status = "okay";
298 &sdmmc1 {
299         pinctrl-names = "default", "opendrain", "sleep";
300         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
301         pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
302         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
303         broken-cd;
304         st,sig-dir;
305         st,neg-edge;
306         st,use-ckin;
307         bus-width = <4>;
308         vmmc-supply = <&vdd_sd>;
309         status = "okay";
312 &uart4 {
313         /* On Low speed expansion header */
314         label = "LS-UART1";
315         pinctrl-names = "default";
316         pinctrl-0 = <&uart4_pins_b>;
317         status = "okay";
320 &uart7 {
321         /* On Low speed expansion header */
322         label = "LS-UART0";
323         pinctrl-names = "default";
324         pinctrl-0 = <&uart7_pins_a>;
325         status = "okay";