ARM: dts: stm32: add pinctrl sleep config for qspi on stm32mp157c-ev1
[linux-2.6-microblaze.git] / arch / arm / boot / dts / stm32mp157c-ev1.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-ed1.dts"
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13         model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
14         compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157";
15
16         chosen {
17                 stdout-path = "serial0:115200n8";
18         };
19
20         aliases {
21                 serial0 = &uart4;
22                 ethernet0 = &ethernet0;
23         };
24
25         joystick {
26                 compatible = "gpio-keys";
27                 #size-cells = <0>;
28                 pinctrl-0 = <&joystick_pins>;
29                 pinctrl-names = "default";
30                 button-0 {
31                         label = "JoySel";
32                         linux,code = <KEY_ENTER>;
33                         interrupt-parent = <&stmfx_pinctrl>;
34                         interrupts = <0 IRQ_TYPE_EDGE_RISING>;
35                 };
36                 button-1 {
37                         label = "JoyDown";
38                         linux,code = <KEY_DOWN>;
39                         interrupt-parent = <&stmfx_pinctrl>;
40                         interrupts = <1 IRQ_TYPE_EDGE_RISING>;
41                 };
42                 button-2 {
43                         label = "JoyLeft";
44                         linux,code = <KEY_LEFT>;
45                         interrupt-parent = <&stmfx_pinctrl>;
46                         interrupts = <2 IRQ_TYPE_EDGE_RISING>;
47                 };
48                 button-3 {
49                         label = "JoyRight";
50                         linux,code = <KEY_RIGHT>;
51                         interrupt-parent = <&stmfx_pinctrl>;
52                         interrupts = <3 IRQ_TYPE_EDGE_RISING>;
53                 };
54                 button-4 {
55                         label = "JoyUp";
56                         linux,code = <KEY_UP>;
57                         interrupt-parent = <&stmfx_pinctrl>;
58                         interrupts = <4 IRQ_TYPE_EDGE_RISING>;
59                 };
60         };
61
62         panel_backlight: panel-backlight {
63                 compatible = "gpio-backlight";
64                 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
65                 default-on;
66                 status = "okay";
67         };
68 };
69
70 &cec {
71         pinctrl-names = "default";
72         pinctrl-0 = <&cec_pins_a>;
73         status = "okay";
74 };
75
76 &dsi {
77         #address-cells = <1>;
78         #size-cells = <0>;
79         status = "okay";
80
81         ports {
82                 #address-cells = <1>;
83                 #size-cells = <0>;
84
85                 port@0 {
86                         reg = <0>;
87                         dsi_in: endpoint {
88                                 remote-endpoint = <&ltdc_ep0_out>;
89                         };
90                 };
91
92                 port@1 {
93                         reg = <1>;
94                         dsi_out: endpoint {
95                                 remote-endpoint = <&dsi_panel_in>;
96                         };
97                 };
98         };
99
100         panel-dsi@0 {
101                 compatible = "raydium,rm68200";
102                 reg = <0>;
103                 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
104                 backlight = <&panel_backlight>;
105                 status = "okay";
106
107                 port {
108                         dsi_panel_in: endpoint {
109                                 remote-endpoint = <&dsi_out>;
110                         };
111                 };
112         };
113 };
114
115 &ethernet0 {
116         status = "okay";
117         pinctrl-0 = <&ethernet0_rgmii_pins_a>;
118         pinctrl-1 = <&ethernet0_rgmii_pins_sleep_a>;
119         pinctrl-names = "default", "sleep";
120         phy-mode = "rgmii";
121         max-speed = <1000>;
122         phy-handle = <&phy0>;
123
124         mdio0 {
125                 #address-cells = <1>;
126                 #size-cells = <0>;
127                 compatible = "snps,dwmac-mdio";
128                 phy0: ethernet-phy@0 {
129                         reg = <0>;
130                 };
131         };
132 };
133
134 &i2c2 {
135         pinctrl-names = "default";
136         pinctrl-0 = <&i2c2_pins_a>;
137         i2c-scl-rising-time-ns = <185>;
138         i2c-scl-falling-time-ns = <20>;
139         status = "okay";
140
141         stmfx: stmfx@42 {
142                 compatible = "st,stmfx-0300";
143                 reg = <0x42>;
144                 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
145                 interrupt-parent = <&gpioi>;
146                 vdd-supply = <&v3v3>;
147
148                 stmfx_pinctrl: stmfx-pin-controller {
149                         compatible = "st,stmfx-0300-pinctrl";
150                         gpio-controller;
151                         #gpio-cells = <2>;
152                         interrupt-controller;
153                         #interrupt-cells = <2>;
154                         gpio-ranges = <&stmfx_pinctrl 0 0 24>;
155
156                         joystick_pins: joystick {
157                                 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
158                                 drive-push-pull;
159                                 bias-pull-down;
160                         };
161                 };
162         };
163 };
164
165 &i2c5 {
166         pinctrl-names = "default";
167         pinctrl-0 = <&i2c5_pins_a>;
168         i2c-scl-rising-time-ns = <185>;
169         i2c-scl-falling-time-ns = <20>;
170         status = "okay";
171 };
172
173 &ltdc {
174         status = "okay";
175
176         port {
177                 #address-cells = <1>;
178                 #size-cells = <0>;
179
180                 ltdc_ep0_out: endpoint@0 {
181                         reg = <0>;
182                         remote-endpoint = <&dsi_in>;
183                 };
184         };
185 };
186
187 &m_can1 {
188         pinctrl-names = "default", "sleep";
189         pinctrl-0 = <&m_can1_pins_a>;
190         pinctrl-1 = <&m_can1_sleep_pins_a>;
191         status = "okay";
192 };
193
194 &qspi {
195         pinctrl-names = "default", "sleep";
196         pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>;
197         pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>;
198         reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
199         #address-cells = <1>;
200         #size-cells = <0>;
201         status = "okay";
202
203         flash0: mx66l51235l@0 {
204                 reg = <0>;
205                 spi-rx-bus-width = <4>;
206                 spi-max-frequency = <108000000>;
207                 #address-cells = <1>;
208                 #size-cells = <1>;
209         };
210
211         flash1: mx66l51235l@1 {
212                 reg = <1>;
213                 spi-rx-bus-width = <4>;
214                 spi-max-frequency = <108000000>;
215                 #address-cells = <1>;
216                 #size-cells = <1>;
217         };
218 };
219
220 &spi1 {
221         pinctrl-names = "default";
222         pinctrl-0 = <&spi1_pins_a>;
223         status = "disabled";
224 };
225
226 &timers2 {
227         /* spare dmas for other usage (un-delete to enable pwm capture) */
228         /delete-property/dmas;
229         /delete-property/dma-names;
230         status = "disabled";
231         pwm {
232                 pinctrl-0 = <&pwm2_pins_a>;
233                 pinctrl-names = "default";
234                 status = "okay";
235         };
236         timer@1 {
237                 status = "okay";
238         };
239 };
240
241 &timers8 {
242         /delete-property/dmas;
243         /delete-property/dma-names;
244         status = "disabled";
245         pwm {
246                 pinctrl-0 = <&pwm8_pins_a>;
247                 pinctrl-names = "default";
248                 status = "okay";
249         };
250         timer@7 {
251                 status = "okay";
252         };
253 };
254
255 &timers12 {
256         /delete-property/dmas;
257         /delete-property/dma-names;
258         status = "disabled";
259         pwm {
260                 pinctrl-0 = <&pwm12_pins_a>;
261                 pinctrl-names = "default";
262                 status = "okay";
263         };
264         timer@11 {
265                 status = "okay";
266         };
267 };
268
269 &usbh_ehci {
270         phys = <&usbphyc_port0>;
271         phy-names = "usb";
272         status = "okay";
273 };
274
275 &usbotg_hs {
276         dr_mode = "peripheral";
277         phys = <&usbphyc_port1 0>;
278         phy-names = "usb2-phy";
279         status = "okay";
280 };
281
282 &usbphyc {
283         status = "okay";
284 };