Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) |
| 2 | /* |
| 3 | * Copyright (C) 2019 Marek Vasut <marex@denx.de> |
| 4 | */ |
| 5 | /dts-v1/; |
| 6 | |
Patrick Delaunay | 48c5e90 | 2020-03-06 17:54:41 +0100 | [diff] [blame] | 7 | #include "stm32mp157.dtsi" |
| 8 | #include "stm32mp15xc.dtsi" |
| 9 | #include "stm32mp15-pinctrl.dtsi" |
| 10 | #include "stm32mp15xxaa-pinctrl.dtsi" |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 11 | #include <dt-bindings/gpio/gpio.h> |
| 12 | #include <dt-bindings/mfd/st,stpmic1.h> |
| 13 | |
| 14 | / { |
Marek Vasut | 2ab7a2a | 2020-03-31 19:51:29 +0200 | [diff] [blame] | 15 | aliases { |
| 16 | eeprom0 = &eeprom0; |
Marek Vasut | a8792d0 | 2020-07-25 16:50:55 +0200 | [diff] [blame] | 17 | ethernet0 = ðernet0; |
Marek Vasut | 2ab7a2a | 2020-03-31 19:51:29 +0200 | [diff] [blame] | 18 | }; |
| 19 | |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 20 | memory@c0000000 { |
| 21 | device_type = "memory"; |
| 22 | reg = <0xC0000000 0x40000000>; |
| 23 | }; |
Marek Vasut | a8792d0 | 2020-07-25 16:50:55 +0200 | [diff] [blame] | 24 | |
| 25 | ethernet_vio: vioregulator { |
| 26 | compatible = "regulator-fixed"; |
| 27 | regulator-name = "vio"; |
| 28 | regulator-min-microvolt = <3300000>; |
| 29 | regulator-max-microvolt = <3300000>; |
| 30 | gpio = <&gpiog 3 GPIO_ACTIVE_LOW>; |
| 31 | regulator-always-on; |
| 32 | regulator-boot-on; |
| 33 | }; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | &cec { |
| 37 | pinctrl-names = "default"; |
| 38 | pinctrl-0 = <&cec_pins_a>; |
| 39 | status = "okay"; |
| 40 | }; |
| 41 | |
| 42 | &dcmi { |
| 43 | status = "okay"; |
| 44 | pinctrl-names = "default", "sleep"; |
| 45 | pinctrl-0 = <&dcmi_pins_a>; |
| 46 | pinctrl-1 = <&dcmi_sleep_pins_a>; |
| 47 | }; |
| 48 | |
| 49 | &dts { |
| 50 | status = "okay"; |
Marek Vasut | a8792d0 | 2020-07-25 16:50:55 +0200 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | ðernet0 { |
| 54 | status = "okay"; |
| 55 | pinctrl-0 = <ðernet0_rmii_pins_a>; |
| 56 | pinctrl-1 = <ðernet0_rmii_pins_sleep_a>; |
| 57 | pinctrl-names = "default", "sleep"; |
| 58 | phy-mode = "rmii"; |
| 59 | max-speed = <100>; |
| 60 | phy-handle = <&phy0>; |
| 61 | st,eth_ref_clk_sel; |
| 62 | phy-reset-gpios = <&gpioh 15 GPIO_ACTIVE_LOW>; |
| 63 | |
| 64 | mdio0 { |
| 65 | #address-cells = <1>; |
| 66 | #size-cells = <0>; |
| 67 | compatible = "snps,dwmac-mdio"; |
| 68 | |
| 69 | phy0: ethernet-phy@1 { |
| 70 | reg = <1>; |
| 71 | }; |
| 72 | }; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | &i2c2 { |
| 76 | pinctrl-names = "default"; |
| 77 | pinctrl-0 = <&i2c2_pins_a>; |
| 78 | i2c-scl-rising-time-ns = <185>; |
| 79 | i2c-scl-falling-time-ns = <20>; |
| 80 | status = "okay"; |
| 81 | }; |
| 82 | |
| 83 | &i2c4 { |
| 84 | pinctrl-names = "default"; |
| 85 | pinctrl-0 = <&i2c4_pins_a>; |
| 86 | i2c-scl-rising-time-ns = <185>; |
| 87 | i2c-scl-falling-time-ns = <20>; |
| 88 | status = "okay"; |
| 89 | /* spare dmas for other usage */ |
| 90 | /delete-property/dmas; |
| 91 | /delete-property/dma-names; |
| 92 | |
| 93 | pmic: stpmic@33 { |
| 94 | compatible = "st,stpmic1"; |
| 95 | reg = <0x33>; |
| 96 | interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; |
| 97 | interrupt-controller; |
| 98 | #interrupt-cells = <2>; |
| 99 | status = "okay"; |
| 100 | |
| 101 | regulators { |
| 102 | compatible = "st,stpmic1-regulators"; |
| 103 | ldo1-supply = <&v3v3>; |
| 104 | ldo2-supply = <&v3v3>; |
| 105 | ldo3-supply = <&vdd_ddr>; |
| 106 | ldo5-supply = <&v3v3>; |
| 107 | ldo6-supply = <&v3v3>; |
| 108 | pwr_sw1-supply = <&bst_out>; |
| 109 | pwr_sw2-supply = <&bst_out>; |
| 110 | |
| 111 | vddcore: buck1 { |
| 112 | regulator-name = "vddcore"; |
| 113 | regulator-min-microvolt = <800000>; |
| 114 | regulator-max-microvolt = <1350000>; |
| 115 | regulator-always-on; |
| 116 | regulator-initial-mode = <0>; |
| 117 | regulator-over-current-protection; |
| 118 | }; |
| 119 | |
| 120 | vdd_ddr: buck2 { |
| 121 | regulator-name = "vdd_ddr"; |
| 122 | regulator-min-microvolt = <1350000>; |
| 123 | regulator-max-microvolt = <1350000>; |
| 124 | regulator-always-on; |
| 125 | regulator-initial-mode = <0>; |
| 126 | regulator-over-current-protection; |
| 127 | }; |
| 128 | |
| 129 | vdd: buck3 { |
| 130 | regulator-name = "vdd"; |
| 131 | regulator-min-microvolt = <3300000>; |
| 132 | regulator-max-microvolt = <3300000>; |
| 133 | regulator-always-on; |
| 134 | st,mask-reset; |
| 135 | regulator-initial-mode = <0>; |
| 136 | regulator-over-current-protection; |
| 137 | }; |
| 138 | |
| 139 | v3v3: buck4 { |
| 140 | regulator-name = "v3v3"; |
| 141 | regulator-min-microvolt = <3300000>; |
| 142 | regulator-max-microvolt = <3300000>; |
| 143 | regulator-always-on; |
| 144 | regulator-over-current-protection; |
| 145 | regulator-initial-mode = <0>; |
| 146 | }; |
| 147 | |
| 148 | vdda: ldo1 { |
| 149 | regulator-name = "vdda"; |
| 150 | regulator-min-microvolt = <2900000>; |
| 151 | regulator-max-microvolt = <2900000>; |
| 152 | interrupts = <IT_CURLIM_LDO1 0>; |
| 153 | }; |
| 154 | |
| 155 | v2v8: ldo2 { |
| 156 | regulator-name = "v2v8"; |
| 157 | regulator-min-microvolt = <2800000>; |
| 158 | regulator-max-microvolt = <2800000>; |
| 159 | interrupts = <IT_CURLIM_LDO2 0>; |
| 160 | }; |
| 161 | |
| 162 | vtt_ddr: ldo3 { |
| 163 | regulator-name = "vtt_ddr"; |
| 164 | regulator-min-microvolt = <500000>; |
| 165 | regulator-max-microvolt = <750000>; |
| 166 | regulator-always-on; |
| 167 | regulator-over-current-protection; |
| 168 | }; |
| 169 | |
| 170 | vdd_usb: ldo4 { |
| 171 | regulator-name = "vdd_usb"; |
| 172 | regulator-min-microvolt = <3300000>; |
| 173 | regulator-max-microvolt = <3300000>; |
| 174 | interrupts = <IT_CURLIM_LDO4 0>; |
| 175 | }; |
| 176 | |
| 177 | vdd_sd: ldo5 { |
| 178 | regulator-name = "vdd_sd"; |
| 179 | regulator-min-microvolt = <2900000>; |
| 180 | regulator-max-microvolt = <2900000>; |
| 181 | interrupts = <IT_CURLIM_LDO5 0>; |
| 182 | regulator-boot-on; |
| 183 | }; |
| 184 | |
| 185 | v1v8: ldo6 { |
| 186 | regulator-name = "v1v8"; |
| 187 | regulator-min-microvolt = <1800000>; |
| 188 | regulator-max-microvolt = <1800000>; |
| 189 | interrupts = <IT_CURLIM_LDO6 0>; |
| 190 | }; |
| 191 | |
| 192 | vref_ddr: vref_ddr { |
| 193 | regulator-name = "vref_ddr"; |
| 194 | regulator-always-on; |
| 195 | regulator-over-current-protection; |
| 196 | }; |
| 197 | |
| 198 | bst_out: boost { |
| 199 | regulator-name = "bst_out"; |
| 200 | interrupts = <IT_OCP_BOOST 0>; |
| 201 | }; |
| 202 | |
| 203 | vbus_otg: pwr_sw1 { |
| 204 | regulator-name = "vbus_otg"; |
| 205 | interrupts = <IT_OCP_OTG 0>; |
| 206 | }; |
| 207 | |
| 208 | vbus_sw: pwr_sw2 { |
| 209 | regulator-name = "vbus_sw"; |
| 210 | interrupts = <IT_OCP_SWOUT 0>; |
| 211 | regulator-active-discharge; |
| 212 | }; |
| 213 | }; |
| 214 | |
| 215 | onkey { |
| 216 | compatible = "st,stpmic1-onkey"; |
| 217 | interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>; |
| 218 | interrupt-names = "onkey-falling", "onkey-rising"; |
| 219 | power-off-time-sec = <10>; |
| 220 | status = "okay"; |
| 221 | }; |
| 222 | |
| 223 | watchdog { |
| 224 | compatible = "st,stpmic1-wdt"; |
| 225 | status = "disabled"; |
| 226 | }; |
| 227 | }; |
| 228 | |
Marek Vasut | 2ab7a2a | 2020-03-31 19:51:29 +0200 | [diff] [blame] | 229 | eeprom0: eeprom@50 { |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 230 | compatible = "atmel,24c02"; |
| 231 | reg = <0x50>; |
| 232 | pagesize = <16>; |
| 233 | }; |
| 234 | }; |
| 235 | |
| 236 | &i2c5 { |
| 237 | pinctrl-names = "default"; |
| 238 | pinctrl-0 = <&i2c5_pins_a>; |
| 239 | i2c-scl-rising-time-ns = <185>; |
| 240 | i2c-scl-falling-time-ns = <20>; |
| 241 | status = "okay"; |
| 242 | }; |
| 243 | |
| 244 | &ipcc { |
| 245 | status = "okay"; |
| 246 | }; |
| 247 | |
| 248 | &iwdg2 { |
| 249 | timeout-sec = <32>; |
| 250 | status = "okay"; |
| 251 | }; |
| 252 | |
| 253 | &m4_rproc { |
| 254 | mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>; |
| 255 | mbox-names = "vq0", "vq1", "shutdown"; |
| 256 | status = "okay"; |
| 257 | }; |
| 258 | |
Patrick Delaunay | 900494d | 2020-01-28 10:10:59 +0100 | [diff] [blame] | 259 | &pwr_regulators { |
| 260 | vdd-supply = <&vdd>; |
| 261 | vdd_3v3_usbfs-supply = <&vdd_usb>; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 262 | }; |
| 263 | |
Marek Vasut | a8792d0 | 2020-07-25 16:50:55 +0200 | [diff] [blame] | 264 | &pinctrl { |
| 265 | ethernet0_rmii_pins_a: rmii-0 { |
| 266 | pins1 { |
| 267 | pinmux = <STM32_PINMUX('G', 13, AF11)>, /* ETH1_RMII_TXD0 */ |
| 268 | <STM32_PINMUX('G', 14, AF11)>, /* ETH1_RMII_TXD1 */ |
| 269 | <STM32_PINMUX('B', 11, AF11)>, /* ETH1_RMII_TX_EN */ |
| 270 | <STM32_PINMUX('A', 1, AF0)>, /* ETH1_RMII_REF_CLK */ |
| 271 | <STM32_PINMUX('A', 2, AF11)>, /* ETH1_MDIO */ |
| 272 | <STM32_PINMUX('C', 1, AF11)>; /* ETH1_MDC */ |
| 273 | bias-disable; |
| 274 | drive-push-pull; |
| 275 | slew-rate = <2>; |
| 276 | }; |
| 277 | pins2 { |
| 278 | pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH1_RMII_RXD0 */ |
| 279 | <STM32_PINMUX('C', 5, AF11)>, /* ETH1_RMII_RXD1 */ |
| 280 | <STM32_PINMUX('A', 7, AF11)>; /* ETH1_RMII_CRS_DV */ |
| 281 | bias-disable; |
| 282 | }; |
| 283 | }; |
| 284 | |
| 285 | ethernet0_rmii_pins_sleep_a: rmii-sleep-0 { |
| 286 | pins1 { |
| 287 | pinmux = <STM32_PINMUX('G', 13, ANALOG)>, /* ETH1_RMII_TXD0 */ |
| 288 | <STM32_PINMUX('G', 14, ANALOG)>, /* ETH1_RMII_TXD1 */ |
| 289 | <STM32_PINMUX('B', 11, ANALOG)>, /* ETH1_RMII_TX_EN */ |
| 290 | <STM32_PINMUX('A', 2, ANALOG)>, /* ETH1_MDIO */ |
| 291 | <STM32_PINMUX('C', 1, ANALOG)>, /* ETH1_MDC */ |
| 292 | <STM32_PINMUX('C', 4, ANALOG)>, /* ETH1_RMII_RXD0 */ |
| 293 | <STM32_PINMUX('C', 5, ANALOG)>, /* ETH1_RMII_RXD1 */ |
| 294 | <STM32_PINMUX('A', 1, ANALOG)>, /* ETH1_RMII_REF_CLK */ |
| 295 | <STM32_PINMUX('A', 7, ANALOG)>; /* ETH1_RMII_CRS_DV */ |
| 296 | }; |
| 297 | }; |
| 298 | }; |
| 299 | |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 300 | &qspi { |
| 301 | pinctrl-names = "default", "sleep"; |
| 302 | pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a &qspi_bk2_pins_a>; |
| 303 | pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a &qspi_bk2_sleep_pins_a>; |
| 304 | reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; |
| 305 | #address-cells = <1>; |
| 306 | #size-cells = <0>; |
| 307 | status = "okay"; |
| 308 | |
| 309 | flash0: mx66l51235l@0 { |
| 310 | compatible = "jedec,spi-nor"; |
| 311 | reg = <0>; |
| 312 | spi-rx-bus-width = <4>; |
| 313 | spi-max-frequency = <108000000>; |
| 314 | #address-cells = <1>; |
| 315 | #size-cells = <1>; |
| 316 | }; |
| 317 | |
| 318 | flash1: mx66l51235l@1 { |
| 319 | compatible = "jedec,spi-nor"; |
| 320 | reg = <1>; |
| 321 | spi-rx-bus-width = <4>; |
| 322 | spi-max-frequency = <108000000>; |
| 323 | #address-cells = <1>; |
| 324 | #size-cells = <1>; |
| 325 | }; |
| 326 | }; |
| 327 | |
| 328 | &rng1 { |
| 329 | status = "okay"; |
| 330 | }; |
| 331 | |
| 332 | &rtc { |
| 333 | status = "okay"; |
| 334 | }; |
| 335 | |
| 336 | &sdmmc1 { |
| 337 | pinctrl-names = "default", "opendrain", "sleep"; |
| 338 | pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; |
| 339 | pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_a>; |
| 340 | pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_a>; |
Patrick Delaunay | df0d20a | 2020-04-30 15:52:46 +0200 | [diff] [blame] | 341 | cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 342 | disable-wp; |
Marek Vasut | 5ff0529 | 2020-01-24 18:39:16 +0100 | [diff] [blame] | 343 | st,sig-dir; |
| 344 | st,neg-edge; |
| 345 | st,use-ckin; |
| 346 | bus-width = <4>; |
| 347 | vmmc-supply = <&vdd_sd>; |
| 348 | status = "okay"; |
| 349 | }; |
| 350 | |
| 351 | &sdmmc2 { |
| 352 | pinctrl-names = "default"; |
| 353 | pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>; |
| 354 | non-removable; |
| 355 | no-sd; |
| 356 | no-sdio; |
| 357 | st,sig-dir; |
| 358 | st,neg-edge; |
| 359 | bus-width = <8>; |
| 360 | vmmc-supply = <&v3v3>; |
| 361 | status = "okay"; |
| 362 | }; |
| 363 | |
| 364 | &spi1 { |
| 365 | pinctrl-names = "default"; |
| 366 | pinctrl-0 = <&spi1_pins_a>; |
| 367 | status = "disabled"; |
| 368 | }; |
| 369 | |
| 370 | &timers2 { |
| 371 | /* spare dmas for other usage (un-delete to enable pwm capture) */ |
| 372 | /delete-property/dmas; |
| 373 | /delete-property/dma-names; |
| 374 | status = "disabled"; |
| 375 | pwm { |
| 376 | pinctrl-0 = <&pwm2_pins_a>; |
| 377 | pinctrl-names = "default"; |
| 378 | status = "okay"; |
| 379 | }; |
| 380 | timer@1 { |
| 381 | status = "okay"; |
| 382 | }; |
| 383 | }; |
| 384 | |
| 385 | &timers6 { |
| 386 | status = "okay"; |
| 387 | /* spare dmas for other usage */ |
| 388 | /delete-property/dmas; |
| 389 | /delete-property/dma-names; |
| 390 | timer@5 { |
| 391 | status = "okay"; |
| 392 | }; |
| 393 | }; |
| 394 | |
| 395 | &timers8 { |
| 396 | /delete-property/dmas; |
| 397 | /delete-property/dma-names; |
| 398 | status = "disabled"; |
| 399 | pwm { |
| 400 | pinctrl-0 = <&pwm8_pins_a>; |
| 401 | pinctrl-names = "default"; |
| 402 | status = "okay"; |
| 403 | }; |
| 404 | timer@7 { |
| 405 | status = "okay"; |
| 406 | }; |
| 407 | }; |
| 408 | |
| 409 | &timers12 { |
| 410 | /delete-property/dmas; |
| 411 | /delete-property/dma-names; |
| 412 | status = "disabled"; |
| 413 | pwm { |
| 414 | pinctrl-0 = <&pwm12_pins_a>; |
| 415 | pinctrl-names = "default"; |
| 416 | status = "okay"; |
| 417 | }; |
| 418 | timer@11 { |
| 419 | status = "okay"; |
| 420 | }; |
| 421 | }; |
| 422 | |
| 423 | &uart4 { |
| 424 | pinctrl-names = "default"; |
| 425 | pinctrl-0 = <&uart4_pins_a>; |
| 426 | status = "okay"; |
| 427 | }; |
| 428 | |
| 429 | &usbh_ehci { |
| 430 | phys = <&usbphyc_port0>; |
| 431 | phy-names = "usb"; |
| 432 | status = "okay"; |
| 433 | }; |
| 434 | |
| 435 | &usbotg_hs { |
| 436 | dr_mode = "peripheral"; |
| 437 | phys = <&usbphyc_port1 0>; |
| 438 | phy-names = "usb2-phy"; |
| 439 | vbus-supply = <&vbus_otg>; |
| 440 | status = "okay"; |
| 441 | }; |
| 442 | |
| 443 | &usbphyc { |
| 444 | status = "okay"; |
| 445 | }; |
| 446 | |
| 447 | &usbphyc_port0 { |
| 448 | phy-supply = <&vdd_usb>; |
| 449 | }; |
| 450 | |
| 451 | &usbphyc_port1 { |
| 452 | phy-supply = <&vdd_usb>; |
| 453 | }; |