1*4882a593Smuzhiyun/* 2*4882a593Smuzhiyun * Copyright 2014 Maxime Ripard 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Maxime Ripard <maxime.ripard@free-electrons.com> 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms 7*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual 8*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a 9*4882a593Smuzhiyun * whole. 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * a) This file is free software; you can redistribute it and/or 12*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License as 13*4882a593Smuzhiyun * published by the Free Software Foundation; either version 2 of the 14*4882a593Smuzhiyun * License, or (at your option) any later version. 15*4882a593Smuzhiyun * 16*4882a593Smuzhiyun * This file is distributed in the hope that it will be useful, 17*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 18*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19*4882a593Smuzhiyun * GNU General Public License for more details. 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * Or, alternatively, 22*4882a593Smuzhiyun * 23*4882a593Smuzhiyun * b) Permission is hereby granted, free of charge, to any person 24*4882a593Smuzhiyun * obtaining a copy of this software and associated documentation 25*4882a593Smuzhiyun * files (the "Software"), to deal in the Software without 26*4882a593Smuzhiyun * restriction, including without limitation the rights to use, 27*4882a593Smuzhiyun * copy, modify, merge, publish, distribute, sublicense, and/or 28*4882a593Smuzhiyun * sell copies of the Software, and to permit persons to whom the 29*4882a593Smuzhiyun * Software is furnished to do so, subject to the following 30*4882a593Smuzhiyun * conditions: 31*4882a593Smuzhiyun * 32*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be 33*4882a593Smuzhiyun * included in all copies or substantial portions of the Software. 34*4882a593Smuzhiyun * 35*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36*4882a593Smuzhiyun * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37*4882a593Smuzhiyun * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38*4882a593Smuzhiyun * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39*4882a593Smuzhiyun * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41*4882a593Smuzhiyun * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 43*4882a593Smuzhiyun */ 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun/dts-v1/; 46*4882a593Smuzhiyun#include "sun6i-a31.dtsi" 47*4882a593Smuzhiyun#include "sunxi-common-regulators.dtsi" 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun#include <dt-bindings/gpio/gpio.h> 50*4882a593Smuzhiyun#include <dt-bindings/pinctrl/sun4i-a10.h> 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun/ { 53*4882a593Smuzhiyun model = "Merrii A31 Hummingbird"; 54*4882a593Smuzhiyun compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31"; 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun aliases { 57*4882a593Smuzhiyun rtc0 = &pcf8563; 58*4882a593Smuzhiyun rtc1 = &rtc; 59*4882a593Smuzhiyun serial0 = &uart0; 60*4882a593Smuzhiyun }; 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun chosen { 63*4882a593Smuzhiyun stdout-path = "serial0:115200n8"; 64*4882a593Smuzhiyun }; 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun wifi_pwrseq: wifi_pwrseq { 67*4882a593Smuzhiyun compatible = "mmc-pwrseq-simple"; 68*4882a593Smuzhiyun reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ 69*4882a593Smuzhiyun }; 70*4882a593Smuzhiyun}; 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun&cpu0 { 73*4882a593Smuzhiyun cpu-supply = <®_dcdc3>; 74*4882a593Smuzhiyun}; 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun&ehci0 { 77*4882a593Smuzhiyun status = "okay"; 78*4882a593Smuzhiyun}; 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun&gmac { 81*4882a593Smuzhiyun pinctrl-names = "default"; 82*4882a593Smuzhiyun pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>; 83*4882a593Smuzhiyun phy = <&phy1>; 84*4882a593Smuzhiyun phy-mode = "rgmii"; 85*4882a593Smuzhiyun snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; 86*4882a593Smuzhiyun snps,reset-active-low; 87*4882a593Smuzhiyun snps,reset-delays-us = <0 10000 30000>; 88*4882a593Smuzhiyun status = "okay"; 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun phy1: ethernet-phy@1 { 91*4882a593Smuzhiyun reg = <1>; 92*4882a593Smuzhiyun }; 93*4882a593Smuzhiyun}; 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun&i2c0 { 96*4882a593Smuzhiyun pinctrl-names = "default"; 97*4882a593Smuzhiyun pinctrl-0 = <&i2c0_pins_a>; 98*4882a593Smuzhiyun /* pull-ups and devices require AXP221 DLDO3 */ 99*4882a593Smuzhiyun status = "failed"; 100*4882a593Smuzhiyun}; 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun&i2c1 { 103*4882a593Smuzhiyun pinctrl-names = "default"; 104*4882a593Smuzhiyun pinctrl-0 = <&i2c1_pins_a>; 105*4882a593Smuzhiyun status = "okay"; 106*4882a593Smuzhiyun}; 107*4882a593Smuzhiyun 108*4882a593Smuzhiyun&i2c2 { 109*4882a593Smuzhiyun pinctrl-names = "default"; 110*4882a593Smuzhiyun pinctrl-0 = <&i2c2_pins_a>; 111*4882a593Smuzhiyun status = "okay"; 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun pcf8563: rtc@51 { 114*4882a593Smuzhiyun compatible = "nxp,pcf8563"; 115*4882a593Smuzhiyun reg = <0x51>; 116*4882a593Smuzhiyun }; 117*4882a593Smuzhiyun}; 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun&ir { 120*4882a593Smuzhiyun pinctrl-names = "default"; 121*4882a593Smuzhiyun pinctrl-0 = <&ir_pins_a>; 122*4882a593Smuzhiyun status = "okay"; 123*4882a593Smuzhiyun}; 124*4882a593Smuzhiyun 125*4882a593Smuzhiyun&mmc0 { 126*4882a593Smuzhiyun pinctrl-names = "default"; 127*4882a593Smuzhiyun pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; 128*4882a593Smuzhiyun vmmc-supply = <®_dcdc1>; 129*4882a593Smuzhiyun bus-width = <4>; 130*4882a593Smuzhiyun cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 131*4882a593Smuzhiyun cd-inverted; 132*4882a593Smuzhiyun status = "okay"; 133*4882a593Smuzhiyun}; 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun&mmc0_pins_a { 136*4882a593Smuzhiyun /* external pull-ups missing for some pins */ 137*4882a593Smuzhiyun allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 138*4882a593Smuzhiyun}; 139*4882a593Smuzhiyun 140*4882a593Smuzhiyun&mmc1 { 141*4882a593Smuzhiyun pinctrl-names = "default"; 142*4882a593Smuzhiyun pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>; 143*4882a593Smuzhiyun vmmc-supply = <®_aldo1>; 144*4882a593Smuzhiyun mmc-pwrseq = <&wifi_pwrseq>; 145*4882a593Smuzhiyun bus-width = <4>; 146*4882a593Smuzhiyun non-removable; 147*4882a593Smuzhiyun status = "okay"; 148*4882a593Smuzhiyun}; 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun&ohci0 { 151*4882a593Smuzhiyun status = "okay"; 152*4882a593Smuzhiyun}; 153*4882a593Smuzhiyun 154*4882a593Smuzhiyun&pio { 155*4882a593Smuzhiyun gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 { 156*4882a593Smuzhiyun allwinner,pins = "PA21"; 157*4882a593Smuzhiyun allwinner,function = "gpio_out"; 158*4882a593Smuzhiyun allwinner,drive = <SUN4I_PINCTRL_10_MA>; 159*4882a593Smuzhiyun allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 160*4882a593Smuzhiyun }; 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 { 163*4882a593Smuzhiyun allwinner,pins = "PA8"; 164*4882a593Smuzhiyun allwinner,function = "gpio_in"; 165*4882a593Smuzhiyun allwinner,drive = <SUN4I_PINCTRL_10_MA>; 166*4882a593Smuzhiyun allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 167*4882a593Smuzhiyun }; 168*4882a593Smuzhiyun 169*4882a593Smuzhiyun wifi_reset_pin_hummingbird: wifi_reset_pin@0 { 170*4882a593Smuzhiyun allwinner,pins = "PG10"; 171*4882a593Smuzhiyun allwinner,function = "gpio_out"; 172*4882a593Smuzhiyun allwinner,drive = <SUN4I_PINCTRL_10_MA>; 173*4882a593Smuzhiyun allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 174*4882a593Smuzhiyun }; 175*4882a593Smuzhiyun}; 176*4882a593Smuzhiyun 177*4882a593Smuzhiyun&p2wi { 178*4882a593Smuzhiyun status = "okay"; 179*4882a593Smuzhiyun 180*4882a593Smuzhiyun axp22x: pmic@68 { 181*4882a593Smuzhiyun compatible = "x-powers,axp221"; 182*4882a593Smuzhiyun reg = <0x68>; 183*4882a593Smuzhiyun interrupt-parent = <&nmi_intc>; 184*4882a593Smuzhiyun interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 185*4882a593Smuzhiyun }; 186*4882a593Smuzhiyun}; 187*4882a593Smuzhiyun 188*4882a593Smuzhiyun#include "axp22x.dtsi" 189*4882a593Smuzhiyun 190*4882a593Smuzhiyun®_aldo1 { 191*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 192*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 193*4882a593Smuzhiyun regulator-name = "vcc-wifi"; 194*4882a593Smuzhiyun}; 195*4882a593Smuzhiyun 196*4882a593Smuzhiyun®_aldo3 { 197*4882a593Smuzhiyun regulator-always-on; 198*4882a593Smuzhiyun regulator-min-microvolt = <2700000>; 199*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 200*4882a593Smuzhiyun regulator-name = "avcc"; 201*4882a593Smuzhiyun}; 202*4882a593Smuzhiyun 203*4882a593Smuzhiyun®_dc5ldo { 204*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 205*4882a593Smuzhiyun regulator-max-microvolt = <1320000>; 206*4882a593Smuzhiyun regulator-name = "vdd-cpus"; 207*4882a593Smuzhiyun}; 208*4882a593Smuzhiyun 209*4882a593Smuzhiyun®_dcdc1 { 210*4882a593Smuzhiyun regulator-always-on; 211*4882a593Smuzhiyun regulator-min-microvolt = <3000000>; 212*4882a593Smuzhiyun regulator-max-microvolt = <3000000>; 213*4882a593Smuzhiyun regulator-name = "vcc-3v0"; 214*4882a593Smuzhiyun}; 215*4882a593Smuzhiyun 216*4882a593Smuzhiyun®_dcdc2 { 217*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 218*4882a593Smuzhiyun regulator-max-microvolt = <1320000>; 219*4882a593Smuzhiyun regulator-name = "vdd-gpu"; 220*4882a593Smuzhiyun}; 221*4882a593Smuzhiyun 222*4882a593Smuzhiyun®_dcdc3 { 223*4882a593Smuzhiyun regulator-always-on; 224*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 225*4882a593Smuzhiyun regulator-max-microvolt = <1320000>; 226*4882a593Smuzhiyun regulator-name = "vdd-cpu"; 227*4882a593Smuzhiyun}; 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun®_dcdc4 { 230*4882a593Smuzhiyun regulator-always-on; 231*4882a593Smuzhiyun regulator-min-microvolt = <700000>; 232*4882a593Smuzhiyun regulator-max-microvolt = <1320000>; 233*4882a593Smuzhiyun regulator-name = "vdd-sys-dll"; 234*4882a593Smuzhiyun}; 235*4882a593Smuzhiyun 236*4882a593Smuzhiyun®_dcdc5 { 237*4882a593Smuzhiyun regulator-always-on; 238*4882a593Smuzhiyun regulator-min-microvolt = <1500000>; 239*4882a593Smuzhiyun regulator-max-microvolt = <1500000>; 240*4882a593Smuzhiyun regulator-name = "vcc-dram"; 241*4882a593Smuzhiyun}; 242*4882a593Smuzhiyun 243*4882a593Smuzhiyun®_usb1_vbus { 244*4882a593Smuzhiyun gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ 245*4882a593Smuzhiyun status = "okay"; 246*4882a593Smuzhiyun}; 247*4882a593Smuzhiyun 248*4882a593Smuzhiyun&uart0 { 249*4882a593Smuzhiyun pinctrl-names = "default"; 250*4882a593Smuzhiyun pinctrl-0 = <&uart0_pins_a>; 251*4882a593Smuzhiyun status = "okay"; 252*4882a593Smuzhiyun}; 253*4882a593Smuzhiyun 254*4882a593Smuzhiyun&usb1_vbus_pin_a { 255*4882a593Smuzhiyun /* different pin from sunxi-common-regulators */ 256*4882a593Smuzhiyun allwinner,pins = "PH24"; 257*4882a593Smuzhiyun}; 258*4882a593Smuzhiyun 259*4882a593Smuzhiyun&usbphy { 260*4882a593Smuzhiyun usb1_vbus-supply = <®_usb1_vbus>; 261*4882a593Smuzhiyun status = "okay"; 262*4882a593Smuzhiyun}; 263