Manivannan Sadhasivam | 93ffa2b | 2019-05-02 13:26:44 +0530 | [diff] [blame^] | 1 | // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) |
| 2 | /* |
| 3 | * Copyright (C) STMicroelectronics 2019 - All Rights Reserved |
| 4 | * Author: Alexandre Torgue <alexandre.torgue@st.com> for STMicroelectronics. |
| 5 | * |
| 6 | * Copyright (C) Linaro Ltd 2019 - All Rights Reserved |
| 7 | * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> |
| 8 | */ |
| 9 | |
| 10 | /dts-v1/; |
| 11 | |
| 12 | #include "stm32mp157c.dtsi" |
| 13 | #include "stm32mp157-pinctrl.dtsi" |
| 14 | #include <dt-bindings/gpio/gpio.h> |
| 15 | #include <dt-bindings/mfd/st,stpmic1.h> |
| 16 | |
| 17 | / { |
| 18 | model = "Arrow Electronics STM32MP157A Avenger96 board"; |
| 19 | compatible = "st,stm32mp157a-avenger96", "st,stm32mp157"; |
| 20 | |
| 21 | aliases { |
| 22 | ethernet0 = ðernet0; |
| 23 | serial0 = &uart4; |
| 24 | }; |
| 25 | |
| 26 | chosen { |
| 27 | stdout-path = "serial0:115200n8"; |
| 28 | }; |
| 29 | |
| 30 | memory@c0000000 { |
| 31 | reg = <0xc0000000 0x40000000>; |
| 32 | }; |
| 33 | |
| 34 | led { |
| 35 | compatible = "gpio-leds"; |
| 36 | led1 { |
| 37 | label = "green:user1"; |
| 38 | gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>; |
| 39 | linux,default-trigger = "heartbeat"; |
| 40 | default-state = "off"; |
| 41 | }; |
| 42 | |
| 43 | led2 { |
| 44 | label = "green:user2"; |
| 45 | gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; |
| 46 | linux,default-trigger = "mmc0"; |
| 47 | default-state = "off"; |
| 48 | }; |
| 49 | |
| 50 | led3 { |
| 51 | label = "green:user3"; |
| 52 | gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>; |
| 53 | linux,default-trigger = "mmc1"; |
| 54 | default-state = "off"; |
| 55 | }; |
| 56 | |
| 57 | led4 { |
| 58 | label = "green:user3"; |
| 59 | gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>; |
| 60 | linux,default-trigger = "none"; |
| 61 | default-state = "off"; |
| 62 | panic-indicator; |
| 63 | }; |
| 64 | |
| 65 | led5 { |
| 66 | label = "yellow:wifi"; |
| 67 | gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>; |
| 68 | linux,default-trigger = "phy0tx"; |
| 69 | default-state = "off"; |
| 70 | }; |
| 71 | |
| 72 | led6 { |
| 73 | label = "blue:bt"; |
| 74 | gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>; |
| 75 | linux,default-trigger = "bluetooth-power"; |
| 76 | default-state = "off"; |
| 77 | }; |
| 78 | }; |
| 79 | }; |
| 80 | |
| 81 | ðernet0 { |
| 82 | status = "okay"; |
| 83 | pinctrl-0 = <ðernet0_rgmii_pins_a>; |
| 84 | pinctrl-1 = <ðernet0_rgmii_pins_sleep_a>; |
| 85 | pinctrl-names = "default", "sleep"; |
| 86 | phy-mode = "rgmii"; |
| 87 | max-speed = <1000>; |
| 88 | phy-handle = <&phy0>; |
| 89 | |
| 90 | mdio0 { |
| 91 | #address-cells = <1>; |
| 92 | #size-cells = <0>; |
| 93 | compatible = "snps,dwmac-mdio"; |
| 94 | phy0: ethernet-phy@7 { |
| 95 | reg = <7>; |
| 96 | }; |
| 97 | }; |
| 98 | }; |
| 99 | |
| 100 | &i2c1 { |
| 101 | pinctrl-names = "default"; |
| 102 | pinctrl-0 = <&i2c1_pins_b>; |
| 103 | i2c-scl-rising-time-ns = <185>; |
| 104 | i2c-scl-falling-time-ns = <20>; |
| 105 | status = "okay"; |
| 106 | /delete-property/dmas; |
| 107 | /delete-property/dma-names; |
| 108 | }; |
| 109 | |
| 110 | &i2c2 { |
| 111 | pinctrl-names = "default"; |
| 112 | pinctrl-0 = <&i2c2_pins_b>; |
| 113 | i2c-scl-rising-time-ns = <185>; |
| 114 | i2c-scl-falling-time-ns = <20>; |
| 115 | status = "okay"; |
| 116 | /delete-property/dmas; |
| 117 | /delete-property/dma-names; |
| 118 | }; |
| 119 | |
| 120 | &i2c4 { |
| 121 | pinctrl-names = "default"; |
| 122 | pinctrl-0 = <&i2c4_pins_a>; |
| 123 | i2c-scl-rising-time-ns = <185>; |
| 124 | i2c-scl-falling-time-ns = <20>; |
| 125 | status = "okay"; |
| 126 | /delete-property/dmas; |
| 127 | /delete-property/dma-names; |
| 128 | |
| 129 | pmic: stpmic@33 { |
| 130 | compatible = "st,stpmic1"; |
| 131 | reg = <0x33>; |
| 132 | interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>; |
| 133 | interrupt-controller; |
| 134 | #interrupt-cells = <2>; |
| 135 | status = "okay"; |
| 136 | |
| 137 | st,main-control-register = <0x04>; |
| 138 | st,vin-control-register = <0xc0>; |
| 139 | st,usb-control-register = <0x30>; |
| 140 | |
| 141 | regulators { |
| 142 | compatible = "st,stpmic1-regulators"; |
| 143 | |
| 144 | ldo1-supply = <&v3v3>; |
| 145 | ldo2-supply = <&v3v3>; |
| 146 | ldo3-supply = <&vdd_ddr>; |
| 147 | ldo5-supply = <&v3v3>; |
| 148 | ldo6-supply = <&v3v3>; |
| 149 | pwr_sw1-supply = <&bst_out>; |
| 150 | pwr_sw2-supply = <&bst_out>; |
| 151 | |
| 152 | vddcore: buck1 { |
| 153 | regulator-name = "vddcore"; |
| 154 | regulator-min-microvolt = <800000>; |
| 155 | regulator-max-microvolt = <1350000>; |
| 156 | regulator-always-on; |
| 157 | regulator-initial-mode = <2>; |
| 158 | regulator-over-current-protection; |
| 159 | }; |
| 160 | |
| 161 | vdd_ddr: buck2 { |
| 162 | regulator-name = "vdd_ddr"; |
| 163 | regulator-min-microvolt = <1350000>; |
| 164 | regulator-max-microvolt = <1350000>; |
| 165 | regulator-always-on; |
| 166 | regulator-initial-mode = <2>; |
| 167 | regulator-over-current-protection; |
| 168 | }; |
| 169 | |
| 170 | vdd: buck3 { |
| 171 | regulator-name = "vdd"; |
| 172 | regulator-min-microvolt = <2500000>; |
| 173 | regulator-max-microvolt = <2500000>; |
| 174 | regulator-always-on; |
| 175 | st,mask_reset; |
| 176 | regulator-initial-mode = <8>; |
| 177 | regulator-over-current-protection; |
| 178 | }; |
| 179 | |
| 180 | v3v3: buck4 { |
| 181 | regulator-name = "v3v3"; |
| 182 | regulator-min-microvolt = <3300000>; |
| 183 | regulator-max-microvolt = <3300000>; |
| 184 | regulator-always-on; |
| 185 | regulator-over-current-protection; |
| 186 | regulator-initial-mode = <8>; |
| 187 | }; |
| 188 | |
| 189 | vdda: ldo1 { |
| 190 | regulator-name = "vdda"; |
| 191 | regulator-min-microvolt = <2900000>; |
| 192 | regulator-max-microvolt = <2900000>; |
| 193 | interrupts = <IT_CURLIM_LDO1 0>; |
| 194 | interrupt-parent = <&pmic>; |
| 195 | }; |
| 196 | |
| 197 | v2v8: ldo2 { |
| 198 | regulator-name = "v2v8"; |
| 199 | regulator-min-microvolt = <2800000>; |
| 200 | regulator-max-microvolt = <2800000>; |
| 201 | interrupts = <IT_CURLIM_LDO2 0>; |
| 202 | interrupt-parent = <&pmic>; |
| 203 | }; |
| 204 | |
| 205 | vtt_ddr: ldo3 { |
| 206 | regulator-name = "vtt_ddr"; |
| 207 | regulator-min-microvolt = <0000000>; |
| 208 | regulator-max-microvolt = <1000000>; |
| 209 | regulator-always-on; |
| 210 | regulator-over-current-protection; |
| 211 | }; |
| 212 | |
| 213 | vdd_usb: ldo4 { |
| 214 | regulator-name = "vdd_usb"; |
| 215 | regulator-min-microvolt = <3300000>; |
| 216 | regulator-max-microvolt = <3300000>; |
| 217 | interrupts = <IT_CURLIM_LDO4 0>; |
| 218 | interrupt-parent = <&pmic>; |
| 219 | }; |
| 220 | |
| 221 | vdd_sd: ldo5 { |
| 222 | regulator-name = "vdd_sd"; |
| 223 | regulator-min-microvolt = <2900000>; |
| 224 | regulator-max-microvolt = <2900000>; |
| 225 | interrupts = <IT_CURLIM_LDO5 0>; |
| 226 | interrupt-parent = <&pmic>; |
| 227 | regulator-boot-on; |
| 228 | }; |
| 229 | |
| 230 | v1v8: ldo6 { |
| 231 | regulator-name = "v1v8"; |
| 232 | regulator-min-microvolt = <1800000>; |
| 233 | regulator-max-microvolt = <1800000>; |
| 234 | interrupts = <IT_CURLIM_LDO6 0>; |
| 235 | interrupt-parent = <&pmic>; |
| 236 | }; |
| 237 | |
| 238 | vref_ddr: vref_ddr { |
| 239 | regulator-name = "vref_ddr"; |
| 240 | regulator-always-on; |
| 241 | regulator-over-current-protection; |
| 242 | }; |
| 243 | |
| 244 | bst_out: boost { |
| 245 | regulator-name = "bst_out"; |
| 246 | interrupts = <IT_OCP_BOOST 0>; |
| 247 | interrupt-parent = <&pmic>; |
| 248 | }; |
| 249 | |
| 250 | vbus_otg: pwr_sw1 { |
| 251 | regulator-name = "vbus_otg"; |
| 252 | interrupts = <IT_OCP_OTG 0>; |
| 253 | interrupt-parent = <&pmic>; |
| 254 | regulator-active-discharge; |
| 255 | }; |
| 256 | |
| 257 | vbus_sw: pwr_sw2 { |
| 258 | regulator-name = "vbus_sw"; |
| 259 | interrupts = <IT_OCP_SWOUT 0>; |
| 260 | interrupt-parent = <&pmic>; |
| 261 | regulator-active-discharge; |
| 262 | }; |
| 263 | }; |
| 264 | |
| 265 | onkey { |
| 266 | compatible = "st,stpmic1-onkey"; |
| 267 | interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>; |
| 268 | interrupt-names = "onkey-falling", "onkey-rising"; |
| 269 | status = "okay"; |
| 270 | }; |
| 271 | |
| 272 | watchdog { |
| 273 | compatible = "st,stpmic1-wdt"; |
| 274 | status = "disabled"; |
| 275 | }; |
| 276 | }; |
| 277 | }; |
| 278 | |
| 279 | &iwdg2 { |
| 280 | timeout-sec = <32>; |
| 281 | status = "okay"; |
| 282 | }; |
| 283 | |
| 284 | &pwr { |
| 285 | pwr-supply = <&vdd>; |
| 286 | }; |
| 287 | |
| 288 | &rng1 { |
| 289 | status = "okay"; |
| 290 | }; |
| 291 | |
| 292 | &rtc { |
| 293 | status = "okay"; |
| 294 | }; |
| 295 | |
| 296 | &sdmmc1 { |
| 297 | pinctrl-names = "default"; |
| 298 | pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; |
| 299 | broken-cd; |
| 300 | st,sig-dir; |
| 301 | st,neg-edge; |
| 302 | st,use-ckin; |
| 303 | bus-width = <4>; |
| 304 | vmmc-supply = <&vdd_sd>; |
| 305 | status = "okay"; |
| 306 | }; |
| 307 | |
| 308 | &sdmmc2 { |
| 309 | pinctrl-names = "default"; |
| 310 | pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>; |
| 311 | non-removable; |
| 312 | no-sd; |
| 313 | no-sdio; |
| 314 | st,neg-edge; |
| 315 | bus-width = <8>; |
| 316 | vmmc-supply = <&v3v3>; |
| 317 | mmc-ddr-3_3v; |
| 318 | status = "okay"; |
| 319 | }; |
| 320 | |
| 321 | &spi2 { |
| 322 | pinctrl-names = "default"; |
| 323 | pinctrl-0 = <&spi2_pins_a>; |
| 324 | status = "okay"; |
| 325 | }; |
| 326 | |
| 327 | &uart4 { |
| 328 | pinctrl-names = "default"; |
| 329 | pinctrl-0 = <&uart4_pins_b>; |
| 330 | status = "okay"; |
| 331 | }; |
| 332 | |
| 333 | &uart7 { |
| 334 | pinctrl-names = "default"; |
| 335 | pinctrl-0 = <&uart7_pins_a>; |
| 336 | status = "okay"; |
| 337 | }; |
| 338 | |
| 339 | &usbh_ehci { |
| 340 | phys = <&usbphyc_port0>; |
| 341 | phy-names = "usb"; |
| 342 | status = "okay"; |
| 343 | }; |
| 344 | |
| 345 | &usbotg_hs { |
| 346 | dr_mode = "peripheral"; |
| 347 | phys = <&usbphyc_port1 0>; |
| 348 | phy-names = "usb2-phy"; |
| 349 | status = "okay"; |
| 350 | }; |
| 351 | |
| 352 | &usbphyc { |
| 353 | status = "okay"; |
| 354 | }; |
| 355 | |
| 356 | &usbphyc_port0 { |
| 357 | phy-supply = <&vdd_usb>; |
| 358 | }; |
| 359 | |
| 360 | &usbphyc_port1 { |
| 361 | phy-supply = <&vdd_usb>; |
| 362 | }; |