Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 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" |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 9 | #include <dt-bindings/gpio/gpio.h> |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 10 | #include <dt-bindings/input/input.h> |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 11 | |
| 12 | / { |
| 13 | model = "STMicroelectronics STM32MP157C eval daughter on eval mother"; |
| 14 | compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157"; |
| 15 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 16 | chosen { |
| 17 | stdout-path = "serial0:115200n8"; |
| 18 | }; |
| 19 | |
| 20 | aliases { |
| 21 | serial0 = &uart4; |
| 22 | ethernet0 = ðernet0; |
| 23 | }; |
| 24 | |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 25 | clocks { |
| 26 | clk_ext_camera: clk-ext-camera { |
| 27 | #clock-cells = <0>; |
| 28 | compatible = "fixed-clock"; |
| 29 | clock-frequency = <24000000>; |
| 30 | }; |
| 31 | }; |
| 32 | |
| 33 | joystick { |
| 34 | compatible = "gpio-keys"; |
| 35 | #size-cells = <0>; |
| 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 | }; |
| 68 | }; |
| 69 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 70 | panel_backlight: panel-backlight { |
| 71 | compatible = "gpio-backlight"; |
| 72 | gpios = <&gpiod 13 GPIO_ACTIVE_LOW>; |
| 73 | default-on; |
| 74 | status = "okay"; |
| 75 | }; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 76 | }; |
| 77 | |
| 78 | &cec { |
| 79 | pinctrl-names = "default"; |
| 80 | pinctrl-0 = <&cec_pins_a>; |
| 81 | status = "okay"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 82 | }; |
| 83 | |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 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 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 101 | &dsi { |
| 102 | #address-cells = <1>; |
| 103 | #size-cells = <0>; |
Patrick Delaunay | 8c6e613 | 2019-11-06 16:16:33 +0100 | [diff] [blame] | 104 | phy-dsi-supply = <®18>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 105 | status = "okay"; |
| 106 | |
| 107 | ports { |
| 108 | #address-cells = <1>; |
| 109 | #size-cells = <0>; |
| 110 | |
| 111 | port@0 { |
| 112 | reg = <0>; |
| 113 | dsi_in: endpoint { |
| 114 | remote-endpoint = <<dc_ep0_out>; |
| 115 | }; |
| 116 | }; |
| 117 | |
| 118 | port@1 { |
| 119 | reg = <1>; |
| 120 | dsi_out: endpoint { |
| 121 | remote-endpoint = <&dsi_panel_in>; |
| 122 | }; |
| 123 | }; |
| 124 | }; |
| 125 | |
| 126 | panel-dsi@0 { |
| 127 | compatible = "raydium,rm68200"; |
| 128 | reg = <0>; |
| 129 | reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>; |
| 130 | backlight = <&panel_backlight>; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 131 | power-supply = <&v3v3>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 132 | status = "okay"; |
| 133 | |
| 134 | port { |
| 135 | dsi_panel_in: endpoint { |
| 136 | remote-endpoint = <&dsi_out>; |
| 137 | }; |
| 138 | }; |
| 139 | }; |
| 140 | }; |
| 141 | |
| 142 | ðernet0 { |
| 143 | status = "okay"; |
| 144 | pinctrl-0 = <ðernet0_rgmii_pins_a>; |
| 145 | pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; |
| 146 | pinctrl-names = "default", "sleep"; |
Christophe Roullier | 32ac305 | 2019-05-17 15:08:45 +0200 | [diff] [blame] | 147 | phy-mode = "rgmii-id"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 148 | max-speed = <1000>; |
| 149 | phy-handle = <&phy0>; |
| 150 | |
| 151 | mdio0 { |
| 152 | #address-cells = <1>; |
| 153 | #size-cells = <0>; |
| 154 | compatible = "snps,dwmac-mdio"; |
| 155 | phy0: ethernet-phy@0 { |
| 156 | reg = <0>; |
| 157 | }; |
| 158 | }; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 159 | }; |
| 160 | |
Patrick Delaunay | e0188ac | 2019-04-08 15:30:52 +0200 | [diff] [blame] | 161 | &fmc { |
| 162 | pinctrl-names = "default", "sleep"; |
| 163 | pinctrl-0 = <&fmc_pins_a>; |
| 164 | pinctrl-1 = <&fmc_sleep_pins_a>; |
| 165 | status = "okay"; |
| 166 | #address-cells = <1>; |
| 167 | #size-cells = <0>; |
| 168 | |
Patrick Delaunay | 8c6e613 | 2019-11-06 16:16:33 +0100 | [diff] [blame] | 169 | nand@0 { |
Patrick Delaunay | e0188ac | 2019-04-08 15:30:52 +0200 | [diff] [blame] | 170 | reg = <0>; |
| 171 | nand-on-flash-bbt; |
| 172 | #address-cells = <1>; |
| 173 | #size-cells = <1>; |
| 174 | }; |
| 175 | }; |
| 176 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 177 | &i2c2 { |
| 178 | pinctrl-names = "default"; |
| 179 | pinctrl-0 = <&i2c2_pins_a>; |
| 180 | i2c-scl-rising-time-ns = <185>; |
| 181 | i2c-scl-falling-time-ns = <20>; |
| 182 | status = "okay"; |
Patrick Delaunay | 1b58b55 | 2019-04-12 14:38:28 +0200 | [diff] [blame] | 183 | |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 184 | ov5640: camera@3c { |
| 185 | compatible = "ovti,ov5640"; |
| 186 | pinctrl-names = "default"; |
| 187 | pinctrl-0 = <&ov5640_pins>; |
| 188 | reg = <0x3c>; |
| 189 | clocks = <&clk_ext_camera>; |
| 190 | clock-names = "xclk"; |
| 191 | DOVDD-supply = <&v2v8>; |
| 192 | powerdown-gpios = <&stmfx_pinctrl 18 GPIO_ACTIVE_HIGH>; |
| 193 | reset-gpios = <&stmfx_pinctrl 19 GPIO_ACTIVE_LOW>; |
| 194 | rotation = <180>; |
| 195 | status = "okay"; |
| 196 | |
| 197 | port { |
| 198 | ov5640_0: endpoint { |
| 199 | remote-endpoint = <&dcmi_0>; |
| 200 | bus-width = <8>; |
| 201 | data-shift = <2>; /* lines 9:2 are used */ |
| 202 | hsync-active = <0>; |
| 203 | vsync-active = <0>; |
| 204 | pclk-sample = <1>; |
| 205 | }; |
| 206 | }; |
| 207 | }; |
| 208 | |
Patrick Delaunay | 1b58b55 | 2019-04-12 14:38:28 +0200 | [diff] [blame] | 209 | stmfx: stmfx@42 { |
| 210 | compatible = "st,stmfx-0300"; |
| 211 | reg = <0x42>; |
| 212 | interrupts = <8 IRQ_TYPE_EDGE_RISING>; |
| 213 | interrupt-parent = <&gpioi>; |
| 214 | vdd-supply = <&v3v3>; |
| 215 | |
| 216 | stmfx_pinctrl: stmfx-pin-controller { |
| 217 | compatible = "st,stmfx-0300-pinctrl"; |
| 218 | gpio-controller; |
| 219 | #gpio-cells = <2>; |
| 220 | interrupt-controller; |
| 221 | #interrupt-cells = <2>; |
| 222 | gpio-ranges = <&stmfx_pinctrl 0 0 24>; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 223 | |
| 224 | joystick_pins: joystick { |
| 225 | pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; |
| 226 | drive-push-pull; |
| 227 | bias-pull-down; |
| 228 | }; |
| 229 | |
| 230 | ov5640_pins: camera { |
| 231 | pins = "agpio2", "agpio3"; /* stmfx pins 18 & 19 */ |
| 232 | drive-push-pull; |
| 233 | output-low; |
| 234 | }; |
Patrick Delaunay | 1b58b55 | 2019-04-12 14:38:28 +0200 | [diff] [blame] | 235 | }; |
| 236 | }; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 237 | }; |
| 238 | |
| 239 | &i2c5 { |
| 240 | pinctrl-names = "default"; |
| 241 | pinctrl-0 = <&i2c5_pins_a>; |
| 242 | i2c-scl-rising-time-ns = <185>; |
| 243 | i2c-scl-falling-time-ns = <20>; |
| 244 | status = "okay"; |
| 245 | }; |
| 246 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 247 | <dc { |
| 248 | status = "okay"; |
| 249 | |
| 250 | port { |
| 251 | #address-cells = <1>; |
| 252 | #size-cells = <0>; |
| 253 | |
| 254 | ltdc_ep0_out: endpoint@0 { |
| 255 | reg = <0>; |
| 256 | remote-endpoint = <&dsi_in>; |
| 257 | }; |
| 258 | }; |
| 259 | }; |
| 260 | |
| 261 | &m_can1 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 262 | pinctrl-names = "default", "sleep"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 263 | pinctrl-0 = <&m_can1_pins_a>; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 264 | pinctrl-1 = <&m_can1_sleep_pins_a>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 265 | status = "okay"; |
| 266 | }; |
| 267 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 268 | &qspi { |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 269 | pinctrl-names = "default", "sleep"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 270 | pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 271 | pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 272 | reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; |
| 273 | #address-cells = <1>; |
| 274 | #size-cells = <0>; |
| 275 | status = "okay"; |
| 276 | |
| 277 | flash0: mx66l51235l@0 { |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 278 | compatible = "jedec,spi-nor"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 279 | reg = <0>; |
| 280 | spi-rx-bus-width = <4>; |
| 281 | spi-max-frequency = <108000000>; |
| 282 | #address-cells = <1>; |
| 283 | #size-cells = <1>; |
| 284 | }; |
| 285 | |
| 286 | flash1: mx66l51235l@1 { |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 287 | compatible = "jedec,spi-nor"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 288 | reg = <1>; |
| 289 | spi-rx-bus-width = <4>; |
| 290 | spi-max-frequency = <108000000>; |
| 291 | #address-cells = <1>; |
| 292 | #size-cells = <1>; |
| 293 | }; |
| 294 | }; |
| 295 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 296 | &spi1 { |
| 297 | pinctrl-names = "default"; |
| 298 | pinctrl-0 = <&spi1_pins_a>; |
| 299 | status = "disabled"; |
| 300 | }; |
| 301 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 302 | &timers2 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 303 | /* spare dmas for other usage (un-delete to enable pwm capture) */ |
| 304 | /delete-property/dmas; |
| 305 | /delete-property/dma-names; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 306 | status = "disabled"; |
| 307 | pwm { |
| 308 | pinctrl-0 = <&pwm2_pins_a>; |
| 309 | pinctrl-names = "default"; |
| 310 | status = "okay"; |
| 311 | }; |
| 312 | timer@1 { |
| 313 | status = "okay"; |
| 314 | }; |
| 315 | }; |
| 316 | |
| 317 | &timers8 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 318 | /delete-property/dmas; |
| 319 | /delete-property/dma-names; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 320 | status = "disabled"; |
| 321 | pwm { |
| 322 | pinctrl-0 = <&pwm8_pins_a>; |
| 323 | pinctrl-names = "default"; |
| 324 | status = "okay"; |
| 325 | }; |
| 326 | timer@7 { |
| 327 | status = "okay"; |
| 328 | }; |
| 329 | }; |
| 330 | |
| 331 | &timers12 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 332 | /delete-property/dmas; |
| 333 | /delete-property/dma-names; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 334 | status = "disabled"; |
| 335 | pwm { |
| 336 | pinctrl-0 = <&pwm12_pins_a>; |
| 337 | pinctrl-names = "default"; |
| 338 | status = "okay"; |
| 339 | }; |
| 340 | timer@11 { |
| 341 | status = "okay"; |
| 342 | }; |
| 343 | }; |
| 344 | |
Patrice Chotard | f7a5edc | 2018-08-10 17:12:12 +0200 | [diff] [blame] | 345 | &usbh_ehci { |
| 346 | phys = <&usbphyc_port0>; |
| 347 | phy-names = "usb"; |
Patrice Chotard | f7a5edc | 2018-08-10 17:12:12 +0200 | [diff] [blame] | 348 | status = "okay"; |
| 349 | }; |
| 350 | |
Patrice Chotard | 18cb6f5 | 2018-08-10 17:12:11 +0200 | [diff] [blame] | 351 | &usbotg_hs { |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 352 | dr_mode = "peripheral"; |
Patrice Chotard | 18cb6f5 | 2018-08-10 17:12:11 +0200 | [diff] [blame] | 353 | phys = <&usbphyc_port1 0>; |
| 354 | phy-names = "usb2-phy"; |
| 355 | status = "okay"; |
| 356 | }; |
| 357 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 358 | &usbphyc { |
| 359 | status = "okay"; |
| 360 | }; |