Marcin Sloniewski | 83e7c20 | 2020-07-08 19:56:22 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) |
| 2 | /* |
| 3 | * Copyright (C) 2020 Marcin Sloniewski <marcin.sloniewski@gmail.com> |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "stm32mp157.dtsi" |
| 9 | #include "stm32mp15xc.dtsi" |
| 10 | #include "stm32mp15-pinctrl.dtsi" |
| 11 | #include "stm32mp15xxac-pinctrl.dtsi" |
| 12 | |
| 13 | #include <dt-bindings/gpio/gpio.h> |
| 14 | #include <dt-bindings/mfd/st,stpmic1.h> |
| 15 | |
| 16 | / { |
| 17 | |
| 18 | model = "Seeed Studio Odyssey-STM32MP157C SOM"; |
| 19 | compatible = "seeed,odyssey-stm32mp157c-som", "st,stm32mp157"; |
| 20 | |
| 21 | memory@c0000000 { |
| 22 | device_type = "memory"; |
| 23 | reg = <0xc0000000 0x20000000>; |
| 24 | }; |
| 25 | |
| 26 | reserved-memory { |
| 27 | #address-cells = <1>; |
| 28 | #size-cells = <1>; |
| 29 | ranges; |
| 30 | |
| 31 | mcuram2: mcuram2@10000000 { |
| 32 | compatible = "shared-dma-pool"; |
| 33 | reg = <0x10000000 0x40000>; |
| 34 | no-map; |
| 35 | }; |
| 36 | |
| 37 | vdev0vring0: vdev0vring0@10040000 { |
| 38 | compatible = "shared-dma-pool"; |
| 39 | reg = <0x10040000 0x1000>; |
| 40 | no-map; |
| 41 | }; |
| 42 | |
| 43 | vdev0vring1: vdev0vring1@10041000 { |
| 44 | compatible = "shared-dma-pool"; |
| 45 | reg = <0x10041000 0x1000>; |
| 46 | no-map; |
| 47 | }; |
| 48 | |
| 49 | vdev0buffer: vdev0buffer@10042000 { |
| 50 | compatible = "shared-dma-pool"; |
| 51 | reg = <0x10042000 0x4000>; |
| 52 | no-map; |
| 53 | }; |
| 54 | |
| 55 | mcuram: mcuram@30000000 { |
| 56 | compatible = "shared-dma-pool"; |
| 57 | reg = <0x30000000 0x40000>; |
| 58 | no-map; |
| 59 | }; |
| 60 | |
| 61 | retram: retram@38000000 { |
| 62 | compatible = "shared-dma-pool"; |
| 63 | reg = <0x38000000 0x10000>; |
| 64 | no-map; |
| 65 | }; |
| 66 | |
| 67 | gpu_reserved: gpu@d4000000 { |
| 68 | reg = <0xd4000000 0x4000000>; |
| 69 | no-map; |
| 70 | }; |
| 71 | |
| 72 | optee@de000000 { |
| 73 | reg = <0xde000000 0x02000000>; |
| 74 | no-map; |
| 75 | }; |
| 76 | }; |
| 77 | |
| 78 | led { |
| 79 | compatible = "gpio-leds"; |
| 80 | blue { |
| 81 | label = "heartbeat"; |
| 82 | gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>; |
| 83 | linux,default-trigger = "heartbeat"; |
| 84 | default-state = "off"; |
| 85 | }; |
| 86 | }; |
| 87 | |
| 88 | }; |
| 89 | |
| 90 | &gpu { |
| 91 | contiguous-area = <&gpu_reserved>; |
| 92 | status = "okay"; |
| 93 | }; |
| 94 | |
| 95 | &i2c2 { |
| 96 | pinctrl-names = "default", "sleep"; |
| 97 | pinctrl-0 = <&i2c2_pins_a>; |
| 98 | pinctrl-1 = <&i2c2_sleep_pins_a>; |
| 99 | i2c-scl-rising-time-ns = <185>; |
| 100 | i2c-scl-falling-time-ns = <20>; |
| 101 | clock-frequency = <400000>; |
| 102 | status = "okay"; |
| 103 | /* spare dmas for other usage */ |
| 104 | /delete-property/dmas; |
| 105 | /delete-property/dma-names; |
| 106 | |
| 107 | pmic: stpmic@33 { |
| 108 | compatible = "st,stpmic1"; |
| 109 | reg = <0x33>; |
| 110 | interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; |
| 111 | interrupt-controller; |
| 112 | #interrupt-cells = <2>; |
| 113 | status = "okay"; |
| 114 | |
| 115 | regulators { |
| 116 | compatible = "st,stpmic1-regulators"; |
| 117 | ldo1-supply = <&v3v3>; |
| 118 | ldo3-supply = <&vdd_ddr>; |
| 119 | ldo6-supply = <&v3v3>; |
| 120 | pwr_sw1-supply = <&bst_out>; |
| 121 | pwr_sw2-supply = <&bst_out>; |
| 122 | |
| 123 | vddcore: buck1 { |
| 124 | regulator-name = "vddcore"; |
| 125 | regulator-min-microvolt = <1200000>; |
| 126 | regulator-max-microvolt = <1350000>; |
| 127 | regulator-always-on; |
| 128 | regulator-initial-mode = <0>; |
| 129 | regulator-over-current-protection; |
| 130 | }; |
| 131 | |
| 132 | vdd_ddr: buck2 { |
| 133 | regulator-name = "vdd_ddr"; |
| 134 | regulator-min-microvolt = <1350000>; |
| 135 | regulator-max-microvolt = <1350000>; |
| 136 | regulator-always-on; |
| 137 | regulator-initial-mode = <0>; |
| 138 | regulator-over-current-protection; |
| 139 | }; |
| 140 | |
| 141 | vdd: buck3 { |
| 142 | regulator-name = "vdd"; |
| 143 | regulator-min-microvolt = <3300000>; |
| 144 | regulator-max-microvolt = <3300000>; |
| 145 | regulator-always-on; |
| 146 | st,mask-reset; |
| 147 | regulator-initial-mode = <0>; |
| 148 | regulator-over-current-protection; |
| 149 | }; |
| 150 | |
| 151 | v3v3: buck4 { |
| 152 | regulator-name = "v3v3"; |
| 153 | regulator-min-microvolt = <3300000>; |
| 154 | regulator-max-microvolt = <3300000>; |
| 155 | regulator-always-on; |
| 156 | regulator-over-current-protection; |
| 157 | regulator-initial-mode = <0>; |
| 158 | }; |
| 159 | |
| 160 | v1v8_audio: ldo1 { |
| 161 | regulator-name = "v1v8_audio"; |
| 162 | regulator-min-microvolt = <1800000>; |
| 163 | regulator-max-microvolt = <1800000>; |
| 164 | regulator-always-on; |
| 165 | interrupts = <IT_CURLIM_LDO1 0>; |
| 166 | }; |
| 167 | |
| 168 | v3v3_hdmi: ldo2 { |
| 169 | regulator-name = "v3v3_hdmi"; |
| 170 | regulator-min-microvolt = <3300000>; |
| 171 | regulator-max-microvolt = <3300000>; |
| 172 | regulator-always-on; |
| 173 | interrupts = <IT_CURLIM_LDO2 0>; |
| 174 | }; |
| 175 | |
| 176 | vtt_ddr: ldo3 { |
| 177 | regulator-name = "vtt_ddr"; |
| 178 | regulator-min-microvolt = <500000>; |
| 179 | regulator-max-microvolt = <750000>; |
| 180 | regulator-always-on; |
| 181 | regulator-over-current-protection; |
| 182 | }; |
| 183 | |
| 184 | vdd_usb: ldo4 { |
| 185 | regulator-name = "vdd_usb"; |
| 186 | interrupts = <IT_CURLIM_LDO4 0>; |
| 187 | }; |
| 188 | |
| 189 | vdda: ldo5 { |
| 190 | regulator-name = "vdda"; |
| 191 | regulator-min-microvolt = <2900000>; |
| 192 | regulator-max-microvolt = <2900000>; |
| 193 | interrupts = <IT_CURLIM_LDO5 0>; |
| 194 | regulator-boot-on; |
| 195 | }; |
| 196 | |
| 197 | v1v2_hdmi: ldo6 { |
| 198 | regulator-name = "v1v2_hdmi"; |
| 199 | regulator-min-microvolt = <1200000>; |
| 200 | regulator-max-microvolt = <1200000>; |
| 201 | regulator-always-on; |
| 202 | interrupts = <IT_CURLIM_LDO6 0>; |
| 203 | }; |
| 204 | |
| 205 | vref_ddr: vref_ddr { |
| 206 | regulator-name = "vref_ddr"; |
| 207 | regulator-always-on; |
| 208 | }; |
| 209 | |
| 210 | bst_out: boost { |
| 211 | regulator-name = "bst_out"; |
| 212 | interrupts = <IT_OCP_BOOST 0>; |
| 213 | }; |
| 214 | |
| 215 | vbus_otg: pwr_sw1 { |
| 216 | regulator-name = "vbus_otg"; |
| 217 | interrupts = <IT_OCP_OTG 0>; |
| 218 | }; |
| 219 | |
| 220 | vbus_sw: pwr_sw2 { |
| 221 | regulator-name = "vbus_sw"; |
| 222 | interrupts = <IT_OCP_SWOUT 0>; |
| 223 | regulator-active-discharge = <1>; |
| 224 | }; |
| 225 | }; |
| 226 | |
| 227 | onkey { |
| 228 | compatible = "st,stpmic1-onkey"; |
| 229 | interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 0>; |
| 230 | interrupt-names = "onkey-falling", "onkey-rising"; |
| 231 | power-off-time-sec = <10>; |
| 232 | status = "okay"; |
| 233 | }; |
| 234 | |
| 235 | watchdog { |
| 236 | compatible = "st,stpmic1-wdt"; |
| 237 | status = "disabled"; |
| 238 | }; |
| 239 | }; |
| 240 | }; |
| 241 | |
| 242 | &ipcc { |
| 243 | status = "okay"; |
| 244 | }; |
| 245 | |
| 246 | &iwdg2 { |
| 247 | timeout-sec = <32>; |
| 248 | status = "okay"; |
| 249 | }; |
| 250 | |
| 251 | &m4_rproc { |
| 252 | memory-region = <&retram>, <&mcuram>, <&mcuram2>, <&vdev0vring0>, |
| 253 | <&vdev0vring1>, <&vdev0buffer>; |
| 254 | mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>; |
| 255 | mbox-names = "vq0", "vq1", "shutdown"; |
| 256 | interrupt-parent = <&exti>; |
| 257 | interrupts = <68 1>; |
| 258 | status = "okay"; |
| 259 | }; |
| 260 | |
Grzegorz Szymaszek | 96cb495 | 2021-04-19 19:55:52 +0200 | [diff] [blame] | 261 | &rng1 { |
| 262 | status = "okay"; |
| 263 | }; |
| 264 | |
Marcin Sloniewski | 83e7c20 | 2020-07-08 19:56:22 +0200 | [diff] [blame] | 265 | &sdmmc2 { |
| 266 | pinctrl-names = "default", "opendrain", "sleep"; |
Grzegorz Szymaszek | 531d6c5 | 2021-06-02 19:09:03 +0200 | [diff] [blame^] | 267 | pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_d>; |
| 268 | pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_d>; |
| 269 | pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_d>; |
Grzegorz Szymaszek | 4bb56c6 | 2021-06-02 19:08:23 +0200 | [diff] [blame] | 270 | non-removable; |
| 271 | no-sd; |
| 272 | no-sdio; |
Marcin Sloniewski | 83e7c20 | 2020-07-08 19:56:22 +0200 | [diff] [blame] | 273 | st,neg-edge; |
Grzegorz Szymaszek | 531d6c5 | 2021-06-02 19:09:03 +0200 | [diff] [blame^] | 274 | bus-width = <8>; |
Marcin Sloniewski | 83e7c20 | 2020-07-08 19:56:22 +0200 | [diff] [blame] | 275 | vmmc-supply = <&v3v3>; |
| 276 | status = "okay"; |
| 277 | }; |
| 278 | |
| 279 | &timers1 { |
| 280 | /* spare dmas for other usage */ |
| 281 | /delete-property/dmas; |
| 282 | /delete-property/dma-names; |
| 283 | status = "disabled"; |
| 284 | pwm { |
| 285 | pinctrl-0 = <&pwm1_pins_a>; |
| 286 | pinctrl-1 = <&pwm1_sleep_pins_a>; |
| 287 | pinctrl-names = "default", "sleep"; |
| 288 | status = "okay"; |
| 289 | }; |
| 290 | timer@0 { |
| 291 | status = "okay"; |
| 292 | }; |
| 293 | }; |
| 294 | |
| 295 | &timers3 { |
| 296 | /delete-property/dmas; |
| 297 | /delete-property/dma-names; |
| 298 | status = "disabled"; |
| 299 | pwm { |
| 300 | pinctrl-0 = <&pwm3_pins_a>; |
| 301 | pinctrl-1 = <&pwm3_sleep_pins_a>; |
| 302 | pinctrl-names = "default", "sleep"; |
| 303 | status = "okay"; |
| 304 | }; |
| 305 | timer@2 { |
| 306 | status = "okay"; |
| 307 | }; |
| 308 | }; |
| 309 | |
| 310 | &timers4 { |
| 311 | /delete-property/dmas; |
| 312 | /delete-property/dma-names; |
| 313 | status = "disabled"; |
| 314 | pwm { |
| 315 | pinctrl-0 = <&pwm4_pins_a &pwm4_pins_b>; |
| 316 | pinctrl-1 = <&pwm4_sleep_pins_a &pwm4_sleep_pins_b>; |
| 317 | pinctrl-names = "default", "sleep"; |
| 318 | status = "okay"; |
| 319 | }; |
| 320 | timer@3 { |
| 321 | status = "okay"; |
| 322 | }; |
| 323 | }; |
| 324 | |
| 325 | &timers5 { |
| 326 | /delete-property/dmas; |
| 327 | /delete-property/dma-names; |
| 328 | status = "disabled"; |
| 329 | pwm { |
| 330 | pinctrl-0 = <&pwm5_pins_a>; |
| 331 | pinctrl-1 = <&pwm5_sleep_pins_a>; |
| 332 | pinctrl-names = "default", "sleep"; |
| 333 | status = "okay"; |
| 334 | }; |
| 335 | timer@4 { |
| 336 | status = "okay"; |
| 337 | }; |
| 338 | }; |
| 339 | |
| 340 | &timers6 { |
| 341 | /delete-property/dmas; |
| 342 | /delete-property/dma-names; |
| 343 | status = "disabled"; |
| 344 | timer@5 { |
| 345 | status = "okay"; |
| 346 | }; |
| 347 | }; |
| 348 | |
| 349 | &timers12 { |
| 350 | /delete-property/dmas; |
| 351 | /delete-property/dma-names; |
| 352 | status = "disabled"; |
| 353 | pwm { |
| 354 | pinctrl-0 = <&pwm12_pins_a>; |
| 355 | pinctrl-1 = <&pwm12_sleep_pins_a>; |
| 356 | pinctrl-names = "default", "sleep"; |
| 357 | status = "okay"; |
| 358 | }; |
| 359 | timer@11 { |
| 360 | status = "okay"; |
| 361 | }; |
| 362 | }; |
| 363 | |
| 364 | &vrefbuf { |
| 365 | regulator-min-microvolt = <2500000>; |
| 366 | regulator-max-microvolt = <2500000>; |
| 367 | vdda-supply = <&vdd>; |
| 368 | status = "okay"; |
| 369 | }; |