1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2// Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io> 3 4/dts-v1/; 5 6#include "sun50i-h6.dtsi" 7#include "sun50i-h6-cpu-opp.dtsi" 8 9#include <dt-bindings/gpio/gpio.h> 10 11/ { 12 model = "Pine64 PINE H64 Model A"; 13 compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; 14 15 aliases { 16 ethernet0 = &emac; 17 serial0 = &uart0; 18 spi0 = &spi0; 19 }; 20 21 chosen { 22 stdout-path = "serial0:115200n8"; 23 }; 24 25 ext_osc32k: ext-osc32k-clk { 26 #clock-cells = <0>; 27 compatible = "fixed-clock"; 28 clock-frequency = <32768>; 29 clock-output-names = "ext_osc32k"; 30 }; 31 32 hdmi_connector: connector { 33 compatible = "hdmi-connector"; 34 type = "a"; 35 ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ 36 37 port { 38 hdmi_con_in: endpoint { 39 remote-endpoint = <&hdmi_out_con>; 40 }; 41 }; 42 }; 43 44 leds { 45 compatible = "gpio-leds"; 46 47 led-0 { 48 label = "pine-h64:green:heartbeat"; 49 gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ 50 }; 51 52 led-1 { 53 label = "pine-h64:white:link"; 54 gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */ 55 }; 56 57 led-2 { 58 label = "pine-h64:blue:status"; 59 gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ 60 }; 61 }; 62 63 reg_gmac_3v3: gmac-3v3 { 64 compatible = "regulator-fixed"; 65 regulator-name = "vcc-gmac-3v3"; 66 regulator-min-microvolt = <3300000>; 67 regulator-max-microvolt = <3300000>; 68 startup-delay-us = <100000>; 69 gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; 70 enable-active-high; 71 }; 72 73 reg_usb_vbus: vbus { 74 compatible = "regulator-fixed"; 75 regulator-name = "usb-vbus"; 76 regulator-min-microvolt = <5000000>; 77 regulator-max-microvolt = <5000000>; 78 startup-delay-us = <100000>; 79 gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; 80 enable-active-high; 81 }; 82}; 83 84&cpu0 { 85 cpu-supply = <®_dcdca>; 86}; 87 88&de { 89 status = "okay"; 90}; 91 92&ehci0 { 93 status = "okay"; 94}; 95 96&ehci3 { 97 status = "okay"; 98}; 99 100&emac { 101 pinctrl-names = "default"; 102 pinctrl-0 = <&ext_rgmii_pins>; 103 phy-mode = "rgmii-id"; 104 phy-handle = <&ext_rgmii_phy>; 105 phy-supply = <®_gmac_3v3>; 106 allwinner,rx-delay-ps = <200>; 107 allwinner,tx-delay-ps = <200>; 108 status = "okay"; 109}; 110 111&gpu { 112 mali-supply = <®_dcdcc>; 113 status = "okay"; 114}; 115 116&hdmi { 117 status = "okay"; 118}; 119 120&hdmi_out { 121 hdmi_out_con: endpoint { 122 remote-endpoint = <&hdmi_con_in>; 123 }; 124}; 125 126&mdio { 127 ext_rgmii_phy: ethernet-phy@1 { 128 compatible = "ethernet-phy-ieee802.3-c22"; 129 reg = <1>; 130 }; 131}; 132 133&mmc0 { 134 vmmc-supply = <®_cldo1>; 135 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 136 disable-wp; 137 bus-width = <4>; 138 status = "okay"; 139}; 140 141&mmc2 { 142 vmmc-supply = <®_cldo1>; 143 vqmmc-supply = <®_bldo2>; 144 non-removable; 145 cap-mmc-hw-reset; 146 mmc-hs200-1_8v; 147 bus-width = <8>; 148 status = "okay"; 149}; 150 151&ohci0 { 152 status = "okay"; 153}; 154 155&ohci3 { 156 status = "okay"; 157}; 158 159&pio { 160 vcc-pc-supply = <®_bldo2>; 161 vcc-pd-supply = <®_cldo1>; 162 vcc-pg-supply = <®_aldo1>; 163}; 164 165&r_i2c { 166 status = "okay"; 167 168 axp805: pmic@36 { 169 compatible = "x-powers,axp805", "x-powers,axp806"; 170 reg = <0x36>; 171 interrupt-parent = <&r_intc>; 172 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>; 173 interrupt-controller; 174 #interrupt-cells = <1>; 175 x-powers,self-working-mode; 176 177 regulators { 178 reg_aldo1: aldo1 { 179 regulator-always-on; 180 regulator-min-microvolt = <3300000>; 181 regulator-max-microvolt = <3300000>; 182 regulator-name = "vcc-pl"; 183 }; 184 185 reg_aldo2: aldo2 { 186 regulator-min-microvolt = <3300000>; 187 regulator-max-microvolt = <3300000>; 188 regulator-name = "vcc-ac200"; 189 regulator-enable-ramp-delay = <100000>; 190 }; 191 192 reg_aldo3: aldo3 { 193 /* This regulator is connected with CLDO1 */ 194 regulator-always-on; 195 regulator-min-microvolt = <3300000>; 196 regulator-max-microvolt = <3300000>; 197 regulator-name = "vcc-3v3-1"; 198 }; 199 200 reg_bldo1: bldo1 { 201 regulator-always-on; 202 regulator-min-microvolt = <1800000>; 203 regulator-max-microvolt = <1800000>; 204 regulator-name = "vcc-bias-pll"; 205 }; 206 207 reg_bldo2: bldo2 { 208 regulator-always-on; 209 regulator-min-microvolt = <1800000>; 210 regulator-max-microvolt = <1800000>; 211 regulator-name = "vcc-efuse-pcie-hdmi-io"; 212 }; 213 214 reg_bldo3: bldo3 { 215 regulator-always-on; 216 regulator-min-microvolt = <1800000>; 217 regulator-max-microvolt = <1800000>; 218 regulator-name = "vcc-dcxoio"; 219 }; 220 221 bldo4 { 222 /* unused */ 223 }; 224 225 reg_cldo1: cldo1 { 226 /* This regulator is connected with ALDO3 */ 227 regulator-always-on; 228 regulator-min-microvolt = <3300000>; 229 regulator-max-microvolt = <3300000>; 230 regulator-name = "vcc-3v3-2"; 231 }; 232 233 reg_cldo2: cldo2 { 234 regulator-min-microvolt = <3300000>; 235 regulator-max-microvolt = <3300000>; 236 regulator-name = "vcc-wifi-1"; 237 }; 238 239 reg_cldo3: cldo3 { 240 regulator-min-microvolt = <3300000>; 241 regulator-max-microvolt = <3300000>; 242 regulator-name = "vcc-wifi-2"; 243 }; 244 245 reg_dcdca: dcdca { 246 regulator-always-on; 247 regulator-min-microvolt = <810000>; 248 regulator-max-microvolt = <1160000>; 249 regulator-ramp-delay = <2500>; 250 regulator-name = "vdd-cpu"; 251 }; 252 253 reg_dcdcc: dcdcc { 254 regulator-enable-ramp-delay = <32000>; 255 regulator-min-microvolt = <810000>; 256 regulator-max-microvolt = <1080000>; 257 regulator-ramp-delay = <2500>; 258 regulator-name = "vdd-gpu"; 259 }; 260 261 reg_dcdcd: dcdcd { 262 regulator-always-on; 263 regulator-min-microvolt = <960000>; 264 regulator-max-microvolt = <960000>; 265 regulator-name = "vdd-sys"; 266 }; 267 268 reg_dcdce: dcdce { 269 regulator-always-on; 270 regulator-min-microvolt = <1200000>; 271 regulator-max-microvolt = <1200000>; 272 regulator-name = "vcc-dram"; 273 }; 274 275 sw { 276 /* unused */ 277 }; 278 }; 279 }; 280 281 pcf8563: rtc@51 { 282 compatible = "nxp,pcf8563"; 283 reg = <0x51>; 284 interrupt-parent = <&r_intc>; 285 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>; 286 #clock-cells = <0>; 287 }; 288}; 289 290&r_ir { 291 status = "okay"; 292}; 293 294&r_pio { 295 vcc-pm-supply = <®_aldo1>; 296}; 297 298&rtc { 299 clocks = <&ext_osc32k>; 300}; 301 302/* 303 * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI 304 * flash and eMMC at the same time, as one of them would fail probing. 305 * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can 306 * fix this up in no eMMC is connected. 307 */ 308&spi0 { 309 pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>; 310 pinctrl-names = "default"; 311 status = "disabled"; 312 313 flash@0 { 314 compatible = "winbond,w25q128", "jedec,spi-nor"; 315 reg = <0>; 316 spi-max-frequency = <4000000>; 317 }; 318}; 319 320&uart0 { 321 pinctrl-names = "default"; 322 pinctrl-0 = <&uart0_ph_pins>; 323 status = "okay"; 324}; 325 326&usb2otg { 327 dr_mode = "host"; 328 status = "okay"; 329}; 330 331&usb2phy { 332 usb0_vbus-supply = <®_usb_vbus>; 333 usb3_vbus-supply = <®_usb_vbus>; 334 status = "okay"; 335}; 336