ARM: dts: stm32: Add configuration EEPROM on AV96
[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                 spi0 = &qspi;
25         };
26
27         chosen {
28                 stdout-path = "serial0:115200n8";
29         };
30
31         memory@c0000000 {
32                 device_type = "memory";
33                 reg = <0xc0000000 0x40000000>;
34         };
35
36         led {
37                 compatible = "gpio-leds";
38                 led1 {
39                         label = "green:user1";
40                         gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
41                         linux,default-trigger = "heartbeat";
42                         default-state = "off";
43                 };
44
45                 led2 {
46                         label = "green:user2";
47                         gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
48                         linux,default-trigger = "mmc0";
49                         default-state = "off";
50                 };
51
52                 led3 {
53                         label = "green:user3";
54                         gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
55                         linux,default-trigger = "mmc1";
56                         default-state = "off";
57                 };
58
59                 led4 {
60                         label = "green:user3";
61                         gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>;
62                         linux,default-trigger = "none";
63                         default-state = "off";
64                         panic-indicator;
65                 };
66
67                 led5 {
68                         label = "yellow:wifi";
69                         gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
70                         linux,default-trigger = "phy0tx";
71                         default-state = "off";
72                 };
73
74                 led6 {
75                         label = "blue:bt";
76                         gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
77                         linux,default-trigger = "bluetooth-power";
78                         default-state = "off";
79                 };
80         };
81
82         sd_switch: regulator-sd_switch {
83                 compatible = "regulator-gpio";
84                 regulator-name = "sd_switch";
85                 regulator-min-microvolt = <1800000>;
86                 regulator-max-microvolt = <2900000>;
87                 regulator-type = "voltage";
88                 regulator-always-on;
89
90                 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
91                 gpios-states = <0>;
92                 states = <1800000 0x1>,
93                          <2900000 0x0>;
94         };
95
96         /* Enpirion EP3A8LQI U2 on the DHCOR */
97         vdd_io: regulator-buck-io {
98                 compatible = "regulator-fixed";
99                 regulator-name = "buck-io";
100                 regulator-min-microvolt = <1800000>;
101                 regulator-max-microvolt = <1800000>;
102                 regulator-always-on;
103                 regulator-boot-on;
104                 vin-supply = <&vdd>;
105         };
106 };
107
108 &ethernet0 {
109         status = "okay";
110         pinctrl-0 = <&ethernet0_rgmii_pins_c>;
111         pinctrl-1 = <&ethernet0_rgmii_sleep_pins_c>;
112         pinctrl-names = "default", "sleep";
113         phy-mode = "rgmii";
114         max-speed = <1000>;
115         phy-handle = <&phy0>;
116
117         mdio0 {
118                 #address-cells = <1>;
119                 #size-cells = <0>;
120                 compatible = "snps,dwmac-mdio";
121                 reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
122                 reset-delay-us = <1000>;
123
124                 phy0: ethernet-phy@7 {
125                         reg = <7>;
126
127                         rxc-skew-ps = <1500>;
128                         rxdv-skew-ps = <540>;
129                         rxd0-skew-ps = <420>;
130                         rxd1-skew-ps = <420>;
131                         rxd2-skew-ps = <420>;
132                         rxd3-skew-ps = <420>;
133
134                         txc-skew-ps = <1440>;
135                         txen-skew-ps = <540>;
136                         txd0-skew-ps = <420>;
137                         txd1-skew-ps = <420>;
138                         txd2-skew-ps = <420>;
139                         txd3-skew-ps = <420>;
140                 };
141         };
142 };
143
144 &i2c1 {
145         pinctrl-names = "default";
146         pinctrl-0 = <&i2c1_pins_b>;
147         i2c-scl-rising-time-ns = <185>;
148         i2c-scl-falling-time-ns = <20>;
149         status = "okay";
150         /delete-property/dmas;
151         /delete-property/dma-names;
152 };
153
154 &i2c2 {
155         pinctrl-names = "default";
156         pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
157         i2c-scl-rising-time-ns = <185>;
158         i2c-scl-falling-time-ns = <20>;
159         status = "okay";
160         /delete-property/dmas;
161         /delete-property/dma-names;
162 };
163
164 &i2c4 {
165         pinctrl-names = "default";
166         pinctrl-0 = <&i2c4_pins_a>;
167         i2c-scl-rising-time-ns = <185>;
168         i2c-scl-falling-time-ns = <20>;
169         status = "okay";
170         /delete-property/dmas;
171         /delete-property/dma-names;
172
173         pmic: stpmic@33 {
174                 compatible = "st,stpmic1";
175                 reg = <0x33>;
176                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
177                 interrupt-controller;
178                 #interrupt-cells = <2>;
179                 status = "okay";
180
181                 regulators {
182                         compatible = "st,stpmic1-regulators";
183
184                         ldo1-supply = <&v3v3>;
185                         ldo2-supply = <&v3v3>;
186                         ldo3-supply = <&vdd_ddr>;
187                         ldo5-supply = <&v3v3>;
188                         ldo6-supply = <&v3v3>;
189                         pwr_sw1-supply = <&bst_out>;
190                         pwr_sw2-supply = <&bst_out>;
191
192                         vddcore: buck1 {
193                                 regulator-name = "vddcore";
194                                 regulator-min-microvolt = <1200000>;
195                                 regulator-max-microvolt = <1350000>;
196                                 regulator-always-on;
197                                 regulator-initial-mode = <0>;
198                                 regulator-over-current-protection;
199                         };
200
201                         vdd_ddr: buck2 {
202                                 regulator-name = "vdd_ddr";
203                                 regulator-min-microvolt = <1350000>;
204                                 regulator-max-microvolt = <1350000>;
205                                 regulator-always-on;
206                                 regulator-initial-mode = <0>;
207                                 regulator-over-current-protection;
208                         };
209
210                         vdd: buck3 {
211                                 regulator-name = "vdd";
212                                 regulator-min-microvolt = <2900000>;
213                                 regulator-max-microvolt = <2900000>;
214                                 regulator-always-on;
215                                 regulator-initial-mode = <0>;
216                                 regulator-over-current-protection;
217                         };
218
219                         v3v3: buck4 {
220                                 regulator-name = "v3v3";
221                                 regulator-min-microvolt = <3300000>;
222                                 regulator-max-microvolt = <3300000>;
223                                 regulator-always-on;
224                                 regulator-over-current-protection;
225                                 regulator-initial-mode = <0>;
226                         };
227
228                         vdda: ldo1 {
229                                 regulator-name = "vdda";
230                                 regulator-min-microvolt = <2900000>;
231                                 regulator-max-microvolt = <2900000>;
232                                 interrupts = <IT_CURLIM_LDO1 0>;
233                         };
234
235                         v2v8: ldo2 {
236                                 regulator-name = "v2v8";
237                                 regulator-min-microvolt = <2800000>;
238                                 regulator-max-microvolt = <2800000>;
239                                 interrupts = <IT_CURLIM_LDO2 0>;
240                         };
241
242                         vtt_ddr: ldo3 {
243                                 regulator-name = "vtt_ddr";
244                                 regulator-min-microvolt = <500000>;
245                                 regulator-max-microvolt = <750000>;
246                                 regulator-always-on;
247                                 regulator-over-current-protection;
248                         };
249
250                         vdd_usb: ldo4 {
251                                 regulator-name = "vdd_usb";
252                                 interrupts = <IT_CURLIM_LDO4 0>;
253                         };
254
255                         vdd_sd: ldo5 {
256                                 regulator-name = "vdd_sd";
257                                 regulator-min-microvolt = <2900000>;
258                                 regulator-max-microvolt = <2900000>;
259                                 interrupts = <IT_CURLIM_LDO5 0>;
260                                 regulator-boot-on;
261                         };
262
263                         v1v8: ldo6 {
264                                 regulator-name = "v1v8";
265                                 regulator-min-microvolt = <1800000>;
266                                 regulator-max-microvolt = <1800000>;
267                                 interrupts = <IT_CURLIM_LDO6 0>;
268                                 regulator-enable-ramp-delay = <300000>;
269                         };
270
271                         vref_ddr: vref_ddr {
272                                 regulator-name = "vref_ddr";
273                                 regulator-always-on;
274                         };
275
276                         bst_out: boost {
277                                 regulator-name = "bst_out";
278                                 interrupts = <IT_OCP_BOOST 0>;
279                         };
280
281                         vbus_otg: pwr_sw1 {
282                                 regulator-name = "vbus_otg";
283                                 interrupts = <IT_OCP_OTG 0>;
284                                 regulator-active-discharge = <1>;
285                         };
286
287                         vbus_sw: pwr_sw2 {
288                                 regulator-name = "vbus_sw";
289                                 interrupts = <IT_OCP_SWOUT 0>;
290                                 regulator-active-discharge = <1>;
291                         };
292                 };
293
294                 onkey {
295                         compatible = "st,stpmic1-onkey";
296                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>;
297                         interrupt-names = "onkey-falling", "onkey-rising";
298                         status = "okay";
299                 };
300
301                 watchdog {
302                         compatible = "st,stpmic1-wdt";
303                         status = "disabled";
304                 };
305         };
306
307         eeprom@53 {
308                 compatible = "atmel,24c02";
309                 reg = <0x53>;
310                 pagesize = <16>;
311         };
312 };
313
314 &iwdg2 {
315         timeout-sec = <32>;
316         status = "okay";
317 };
318
319 &pwr_regulators {
320         vdd-supply = <&vdd_io>;
321         vdd_3v3_usbfs-supply = <&vdd_usb>;
322 };
323
324 &qspi {
325         pinctrl-names = "default", "sleep";
326         pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
327         pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
328         reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
329         #address-cells = <1>;
330         #size-cells = <0>;
331         status = "okay";
332
333         flash0: spi-flash@0 {
334                 compatible = "jedec,spi-nor";
335                 reg = <0>;
336                 spi-rx-bus-width = <4>;
337                 spi-max-frequency = <108000000>;
338                 #address-cells = <1>;
339                 #size-cells = <1>;
340         };
341 };
342
343 &rng1 {
344         status = "okay";
345 };
346
347 &rtc {
348         status = "okay";
349 };
350
351 &sdmmc1 {
352         pinctrl-names = "default", "opendrain", "sleep";
353         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>;
354         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>;
355         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
356         cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
357         disable-wp;
358         st,sig-dir;
359         st,neg-edge;
360         st,use-ckin;
361         bus-width = <4>;
362         vmmc-supply = <&vdd_sd>;
363         vqmmc-supply = <&sd_switch>;
364         status = "okay";
365 };
366
367 &sdmmc2 {
368         pinctrl-names = "default", "opendrain", "sleep";
369         pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>;
370         pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_b>;
371         pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_b>;
372         bus-width = <8>;
373         mmc-ddr-1_8v;
374         no-sd;
375         no-sdio;
376         non-removable;
377         st,neg-edge;
378         vmmc-supply = <&v3v3>;
379         vqmmc-supply = <&vdd_io>;
380         status = "okay";
381 };
382
383 &uart4 {
384         /* On Low speed expansion header */
385         label = "LS-UART1";
386         pinctrl-names = "default";
387         pinctrl-0 = <&uart4_pins_b>;
388         status = "okay";
389 };
390
391 &uart7 {
392         /* On Low speed expansion header */
393         label = "LS-UART0";
394         pinctrl-names = "default";
395         pinctrl-0 = <&uart7_pins_a>;
396         status = "okay";
397 };