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