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