1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2// Copyright (C) 2017 Jagan Teki <jteki@openedev.com> 3 4/dts-v1/; 5 6#include "sun50i-a64.dtsi" 7 8#include <dt-bindings/gpio/gpio.h> 9 10/ { 11 model = "FriendlyARM NanoPi A64"; 12 compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; 13 14 aliases { 15 ethernet0 = &emac; 16 serial0 = &uart0; 17 }; 18 19 chosen { 20 stdout-path = "serial0:115200n8"; 21 }; 22 23 hdmi-connector { 24 compatible = "hdmi-connector"; 25 type = "a"; 26 27 port { 28 hdmi_con_in: endpoint { 29 remote-endpoint = <&hdmi_out_con>; 30 }; 31 }; 32 }; 33 34 leds { 35 compatible = "gpio-leds"; 36 37 blue { 38 label = "nanopi-a64:blue:status"; 39 gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ 40 }; 41 }; 42 43 wifi_pwrseq: wifi_pwrseq { 44 compatible = "mmc-pwrseq-simple"; 45 clocks = <&rtc 1>; 46 clock-names = "ext_clock"; 47 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 48 }; 49}; 50 51&de { 52 status = "okay"; 53}; 54 55&ehci0 { 56 status = "okay"; 57}; 58 59&ehci1 { 60 status = "okay"; 61}; 62 63&emac { 64 pinctrl-names = "default"; 65 pinctrl-0 = <&rgmii_pins>; 66 phy-mode = "rgmii"; 67 phy-handle = <&ext_rgmii_phy>; 68 phy-supply = <®_dcdc1>; 69 status = "okay"; 70}; 71 72&hdmi { 73 hvcc-supply = <®_dldo1>; 74 status = "okay"; 75}; 76 77&hdmi_out { 78 hdmi_out_con: endpoint { 79 remote-endpoint = <&hdmi_con_in>; 80 }; 81}; 82 83/* i2c1 connected with gpio headers like pine64, bananapi */ 84&i2c1_pins { 85 bias-pull-up; 86}; 87 88&mdio { 89 ext_rgmii_phy: ethernet-phy@1 { 90 compatible = "ethernet-phy-ieee802.3-c22"; 91 reg = <7>; 92 }; 93}; 94 95&mmc0 { 96 pinctrl-names = "default"; 97 pinctrl-0 = <&mmc0_pins>; 98 vmmc-supply = <®_dcdc1>; 99 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 100 disable-wp; 101 bus-width = <4>; 102 status = "okay"; 103}; 104 105&mmc1 { 106 pinctrl-names = "default"; 107 pinctrl-0 = <&mmc1_pins>; 108 vmmc-supply = <®_dcdc1>; 109 vqmmc-supply = <®_dldo4>; 110 mmc-pwrseq = <&wifi_pwrseq>; 111 bus-width = <4>; 112 non-removable; 113 status = "okay"; 114 115 rtl8189etv: wifi@1 { 116 reg = <1>; 117 interrupt-parent = <&r_pio>; 118 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ 119 interrupt-names = "host-wake"; 120 }; 121}; 122 123&ohci0 { 124 status = "okay"; 125}; 126 127&ohci1 { 128 status = "okay"; 129}; 130 131&r_rsb { 132 status = "okay"; 133 134 axp803: pmic@3a3 { 135 compatible = "x-powers,axp803"; 136 reg = <0x3a3>; 137 interrupt-parent = <&r_intc>; 138 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 139 }; 140}; 141 142#include "axp803.dtsi" 143 144&ac_power_supply { 145 status = "okay"; 146}; 147 148®_aldo2 { 149 regulator-always-on; 150 regulator-min-microvolt = <1800000>; 151 regulator-max-microvolt = <3300000>; 152 regulator-name = "vcc-pl"; 153}; 154 155®_aldo3 { 156 regulator-always-on; 157 regulator-min-microvolt = <3000000>; 158 regulator-max-microvolt = <3000000>; 159 regulator-name = "vcc-pll-avcc"; 160}; 161 162®_dcdc1 { 163 regulator-always-on; 164 regulator-min-microvolt = <3300000>; 165 regulator-max-microvolt = <3300000>; 166 regulator-name = "vcc-3v3"; 167}; 168 169®_dcdc2 { 170 regulator-always-on; 171 regulator-min-microvolt = <1040000>; 172 regulator-max-microvolt = <1300000>; 173 regulator-name = "vdd-cpux"; 174}; 175 176/* DCDC3 is polyphased with DCDC2 */ 177 178®_dcdc5 { 179 regulator-always-on; 180 regulator-min-microvolt = <1500000>; 181 regulator-max-microvolt = <1500000>; 182 regulator-name = "vcc-dram"; 183}; 184 185®_dcdc6 { 186 regulator-always-on; 187 regulator-min-microvolt = <1100000>; 188 regulator-max-microvolt = <1100000>; 189 regulator-name = "vdd-sys"; 190}; 191 192®_dldo1 { 193 regulator-always-on; 194 regulator-min-microvolt = <3300000>; 195 regulator-max-microvolt = <3300000>; 196 regulator-name = "vcc-hdmi-dsi"; 197}; 198 199®_dldo4 { 200 regulator-always-on; 201 regulator-min-microvolt = <3000000>; 202 regulator-max-microvolt = <3000000>; 203 regulator-name = "vcc-pg-wifi-io"; 204}; 205 206®_eldo1 { 207 regulator-min-microvolt = <1800000>; 208 regulator-max-microvolt = <1800000>; 209 regulator-name = "cpvdd"; 210}; 211 212®_fldo1 { 213 regulator-min-microvolt = <1200000>; 214 regulator-max-microvolt = <1200000>; 215 regulator-name = "vcc-1v2-hsic"; 216}; 217 218/* 219 * The A64 chip cannot work without this regulator off, although 220 * it seems to be only driving the AR100 core. 221 * Maybe we don't still know well about CPUs domain. 222 */ 223®_fldo2 { 224 regulator-always-on; 225 regulator-min-microvolt = <1100000>; 226 regulator-max-microvolt = <1100000>; 227 regulator-name = "vdd-cpus"; 228}; 229 230®_rtc_ldo { 231 regulator-name = "vcc-rtc"; 232}; 233 234&simplefb_hdmi { 235 vcc-hdmi-supply = <®_dldo1>; 236}; 237 238&uart0 { 239 pinctrl-names = "default"; 240 pinctrl-0 = <&uart0_pb_pins>; 241 status = "okay"; 242}; 243 244&usbphy { 245 status = "okay"; 246}; 247