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