Merge branch 'next' into for-linus
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp157c-ed1.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2 /*
3  * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
4  * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
5  */
6 /dts-v1/;
7
8 #include "stm32mp157c.dtsi"
9 #include "stm32mp157xaa-pinctrl.dtsi"
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/mfd/st,stpmic1.h>
12
13 / {
14         model = "STMicroelectronics STM32MP157C eval daughter";
15         compatible = "st,stm32mp157c-ed1", "st,stm32mp157";
16
17         chosen {
18                 stdout-path = "serial0:115200n8";
19         };
20
21         memory@c0000000 {
22                 device_type = "memory";
23                 reg = <0xC0000000 0x40000000>;
24         };
25
26         reserved-memory {
27                 #address-cells = <1>;
28                 #size-cells = <1>;
29                 ranges;
30
31                 gpu_reserved: gpu@e8000000 {
32                         reg = <0xe8000000 0x8000000>;
33                         no-map;
34                 };
35         };
36
37         aliases {
38                 serial0 = &uart4;
39         };
40
41         reg11: reg11 {
42                 compatible = "regulator-fixed";
43                 regulator-name = "reg11";
44                 regulator-min-microvolt = <1100000>;
45                 regulator-max-microvolt = <1100000>;
46                 regulator-always-on;
47         };
48
49         reg18: reg18 {
50                 compatible = "regulator-fixed";
51                 regulator-name = "reg18";
52                 regulator-min-microvolt = <1800000>;
53                 regulator-max-microvolt = <1800000>;
54                 regulator-always-on;
55         };
56
57         sd_switch: regulator-sd_switch {
58                 compatible = "regulator-gpio";
59                 regulator-name = "sd_switch";
60                 regulator-min-microvolt = <1800000>;
61                 regulator-max-microvolt = <2900000>;
62                 regulator-type = "voltage";
63                 regulator-always-on;
64
65                 gpios = <&gpiof 14 GPIO_ACTIVE_HIGH>;
66                 gpios-states = <0>;
67                 states = <1800000 0x1 2900000 0x0>;
68         };
69 };
70
71 &dts {
72         status = "okay";
73 };
74
75 &gpu {
76         contiguous-area = <&gpu_reserved>;
77         status = "okay";
78 };
79
80 &i2c4 {
81         pinctrl-names = "default";
82         pinctrl-0 = <&i2c4_pins_a>;
83         i2c-scl-rising-time-ns = <185>;
84         i2c-scl-falling-time-ns = <20>;
85         status = "okay";
86         /* spare dmas for other usage */
87         /delete-property/dmas;
88         /delete-property/dma-names;
89
90         pmic: stpmic@33 {
91                 compatible = "st,stpmic1";
92                 reg = <0x33>;
93                 interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
94                 interrupt-controller;
95                 #interrupt-cells = <2>;
96                 status = "okay";
97
98                 regulators {
99                         compatible = "st,stpmic1-regulators";
100                         ldo1-supply = <&v3v3>;
101                         ldo2-supply = <&v3v3>;
102                         ldo3-supply = <&vdd_ddr>;
103                         ldo5-supply = <&v3v3>;
104                         ldo6-supply = <&v3v3>;
105                         pwr_sw1-supply = <&bst_out>;
106                         pwr_sw2-supply = <&bst_out>;
107
108                         vddcore: buck1 {
109                                 regulator-name = "vddcore";
110                                 regulator-min-microvolt = <800000>;
111                                 regulator-max-microvolt = <1350000>;
112                                 regulator-always-on;
113                                 regulator-initial-mode = <0>;
114                                 regulator-over-current-protection;
115                         };
116
117                         vdd_ddr: buck2 {
118                                 regulator-name = "vdd_ddr";
119                                 regulator-min-microvolt = <1350000>;
120                                 regulator-max-microvolt = <1350000>;
121                                 regulator-always-on;
122                                 regulator-initial-mode = <0>;
123                                 regulator-over-current-protection;
124                         };
125
126                         vdd: buck3 {
127                                 regulator-name = "vdd";
128                                 regulator-min-microvolt = <3300000>;
129                                 regulator-max-microvolt = <3300000>;
130                                 regulator-always-on;
131                                 st,mask-reset;
132                                 regulator-initial-mode = <0>;
133                                 regulator-over-current-protection;
134                         };
135
136                         v3v3: buck4 {
137                                 regulator-name = "v3v3";
138                                 regulator-min-microvolt = <3300000>;
139                                 regulator-max-microvolt = <3300000>;
140                                 regulator-always-on;
141                                 regulator-over-current-protection;
142                                 regulator-initial-mode = <0>;
143                         };
144
145                         vdda: ldo1 {
146                                 regulator-name = "vdda";
147                                 regulator-min-microvolt = <2900000>;
148                                 regulator-max-microvolt = <2900000>;
149                                 interrupts = <IT_CURLIM_LDO1 0>;
150                         };
151
152                         v2v8: ldo2 {
153                                 regulator-name = "v2v8";
154                                 regulator-min-microvolt = <2800000>;
155                                 regulator-max-microvolt = <2800000>;
156                                 interrupts = <IT_CURLIM_LDO2 0>;
157                         };
158
159                         vtt_ddr: ldo3 {
160                                 regulator-name = "vtt_ddr";
161                                 regulator-min-microvolt = <500000>;
162                                 regulator-max-microvolt = <750000>;
163                                 regulator-always-on;
164                                 regulator-over-current-protection;
165                         };
166
167                         vdd_usb: ldo4 {
168                                 regulator-name = "vdd_usb";
169                                 regulator-min-microvolt = <3300000>;
170                                 regulator-max-microvolt = <3300000>;
171                                 interrupts = <IT_CURLIM_LDO4 0>;
172                         };
173
174                         vdd_sd: ldo5 {
175                                 regulator-name = "vdd_sd";
176                                 regulator-min-microvolt = <2900000>;
177                                 regulator-max-microvolt = <2900000>;
178                                 interrupts = <IT_CURLIM_LDO5 0>;
179                                 regulator-boot-on;
180                         };
181
182                         v1v8: ldo6 {
183                                 regulator-name = "v1v8";
184                                 regulator-min-microvolt = <1800000>;
185                                 regulator-max-microvolt = <1800000>;
186                                 interrupts = <IT_CURLIM_LDO6 0>;
187                         };
188
189                         vref_ddr: vref_ddr {
190                                 regulator-name = "vref_ddr";
191                                 regulator-always-on;
192                                 regulator-over-current-protection;
193                         };
194
195                         bst_out: boost {
196                                 regulator-name = "bst_out";
197                                 interrupts = <IT_OCP_BOOST 0>;
198                         };
199
200                         vbus_otg: pwr_sw1 {
201                                 regulator-name = "vbus_otg";
202                                 interrupts = <IT_OCP_OTG 0>;
203                          };
204
205                          vbus_sw: pwr_sw2 {
206                                 regulator-name = "vbus_sw";
207                                 interrupts = <IT_OCP_SWOUT 0>;
208                                 regulator-active-discharge;
209                          };
210                 };
211
212                 onkey {
213                         compatible = "st,stpmic1-onkey";
214                         interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>;
215                         interrupt-names = "onkey-falling", "onkey-rising";
216                         power-off-time-sec = <10>;
217                         status = "okay";
218                 };
219
220                 watchdog {
221                         compatible = "st,stpmic1-wdt";
222                         status = "disabled";
223                 };
224         };
225 };
226
227 &ipcc {
228         status = "okay";
229 };
230
231 &iwdg2 {
232         timeout-sec = <32>;
233         status = "okay";
234 };
235
236 &rng1 {
237         status = "okay";
238 };
239
240 &rtc {
241         status = "okay";
242 };
243
244 &sdmmc1 {
245         pinctrl-names = "default", "opendrain", "sleep";
246         pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>;
247         pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>;
248         pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>;
249         broken-cd;
250         st,sig-dir;
251         st,neg-edge;
252         st,use-ckin;
253         bus-width = <4>;
254         vmmc-supply = <&vdd_sd>;
255         vqmmc-supply = <&sd_switch>;
256         status = "okay";
257 };
258
259 &timers6 {
260         status = "okay";
261         /* spare dmas for other usage */
262         /delete-property/dmas;
263         /delete-property/dma-names;
264         timer@5 {
265                 status = "okay";
266         };
267 };
268
269 &uart4 {
270         pinctrl-names = "default";
271         pinctrl-0 = <&uart4_pins_a>;
272         status = "okay";
273 };
274
275 &usbphyc_port0 {
276         phy-supply = <&vdd_usb>;
277         vdda1v1-supply = <&reg11>;
278         vdda1v8-supply = <&reg18>;
279 };
280
281 &usbphyc_port1 {
282         phy-supply = <&vdd_usb>;
283         vdda1v1-supply = <&reg11>;
284         vdda1v8-supply = <&reg18>;
285 };