Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (c) 2017 Icenowy Zheng <icenowy@aosc.io>
0003 
0004 /dts-v1/;
0005 
0006 #include "sun50i-h6.dtsi"
0007 #include "sun50i-h6-cpu-opp.dtsi"
0008 
0009 #include <dt-bindings/gpio/gpio.h>
0010 
0011 / {
0012         model = "Pine H64 model A";
0013         compatible = "pine64,pine-h64", "allwinner,sun50i-h6";
0014 
0015         aliases {
0016                 ethernet0 = &emac;
0017                 serial0 = &uart0;
0018                 spi0 = &spi0;
0019         };
0020 
0021         chosen {
0022                 stdout-path = "serial0:115200n8";
0023         };
0024 
0025         ext_osc32k: ext_osc32k_clk {
0026                 #clock-cells = <0>;
0027                 compatible = "fixed-clock";
0028                 clock-frequency = <32768>;
0029                 clock-output-names = "ext_osc32k";
0030         };
0031 
0032         hdmi_connector: connector {
0033                 compatible = "hdmi-connector";
0034                 type = "a";
0035                 ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
0036 
0037                 port {
0038                         hdmi_con_in: endpoint {
0039                                 remote-endpoint = <&hdmi_out_con>;
0040                         };
0041                 };
0042         };
0043 
0044         leds {
0045                 compatible = "gpio-leds";
0046 
0047                 led-0 {
0048                         label = "pine-h64:green:heartbeat";
0049                         gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
0050                 };
0051 
0052                 led-1 {
0053                         label = "pine-h64:white:link";
0054                         gpios = <&r_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */
0055                 };
0056 
0057                 led-2 {
0058                         label = "pine-h64:blue:status";
0059                         gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
0060                 };
0061         };
0062 
0063         reg_gmac_3v3: gmac-3v3 {
0064                 compatible = "regulator-fixed";
0065                 regulator-name = "vcc-gmac-3v3";
0066                 regulator-min-microvolt = <3300000>;
0067                 regulator-max-microvolt = <3300000>;
0068                 startup-delay-us = <100000>;
0069                 gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>;
0070                 enable-active-high;
0071         };
0072 
0073         reg_usb_vbus: vbus {
0074                 compatible = "regulator-fixed";
0075                 regulator-name = "usb-vbus";
0076                 regulator-min-microvolt = <5000000>;
0077                 regulator-max-microvolt = <5000000>;
0078                 startup-delay-us = <100000>;
0079                 gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>;
0080                 enable-active-high;
0081         };
0082 };
0083 
0084 &cpu0 {
0085         cpu-supply = <&reg_dcdca>;
0086 };
0087 
0088 &de {
0089         status = "okay";
0090 };
0091 
0092 &ehci0 {
0093         status = "okay";
0094 };
0095 
0096 &ehci3 {
0097         status = "okay";
0098 };
0099 
0100 &emac {
0101         pinctrl-names = "default";
0102         pinctrl-0 = <&ext_rgmii_pins>;
0103         phy-mode = "rgmii-id";
0104         phy-handle = <&ext_rgmii_phy>;
0105         phy-supply = <&reg_gmac_3v3>;
0106         allwinner,rx-delay-ps = <200>;
0107         allwinner,tx-delay-ps = <200>;
0108         status = "okay";
0109 };
0110 
0111 &gpu {
0112         mali-supply = <&reg_dcdcc>;
0113         status = "okay";
0114 };
0115 
0116 &hdmi {
0117         status = "okay";
0118 };
0119 
0120 &hdmi_out {
0121         hdmi_out_con: endpoint {
0122                 remote-endpoint = <&hdmi_con_in>;
0123         };
0124 };
0125 
0126 &mdio {
0127         ext_rgmii_phy: ethernet-phy@1 {
0128                 compatible = "ethernet-phy-ieee802.3-c22";
0129                 reg = <1>;
0130         };
0131 };
0132 
0133 &mmc0 {
0134         vmmc-supply = <&reg_cldo1>;
0135         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
0136         bus-width = <4>;
0137         status = "okay";
0138 };
0139 
0140 &mmc2 {
0141         vmmc-supply = <&reg_cldo1>;
0142         vqmmc-supply = <&reg_bldo2>;
0143         non-removable;
0144         cap-mmc-hw-reset;
0145         mmc-hs200-1_8v;
0146         bus-width = <8>;
0147         status = "okay";
0148 };
0149 
0150 &ohci0 {
0151         status = "okay";
0152 };
0153 
0154 &ohci3 {
0155         status = "okay";
0156 };
0157 
0158 &pio {
0159         vcc-pc-supply = <&reg_bldo2>;
0160         vcc-pd-supply = <&reg_cldo1>;
0161         vcc-pg-supply = <&reg_aldo1>;
0162 };
0163 
0164 &r_i2c {
0165         status = "okay";
0166 
0167         axp805: pmic@36 {
0168                 compatible = "x-powers,axp805", "x-powers,axp806";
0169                 reg = <0x36>;
0170                 interrupt-parent = <&r_intc>;
0171                 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
0172                 interrupt-controller;
0173                 #interrupt-cells = <1>;
0174                 x-powers,self-working-mode;
0175 
0176                 regulators {
0177                         reg_aldo1: aldo1 {
0178                                 regulator-always-on;
0179                                 regulator-min-microvolt = <3300000>;
0180                                 regulator-max-microvolt = <3300000>;
0181                                 regulator-name = "vcc-pl";
0182                         };
0183 
0184                         reg_aldo2: aldo2 {
0185                                 regulator-min-microvolt = <3300000>;
0186                                 regulator-max-microvolt = <3300000>;
0187                                 regulator-name = "vcc-ac200";
0188                                 regulator-enable-ramp-delay = <100000>;
0189                         };
0190 
0191                         reg_aldo3: aldo3 {
0192                                 /* This regulator is connected with CLDO1 */
0193                                 regulator-always-on;
0194                                 regulator-min-microvolt = <3300000>;
0195                                 regulator-max-microvolt = <3300000>;
0196                                 regulator-name = "vcc-3v3-1";
0197                         };
0198 
0199                         reg_bldo1: bldo1 {
0200                                 regulator-always-on;
0201                                 regulator-min-microvolt = <1800000>;
0202                                 regulator-max-microvolt = <1800000>;
0203                                 regulator-name = "vcc-bias-pll";
0204                         };
0205 
0206                         reg_bldo2: bldo2 {
0207                                 regulator-always-on;
0208                                 regulator-min-microvolt = <1800000>;
0209                                 regulator-max-microvolt = <1800000>;
0210                                 regulator-name = "vcc-efuse-pcie-hdmi-io";
0211                         };
0212 
0213                         reg_bldo3: bldo3 {
0214                                 regulator-always-on;
0215                                 regulator-min-microvolt = <1800000>;
0216                                 regulator-max-microvolt = <1800000>;
0217                                 regulator-name = "vcc-dcxoio";
0218                         };
0219 
0220                         bldo4 {
0221                                 /* unused */
0222                         };
0223 
0224                         reg_cldo1: cldo1 {
0225                                 /* This regulator is connected with ALDO3 */
0226                                 regulator-always-on;
0227                                 regulator-min-microvolt = <3300000>;
0228                                 regulator-max-microvolt = <3300000>;
0229                                 regulator-name = "vcc-3v3-2";
0230                         };
0231 
0232                         reg_cldo2: cldo2 {
0233                                 regulator-min-microvolt = <3300000>;
0234                                 regulator-max-microvolt = <3300000>;
0235                                 regulator-name = "vcc-wifi-1";
0236                         };
0237 
0238                         reg_cldo3: cldo3 {
0239                                 regulator-min-microvolt = <3300000>;
0240                                 regulator-max-microvolt = <3300000>;
0241                                 regulator-name = "vcc-wifi-2";
0242                         };
0243 
0244                         reg_dcdca: dcdca {
0245                                 regulator-always-on;
0246                                 regulator-min-microvolt = <810000>;
0247                                 regulator-max-microvolt = <1160000>;
0248                                 regulator-ramp-delay = <2500>;
0249                                 regulator-name = "vdd-cpu";
0250                         };
0251 
0252                         reg_dcdcc: dcdcc {
0253                                 regulator-enable-ramp-delay = <32000>;
0254                                 regulator-min-microvolt = <810000>;
0255                                 regulator-max-microvolt = <1080000>;
0256                                 regulator-ramp-delay = <2500>;
0257                                 regulator-name = "vdd-gpu";
0258                         };
0259 
0260                         reg_dcdcd: dcdcd {
0261                                 regulator-always-on;
0262                                 regulator-min-microvolt = <960000>;
0263                                 regulator-max-microvolt = <960000>;
0264                                 regulator-name = "vdd-sys";
0265                         };
0266 
0267                         reg_dcdce: dcdce {
0268                                 regulator-always-on;
0269                                 regulator-min-microvolt = <1200000>;
0270                                 regulator-max-microvolt = <1200000>;
0271                                 regulator-name = "vcc-dram";
0272                         };
0273 
0274                         sw {
0275                                 /* unused */
0276                         };
0277                 };
0278         };
0279 
0280         pcf8563: rtc@51 {
0281                 compatible = "nxp,pcf8563";
0282                 reg = <0x51>;
0283                 interrupt-parent = <&r_intc>;
0284                 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
0285                 #clock-cells = <0>;
0286         };
0287 };
0288 
0289 &r_ir {
0290         status = "okay";
0291 };
0292 
0293 &r_pio {
0294         vcc-pm-supply = <&reg_aldo1>;
0295 };
0296 
0297 &rtc {
0298         clocks = <&ext_osc32k>;
0299 };
0300 
0301 /*
0302  * The CS pin is shared with the MMC2 CMD pin, so we cannot have the SPI
0303  * flash and eMMC at the same time, as one of them would fail probing.
0304  * Disable SPI0 in here, to prefer the more useful eMMC. U-Boot can
0305  * fix this up in no eMMC is connected.
0306  */
0307 &spi0 {
0308         pinctrl-0 = <&spi0_pins>, <&spi0_cs_pin>;
0309         pinctrl-names = "default";
0310         status = "disabled";
0311 
0312         flash@0 {
0313                 compatible = "winbond,w25q128", "jedec,spi-nor";
0314                 reg = <0>;
0315                 spi-max-frequency = <4000000>;
0316         };
0317 };
0318 
0319 &uart0 {
0320         pinctrl-names = "default";
0321         pinctrl-0 = <&uart0_ph_pins>;
0322         status = "okay";
0323 };
0324 
0325 &usb2otg {
0326         dr_mode = "host";
0327         status = "okay";
0328 };
0329 
0330 &usb2phy {
0331         usb0_vbus-supply = <&reg_usb_vbus>;
0332         usb3_vbus-supply = <&reg_usb_vbus>;
0333         status = "okay";
0334 };