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