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