1012af553SClément Péron// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2cabbaed7SClément Péron// Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io> 3494d8367SIcenowy Zheng 4494d8367SIcenowy Zheng/dts-v1/; 5494d8367SIcenowy Zheng 6494d8367SIcenowy Zheng#include "sun50i-h6.dtsi" 7494d8367SIcenowy Zheng 8494d8367SIcenowy Zheng#include <dt-bindings/gpio/gpio.h> 9494d8367SIcenowy Zheng 10494d8367SIcenowy Zheng/ { 1124e9f61cSCorentin Labbe model = "Pine H64 model A"; 12494d8367SIcenowy Zheng compatible = "pine64,pine-h64", "allwinner,sun50i-h6"; 13494d8367SIcenowy Zheng 14494d8367SIcenowy Zheng aliases { 15729e1ffcSIcenowy Zheng ethernet0 = &emac; 16494d8367SIcenowy Zheng serial0 = &uart0; 17e757bdd0SAndre Przywara spi0 = &spi0; 18494d8367SIcenowy Zheng }; 19494d8367SIcenowy Zheng 20494d8367SIcenowy Zheng chosen { 21494d8367SIcenowy Zheng stdout-path = "serial0:115200n8"; 22494d8367SIcenowy Zheng }; 236677bbdeSChen-Yu Tsai 2432507b86SJernej Skrabec ext_osc32k: ext_osc32k_clk { 2532507b86SJernej Skrabec #clock-cells = <0>; 2632507b86SJernej Skrabec compatible = "fixed-clock"; 2732507b86SJernej Skrabec clock-frequency = <32768>; 2832507b86SJernej Skrabec clock-output-names = "ext_osc32k"; 2932507b86SJernej Skrabec }; 3032507b86SJernej Skrabec 3124e9f61cSCorentin Labbe hdmi_connector: connector { 327d5bca1cSJernej Skrabec compatible = "hdmi-connector"; 337d5bca1cSJernej Skrabec type = "a"; 3424e9f61cSCorentin Labbe ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ 357d5bca1cSJernej Skrabec 367d5bca1cSJernej Skrabec port { 377d5bca1cSJernej Skrabec hdmi_con_in: endpoint { 387d5bca1cSJernej Skrabec remote-endpoint = <&hdmi_out_con>; 397d5bca1cSJernej Skrabec }; 407d5bca1cSJernej Skrabec }; 417d5bca1cSJernej Skrabec }; 427d5bca1cSJernej Skrabec 436677bbdeSChen-Yu Tsai leds { 446677bbdeSChen-Yu Tsai compatible = "gpio-leds"; 456677bbdeSChen-Yu Tsai 466677bbdeSChen-Yu Tsai heartbeat { 476677bbdeSChen-Yu Tsai label = "pine-h64:green:heartbeat"; 486677bbdeSChen-Yu Tsai gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ 496677bbdeSChen-Yu Tsai }; 506677bbdeSChen-Yu Tsai 516677bbdeSChen-Yu Tsai link { 526677bbdeSChen-Yu Tsai label = "pine-h64:white:link"; 536677bbdeSChen-Yu Tsai gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */ 546677bbdeSChen-Yu Tsai }; 556677bbdeSChen-Yu Tsai 566677bbdeSChen-Yu Tsai status { 576677bbdeSChen-Yu Tsai label = "pine-h64:blue:status"; 586677bbdeSChen-Yu Tsai gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ 596677bbdeSChen-Yu Tsai }; 606677bbdeSChen-Yu Tsai }; 6144eb589cSIcenowy Zheng 6224e9f61cSCorentin Labbe reg_gmac_3v3: gmac-3v3 { 6324e9f61cSCorentin Labbe compatible = "regulator-fixed"; 6424e9f61cSCorentin Labbe regulator-name = "vcc-gmac-3v3"; 6524e9f61cSCorentin Labbe regulator-min-microvolt = <3300000>; 6624e9f61cSCorentin Labbe regulator-max-microvolt = <3300000>; 6724e9f61cSCorentin Labbe startup-delay-us = <100000>; 6824e9f61cSCorentin Labbe gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; 6924e9f61cSCorentin Labbe enable-active-high; 7024e9f61cSCorentin Labbe }; 7124e9f61cSCorentin Labbe 7244eb589cSIcenowy Zheng reg_usb_vbus: vbus { 7344eb589cSIcenowy Zheng compatible = "regulator-fixed"; 7444eb589cSIcenowy Zheng regulator-name = "usb-vbus"; 7544eb589cSIcenowy Zheng regulator-min-microvolt = <5000000>; 7644eb589cSIcenowy Zheng regulator-max-microvolt = <5000000>; 7744eb589cSIcenowy Zheng startup-delay-us = <100000>; 7844eb589cSIcenowy Zheng gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; 7944eb589cSIcenowy Zheng enable-active-high; 8044eb589cSIcenowy Zheng }; 81494d8367SIcenowy Zheng}; 82494d8367SIcenowy Zheng 83d8e2b7e1SClément Péron&de { 84d8e2b7e1SClément Péron status = "okay"; 85d8e2b7e1SClément Péron}; 86d8e2b7e1SClément Péron 87d8e2b7e1SClément Péron&ehci0 { 88d8e2b7e1SClément Péron status = "okay"; 89d8e2b7e1SClément Péron}; 90d8e2b7e1SClément Péron 91d8e2b7e1SClément Péron&ehci3 { 92d8e2b7e1SClément Péron status = "okay"; 93d8e2b7e1SClément Péron}; 94d8e2b7e1SClément Péron 95729e1ffcSIcenowy Zheng&emac { 96729e1ffcSIcenowy Zheng pinctrl-names = "default"; 97729e1ffcSIcenowy Zheng pinctrl-0 = <&ext_rgmii_pins>; 98729e1ffcSIcenowy Zheng phy-mode = "rgmii"; 99729e1ffcSIcenowy Zheng phy-handle = <&ext_rgmii_phy>; 10024e9f61cSCorentin Labbe phy-supply = <®_gmac_3v3>; 101729e1ffcSIcenowy Zheng allwinner,rx-delay-ps = <200>; 102729e1ffcSIcenowy Zheng allwinner,tx-delay-ps = <200>; 103729e1ffcSIcenowy Zheng status = "okay"; 104729e1ffcSIcenowy Zheng}; 105729e1ffcSIcenowy Zheng 1068abc4c4aSClément Péron&gpu { 1078abc4c4aSClément Péron mali-supply = <®_dcdcc>; 1088abc4c4aSClément Péron status = "okay"; 1098abc4c4aSClément Péron}; 1108abc4c4aSClément Péron 1117d5bca1cSJernej Skrabec&hdmi { 1127d5bca1cSJernej Skrabec status = "okay"; 1137d5bca1cSJernej Skrabec}; 1147d5bca1cSJernej Skrabec 1157d5bca1cSJernej Skrabec&hdmi_out { 1167d5bca1cSJernej Skrabec hdmi_out_con: endpoint { 1177d5bca1cSJernej Skrabec remote-endpoint = <&hdmi_con_in>; 1187d5bca1cSJernej Skrabec }; 1197d5bca1cSJernej Skrabec}; 1207d5bca1cSJernej Skrabec 121d8e2b7e1SClément Péron&mdio { 122d8e2b7e1SClément Péron ext_rgmii_phy: ethernet-phy@1 { 123d8e2b7e1SClément Péron compatible = "ethernet-phy-ieee802.3-c22"; 124d8e2b7e1SClément Péron reg = <1>; 1253bfa011dSIcenowy Zheng }; 1263bfa011dSIcenowy Zheng}; 1273bfa011dSIcenowy Zheng 128ecbd6118SIcenowy Zheng&mmc0 { 129ecbd6118SIcenowy Zheng vmmc-supply = <®_cldo1>; 130ecbd6118SIcenowy Zheng cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 131d177c8b6SIcenowy Zheng bus-width = <4>; 132ecbd6118SIcenowy Zheng status = "okay"; 133ecbd6118SIcenowy Zheng}; 134ecbd6118SIcenowy Zheng 135ecbd6118SIcenowy Zheng&mmc2 { 136ecbd6118SIcenowy Zheng vmmc-supply = <®_cldo1>; 137ecbd6118SIcenowy Zheng vqmmc-supply = <®_bldo2>; 138ecbd6118SIcenowy Zheng non-removable; 139ecbd6118SIcenowy Zheng cap-mmc-hw-reset; 140d177c8b6SIcenowy Zheng bus-width = <8>; 141ecbd6118SIcenowy Zheng status = "okay"; 142ecbd6118SIcenowy Zheng}; 143ecbd6118SIcenowy Zheng 1443bfa011dSIcenowy Zheng&ohci0 { 1453bfa011dSIcenowy Zheng status = "okay"; 1463bfa011dSIcenowy Zheng}; 1473bfa011dSIcenowy Zheng 1483bfa011dSIcenowy Zheng&ohci3 { 1493bfa011dSIcenowy Zheng status = "okay"; 1503bfa011dSIcenowy Zheng}; 1513bfa011dSIcenowy Zheng 15222538576SIcenowy Zheng&pio { 15322538576SIcenowy Zheng vcc-pc-supply = <®_bldo2>; 15422538576SIcenowy Zheng vcc-pd-supply = <®_cldo1>; 15522538576SIcenowy Zheng vcc-pg-supply = <®_aldo1>; 15622538576SIcenowy Zheng}; 15722538576SIcenowy Zheng 15817ebc33aSIcenowy Zheng&r_i2c { 15917ebc33aSIcenowy Zheng status = "okay"; 16017ebc33aSIcenowy Zheng 161eb28fb9eSIcenowy Zheng axp805: pmic@36 { 162eb28fb9eSIcenowy Zheng compatible = "x-powers,axp805", "x-powers,axp806"; 163eb28fb9eSIcenowy Zheng reg = <0x36>; 164eb28fb9eSIcenowy Zheng interrupt-parent = <&r_intc>; 165eb28fb9eSIcenowy Zheng interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 166eb28fb9eSIcenowy Zheng interrupt-controller; 167eb28fb9eSIcenowy Zheng #interrupt-cells = <1>; 168eb28fb9eSIcenowy Zheng x-powers,self-working-mode; 169eb28fb9eSIcenowy Zheng 170eb28fb9eSIcenowy Zheng regulators { 171eb28fb9eSIcenowy Zheng reg_aldo1: aldo1 { 172eb28fb9eSIcenowy Zheng regulator-always-on; 173eb28fb9eSIcenowy Zheng regulator-min-microvolt = <3300000>; 174eb28fb9eSIcenowy Zheng regulator-max-microvolt = <3300000>; 175eb28fb9eSIcenowy Zheng regulator-name = "vcc-pl"; 176eb28fb9eSIcenowy Zheng }; 177eb28fb9eSIcenowy Zheng 178eb28fb9eSIcenowy Zheng reg_aldo2: aldo2 { 179eb28fb9eSIcenowy Zheng regulator-min-microvolt = <3300000>; 180eb28fb9eSIcenowy Zheng regulator-max-microvolt = <3300000>; 181eb28fb9eSIcenowy Zheng regulator-name = "vcc-ac200"; 182729e1ffcSIcenowy Zheng regulator-enable-ramp-delay = <100000>; 183eb28fb9eSIcenowy Zheng }; 184eb28fb9eSIcenowy Zheng 185eb28fb9eSIcenowy Zheng reg_aldo3: aldo3 { 186eb28fb9eSIcenowy Zheng /* This regulator is connected with CLDO1 */ 187eb28fb9eSIcenowy Zheng regulator-always-on; 188eb28fb9eSIcenowy Zheng regulator-min-microvolt = <3300000>; 189eb28fb9eSIcenowy Zheng regulator-max-microvolt = <3300000>; 190eb28fb9eSIcenowy Zheng regulator-name = "vcc-3v3-1"; 191eb28fb9eSIcenowy Zheng }; 192eb28fb9eSIcenowy Zheng 193eb28fb9eSIcenowy Zheng reg_bldo1: bldo1 { 194eb28fb9eSIcenowy Zheng regulator-always-on; 195eb28fb9eSIcenowy Zheng regulator-min-microvolt = <1800000>; 196eb28fb9eSIcenowy Zheng regulator-max-microvolt = <1800000>; 197eb28fb9eSIcenowy Zheng regulator-name = "vcc-bias-pll"; 198eb28fb9eSIcenowy Zheng }; 199eb28fb9eSIcenowy Zheng 200eb28fb9eSIcenowy Zheng reg_bldo2: bldo2 { 201eb28fb9eSIcenowy Zheng regulator-always-on; 202eb28fb9eSIcenowy Zheng regulator-min-microvolt = <1800000>; 203eb28fb9eSIcenowy Zheng regulator-max-microvolt = <1800000>; 204eb28fb9eSIcenowy Zheng regulator-name = "vcc-efuse-pcie-hdmi-io"; 205eb28fb9eSIcenowy Zheng }; 206eb28fb9eSIcenowy Zheng 207eb28fb9eSIcenowy Zheng reg_bldo3: bldo3 { 208eb28fb9eSIcenowy Zheng regulator-always-on; 209eb28fb9eSIcenowy Zheng regulator-min-microvolt = <1800000>; 210eb28fb9eSIcenowy Zheng regulator-max-microvolt = <1800000>; 211eb28fb9eSIcenowy Zheng regulator-name = "vcc-dcxoio"; 212eb28fb9eSIcenowy Zheng }; 213eb28fb9eSIcenowy Zheng 214eb28fb9eSIcenowy Zheng bldo4 { 215eb28fb9eSIcenowy Zheng /* unused */ 216eb28fb9eSIcenowy Zheng }; 217eb28fb9eSIcenowy Zheng 218eb28fb9eSIcenowy Zheng reg_cldo1: cldo1 { 219eb28fb9eSIcenowy Zheng /* This regulator is connected with ALDO3 */ 220eb28fb9eSIcenowy Zheng regulator-always-on; 221eb28fb9eSIcenowy Zheng regulator-min-microvolt = <3300000>; 222eb28fb9eSIcenowy Zheng regulator-max-microvolt = <3300000>; 223eb28fb9eSIcenowy Zheng regulator-name = "vcc-3v3-2"; 224eb28fb9eSIcenowy Zheng }; 225eb28fb9eSIcenowy Zheng 226eb28fb9eSIcenowy Zheng reg_cldo2: cldo2 { 227eb28fb9eSIcenowy Zheng regulator-min-microvolt = <3300000>; 228eb28fb9eSIcenowy Zheng regulator-max-microvolt = <3300000>; 229eb28fb9eSIcenowy Zheng regulator-name = "vcc-wifi-1"; 230eb28fb9eSIcenowy Zheng }; 231eb28fb9eSIcenowy Zheng 232eb28fb9eSIcenowy Zheng reg_cldo3: cldo3 { 233eb28fb9eSIcenowy Zheng regulator-min-microvolt = <3300000>; 234eb28fb9eSIcenowy Zheng regulator-max-microvolt = <3300000>; 235eb28fb9eSIcenowy Zheng regulator-name = "vcc-wifi-2"; 236eb28fb9eSIcenowy Zheng }; 237eb28fb9eSIcenowy Zheng 238eb28fb9eSIcenowy Zheng reg_dcdca: dcdca { 239eb28fb9eSIcenowy Zheng regulator-always-on; 240eb28fb9eSIcenowy Zheng regulator-min-microvolt = <810000>; 241eb28fb9eSIcenowy Zheng regulator-max-microvolt = <1080000>; 242eb28fb9eSIcenowy Zheng regulator-name = "vdd-cpu"; 243eb28fb9eSIcenowy Zheng }; 244eb28fb9eSIcenowy Zheng 245eb28fb9eSIcenowy Zheng reg_dcdcc: dcdcc { 2468abc4c4aSClément Péron regulator-enable-ramp-delay = <32000>; 247eb28fb9eSIcenowy Zheng regulator-min-microvolt = <810000>; 248eb28fb9eSIcenowy Zheng regulator-max-microvolt = <1080000>; 249eb28fb9eSIcenowy Zheng regulator-name = "vdd-gpu"; 250eb28fb9eSIcenowy Zheng }; 251eb28fb9eSIcenowy Zheng 252eb28fb9eSIcenowy Zheng reg_dcdcd: dcdcd { 253eb28fb9eSIcenowy Zheng regulator-always-on; 254eb28fb9eSIcenowy Zheng regulator-min-microvolt = <960000>; 255eb28fb9eSIcenowy Zheng regulator-max-microvolt = <960000>; 256eb28fb9eSIcenowy Zheng regulator-name = "vdd-sys"; 257eb28fb9eSIcenowy Zheng }; 258eb28fb9eSIcenowy Zheng 259eb28fb9eSIcenowy Zheng reg_dcdce: dcdce { 260eb28fb9eSIcenowy Zheng regulator-always-on; 261eb28fb9eSIcenowy Zheng regulator-min-microvolt = <1200000>; 262eb28fb9eSIcenowy Zheng regulator-max-microvolt = <1200000>; 263eb28fb9eSIcenowy Zheng regulator-name = "vcc-dram"; 264eb28fb9eSIcenowy Zheng }; 265eb28fb9eSIcenowy Zheng 266eb28fb9eSIcenowy Zheng sw { 267eb28fb9eSIcenowy Zheng /* unused */ 268eb28fb9eSIcenowy Zheng }; 269eb28fb9eSIcenowy Zheng }; 270eb28fb9eSIcenowy Zheng }; 271eb28fb9eSIcenowy Zheng 27217ebc33aSIcenowy Zheng pcf8563: rtc@51 { 27317ebc33aSIcenowy Zheng compatible = "nxp,pcf8563"; 27417ebc33aSIcenowy Zheng reg = <0x51>; 2750bb9d187SChen-Yu Tsai interrupt-parent = <&r_intc>; 2760bb9d187SChen-Yu Tsai interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 27717ebc33aSIcenowy Zheng #clock-cells = <0>; 27817ebc33aSIcenowy Zheng }; 27917ebc33aSIcenowy Zheng}; 28017ebc33aSIcenowy Zheng 28186be7408SClément Péron&r_ir { 28286be7408SClément Péron status = "okay"; 28386be7408SClément Péron}; 28486be7408SClément Péron 28522538576SIcenowy Zheng&r_pio { 28622538576SIcenowy Zheng vcc-pm-supply = <®_aldo1>; 28722538576SIcenowy Zheng}; 28822538576SIcenowy Zheng 28932507b86SJernej Skrabec&rtc { 29032507b86SJernej Skrabec clocks = <&ext_osc32k>; 29132507b86SJernej Skrabec}; 29232507b86SJernej Skrabec 293e757bdd0SAndre Przywara/* 294e757bdd0SAndre Przywara * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI 295e757bdd0SAndre Przywara * flash and eMMC at the same time, as one of them would fail probing. 296e757bdd0SAndre Przywara * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can 297e757bdd0SAndre Przywara * fix this up in no eMMC is connected. 298e757bdd0SAndre Przywara */ 299e757bdd0SAndre Przywara&spi0 { 300e757bdd0SAndre Przywara pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>; 301e757bdd0SAndre Przywara pinctrl-names = "default"; 302e757bdd0SAndre Przywara status = "disabled"; 303e757bdd0SAndre Przywara 304e757bdd0SAndre Przywara flash@0 { 305e757bdd0SAndre Przywara compatible = "winbond,w25q128", "jedec,spi-nor"; 306e757bdd0SAndre Przywara reg = <0>; 307e757bdd0SAndre Przywara spi-max-frequency = <4000000>; 308e757bdd0SAndre Przywara }; 309e757bdd0SAndre Przywara}; 310e757bdd0SAndre Przywara 311494d8367SIcenowy Zheng&uart0 { 312494d8367SIcenowy Zheng pinctrl-names = "default"; 313494d8367SIcenowy Zheng pinctrl-0 = <&uart0_ph_pins>; 314494d8367SIcenowy Zheng status = "okay"; 315494d8367SIcenowy Zheng}; 3163bfa011dSIcenowy Zheng 3173bfa011dSIcenowy Zheng&usb2otg { 3183bfa011dSIcenowy Zheng dr_mode = "host"; 3193bfa011dSIcenowy Zheng status = "okay"; 3203bfa011dSIcenowy Zheng}; 3213bfa011dSIcenowy Zheng 3223bfa011dSIcenowy Zheng&usb2phy { 3233bfa011dSIcenowy Zheng usb0_vbus-supply = <®_usb_vbus>; 3243bfa011dSIcenowy Zheng usb3_vbus-supply = <®_usb_vbus>; 3253bfa011dSIcenowy Zheng status = "okay"; 3263bfa011dSIcenowy Zheng}; 327