Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ or MIT) |
| 2 | /* |
| 3 | * Copyright (C) 2020 Arm Ltd. |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "sun50i-h616.dtsi" |
| 9 | |
| 10 | #include <dt-bindings/gpio/gpio.h> |
| 11 | #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 12 | #include <dt-bindings/leds/common.h> |
| 13 | |
| 14 | / { |
| 15 | model = "OrangePi Zero2"; |
| 16 | compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616"; |
| 17 | |
| 18 | aliases { |
| 19 | ethernet0 = &emac0; |
| 20 | serial0 = &uart0; |
| 21 | }; |
| 22 | |
| 23 | chosen { |
| 24 | stdout-path = "serial0:115200n8"; |
| 25 | }; |
| 26 | |
| 27 | leds { |
| 28 | compatible = "gpio-leds"; |
| 29 | |
| 30 | led-0 { |
| 31 | function = LED_FUNCTION_POWER; |
| 32 | color = <LED_COLOR_ID_RED>; |
| 33 | gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */ |
| 34 | default-state = "on"; |
| 35 | }; |
| 36 | |
| 37 | led-1 { |
| 38 | function = LED_FUNCTION_STATUS; |
| 39 | color = <LED_COLOR_ID_GREEN>; |
| 40 | gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */ |
| 41 | }; |
| 42 | }; |
| 43 | |
| 44 | reg_vcc5v: vcc5v { |
| 45 | /* board wide 5V supply directly from the USB-C socket */ |
| 46 | compatible = "regulator-fixed"; |
| 47 | regulator-name = "vcc-5v"; |
| 48 | regulator-min-microvolt = <5000000>; |
| 49 | regulator-max-microvolt = <5000000>; |
| 50 | regulator-always-on; |
| 51 | }; |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 52 | }; |
| 53 | |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 54 | &emac0 { |
| 55 | pinctrl-names = "default"; |
| 56 | pinctrl-0 = <&ext_rgmii_pins>; |
| 57 | phy-mode = "rgmii"; |
| 58 | phy-handle = <&ext_rgmii_phy>; |
| 59 | phy-supply = <®_dcdce>; |
| 60 | allwinner,rx-delay-ps = <3100>; |
| 61 | allwinner,tx-delay-ps = <700>; |
| 62 | status = "okay"; |
| 63 | }; |
| 64 | |
| 65 | &mdio0 { |
| 66 | ext_rgmii_phy: ethernet-phy@1 { |
| 67 | compatible = "ethernet-phy-ieee802.3-c22"; |
| 68 | reg = <1>; |
| 69 | }; |
| 70 | }; |
| 71 | |
| 72 | &mmc0 { |
| 73 | vmmc-supply = <®_dcdce>; |
| 74 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 75 | bus-width = <4>; |
| 76 | status = "okay"; |
| 77 | }; |
| 78 | |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 79 | &r_rsb { |
| 80 | status = "okay"; |
| 81 | |
| 82 | axp305: pmic@745 { |
| 83 | compatible = "x-powers,axp305", "x-powers,axp805", |
| 84 | "x-powers,axp806"; |
| 85 | interrupt-controller; |
| 86 | #interrupt-cells = <1>; |
| 87 | reg = <0x745>; |
| 88 | |
| 89 | x-powers,self-working-mode; |
| 90 | vina-supply = <®_vcc5v>; |
| 91 | vinb-supply = <®_vcc5v>; |
| 92 | vinc-supply = <®_vcc5v>; |
| 93 | vind-supply = <®_vcc5v>; |
| 94 | vine-supply = <®_vcc5v>; |
| 95 | aldoin-supply = <®_vcc5v>; |
| 96 | bldoin-supply = <®_vcc5v>; |
| 97 | cldoin-supply = <®_vcc5v>; |
| 98 | |
| 99 | regulators { |
| 100 | reg_aldo1: aldo1 { |
| 101 | regulator-always-on; |
| 102 | regulator-min-microvolt = <3300000>; |
| 103 | regulator-max-microvolt = <3300000>; |
| 104 | regulator-name = "vcc-sys"; |
| 105 | }; |
| 106 | |
| 107 | reg_aldo2: aldo2 { /* 3.3V on headers */ |
| 108 | regulator-always-on; |
| 109 | regulator-min-microvolt = <3300000>; |
| 110 | regulator-max-microvolt = <3300000>; |
| 111 | regulator-name = "vcc3v3-ext"; |
| 112 | }; |
| 113 | |
| 114 | reg_aldo3: aldo3 { /* 3.3V on headers */ |
| 115 | regulator-always-on; |
| 116 | regulator-min-microvolt = <3300000>; |
| 117 | regulator-max-microvolt = <3300000>; |
| 118 | regulator-name = "vcc3v3-ext2"; |
| 119 | }; |
| 120 | |
| 121 | reg_bldo1: bldo1 { |
| 122 | regulator-always-on; |
| 123 | regulator-min-microvolt = <1800000>; |
| 124 | regulator-max-microvolt = <1800000>; |
| 125 | regulator-name = "vcc1v8"; |
| 126 | }; |
| 127 | |
| 128 | bldo2 { |
| 129 | /* unused */ |
| 130 | }; |
| 131 | |
| 132 | bldo3 { |
| 133 | /* unused */ |
| 134 | }; |
| 135 | |
| 136 | bldo4 { |
| 137 | /* unused */ |
| 138 | }; |
| 139 | |
| 140 | cldo1 { |
| 141 | /* reserved */ |
| 142 | }; |
| 143 | |
| 144 | cldo2 { |
| 145 | /* unused */ |
| 146 | }; |
| 147 | |
| 148 | cldo3 { |
| 149 | /* unused */ |
| 150 | }; |
| 151 | |
| 152 | reg_dcdca: dcdca { |
| 153 | regulator-always-on; |
| 154 | regulator-min-microvolt = <810000>; |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 155 | regulator-max-microvolt = <1100000>; |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 156 | regulator-name = "vdd-cpu"; |
| 157 | }; |
| 158 | |
| 159 | reg_dcdcc: dcdcc { |
| 160 | regulator-always-on; |
| 161 | regulator-min-microvolt = <810000>; |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 162 | regulator-max-microvolt = <990000>; |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 163 | regulator-name = "vdd-gpu-sys"; |
| 164 | }; |
| 165 | |
| 166 | reg_dcdcd: dcdcd { |
| 167 | regulator-always-on; |
| 168 | regulator-min-microvolt = <1500000>; |
| 169 | regulator-max-microvolt = <1500000>; |
| 170 | regulator-name = "vdd-dram"; |
| 171 | }; |
| 172 | |
| 173 | reg_dcdce: dcdce { |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 174 | regulator-always-on; |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 175 | regulator-min-microvolt = <3300000>; |
| 176 | regulator-max-microvolt = <3300000>; |
| 177 | regulator-name = "vcc-eth-mmc"; |
| 178 | }; |
| 179 | |
| 180 | sw { |
| 181 | /* unused */ |
| 182 | }; |
| 183 | }; |
| 184 | }; |
| 185 | }; |
| 186 | |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 187 | &pio { |
| 188 | vcc-pc-supply = <®_aldo1>; |
| 189 | vcc-pf-supply = <®_aldo1>; |
| 190 | vcc-pg-supply = <®_bldo1>; |
| 191 | vcc-ph-supply = <®_aldo1>; |
| 192 | vcc-pi-supply = <®_aldo1>; |
| 193 | }; |
| 194 | |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 195 | &spi0 { |
| 196 | status = "okay"; |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 197 | pinctrl-names = "default"; |
| 198 | pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>; |
Jernej Skrabec | e4e040c | 2021-01-11 21:11:53 +0100 | [diff] [blame] | 199 | |
| 200 | flash@0 { |
| 201 | #address-cells = <1>; |
| 202 | #size-cells = <1>; |
| 203 | compatible = "jedec,spi-nor"; |
| 204 | reg = <0>; |
| 205 | spi-max-frequency = <40000000>; |
| 206 | }; |
| 207 | }; |
| 208 | |
| 209 | &uart0 { |
| 210 | pinctrl-names = "default"; |
| 211 | pinctrl-0 = <&uart0_ph_pins>; |
| 212 | status = "okay"; |
| 213 | }; |