1/* 2 * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> 3 * 4 * This file is dual-licensed: you can use it either under the terms 5 * of the GPL or the X11 license, at your option. Note that this dual 6 * licensing only applies to this file, and not this project as a 7 * whole. 8 * 9 * a) This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License as 11 * published by the Free Software Foundation; either version 2 of the 12 * License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * Or, alternatively, 20 * 21 * b) Permission is hereby granted, free of charge, to any person 22 * obtaining a copy of this software and associated documentation 23 * files (the "Software"), to deal in the Software without 24 * restriction, including without limitation the rights to use, 25 * copy, modify, merge, publish, distribute, sublicense, and/or 26 * sell copies of the Software, and to permit persons to whom the 27 * Software is furnished to do so, subject to the following 28 * conditions: 29 * 30 * The above copyright notice and this permission notice shall be 31 * included in all copies or substantial portions of the Software. 32 * 33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40 * OTHER DEALINGS IN THE SOFTWARE. 41 */ 42 43/dts-v1/; 44 45#include "sun50i-a64.dtsi" 46 47#include <dt-bindings/gpio/gpio.h> 48 49/ { 50 model = "FriendlyARM NanoPi A64"; 51 compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; 52 53 aliases { 54 ethernet0 = &emac; 55 serial0 = &uart0; 56 }; 57 58 chosen { 59 stdout-path = "serial0:115200n8"; 60 }; 61 62 wifi_pwrseq: wifi_pwrseq { 63 compatible = "mmc-pwrseq-simple"; 64 clocks = <&rtc 1>; 65 clock-names = "ext_clock"; 66 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 67 }; 68}; 69 70&ehci0 { 71 status = "okay"; 72}; 73 74&ehci1 { 75 status = "okay"; 76}; 77 78&emac { 79 pinctrl-names = "default"; 80 pinctrl-0 = <&rgmii_pins>; 81 phy-mode = "rgmii"; 82 phy-handle = <&ext_rgmii_phy>; 83 phy-supply = <®_dcdc1>; 84 status = "okay"; 85}; 86 87/* i2c1 connected with gpio headers like pine64, bananapi */ 88&i2c1 { 89 pinctrl-names = "default"; 90 pinctrl-0 = <&i2c1_pins>; 91 status = "disabled"; 92}; 93 94&i2c1_pins { 95 bias-pull-up; 96}; 97 98&mdio { 99 ext_rgmii_phy: ethernet-phy@1 { 100 compatible = "ethernet-phy-ieee802.3-c22"; 101 reg = <7>; 102 }; 103}; 104 105&mmc0 { 106 pinctrl-names = "default"; 107 pinctrl-0 = <&mmc0_pins>; 108 vmmc-supply = <®_dcdc1>; 109 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 110 disable-wp; 111 bus-width = <4>; 112 status = "okay"; 113}; 114 115&mmc1 { 116 pinctrl-names = "default"; 117 pinctrl-0 = <&mmc1_pins>; 118 vmmc-supply = <®_dcdc1>; 119 vqmmc-supply = <®_dldo4>; 120 mmc-pwrseq = <&wifi_pwrseq>; 121 bus-width = <4>; 122 non-removable; 123 status = "okay"; 124 125 rtl8189etv: wifi@1 { 126 reg = <1>; 127 interrupt-parent = <&r_pio>; 128 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ 129 interrupt-names = "host-wake"; 130 }; 131}; 132 133&ohci0 { 134 status = "okay"; 135}; 136 137&ohci1 { 138 status = "okay"; 139}; 140 141&r_rsb { 142 status = "okay"; 143 144 axp803: pmic@3a3 { 145 compatible = "x-powers,axp803"; 146 reg = <0x3a3>; 147 interrupt-parent = <&r_intc>; 148 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 149 }; 150}; 151 152#include "axp803.dtsi" 153 154®_aldo2 { 155 regulator-always-on; 156 regulator-min-microvolt = <1800000>; 157 regulator-max-microvolt = <3300000>; 158 regulator-name = "vcc-pl"; 159}; 160 161®_aldo3 { 162 regulator-always-on; 163 regulator-min-microvolt = <3000000>; 164 regulator-max-microvolt = <3000000>; 165 regulator-name = "vcc-pll-avcc"; 166}; 167 168®_dcdc1 { 169 regulator-always-on; 170 regulator-min-microvolt = <3300000>; 171 regulator-max-microvolt = <3300000>; 172 regulator-name = "vcc-3v3"; 173}; 174 175®_dcdc2 { 176 regulator-always-on; 177 regulator-min-microvolt = <1040000>; 178 regulator-max-microvolt = <1300000>; 179 regulator-name = "vdd-cpux"; 180}; 181 182/* DCDC3 is polyphased with DCDC2 */ 183 184®_dcdc5 { 185 regulator-always-on; 186 regulator-min-microvolt = <1500000>; 187 regulator-max-microvolt = <1500000>; 188 regulator-name = "vcc-dram"; 189}; 190 191®_dcdc6 { 192 regulator-always-on; 193 regulator-min-microvolt = <1100000>; 194 regulator-max-microvolt = <1100000>; 195 regulator-name = "vdd-sys"; 196}; 197 198®_dldo1 { 199 regulator-always-on; 200 regulator-min-microvolt = <3300000>; 201 regulator-max-microvolt = <3300000>; 202 regulator-name = "vcc-hdmi-dsi"; 203}; 204 205®_dldo4 { 206 regulator-always-on; 207 regulator-min-microvolt = <3000000>; 208 regulator-max-microvolt = <3000000>; 209 regulator-name = "vcc-pg-wifi-io"; 210}; 211 212®_eldo1 { 213 regulator-min-microvolt = <1800000>; 214 regulator-max-microvolt = <1800000>; 215 regulator-name = "cpvdd"; 216}; 217 218®_fldo1 { 219 regulator-min-microvolt = <1200000>; 220 regulator-max-microvolt = <1200000>; 221 regulator-name = "vcc-1v2-hsic"; 222}; 223 224/* 225 * The A64 chip cannot work without this regulator off, although 226 * it seems to be only driving the AR100 core. 227 * Maybe we don't still know well about CPUs domain. 228 */ 229®_fldo2 { 230 regulator-always-on; 231 regulator-min-microvolt = <1100000>; 232 regulator-max-microvolt = <1100000>; 233 regulator-name = "vdd-cpus"; 234}; 235 236®_rtc_ldo { 237 regulator-name = "vcc-rtc"; 238}; 239 240&simplefb_hdmi { 241 vcc-hdmi-supply = <®_dldo1>; 242}; 243 244&uart0 { 245 pinctrl-names = "default"; 246 pinctrl-0 = <&uart0_pins_a>; 247 status = "okay"; 248}; 249 250&usbphy { 251 status = "okay"; 252}; 253