1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2023 Arm Ltd.
4 */
5
6/dts-v1/;
7
8#include "sun50i-h616-orangepi-zero.dtsi"
9#include "sun50i-h616-cpu-opp.dtsi"
10
11/ {
12	model = "OrangePi Zero3";
13	compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
14};
15
16&cpu0 {
17	cpu-supply = <&reg_dcdc2>;
18};
19
20&emac0 {
21	allwinner,tx-delay-ps = <700>;
22	phy-mode = "rgmii-rxid";
23	phy-supply = <&reg_dldo1>;
24};
25
26&ext_rgmii_phy {
27	motorcomm,clk-out-frequency-hz = <125000000>;
28};
29
30&mmc0 {
31	/*
32	 * The schematic shows the card detect pin wired up to PF6, via an
33	 * inverter, but it just doesn't work.
34	 */
35	broken-cd;
36	vmmc-supply = <&reg_dldo1>;
37};
38
39&r_i2c {
40	status = "okay";
41
42	axp313: pmic@36 {
43		compatible = "x-powers,axp313a";
44		reg = <0x36>;
45		#interrupt-cells = <1>;
46		interrupt-controller;
47		interrupt-parent = <&pio>;
48		interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>;	/* PC9 */
49
50		vin1-supply = <&reg_vcc5v>;
51		vin2-supply = <&reg_vcc5v>;
52		vin3-supply = <&reg_vcc5v>;
53
54		regulators {
55			/* Supplies VCC-PLL, so needs to be always on. */
56			reg_aldo1: aldo1 {
57				regulator-always-on;
58				regulator-min-microvolt = <1800000>;
59				regulator-max-microvolt = <1800000>;
60				regulator-name = "vcc1v8";
61			};
62
63			/* Supplies VCC-IO, so needs to be always on. */
64			reg_dldo1: dldo1 {
65				regulator-always-on;
66				regulator-min-microvolt = <3300000>;
67				regulator-max-microvolt = <3300000>;
68				regulator-name = "vcc3v3";
69			};
70
71			reg_dcdc1: dcdc1 {
72				regulator-always-on;
73				regulator-min-microvolt = <810000>;
74				regulator-max-microvolt = <990000>;
75				regulator-name = "vdd-gpu-sys";
76			};
77
78			reg_dcdc2: dcdc2 {
79				regulator-always-on;
80				regulator-min-microvolt = <810000>;
81				regulator-max-microvolt = <1100000>;
82				regulator-name = "vdd-cpu";
83			};
84
85			reg_dcdc3: dcdc3 {
86				regulator-always-on;
87				regulator-min-microvolt = <1100000>;
88				regulator-max-microvolt = <1100000>;
89				regulator-name = "vdd-dram";
90			};
91		};
92	};
93};
94
95&pio {
96	vcc-pc-supply = <&reg_dldo1>;
97	vcc-pf-supply = <&reg_dldo1>;
98	vcc-pg-supply = <&reg_aldo1>;
99	vcc-ph-supply = <&reg_dldo1>;
100	vcc-pi-supply = <&reg_dldo1>;
101};
102