1// SPDX-License-Identifier: (GPL-2.0-only OR MIT) 2// Copyright (C) 2025 Arm Ltd. 3 4/dts-v1/; 5 6#include "sun55i-a523.dtsi" 7 8#include <dt-bindings/gpio/gpio.h> 9 10/ { 11 model = "Radxa Cubie A5E"; 12 compatible = "radxa,cubie-a5e", "allwinner,sun55i-a527"; 13 14 aliases { 15 ethernet0 = &emac0; 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 reg_vcc5v: vcc5v { 31 /* board wide 5V supply from the USB-C connector */ 32 compatible = "regulator-fixed"; 33 regulator-name = "vcc-5v"; 34 regulator-min-microvolt = <5000000>; 35 regulator-max-microvolt = <5000000>; 36 regulator-always-on; 37 }; 38 39 reg_usb_vbus: vbus { 40 compatible = "regulator-fixed"; 41 regulator-name = "usb-vbus"; 42 regulator-min-microvolt = <5000000>; 43 regulator-max-microvolt = <5000000>; 44 vin-supply = <®_vcc5v>; 45 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 46 enable-active-high; 47 }; 48}; 49 50&ehci0 { 51 status = "okay"; 52}; 53 54&ehci1 { 55 status = "okay"; 56}; 57 58&emac0 { 59 phy-mode = "rgmii-id"; 60 phy-handle = <&ext_rgmii_phy>; 61 phy-supply = <®_cldo3>; 62 63 allwinner,tx-delay-ps = <300>; 64 allwinner,rx-delay-ps = <400>; 65 66 status = "okay"; 67}; 68 69&mdio0 { 70 ext_rgmii_phy: ethernet-phy@1 { 71 compatible = "ethernet-phy-ieee802.3-c22"; 72 reg = <1>; 73 }; 74}; 75 76&mmc0 { 77 vmmc-supply = <®_cldo3>; 78 cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PF6 */ 79 bus-width = <4>; 80 status = "okay"; 81}; 82 83&ohci0 { 84 status = "okay"; 85}; 86 87&ohci1 { 88 status = "okay"; 89}; 90 91&pio { 92 vcc-pb-supply = <®_cldo3>; /* via VCC-IO */ 93 vcc-pc-supply = <®_cldo1>; 94 vcc-pd-supply = <®_cldo3>; 95 vcc-pe-supply = <®_aldo2>; 96 vcc-pf-supply = <®_cldo3>; /* actually switchable */ 97 vcc-pg-supply = <®_bldo1>; 98 vcc-ph-supply = <®_cldo3>; /* via VCC-IO */ 99 vcc-pi-supply = <®_cldo3>; 100 vcc-pj-supply = <®_cldo4>; 101 vcc-pk-supply = <®_cldo1>; 102}; 103 104&r_i2c0 { 105 status = "okay"; 106 107 axp717: pmic@34 { 108 compatible = "x-powers,axp717"; 109 reg = <0x34>; 110 interrupt-controller; 111 #interrupt-cells = <1>; 112 interrupt-parent = <&nmi_intc>; 113 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 114 115 vin1-supply = <®_vcc5v>; 116 vin2-supply = <®_vcc5v>; 117 vin3-supply = <®_vcc5v>; 118 vin4-supply = <®_vcc5v>; 119 aldoin-supply = <®_vcc5v>; 120 bldoin-supply = <®_vcc5v>; 121 cldoin-supply = <®_vcc5v>; 122 123 regulators { 124 /* Supplies the "little" cluster (1.4 GHz cores) */ 125 reg_dcdc1: dcdc1 { 126 regulator-always-on; 127 regulator-min-microvolt = <900000>; 128 regulator-max-microvolt = <1160000>; 129 regulator-name = "vdd-cpul"; 130 }; 131 132 reg_dcdc2: dcdc2 { 133 regulator-always-on; 134 regulator-min-microvolt = <920000>; 135 regulator-max-microvolt = <920000>; 136 regulator-name = "vdd-gpu-sys"; 137 }; 138 139 reg_dcdc3: dcdc3 { 140 regulator-always-on; 141 regulator-min-microvolt = <1100000>; 142 regulator-max-microvolt = <1100000>; 143 regulator-name = "vdd-dram"; 144 }; 145 146 reg_aldo1: aldo1 { 147 /* not connected */ 148 }; 149 150 reg_aldo2: aldo2 { 151 regulator-min-microvolt = <1800000>; 152 regulator-max-microvolt = <1800000>; 153 regulator-name = "vcc-pe"; 154 }; 155 156 reg_aldo3: aldo3 { 157 /* supplies the I2C pins for this PMIC */ 158 regulator-always-on; 159 regulator-min-microvolt = <3300000>; 160 regulator-max-microvolt = <3300000>; 161 regulator-name = "vcc-pl-usb"; 162 }; 163 164 reg_aldo4: aldo4 { 165 regulator-always-on; 166 regulator-min-microvolt = <1800000>; 167 regulator-max-microvolt = <1800000>; 168 regulator-name = "vcc-pll-dxco-avcc"; 169 }; 170 171 reg_bldo1: bldo1 { 172 regulator-min-microvolt = <1800000>; 173 regulator-max-microvolt = <1800000>; 174 regulator-name = "vcc-pg-iowifi"; 175 }; 176 177 reg_bldo2: bldo2 { 178 regulator-always-on; 179 regulator-min-microvolt = <1800000>; 180 regulator-max-microvolt = <1800000>; 181 regulator-name = "vcc-pm-lpddr4"; 182 }; 183 184 reg_bldo3: bldo3 { 185 regulator-min-microvolt = <3300000>; 186 regulator-max-microvolt = <3300000>; 187 regulator-name = "vcc-mipi-cam"; 188 }; 189 190 reg_bldo4: bldo4 { 191 /* not connected */ 192 }; 193 194 reg_cldo1: cldo1 { 195 regulator-min-microvolt = <1800000>; 196 regulator-max-microvolt = <1800000>; 197 regulator-name = "vcc-pc-and-their-dog"; 198 }; 199 200 reg_cldo2: cldo2 { 201 /* not connected */ 202 }; 203 204 reg_cldo3: cldo3 { 205 /* IO, USB-2, 3V3, card, NAND, sensor, PI */ 206 regulator-always-on; 207 regulator-min-microvolt = <3300000>; 208 regulator-max-microvolt = <3300000>; 209 regulator-name = "vcc-io-mmc-spi-ana"; 210 }; 211 212 reg_cldo4: cldo4 { 213 regulator-min-microvolt = <3300000>; 214 regulator-max-microvolt = <3300000>; 215 regulator-name = "vcc-pj-phy"; 216 }; 217 218 reg_cpusldo: cpusldo { 219 /* supplies the management core */ 220 regulator-always-on; 221 regulator-min-microvolt = <900000>; 222 regulator-max-microvolt = <900000>; 223 regulator-name = "vdd-cpus"; 224 }; 225 }; 226 }; 227 228 axp323: pmic@36 { 229 compatible = "x-powers,axp323"; 230 reg = <0x36>; 231 #interrupt-cells = <1>; 232 interrupt-controller; 233 interrupt-parent = <&nmi_intc>; 234 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 235 status = "okay"; 236 237 vin1-supply = <®_vcc5v>; 238 vin2-supply = <®_vcc5v>; 239 vin3-supply = <®_vcc5v>; 240 241 regulators { 242 aldo1 { 243 regulator-min-microvolt = <1800000>; 244 regulator-max-microvolt = <1800000>; 245 regulator-name = "vcc-mipi-dsi"; 246 }; 247 248 dldo1 { 249 /* not connected */ 250 }; 251 252 /* Supplies the "big" cluster (1.8 GHz cores) */ 253 reg_dcdc1_323: dcdc1 { 254 regulator-always-on; 255 regulator-min-microvolt = <900000>; 256 regulator-max-microvolt = <1160000>; 257 regulator-name = "vdd-cpub"; 258 }; 259 260 /* DCDC2 is polyphased with DCDC1 */ 261 262 /* RISC-V management core supply */ 263 reg_dcdc3_323: dcdc3 { 264 regulator-always-on; 265 regulator-min-microvolt = <900000>; 266 regulator-max-microvolt = <900000>; 267 regulator-name = "vdd-dnr"; 268 }; 269 }; 270 }; 271}; 272 273&r_pio { 274/* 275 * Specifying the supply would create a circular dependency. 276 * 277 * vcc-pl-supply = <®_aldo3>; 278 */ 279 vcc-pm-supply = <®_aldo3>; 280}; 281 282&uart0 { 283 pinctrl-names = "default"; 284 pinctrl-0 = <&uart0_pb_pins>; 285 status = "okay"; 286}; 287 288&usb_otg { 289 /* 290 * The USB-C port is the primary power supply, so in this configuration 291 * relies on the other end of the USB cable to supply the VBUS power. 292 * So use this port in peripheral mode. 293 * It is possible to supply the board with the 5V pins on the GPIO 294 * header, and since the DCIN_5V line is hardwired to the USB-C VBUS 295 * pins, the port turns into a host port, unconditionally supplying 296 * power. The dr_mode property should be changed to "host" here, if 297 * users choose this setup. 298 */ 299 dr_mode = "peripheral"; 300 status = "okay"; 301}; 302 303/* 304 * The schematic describes USB0_ID (PL10), measuring VBUS_5V, which looks to 305 * be always on. Also there is USB-VBUSDET (PL2), which is measuring the same 306 * VBUS_5V. There is also DCIN_DET, which measures DCIN_5V, so the power 307 * input rail. 308 * None of them seem to make any sense in relation to detecting USB devices 309 * or whether there is power provided via any USB pins: they would always 310 * report high, otherwise the system wouldn't be running. 311 * The AXP717C provides proper USB-C CC pin functionality, but the PMIC is 312 * not connected to those pins of the USB-C connector. 313 */ 314&usbphy { 315 usb0_vbus-supply = <®_vcc5v>; 316 usb1_vbus-supply = <®_usb_vbus>; 317 status = "okay"; 318}; 319