1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2/* 3 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved 4 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 5 */ 6 7/dts-v1/; 8 9#include "stm32mp157c.dtsi" 10#include "stm32mp157xac-pinctrl.dtsi" 11#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/mfd/st,stpmic1.h> 13 14/ { 15 model = "Arrow Electronics STM32MP157A Avenger96 board"; 16 compatible = "arrow,stm32mp157a-avenger96", "st,stm32mp157"; 17 18 aliases { 19 ethernet0 = ðernet0; 20 mmc0 = &sdmmc1; 21 serial0 = &uart4; 22 serial1 = &uart7; 23 }; 24 25 chosen { 26 stdout-path = "serial0:115200n8"; 27 }; 28 29 memory@c0000000 { 30 device_type = "memory"; 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_b1 &i2c2_pins_b2>; 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 = <1200000>; 155 regulator-max-microvolt = <1350000>; 156 regulator-always-on; 157 regulator-initial-mode = <0>; 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 = <0>; 167 regulator-over-current-protection; 168 }; 169 170 vdd: buck3 { 171 regulator-name = "vdd"; 172 regulator-min-microvolt = <3300000>; 173 regulator-max-microvolt = <3300000>; 174 regulator-always-on; 175 st,mask_reset; 176 regulator-initial-mode = <0>; 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 = <0>; 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 = <500000>; 208 regulator-max-microvolt = <750000>; 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 regulator-enable-ramp-delay = <300000>; 237 }; 238 239 vref_ddr: vref_ddr { 240 regulator-name = "vref_ddr"; 241 regulator-always-on; 242 regulator-over-current-protection; 243 }; 244 245 bst_out: boost { 246 regulator-name = "bst_out"; 247 interrupts = <IT_OCP_BOOST 0>; 248 interrupt-parent = <&pmic>; 249 }; 250 251 vbus_otg: pwr_sw1 { 252 regulator-name = "vbus_otg"; 253 interrupts = <IT_OCP_OTG 0>; 254 interrupt-parent = <&pmic>; 255 regulator-active-discharge; 256 }; 257 258 vbus_sw: pwr_sw2 { 259 regulator-name = "vbus_sw"; 260 interrupts = <IT_OCP_SWOUT 0>; 261 interrupt-parent = <&pmic>; 262 regulator-active-discharge; 263 }; 264 }; 265 266 onkey { 267 compatible = "st,stpmic1-onkey"; 268 interrupts = <IT_PONKEY_F 0>, <IT_PONKEY_R 1>; 269 interrupt-names = "onkey-falling", "onkey-rising"; 270 status = "okay"; 271 }; 272 273 watchdog { 274 compatible = "st,stpmic1-wdt"; 275 status = "disabled"; 276 }; 277 }; 278}; 279 280&iwdg2 { 281 timeout-sec = <32>; 282 status = "okay"; 283}; 284 285&rng1 { 286 status = "okay"; 287}; 288 289&rtc { 290 status = "okay"; 291}; 292 293&sdmmc1 { 294 pinctrl-names = "default", "opendrain", "sleep"; 295 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_a>; 296 pinctrl-1 = <&sdmmc1_b4_od_pins_a>; 297 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; 298 broken-cd; 299 st,sig-dir; 300 st,neg-edge; 301 st,use-ckin; 302 bus-width = <4>; 303 vmmc-supply = <&vdd_sd>; 304 status = "okay"; 305}; 306 307&uart4 { 308 /* On Low speed expansion header */ 309 label = "LS-UART1"; 310 pinctrl-names = "default"; 311 pinctrl-0 = <&uart4_pins_b>; 312 status = "okay"; 313}; 314 315&uart7 { 316 /* On Low speed expansion header */ 317 label = "LS-UART0"; 318 pinctrl-names = "default"; 319 pinctrl-0 = <&uart7_pins_a>; 320 status = "okay"; 321}; 322