.. | .. |
---|
7 | 7 | |
---|
8 | 8 | #include "stm32mp157c-ed1.dts" |
---|
9 | 9 | #include <dt-bindings/gpio/gpio.h> |
---|
| 10 | +#include <dt-bindings/input/input.h> |
---|
10 | 11 | |
---|
11 | 12 | / { |
---|
12 | 13 | model = "STMicroelectronics STM32MP157C eval daughter on eval mother"; |
---|
.. | .. |
---|
18 | 19 | |
---|
19 | 20 | aliases { |
---|
20 | 21 | serial0 = &uart4; |
---|
| 22 | + serial1 = &usart3; |
---|
21 | 23 | ethernet0 = ðernet0; |
---|
| 24 | + }; |
---|
| 25 | + |
---|
| 26 | + clocks { |
---|
| 27 | + clk_ext_camera: clk-ext-camera { |
---|
| 28 | + #clock-cells = <0>; |
---|
| 29 | + compatible = "fixed-clock"; |
---|
| 30 | + clock-frequency = <24000000>; |
---|
| 31 | + }; |
---|
| 32 | + }; |
---|
| 33 | + |
---|
| 34 | + joystick { |
---|
| 35 | + compatible = "gpio-keys"; |
---|
| 36 | + pinctrl-0 = <&joystick_pins>; |
---|
| 37 | + pinctrl-names = "default"; |
---|
| 38 | + button-0 { |
---|
| 39 | + label = "JoySel"; |
---|
| 40 | + linux,code = <KEY_ENTER>; |
---|
| 41 | + interrupt-parent = <&stmfx_pinctrl>; |
---|
| 42 | + interrupts = <0 IRQ_TYPE_EDGE_RISING>; |
---|
| 43 | + }; |
---|
| 44 | + button-1 { |
---|
| 45 | + label = "JoyDown"; |
---|
| 46 | + linux,code = <KEY_DOWN>; |
---|
| 47 | + interrupt-parent = <&stmfx_pinctrl>; |
---|
| 48 | + interrupts = <1 IRQ_TYPE_EDGE_RISING>; |
---|
| 49 | + }; |
---|
| 50 | + button-2 { |
---|
| 51 | + label = "JoyLeft"; |
---|
| 52 | + linux,code = <KEY_LEFT>; |
---|
| 53 | + interrupt-parent = <&stmfx_pinctrl>; |
---|
| 54 | + interrupts = <2 IRQ_TYPE_EDGE_RISING>; |
---|
| 55 | + }; |
---|
| 56 | + button-3 { |
---|
| 57 | + label = "JoyRight"; |
---|
| 58 | + linux,code = <KEY_RIGHT>; |
---|
| 59 | + interrupt-parent = <&stmfx_pinctrl>; |
---|
| 60 | + interrupts = <3 IRQ_TYPE_EDGE_RISING>; |
---|
| 61 | + }; |
---|
| 62 | + button-4 { |
---|
| 63 | + label = "JoyUp"; |
---|
| 64 | + linux,code = <KEY_UP>; |
---|
| 65 | + interrupt-parent = <&stmfx_pinctrl>; |
---|
| 66 | + interrupts = <4 IRQ_TYPE_EDGE_RISING>; |
---|
| 67 | + }; |
---|
22 | 68 | }; |
---|
23 | 69 | |
---|
24 | 70 | panel_backlight: panel-backlight { |
---|
.. | .. |
---|
35 | 81 | status = "okay"; |
---|
36 | 82 | }; |
---|
37 | 83 | |
---|
| 84 | +&dcmi { |
---|
| 85 | + status = "okay"; |
---|
| 86 | + pinctrl-names = "default", "sleep"; |
---|
| 87 | + pinctrl-0 = <&dcmi_pins_a>; |
---|
| 88 | + pinctrl-1 = <&dcmi_sleep_pins_a>; |
---|
| 89 | + |
---|
| 90 | + port { |
---|
| 91 | + dcmi_0: endpoint { |
---|
| 92 | + remote-endpoint = <&ov5640_0>; |
---|
| 93 | + bus-width = <8>; |
---|
| 94 | + hsync-active = <0>; |
---|
| 95 | + vsync-active = <0>; |
---|
| 96 | + pclk-sample = <1>; |
---|
| 97 | + }; |
---|
| 98 | + }; |
---|
| 99 | +}; |
---|
| 100 | + |
---|
38 | 101 | &dsi { |
---|
39 | | - #address-cells = <1>; |
---|
40 | | - #size-cells = <0>; |
---|
| 102 | + phy-dsi-supply = <®18>; |
---|
41 | 103 | status = "okay"; |
---|
42 | 104 | |
---|
43 | 105 | ports { |
---|
44 | | - #address-cells = <1>; |
---|
45 | | - #size-cells = <0>; |
---|
46 | | - |
---|
47 | 106 | port@0 { |
---|
48 | 107 | reg = <0>; |
---|
49 | 108 | dsi_in: endpoint { |
---|
.. | .. |
---|
64 | 123 | reg = <0>; |
---|
65 | 124 | reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>; |
---|
66 | 125 | backlight = <&panel_backlight>; |
---|
| 126 | + power-supply = <&v3v3>; |
---|
67 | 127 | status = "okay"; |
---|
68 | 128 | |
---|
69 | 129 | port { |
---|
.. | .. |
---|
77 | 137 | ðernet0 { |
---|
78 | 138 | status = "okay"; |
---|
79 | 139 | pinctrl-0 = <ðernet0_rgmii_pins_a>; |
---|
80 | | - pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; |
---|
| 140 | + pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>; |
---|
81 | 141 | pinctrl-names = "default", "sleep"; |
---|
82 | | - phy-mode = "rgmii"; |
---|
| 142 | + phy-mode = "rgmii-id"; |
---|
83 | 143 | max-speed = <1000>; |
---|
84 | 144 | phy-handle = <&phy0>; |
---|
85 | 145 | |
---|
.. | .. |
---|
93 | 153 | }; |
---|
94 | 154 | }; |
---|
95 | 155 | |
---|
| 156 | +&fmc { |
---|
| 157 | + pinctrl-names = "default", "sleep"; |
---|
| 158 | + pinctrl-0 = <&fmc_pins_a>; |
---|
| 159 | + pinctrl-1 = <&fmc_sleep_pins_a>; |
---|
| 160 | + status = "okay"; |
---|
| 161 | + |
---|
| 162 | + nand-controller@4,0 { |
---|
| 163 | + status = "okay"; |
---|
| 164 | + |
---|
| 165 | + nand@0 { |
---|
| 166 | + reg = <0>; |
---|
| 167 | + nand-on-flash-bbt; |
---|
| 168 | + #address-cells = <1>; |
---|
| 169 | + #size-cells = <1>; |
---|
| 170 | + }; |
---|
| 171 | + }; |
---|
| 172 | +}; |
---|
| 173 | + |
---|
96 | 174 | &i2c2 { |
---|
97 | | - pinctrl-names = "default"; |
---|
| 175 | + pinctrl-names = "default", "sleep"; |
---|
98 | 176 | pinctrl-0 = <&i2c2_pins_a>; |
---|
| 177 | + pinctrl-1 = <&i2c2_sleep_pins_a>; |
---|
99 | 178 | i2c-scl-rising-time-ns = <185>; |
---|
100 | 179 | i2c-scl-falling-time-ns = <20>; |
---|
101 | 180 | status = "okay"; |
---|
| 181 | + |
---|
| 182 | + ov5640: camera@3c { |
---|
| 183 | + compatible = "ovti,ov5640"; |
---|
| 184 | + reg = <0x3c>; |
---|
| 185 | + clocks = <&clk_ext_camera>; |
---|
| 186 | + clock-names = "xclk"; |
---|
| 187 | + DOVDD-supply = <&v2v8>; |
---|
| 188 | + powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>; |
---|
| 189 | + reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>; |
---|
| 190 | + rotation = <180>; |
---|
| 191 | + status = "okay"; |
---|
| 192 | + |
---|
| 193 | + port { |
---|
| 194 | + ov5640_0: endpoint { |
---|
| 195 | + remote-endpoint = <&dcmi_0>; |
---|
| 196 | + bus-width = <8>; |
---|
| 197 | + data-shift = <2>; /* lines 9:2 are used */ |
---|
| 198 | + hsync-active = <0>; |
---|
| 199 | + vsync-active = <0>; |
---|
| 200 | + pclk-sample = <1>; |
---|
| 201 | + }; |
---|
| 202 | + }; |
---|
| 203 | + }; |
---|
| 204 | + |
---|
| 205 | + stmfx: stmfx@42 { |
---|
| 206 | + compatible = "st,stmfx-0300"; |
---|
| 207 | + reg = <0x42>; |
---|
| 208 | + interrupts = <8 IRQ_TYPE_EDGE_RISING>; |
---|
| 209 | + interrupt-parent = <&gpioi>; |
---|
| 210 | + vdd-supply = <&v3v3>; |
---|
| 211 | + |
---|
| 212 | + stmfx_pinctrl: pinctrl { |
---|
| 213 | + compatible = "st,stmfx-0300-pinctrl"; |
---|
| 214 | + gpio-controller; |
---|
| 215 | + #gpio-cells = <2>; |
---|
| 216 | + interrupt-controller; |
---|
| 217 | + #interrupt-cells = <2>; |
---|
| 218 | + gpio-ranges = <&stmfx_pinctrl 0 0 24>; |
---|
| 219 | + |
---|
| 220 | + joystick_pins: joystick-pins { |
---|
| 221 | + pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; |
---|
| 222 | + bias-pull-down; |
---|
| 223 | + }; |
---|
| 224 | + }; |
---|
| 225 | + }; |
---|
102 | 226 | }; |
---|
103 | 227 | |
---|
104 | 228 | &i2c5 { |
---|
105 | | - pinctrl-names = "default"; |
---|
| 229 | + pinctrl-names = "default", "sleep"; |
---|
106 | 230 | pinctrl-0 = <&i2c5_pins_a>; |
---|
| 231 | + pinctrl-1 = <&i2c5_sleep_pins_a>; |
---|
107 | 232 | i2c-scl-rising-time-ns = <185>; |
---|
108 | 233 | i2c-scl-falling-time-ns = <20>; |
---|
109 | 234 | status = "okay"; |
---|
.. | .. |
---|
113 | 238 | status = "okay"; |
---|
114 | 239 | |
---|
115 | 240 | port { |
---|
116 | | - #address-cells = <1>; |
---|
117 | | - #size-cells = <0>; |
---|
118 | | - |
---|
119 | 241 | ltdc_ep0_out: endpoint@0 { |
---|
120 | 242 | reg = <0>; |
---|
121 | 243 | remote-endpoint = <&dsi_in>; |
---|
.. | .. |
---|
124 | 246 | }; |
---|
125 | 247 | |
---|
126 | 248 | &m_can1 { |
---|
127 | | - pinctrl-names = "default"; |
---|
| 249 | + pinctrl-names = "default", "sleep"; |
---|
128 | 250 | pinctrl-0 = <&m_can1_pins_a>; |
---|
| 251 | + pinctrl-1 = <&m_can1_sleep_pins_a>; |
---|
129 | 252 | status = "okay"; |
---|
130 | 253 | }; |
---|
131 | 254 | |
---|
132 | 255 | &qspi { |
---|
133 | | - pinctrl-names = "default"; |
---|
| 256 | + pinctrl-names = "default", "sleep"; |
---|
134 | 257 | pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>; |
---|
| 258 | + pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>; |
---|
135 | 259 | reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; |
---|
136 | 260 | #address-cells = <1>; |
---|
137 | 261 | #size-cells = <0>; |
---|
138 | 262 | status = "okay"; |
---|
139 | 263 | |
---|
140 | 264 | flash0: mx66l51235l@0 { |
---|
| 265 | + compatible = "jedec,spi-nor"; |
---|
141 | 266 | reg = <0>; |
---|
142 | 267 | spi-rx-bus-width = <4>; |
---|
143 | 268 | spi-max-frequency = <108000000>; |
---|
.. | .. |
---|
146 | 271 | }; |
---|
147 | 272 | |
---|
148 | 273 | flash1: mx66l51235l@1 { |
---|
| 274 | + compatible = "jedec,spi-nor"; |
---|
149 | 275 | reg = <1>; |
---|
150 | 276 | spi-rx-bus-width = <4>; |
---|
151 | 277 | spi-max-frequency = <108000000>; |
---|
152 | 278 | #address-cells = <1>; |
---|
153 | 279 | #size-cells = <1>; |
---|
154 | 280 | }; |
---|
| 281 | +}; |
---|
| 282 | + |
---|
| 283 | +&sdmmc3 { |
---|
| 284 | + pinctrl-names = "default", "opendrain", "sleep"; |
---|
| 285 | + pinctrl-0 = <&sdmmc3_b4_pins_a>; |
---|
| 286 | + pinctrl-1 = <&sdmmc3_b4_od_pins_a>; |
---|
| 287 | + pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; |
---|
| 288 | + broken-cd; |
---|
| 289 | + st,neg-edge; |
---|
| 290 | + bus-width = <4>; |
---|
| 291 | + vmmc-supply = <&v3v3>; |
---|
| 292 | + status = "disabled"; |
---|
155 | 293 | }; |
---|
156 | 294 | |
---|
157 | 295 | &spi1 { |
---|
.. | .. |
---|
161 | 299 | }; |
---|
162 | 300 | |
---|
163 | 301 | &timers2 { |
---|
| 302 | + /* spare dmas for other usage (un-delete to enable pwm capture) */ |
---|
| 303 | + /delete-property/dmas; |
---|
| 304 | + /delete-property/dma-names; |
---|
164 | 305 | status = "disabled"; |
---|
165 | 306 | pwm { |
---|
166 | 307 | pinctrl-0 = <&pwm2_pins_a>; |
---|
167 | | - pinctrl-names = "default"; |
---|
| 308 | + pinctrl-1 = <&pwm2_sleep_pins_a>; |
---|
| 309 | + pinctrl-names = "default", "sleep"; |
---|
168 | 310 | status = "okay"; |
---|
169 | 311 | }; |
---|
170 | 312 | timer@1 { |
---|
.. | .. |
---|
173 | 315 | }; |
---|
174 | 316 | |
---|
175 | 317 | &timers8 { |
---|
| 318 | + /delete-property/dmas; |
---|
| 319 | + /delete-property/dma-names; |
---|
176 | 320 | status = "disabled"; |
---|
177 | 321 | pwm { |
---|
178 | 322 | pinctrl-0 = <&pwm8_pins_a>; |
---|
179 | | - pinctrl-names = "default"; |
---|
| 323 | + pinctrl-1 = <&pwm8_sleep_pins_a>; |
---|
| 324 | + pinctrl-names = "default", "sleep"; |
---|
180 | 325 | status = "okay"; |
---|
181 | 326 | }; |
---|
182 | 327 | timer@7 { |
---|
.. | .. |
---|
185 | 330 | }; |
---|
186 | 331 | |
---|
187 | 332 | &timers12 { |
---|
| 333 | + /delete-property/dmas; |
---|
| 334 | + /delete-property/dma-names; |
---|
188 | 335 | status = "disabled"; |
---|
189 | 336 | pwm { |
---|
190 | 337 | pinctrl-0 = <&pwm12_pins_a>; |
---|
191 | | - pinctrl-names = "default"; |
---|
| 338 | + pinctrl-1 = <&pwm12_sleep_pins_a>; |
---|
| 339 | + pinctrl-names = "default", "sleep"; |
---|
192 | 340 | status = "okay"; |
---|
193 | 341 | }; |
---|
194 | 342 | timer@11 { |
---|
.. | .. |
---|
196 | 344 | }; |
---|
197 | 345 | }; |
---|
198 | 346 | |
---|
| 347 | +&usart3 { |
---|
| 348 | + pinctrl-names = "default", "sleep", "idle"; |
---|
| 349 | + pinctrl-0 = <&usart3_pins_b>; |
---|
| 350 | + pinctrl-1 = <&usart3_sleep_pins_b>; |
---|
| 351 | + pinctrl-2 = <&usart3_idle_pins_b>; |
---|
| 352 | + /* |
---|
| 353 | + * HW flow control USART3_RTS is optional, and isn't default wired to |
---|
| 354 | + * the connector. SB23 needs to be soldered in order to use it, and R77 |
---|
| 355 | + * (ETH_CLK) should be removed. |
---|
| 356 | + */ |
---|
| 357 | + uart-has-rtscts; |
---|
| 358 | + status = "disabled"; |
---|
| 359 | +}; |
---|
| 360 | + |
---|
199 | 361 | &usbh_ehci { |
---|
200 | 362 | phys = <&usbphyc_port0>; |
---|
201 | | - phy-names = "usb"; |
---|
202 | 363 | status = "okay"; |
---|
203 | 364 | }; |
---|
204 | 365 | |
---|
205 | 366 | &usbotg_hs { |
---|
206 | | - dr_mode = "peripheral"; |
---|
| 367 | + pinctrl-0 = <&usbotg_hs_pins_a>; |
---|
| 368 | + pinctrl-names = "default"; |
---|
207 | 369 | phys = <&usbphyc_port1 0>; |
---|
208 | 370 | phy-names = "usb2-phy"; |
---|
209 | 371 | status = "okay"; |
---|