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"; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 35 | pinctrl-0 = <&joystick_pins>; |
| 36 | pinctrl-names = "default"; |
| 37 | button-0 { |
| 38 | label = "JoySel"; |
| 39 | linux,code = <KEY_ENTER>; |
| 40 | interrupt-parent = <&stmfx_pinctrl>; |
| 41 | interrupts = <0 IRQ_TYPE_EDGE_RISING>; |
| 42 | }; |
| 43 | button-1 { |
| 44 | label = "JoyDown"; |
| 45 | linux,code = <KEY_DOWN>; |
| 46 | interrupt-parent = <&stmfx_pinctrl>; |
| 47 | interrupts = <1 IRQ_TYPE_EDGE_RISING>; |
| 48 | }; |
| 49 | button-2 { |
| 50 | label = "JoyLeft"; |
| 51 | linux,code = <KEY_LEFT>; |
| 52 | interrupt-parent = <&stmfx_pinctrl>; |
| 53 | interrupts = <2 IRQ_TYPE_EDGE_RISING>; |
| 54 | }; |
| 55 | button-3 { |
| 56 | label = "JoyRight"; |
| 57 | linux,code = <KEY_RIGHT>; |
| 58 | interrupt-parent = <&stmfx_pinctrl>; |
| 59 | interrupts = <3 IRQ_TYPE_EDGE_RISING>; |
| 60 | }; |
| 61 | button-4 { |
| 62 | label = "JoyUp"; |
| 63 | linux,code = <KEY_UP>; |
| 64 | interrupt-parent = <&stmfx_pinctrl>; |
| 65 | interrupts = <4 IRQ_TYPE_EDGE_RISING>; |
| 66 | }; |
| 67 | }; |
| 68 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 69 | panel_backlight: panel-backlight { |
| 70 | compatible = "gpio-backlight"; |
| 71 | gpios = <&gpiod 13 GPIO_ACTIVE_LOW>; |
| 72 | default-on; |
| 73 | status = "okay"; |
| 74 | }; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 75 | }; |
| 76 | |
| 77 | &cec { |
| 78 | pinctrl-names = "default"; |
| 79 | pinctrl-0 = <&cec_pins_a>; |
| 80 | status = "okay"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 81 | }; |
| 82 | |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 83 | &dcmi { |
| 84 | status = "okay"; |
| 85 | pinctrl-names = "default", "sleep"; |
| 86 | pinctrl-0 = <&dcmi_pins_a>; |
| 87 | pinctrl-1 = <&dcmi_sleep_pins_a>; |
| 88 | |
| 89 | port { |
| 90 | dcmi_0: endpoint { |
| 91 | remote-endpoint = <&ov5640_0>; |
| 92 | bus-width = <8>; |
| 93 | hsync-active = <0>; |
| 94 | vsync-active = <0>; |
| 95 | pclk-sample = <1>; |
| 96 | }; |
| 97 | }; |
| 98 | }; |
| 99 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 100 | &dsi { |
| 101 | #address-cells = <1>; |
| 102 | #size-cells = <0>; |
Patrick Delaunay | 8c6e613 | 2019-11-06 16:16:33 +0100 | [diff] [blame] | 103 | phy-dsi-supply = <®18>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 104 | status = "okay"; |
| 105 | |
| 106 | ports { |
| 107 | #address-cells = <1>; |
| 108 | #size-cells = <0>; |
| 109 | |
| 110 | port@0 { |
| 111 | reg = <0>; |
| 112 | dsi_in: endpoint { |
| 113 | remote-endpoint = <<dc_ep0_out>; |
| 114 | }; |
| 115 | }; |
| 116 | |
| 117 | port@1 { |
| 118 | reg = <1>; |
| 119 | dsi_out: endpoint { |
| 120 | remote-endpoint = <&dsi_panel_in>; |
| 121 | }; |
| 122 | }; |
| 123 | }; |
| 124 | |
| 125 | panel-dsi@0 { |
| 126 | compatible = "raydium,rm68200"; |
| 127 | reg = <0>; |
| 128 | reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>; |
| 129 | backlight = <&panel_backlight>; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 130 | power-supply = <&v3v3>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 131 | status = "okay"; |
| 132 | |
| 133 | port { |
| 134 | dsi_panel_in: endpoint { |
| 135 | remote-endpoint = <&dsi_out>; |
| 136 | }; |
| 137 | }; |
| 138 | }; |
| 139 | }; |
| 140 | |
| 141 | ðernet0 { |
| 142 | status = "okay"; |
| 143 | pinctrl-0 = <ðernet0_rgmii_pins_a>; |
| 144 | pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; |
| 145 | pinctrl-names = "default", "sleep"; |
Christophe Roullier | 32ac305 | 2019-05-17 15:08:45 +0200 | [diff] [blame] | 146 | phy-mode = "rgmii-id"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 147 | max-speed = <1000>; |
| 148 | phy-handle = <&phy0>; |
| 149 | |
| 150 | mdio0 { |
| 151 | #address-cells = <1>; |
| 152 | #size-cells = <0>; |
| 153 | compatible = "snps,dwmac-mdio"; |
| 154 | phy0: ethernet-phy@0 { |
| 155 | reg = <0>; |
| 156 | }; |
| 157 | }; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 158 | }; |
| 159 | |
Patrick Delaunay | e0188ac | 2019-04-08 15:30:52 +0200 | [diff] [blame] | 160 | &fmc { |
| 161 | pinctrl-names = "default", "sleep"; |
| 162 | pinctrl-0 = <&fmc_pins_a>; |
| 163 | pinctrl-1 = <&fmc_sleep_pins_a>; |
| 164 | status = "okay"; |
| 165 | #address-cells = <1>; |
| 166 | #size-cells = <0>; |
| 167 | |
Patrick Delaunay | 8c6e613 | 2019-11-06 16:16:33 +0100 | [diff] [blame] | 168 | nand@0 { |
Patrick Delaunay | e0188ac | 2019-04-08 15:30:52 +0200 | [diff] [blame] | 169 | reg = <0>; |
| 170 | nand-on-flash-bbt; |
| 171 | #address-cells = <1>; |
| 172 | #size-cells = <1>; |
| 173 | }; |
| 174 | }; |
| 175 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 176 | &i2c2 { |
| 177 | pinctrl-names = "default"; |
| 178 | pinctrl-0 = <&i2c2_pins_a>; |
| 179 | i2c-scl-rising-time-ns = <185>; |
| 180 | i2c-scl-falling-time-ns = <20>; |
| 181 | status = "okay"; |
Patrick Delaunay | 1b58b55 | 2019-04-12 14:38:28 +0200 | [diff] [blame] | 182 | |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 183 | ov5640: camera@3c { |
| 184 | compatible = "ovti,ov5640"; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 185 | reg = <0x3c>; |
| 186 | clocks = <&clk_ext_camera>; |
| 187 | clock-names = "xclk"; |
| 188 | DOVDD-supply = <&v2v8>; |
Patrick Delaunay | 651aea3 | 2020-01-28 10:10:58 +0100 | [diff] [blame] | 189 | powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>; |
| 190 | reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 191 | rotation = <180>; |
| 192 | status = "okay"; |
| 193 | |
| 194 | port { |
| 195 | ov5640_0: endpoint { |
| 196 | remote-endpoint = <&dcmi_0>; |
| 197 | bus-width = <8>; |
| 198 | data-shift = <2>; /* lines 9:2 are used */ |
| 199 | hsync-active = <0>; |
| 200 | vsync-active = <0>; |
| 201 | pclk-sample = <1>; |
| 202 | }; |
| 203 | }; |
| 204 | }; |
| 205 | |
Patrick Delaunay | 1b58b55 | 2019-04-12 14:38:28 +0200 | [diff] [blame] | 206 | stmfx: stmfx@42 { |
| 207 | compatible = "st,stmfx-0300"; |
| 208 | reg = <0x42>; |
| 209 | interrupts = <8 IRQ_TYPE_EDGE_RISING>; |
| 210 | interrupt-parent = <&gpioi>; |
| 211 | vdd-supply = <&v3v3>; |
| 212 | |
| 213 | stmfx_pinctrl: stmfx-pin-controller { |
| 214 | compatible = "st,stmfx-0300-pinctrl"; |
| 215 | gpio-controller; |
| 216 | #gpio-cells = <2>; |
| 217 | interrupt-controller; |
| 218 | #interrupt-cells = <2>; |
| 219 | gpio-ranges = <&stmfx_pinctrl 0 0 24>; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 220 | |
| 221 | joystick_pins: joystick { |
| 222 | pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 223 | bias-pull-down; |
| 224 | }; |
Patrick Delaunay | 1b58b55 | 2019-04-12 14:38:28 +0200 | [diff] [blame] | 225 | }; |
| 226 | }; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 227 | }; |
| 228 | |
| 229 | &i2c5 { |
| 230 | pinctrl-names = "default"; |
| 231 | pinctrl-0 = <&i2c5_pins_a>; |
| 232 | i2c-scl-rising-time-ns = <185>; |
| 233 | i2c-scl-falling-time-ns = <20>; |
| 234 | status = "okay"; |
| 235 | }; |
| 236 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 237 | <dc { |
| 238 | status = "okay"; |
| 239 | |
| 240 | port { |
| 241 | #address-cells = <1>; |
| 242 | #size-cells = <0>; |
| 243 | |
| 244 | ltdc_ep0_out: endpoint@0 { |
| 245 | reg = <0>; |
| 246 | remote-endpoint = <&dsi_in>; |
| 247 | }; |
| 248 | }; |
| 249 | }; |
| 250 | |
| 251 | &m_can1 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 252 | pinctrl-names = "default", "sleep"; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 253 | pinctrl-0 = <&m_can1_pins_a>; |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 254 | pinctrl-1 = <&m_can1_sleep_pins_a>; |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 255 | status = "okay"; |
| 256 | }; |
| 257 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 258 | &qspi { |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 259 | pinctrl-names = "default", "sleep"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 260 | 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] | 261 | 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] | 262 | reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; |
| 263 | #address-cells = <1>; |
| 264 | #size-cells = <0>; |
| 265 | status = "okay"; |
| 266 | |
| 267 | flash0: mx66l51235l@0 { |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 268 | compatible = "jedec,spi-nor"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 269 | reg = <0>; |
| 270 | spi-rx-bus-width = <4>; |
| 271 | spi-max-frequency = <108000000>; |
| 272 | #address-cells = <1>; |
| 273 | #size-cells = <1>; |
| 274 | }; |
| 275 | |
| 276 | flash1: mx66l51235l@1 { |
Patrick Delaunay | 708cae7 | 2019-07-30 19:16:12 +0200 | [diff] [blame] | 277 | compatible = "jedec,spi-nor"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 278 | reg = <1>; |
| 279 | spi-rx-bus-width = <4>; |
| 280 | spi-max-frequency = <108000000>; |
| 281 | #address-cells = <1>; |
| 282 | #size-cells = <1>; |
| 283 | }; |
| 284 | }; |
| 285 | |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 286 | &sdmmc3 { |
| 287 | pinctrl-names = "default", "opendrain", "sleep"; |
| 288 | pinctrl-0 = <&sdmmc3_b4_pins_a>; |
| 289 | pinctrl-1 = <&sdmmc3_b4_od_pins_a>; |
| 290 | pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; |
| 291 | broken-cd; |
| 292 | st,neg-edge; |
| 293 | bus-width = <4>; |
| 294 | vmmc-supply = <&v3v3>; |
| 295 | status = "disabled"; |
| 296 | }; |
| 297 | |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 298 | &spi1 { |
| 299 | pinctrl-names = "default"; |
| 300 | pinctrl-0 = <&spi1_pins_a>; |
| 301 | status = "disabled"; |
| 302 | }; |
| 303 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 304 | &timers2 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 305 | /* spare dmas for other usage (un-delete to enable pwm capture) */ |
| 306 | /delete-property/dmas; |
| 307 | /delete-property/dma-names; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 308 | status = "disabled"; |
| 309 | pwm { |
| 310 | pinctrl-0 = <&pwm2_pins_a>; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 311 | pinctrl-1 = <&pwm2_sleep_pins_a>; |
| 312 | pinctrl-names = "default", "sleep"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 313 | status = "okay"; |
| 314 | }; |
| 315 | timer@1 { |
| 316 | status = "okay"; |
| 317 | }; |
| 318 | }; |
| 319 | |
| 320 | &timers8 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 321 | /delete-property/dmas; |
| 322 | /delete-property/dma-names; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 323 | status = "disabled"; |
| 324 | pwm { |
| 325 | pinctrl-0 = <&pwm8_pins_a>; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 326 | pinctrl-1 = <&pwm8_sleep_pins_a>; |
| 327 | pinctrl-names = "default", "sleep"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 328 | status = "okay"; |
| 329 | }; |
| 330 | timer@7 { |
| 331 | status = "okay"; |
| 332 | }; |
| 333 | }; |
| 334 | |
| 335 | &timers12 { |
Patrick Delaunay | a370530 | 2019-07-11 11:15:28 +0200 | [diff] [blame] | 336 | /delete-property/dmas; |
| 337 | /delete-property/dma-names; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 338 | status = "disabled"; |
| 339 | pwm { |
| 340 | pinctrl-0 = <&pwm12_pins_a>; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 341 | pinctrl-1 = <&pwm12_sleep_pins_a>; |
| 342 | pinctrl-names = "default", "sleep"; |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 343 | status = "okay"; |
| 344 | }; |
| 345 | timer@11 { |
| 346 | status = "okay"; |
| 347 | }; |
| 348 | }; |
| 349 | |
Patrice Chotard | f7a5edc | 2018-08-10 17:12:12 +0200 | [diff] [blame] | 350 | &usbh_ehci { |
| 351 | phys = <&usbphyc_port0>; |
Patrice Chotard | f7a5edc | 2018-08-10 17:12:12 +0200 | [diff] [blame] | 352 | status = "okay"; |
| 353 | }; |
| 354 | |
Patrice Chotard | 18cb6f5 | 2018-08-10 17:12:11 +0200 | [diff] [blame] | 355 | &usbotg_hs { |
Patrice Chotard | 00442d0 | 2019-02-12 16:50:38 +0100 | [diff] [blame] | 356 | dr_mode = "peripheral"; |
Patrice Chotard | 18cb6f5 | 2018-08-10 17:12:11 +0200 | [diff] [blame] | 357 | phys = <&usbphyc_port1 0>; |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 358 | phy-names = "usb2-phy"; |
Patrice Chotard | 18cb6f5 | 2018-08-10 17:12:11 +0200 | [diff] [blame] | 359 | status = "okay"; |
| 360 | }; |
| 361 | |
Patrick Delaunay | e7f435d | 2018-07-09 15:17:22 +0200 | [diff] [blame] | 362 | &usbphyc { |
| 363 | status = "okay"; |
| 364 | }; |