1// SPDX-License-Identifier: (GPL-2.0-only OR MIT) 2// Copyright (C) 2024 Arm Ltd. 3 4/dts-v1/; 5 6#include "sun55i-a523.dtsi" 7 8#include <dt-bindings/gpio/gpio.h> 9 10/ { 11 model = "Avaota A1"; 12 compatible = "yuzukihd,avaota-a1", "allwinner,sun55i-t527"; 13 14 aliases { 15 ethernet0 = &gmac0; 16 serial0 = &uart0; 17 }; 18 19 chosen { 20 stdout-path = "serial0:115200n8"; 21 }; 22 23 ext_osc32k: ext-osc32k-clk { 24 #clock-cells = <0>; 25 compatible = "fixed-clock"; 26 clock-frequency = <32768>; 27 clock-output-names = "ext_osc32k"; 28 }; 29 30 iio-hwmon { 31 compatible = "iio-hwmon"; 32 io-channels = <&axp717_adc 3>, /* vsys_v */ 33 <&axp717_adc 4>; /* pmic_temp */ 34 }; 35 36 reg_vcc12v: vcc12v { 37 /* DC input jack */ 38 compatible = "regulator-fixed"; 39 regulator-name = "vcc-12v"; 40 regulator-min-microvolt = <12000000>; 41 regulator-max-microvolt = <12000000>; 42 regulator-always-on; 43 }; 44 45 reg_vcc5v: vcc5v { 46 /* board wide 5V supply from the 12V->5V regulator */ 47 compatible = "regulator-fixed"; 48 regulator-name = "vcc-5v"; 49 regulator-min-microvolt = <5000000>; 50 regulator-max-microvolt = <5000000>; 51 vin-supply = <®_vcc12v>; 52 regulator-always-on; 53 }; 54 55 reg_usb_vbus: vbus { 56 compatible = "regulator-fixed"; 57 regulator-name = "usb-vbus"; 58 regulator-min-microvolt = <5000000>; 59 regulator-max-microvolt = <5000000>; 60 vin-supply = <®_vcc5v>; 61 gpio = <&pio 8 12 GPIO_ACTIVE_HIGH>; /* PI12 */ 62 enable-active-high; 63 }; 64}; 65 66&ehci0 { 67 status = "okay"; 68}; 69 70&ehci1 { 71 status = "okay"; 72}; 73 74&gmac0 { 75 phy-mode = "rgmii-id"; 76 phy-handle = <&ext_rgmii_phy>; 77 phy-supply = <®_dcdc4>; 78 79 allwinner,tx-delay-ps = <100>; 80 allwinner,rx-delay-ps = <300>; 81 82 status = "okay"; 83}; 84 85&gpu { 86 mali-supply = <®_dcdc2>; 87 status = "okay"; 88}; 89 90&mdio0 { 91 ext_rgmii_phy: ethernet-phy@1 { 92 compatible = "ethernet-phy-ieee802.3-c22"; 93 reg = <1>; 94 reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ 95 reset-assert-us = <10000>; 96 reset-deassert-us = <150000>; 97 }; 98}; 99 100&mmc0 { 101 vmmc-supply = <®_cldo3>; 102 cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */ 103 bus-width = <4>; 104 status = "okay"; 105}; 106 107&mmc2 { 108 bus-width = <8>; 109 cap-mmc-hw-reset; 110 mmc-ddr-1_8v; 111 mmc-hs200-1_8v; 112 non-removable; 113 vmmc-supply = <®_cldo3>; 114 vqmmc-supply = <®_cldo1>; 115 status = "okay"; 116}; 117 118&ohci0 { 119 status = "okay"; 120}; 121 122&ohci1 { 123 status = "okay"; 124}; 125 126&pio { 127 vcc-pb-supply = <®_cldo3>; /* via VCC-IO */ 128 vcc-pc-supply = <®_cldo1>; 129 vcc-pd-supply = <®_dcdc4>; 130 vcc-pe-supply = <®_dcdc4>; 131 vcc-pf-supply = <®_cldo3>; /* actually switchable */ 132 vcc-pg-supply = <®_bldo1>; 133 vcc-ph-supply = <®_cldo3>; /* via VCC-IO */ 134 vcc-pi-supply = <®_dcdc4>; 135 vcc-pj-supply = <®_dcdc4>; 136 vcc-pk-supply = <®_bldo3>; 137}; 138 139&r_i2c0 { 140 status = "okay"; 141 142 axp717: pmic@35 { 143 compatible = "x-powers,axp717"; 144 reg = <0x35>; 145 interrupt-controller; 146 #interrupt-cells = <1>; 147 interrupt-parent = <&nmi_intc>; 148 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 149 150 vin1-supply = <®_vcc5v>; 151 vin2-supply = <®_vcc5v>; 152 vin3-supply = <®_vcc5v>; 153 vin4-supply = <®_vcc5v>; 154 aldoin-supply = <®_vcc5v>; 155 bldoin-supply = <®_vcc5v>; 156 cldoin-supply = <®_vcc5v>; 157 158 axp717_adc: adc { 159 compatible = "x-powers,axp717-adc"; 160 #io-channel-cells = <1>; 161 }; 162 163 battery-power { 164 compatible = "x-powers,axp717-battery-power-supply"; 165 /* no battery; output used for dcdc4 instead */ 166 status = "disabled"; 167 }; 168 169 regulators { 170 /* Supplies the "little" cluster (1.4 GHz cores) */ 171 reg_dcdc1: dcdc1 { 172 regulator-always-on; 173 regulator-min-microvolt = <900000>; 174 regulator-max-microvolt = <1160000>; 175 regulator-name = "vdd-cpul"; 176 }; 177 178 reg_dcdc2: dcdc2 { 179 regulator-always-on; 180 regulator-min-microvolt = <920000>; 181 regulator-max-microvolt = <920000>; 182 regulator-name = "vdd-gpu-sys"; 183 }; 184 185 reg_dcdc3: dcdc3 { 186 regulator-always-on; 187 regulator-min-microvolt = <1160000>; 188 regulator-max-microvolt = <1160000>; 189 regulator-name = "vdd-dram"; 190 }; 191 192 reg_dcdc4: dcdc4 { 193 regulator-always-on; 194 regulator-min-microvolt = <3300000>; 195 regulator-max-microvolt = <3300000>; 196 regulator-name = "vdd-io"; 197 }; 198 199 reg_aldo1: aldo1 { 200 /* not connected */ 201 }; 202 203 reg_aldo2: aldo2 { 204 /* not connected */ 205 }; 206 207 reg_aldo3: aldo3 { 208 /* supplies the I2C pins for this PMIC */ 209 regulator-always-on; 210 regulator-min-microvolt = <3300000>; 211 regulator-max-microvolt = <3300000>; 212 regulator-name = "vcc-pl-pm"; 213 }; 214 215 reg_aldo4: aldo4 { 216 regulator-always-on; 217 regulator-min-microvolt = <1800000>; 218 regulator-max-microvolt = <1800000>; 219 regulator-name = "vcc-pll-dxco-avcc"; 220 }; 221 222 reg_bldo1: bldo1 { 223 regulator-min-microvolt = <1800000>; 224 regulator-max-microvolt = <1800000>; 225 regulator-name = "vcc-pg-wifi-lvds"; 226 }; 227 228 reg_bldo2: bldo2 { 229 regulator-always-on; 230 regulator-min-microvolt = <1800000>; 231 regulator-max-microvolt = <1800000>; 232 regulator-name = "vcc-dram-1v8"; 233 }; 234 235 reg_bldo3: bldo3 { 236 regulator-min-microvolt = <1800000>; 237 regulator-max-microvolt = <1800000>; 238 regulator-name = "vcc-cvp-pk-vid1v8"; 239 }; 240 241 reg_bldo4: bldo4 { 242 /* not connected */ 243 }; 244 245 reg_cldo1: cldo1 { 246 regulator-min-microvolt = <1800000>; 247 regulator-max-microvolt = <1800000>; 248 regulator-name = "vcc-pc"; 249 }; 250 251 reg_cldo2: cldo2 { 252 regulator-min-microvolt = <1800000>; 253 regulator-max-microvolt = <1800000>; 254 regulator-name = "vcc-efuse"; 255 }; 256 257 reg_cldo3: cldo3 { 258 regulator-min-microvolt = <3300000>; 259 regulator-max-microvolt = <3300000>; 260 regulator-name = "vcc-io-mmc-spi-ana"; 261 }; 262 263 reg_cldo4: cldo4 { 264 /* not connected */ 265 }; 266 267 reg_cpusldo: cpusldo { 268 /* supplies the management core */ 269 regulator-always-on; 270 regulator-min-microvolt = <900000>; 271 regulator-max-microvolt = <900000>; 272 regulator-name = "vdd-cpus"; 273 }; 274 }; 275 276 usb-power { 277 compatible = "x-powers,axp717-usb-power-supply"; 278 /* 12V-5V buck converter can supply up to 5A */ 279 input-current-limit-microamp = <3250000>; 280 }; 281 }; 282 283 axp323: pmic@36 { 284 compatible = "x-powers,axp323"; 285 reg = <0x36>; 286 #interrupt-cells = <1>; 287 interrupt-controller; 288 interrupt-parent = <&nmi_intc>; 289 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 290 status = "okay"; 291 292 vin1-supply = <®_vcc5v>; 293 vin2-supply = <®_vcc5v>; 294 vin3-supply = <®_vcc5v>; 295 296 regulators { 297 aldo1 { 298 /* not connected */ 299 }; 300 301 dldo1 { 302 /* not connected */ 303 }; 304 305 /* Supplies the "big" cluster (1.8 GHz cores) */ 306 reg_dcdc1_323: dcdc1 { 307 regulator-always-on; 308 regulator-min-microvolt = <900000>; 309 regulator-max-microvolt = <1160000>; 310 regulator-name = "vdd-cpub"; 311 }; 312 313 /* DCDC2 is polyphased with DCDC1 */ 314 315 /* Some RISC-V management core related voltage */ 316 reg_dcdc3_323: dcdc3 { 317 regulator-always-on; 318 regulator-min-microvolt = <900000>; 319 regulator-max-microvolt = <900000>; 320 regulator-name = "vdd-dnr"; 321 }; 322 }; 323 }; 324}; 325 326&r_pio { 327/* 328 * Specifying the supply would create a circular dependency. 329 * 330 * vcc-pl-supply = <®_aldo3>; 331 */ 332 vcc-pm-supply = <®_aldo3>; 333}; 334 335&rtc { 336 clocks = <&r_ccu CLK_BUS_R_RTC>, <&osc24M>, 337 <&r_ccu CLK_R_AHB>, <&ext_osc32k>; 338 clock-names = "bus", "hosc", "ahb", "ext-osc32k"; 339 assigned-clocks = <&rtc CLK_OSC32K>; 340 assigned-clock-rates = <32768>; 341}; 342 343&uart0 { 344 pinctrl-names = "default"; 345 pinctrl-0 = <&uart0_pb_pins>; 346 status = "okay"; 347}; 348 349&usb_otg { 350 /* 351 * The CC pins of the USB-C port have two pull-down resistors 352 * connected to GND, which fixes this port to a peripheral role. 353 * There is a regulator, controlled by a GPIO, to provide VBUS power 354 * to the port, and a VBUSDET GPIO, to detect externally provided 355 * power, but without the CC pins there is no real way to do a 356 * runtime role detection. 357 */ 358 dr_mode = "peripheral"; 359 status = "okay"; 360}; 361 362&usbphy { 363 usb0_vbus-supply = <®_usb_vbus>; 364 usb0_vbus_det-gpios = <&pio 8 13 GPIO_ACTIVE_HIGH>; /* PI13 */ 365 status = "okay"; 366}; 367