0001 // SPDX-License-Identifier: (GPL-2.0+ or MIT)
0002 /*
0003 * Copyright (C) 2020 Arm Ltd.
0004 */
0005
0006 /dts-v1/;
0007
0008 #include "sun50i-h616.dtsi"
0009
0010 #include <dt-bindings/gpio/gpio.h>
0011 #include <dt-bindings/interrupt-controller/arm-gic.h>
0012 #include <dt-bindings/leds/common.h>
0013
0014 / {
0015 model = "OrangePi Zero2";
0016 compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
0017
0018 aliases {
0019 ethernet0 = &emac0;
0020 serial0 = &uart0;
0021 };
0022
0023 chosen {
0024 stdout-path = "serial0:115200n8";
0025 };
0026
0027 leds {
0028 compatible = "gpio-leds";
0029
0030 led-0 {
0031 function = LED_FUNCTION_POWER;
0032 color = <LED_COLOR_ID_RED>;
0033 gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
0034 default-state = "on";
0035 };
0036
0037 led-1 {
0038 function = LED_FUNCTION_STATUS;
0039 color = <LED_COLOR_ID_GREEN>;
0040 gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
0041 };
0042 };
0043
0044 reg_vcc5v: vcc5v {
0045 /* board wide 5V supply directly from the USB-C socket */
0046 compatible = "regulator-fixed";
0047 regulator-name = "vcc-5v";
0048 regulator-min-microvolt = <5000000>;
0049 regulator-max-microvolt = <5000000>;
0050 regulator-always-on;
0051 };
0052 };
0053
0054 &emac0 {
0055 pinctrl-names = "default";
0056 pinctrl-0 = <&ext_rgmii_pins>;
0057 phy-mode = "rgmii";
0058 phy-handle = <&ext_rgmii_phy>;
0059 phy-supply = <®_dcdce>;
0060 allwinner,rx-delay-ps = <3100>;
0061 allwinner,tx-delay-ps = <700>;
0062 status = "okay";
0063 };
0064
0065 &mdio0 {
0066 ext_rgmii_phy: ethernet-phy@1 {
0067 compatible = "ethernet-phy-ieee802.3-c22";
0068 reg = <1>;
0069 };
0070 };
0071
0072 &mmc0 {
0073 vmmc-supply = <®_dcdce>;
0074 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0075 bus-width = <4>;
0076 status = "okay";
0077 };
0078
0079 &r_rsb {
0080 status = "okay";
0081
0082 axp305: pmic@745 {
0083 compatible = "x-powers,axp305", "x-powers,axp805",
0084 "x-powers,axp806";
0085 interrupt-controller;
0086 #interrupt-cells = <1>;
0087 reg = <0x745>;
0088
0089 x-powers,self-working-mode;
0090 vina-supply = <®_vcc5v>;
0091 vinb-supply = <®_vcc5v>;
0092 vinc-supply = <®_vcc5v>;
0093 vind-supply = <®_vcc5v>;
0094 vine-supply = <®_vcc5v>;
0095 aldoin-supply = <®_vcc5v>;
0096 bldoin-supply = <®_vcc5v>;
0097 cldoin-supply = <®_vcc5v>;
0098
0099 regulators {
0100 reg_aldo1: aldo1 {
0101 regulator-always-on;
0102 regulator-min-microvolt = <3300000>;
0103 regulator-max-microvolt = <3300000>;
0104 regulator-name = "vcc-sys";
0105 };
0106
0107 reg_aldo2: aldo2 { /* 3.3V on headers */
0108 regulator-always-on;
0109 regulator-min-microvolt = <3300000>;
0110 regulator-max-microvolt = <3300000>;
0111 regulator-name = "vcc3v3-ext";
0112 };
0113
0114 reg_aldo3: aldo3 { /* 3.3V on headers */
0115 regulator-always-on;
0116 regulator-min-microvolt = <3300000>;
0117 regulator-max-microvolt = <3300000>;
0118 regulator-name = "vcc3v3-ext2";
0119 };
0120
0121 reg_bldo1: bldo1 {
0122 regulator-always-on;
0123 regulator-min-microvolt = <1800000>;
0124 regulator-max-microvolt = <1800000>;
0125 regulator-name = "vcc1v8";
0126 };
0127
0128 bldo2 {
0129 /* unused */
0130 };
0131
0132 bldo3 {
0133 /* unused */
0134 };
0135
0136 bldo4 {
0137 /* unused */
0138 };
0139
0140 cldo1 {
0141 /* reserved */
0142 };
0143
0144 cldo2 {
0145 /* unused */
0146 };
0147
0148 cldo3 {
0149 /* unused */
0150 };
0151
0152 reg_dcdca: dcdca {
0153 regulator-always-on;
0154 regulator-min-microvolt = <810000>;
0155 regulator-max-microvolt = <1100000>;
0156 regulator-name = "vdd-cpu";
0157 };
0158
0159 reg_dcdcc: dcdcc {
0160 regulator-always-on;
0161 regulator-min-microvolt = <810000>;
0162 regulator-max-microvolt = <990000>;
0163 regulator-name = "vdd-gpu-sys";
0164 };
0165
0166 reg_dcdcd: dcdcd {
0167 regulator-always-on;
0168 regulator-min-microvolt = <1500000>;
0169 regulator-max-microvolt = <1500000>;
0170 regulator-name = "vdd-dram";
0171 };
0172
0173 reg_dcdce: dcdce {
0174 regulator-always-on;
0175 regulator-min-microvolt = <3300000>;
0176 regulator-max-microvolt = <3300000>;
0177 regulator-name = "vcc-eth-mmc";
0178 };
0179
0180 sw {
0181 /* unused */
0182 };
0183 };
0184 };
0185 };
0186
0187 &pio {
0188 vcc-pc-supply = <®_aldo1>;
0189 vcc-pf-supply = <®_aldo1>;
0190 vcc-pg-supply = <®_bldo1>;
0191 vcc-ph-supply = <®_aldo1>;
0192 vcc-pi-supply = <®_aldo1>;
0193 };
0194
0195 &spi0 {
0196 status = "okay";
0197 pinctrl-names = "default";
0198 pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
0199
0200 flash@0 {
0201 #address-cells = <1>;
0202 #size-cells = <1>;
0203 compatible = "jedec,spi-nor";
0204 reg = <0>;
0205 spi-max-frequency = <40000000>;
0206 };
0207 };
0208
0209 &uart0 {
0210 pinctrl-names = "default";
0211 pinctrl-0 = <&uart0_ph_pins>;
0212 status = "okay";
0213 };