Merge tag 'kvmarm-fixes-5.11-2' into kvmarm-master/next
[linux-2.6-microblaze.git] / arch / arm / boot / dts / at91-sama5d27_wlsom1.dtsi
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * at91-sama5d27_wlsom1.dtsi - Device Tree file for SAMA5D27 WLSOM1
4  *
5  * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
6  *
7  * Author: Nicolas Ferre <nicolas.ferre@microcihp.com>
8  * Author: Eugen Hristev <eugen.hristev@microcihp.com>
9  */
10 #include "sama5d2.dtsi"
11 #include "sama5d2-pinfunc.h"
12 #include <dt-bindings/gpio/gpio.h>
13 #include <dt-bindings/mfd/atmel-flexcom.h>
14 #include <dt-bindings/pinctrl/at91.h>
15
16 / {
17         model = "Microchip SAMA5D27 WLSOM1";
18         compatible = "microchip,sama5d27-wlsom1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
19
20         aliases {
21                 i2c0 = &i2c0;
22         };
23
24         clocks {
25                 slow_xtal {
26                         clock-frequency = <32768>;
27                 };
28
29                 main_xtal {
30                         clock-frequency = <24000000>;
31                 };
32         };
33 };
34
35 &flx1 {
36         atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
37
38         uart6: serial@200 {
39                 pinctrl-0 = <&pinctrl_flx1_default>;
40                 pinctrl-names = "default";
41         };
42 };
43
44 &i2c0 {
45         pinctrl-0 = <&pinctrl_i2c0_default>;
46         pinctrl-names = "default";
47         status = "okay";
48 };
49
50 &i2c1 {
51         dmas = <0>, <0>;
52         pinctrl-names = "default";
53         pinctrl-0 = <&pinctrl_i2c1_default>;
54         status = "okay";
55
56         mcp16502@5b {
57                 compatible = "microchip,mcp16502";
58                 reg = <0x5b>;
59                 status = "okay";
60                 lpm-gpios = <&pioBU 0 GPIO_ACTIVE_LOW>;
61
62                 regulators {
63                         vdd_3v3: VDD_IO {
64                                 regulator-name = "VDD_IO";
65                                 regulator-min-microvolt = <1200000>;
66                                 regulator-max-microvolt = <3700000>;
67                                 regulator-initial-mode = <2>;
68                                 regulator-allowed-modes = <2>, <4>;
69                                 regulator-always-on;
70
71                                 regulator-state-standby {
72                                         regulator-on-in-suspend;
73                                         regulator-mode = <4>;
74                                 };
75
76                                 regulator-state-mem {
77                                         regulator-off-in-suspend;
78                                         regulator-mode = <4>;
79                                 };
80                         };
81
82                         vddio_ddr: VDD_DDR {
83                                 regulator-name = "VDD_DDR";
84                                 regulator-min-microvolt = <600000>;
85                                 regulator-max-microvolt = <1850000>;
86                                 regulator-initial-mode = <2>;
87                                 regulator-allowed-modes = <2>, <4>;
88                                 regulator-always-on;
89
90                                 regulator-state-standby {
91                                         regulator-on-in-suspend;
92                                         regulator-suspend-microvolt = <1200000>;
93                                         regulator-changeable-in-suspend;
94                                         regulator-mode = <4>;
95                                 };
96
97                                 regulator-state-mem {
98                                         regulator-on-in-suspend;
99                                         regulator-suspend-microvolt = <1200000>;
100                                         regulator-changeable-in-suspend;
101                                         regulator-mode = <4>;
102                                 };
103                         };
104
105                         vdd_core: VDD_CORE {
106                                 regulator-name = "VDD_CORE";
107                                 regulator-min-microvolt = <600000>;
108                                 regulator-max-microvolt = <1850000>;
109                                 regulator-initial-mode = <2>;
110                                 regulator-allowed-modes = <2>, <4>;
111                                 regulator-always-on;
112
113                                 regulator-state-standby {
114                                         regulator-on-in-suspend;
115                                         regulator-mode = <4>;
116                                 };
117
118                                 regulator-state-mem {
119                                         regulator-off-in-suspend;
120                                         regulator-mode = <4>;
121                                 };
122                         };
123
124                         vdd_ddr: VDD_OTHER {
125                                 regulator-name = "VDD_OTHER";
126                                 regulator-min-microvolt = <1800000>;
127                                 regulator-max-microvolt = <1800000>;
128                                 regulator-initial-mode = <2>;
129                                 regulator-allowed-modes = <2>, <4>;
130                                 regulator-always-on;
131
132                                 regulator-state-standby {
133                                         regulator-on-in-suspend;
134                                         regulator-suspend-microvolt = <1800000>;
135                                         regulator-changeable-in-suspend;
136                                         regulator-mode = <4>;
137                                 };
138
139                                 regulator-state-mem {
140                                         regulator-on-in-suspend;
141                                         regulator-suspend-microvolt = <1800000>;
142                                         regulator-changeable-in-suspend;
143                                         regulator-mode = <4>;
144                                 };
145                         };
146
147                         LDO1 {
148                                 regulator-name = "LDO1";
149                                 regulator-min-microvolt = <1200000>;
150                                 regulator-max-microvolt = <3700000>;
151                                 regulator-always-on;
152
153                                 regulator-state-standby {
154                                         regulator-on-in-suspend;
155                                 };
156
157                                 regulator-state-mem {
158                                         regulator-off-in-suspend;
159                                 };
160                         };
161
162                         LDO2 {
163                                 regulator-name = "LDO2";
164                                 regulator-min-microvolt = <1200000>;
165                                 regulator-max-microvolt = <3700000>;
166                                 regulator-always-on;
167
168                                 regulator-state-standby {
169                                         regulator-on-in-suspend;
170                                 };
171
172                                 regulator-state-mem {
173                                         regulator-off-in-suspend;
174                                 };
175                         };
176                 };
177         };
178 };
179
180 &macb0 {
181         pinctrl-names = "default";
182         pinctrl-0 = <&pinctrl_macb0_default>;
183         phy-mode = "rmii";
184
185         ethernet-phy@0 {
186                 reg = <0x0>;
187                 interrupt-parent = <&pioA>;
188                 interrupts = <PIN_PB24 IRQ_TYPE_LEVEL_LOW>;
189                 pinctrl-names = "default";
190                 pinctrl-0 = <&pinctrl_macb0_phy_irq>;
191         };
192 };
193
194 &pmc {
195         atmel,osc-bypass;
196 };
197
198 &qspi1 {
199         pinctrl-names = "default";
200         pinctrl-0 = <&pinctrl_qspi1_default>;
201         status = "disabled";
202
203         qspi1_flash: spi_flash@0 {
204                 #address-cells = <1>;
205                 #size-cells = <1>;
206                 compatible = "jedec,spi-nor";
207                 reg = <0>;
208                 spi-max-frequency = <80000000>;
209                 spi-rx-bus-width = <4>;
210                 spi-tx-bus-width = <4>;
211                 m25p,fast-read;
212                 status = "disabled";
213
214                 at91bootstrap@0 {
215                         label = "at91bootstrap";
216                         reg = <0x0 0x40000>;
217                 };
218
219                 bootloader@40000 {
220                         label = "bootloader";
221                         reg = <0x40000 0xc0000>;
222                 };
223
224                 bootloaderenvred@100000 {
225                         label = "bootloader env redundant";
226                         reg = <0x100000 0x40000>;
227                 };
228
229                 bootloaderenv@140000 {
230                         label = "bootloader env";
231                         reg = <0x140000 0x40000>;
232                 };
233
234                 dtb@180000 {
235                         label = "device tree";
236                         reg = <0x180000 0x80000>;
237                 };
238
239                 kernel@200000 {
240                         label = "kernel";
241                         reg = <0x200000 0x600000>;
242                 };
243         };
244 };
245
246 &pioA {
247         pinctrl_flx1_default: flx1_usart_default {
248                 pinmux = <PIN_PA24__FLEXCOM1_IO0>,
249                          <PIN_PA23__FLEXCOM1_IO1>,
250                          <PIN_PA25__FLEXCOM1_IO3>,
251                          <PIN_PA26__FLEXCOM1_IO4>;
252                 bias-disable;
253         };
254
255         pinctrl_i2c0_default: i2c0_default {
256                 pinmux = <PIN_PD21__TWD0>,
257                          <PIN_PD22__TWCK0>;
258                 bias-disable;
259         };
260
261         pinctrl_i2c1_default: i2c1_default {
262                 pinmux = <PIN_PD19__TWD1>,
263                          <PIN_PD20__TWCK1>;
264                 bias-disable;
265         };
266
267         pinctrl_macb0_default: macb0_default {
268                 pinmux = <PIN_PB14__GTXCK>,
269                          <PIN_PB15__GTXEN>,
270                          <PIN_PB16__GRXDV>,
271                          <PIN_PB17__GRXER>,
272                          <PIN_PB18__GRX0>,
273                          <PIN_PB19__GRX1>,
274                          <PIN_PB20__GTX0>,
275                          <PIN_PB21__GTX1>,
276                          <PIN_PB22__GMDC>,
277                          <PIN_PB23__GMDIO>;
278                 bias-disable;
279         };
280
281         pinctrl_macb0_phy_irq: macb0_phy_irq {
282                 pinmux = <PIN_PB24__GPIO>;
283                 bias-disable;
284         };
285
286         pinctrl_qspi1_default: qspi1_default {
287                 pinmux = <PIN_PB5__QSPI1_SCK>,
288                          <PIN_PB6__QSPI1_CS>,
289                          <PIN_PB7__QSPI1_IO0>,
290                          <PIN_PB8__QSPI1_IO1>,
291                          <PIN_PB9__QSPI1_IO2>,
292                          <PIN_PB10__QSPI1_IO3>;
293                 bias-pull-up;
294         };
295 };
296