153ab4af3SHans de Goede/* 253ab4af3SHans de Goede * Copyright 2014 Maxime Ripard 353ab4af3SHans de Goede * 453ab4af3SHans de Goede * Maxime Ripard <maxime.ripard@free-electrons.com> 553ab4af3SHans de Goede * 653ab4af3SHans de Goede * This file is dual-licensed: you can use it either under the terms 753ab4af3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual 853ab4af3SHans de Goede * licensing only applies to this file, and not this project as a 953ab4af3SHans de Goede * whole. 1053ab4af3SHans de Goede * 1153ab4af3SHans de Goede * a) This file is free software; you can redistribute it and/or 1253ab4af3SHans de Goede * modify it under the terms of the GNU General Public License as 1353ab4af3SHans de Goede * published by the Free Software Foundation; either version 2 of the 1453ab4af3SHans de Goede * License, or (at your option) any later version. 1553ab4af3SHans de Goede * 1653ab4af3SHans de Goede * This file is distributed in the hope that it will be useful, 1753ab4af3SHans de Goede * but WITHOUT ANY WARRANTY; without even the implied warranty of 1853ab4af3SHans de Goede * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1953ab4af3SHans de Goede * GNU General Public License for more details. 2053ab4af3SHans de Goede * 2153ab4af3SHans de Goede * Or, alternatively, 2253ab4af3SHans de Goede * 2353ab4af3SHans de Goede * b) Permission is hereby granted, free of charge, to any person 2453ab4af3SHans de Goede * obtaining a copy of this software and associated documentation 2553ab4af3SHans de Goede * files (the "Software"), to deal in the Software without 2653ab4af3SHans de Goede * restriction, including without limitation the rights to use, 2753ab4af3SHans de Goede * copy, modify, merge, publish, distribute, sublicense, and/or 2853ab4af3SHans de Goede * sell copies of the Software, and to permit persons to whom the 2953ab4af3SHans de Goede * Software is furnished to do so, subject to the following 3053ab4af3SHans de Goede * conditions: 3153ab4af3SHans de Goede * 3253ab4af3SHans de Goede * The above copyright notice and this permission notice shall be 3353ab4af3SHans de Goede * included in all copies or substantial portions of the Software. 3453ab4af3SHans de Goede * 3553ab4af3SHans de Goede * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 3653ab4af3SHans de Goede * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 3753ab4af3SHans de Goede * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3853ab4af3SHans de Goede * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 3953ab4af3SHans de Goede * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 4053ab4af3SHans de Goede * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 4153ab4af3SHans de Goede * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 4253ab4af3SHans de Goede * OTHER DEALINGS IN THE SOFTWARE. 4353ab4af3SHans de Goede */ 4453ab4af3SHans de Goede 4553ab4af3SHans de Goede/dts-v1/; 4653ab4af3SHans de Goede#include "sun6i-a31.dtsi" 4753ab4af3SHans de Goede#include "sunxi-common-regulators.dtsi" 4853ab4af3SHans de Goede 4953ab4af3SHans de Goede#include <dt-bindings/gpio/gpio.h> 5053ab4af3SHans de Goede#include <dt-bindings/pinctrl/sun4i-a10.h> 5153ab4af3SHans de Goede 5253ab4af3SHans de Goede/ { 5353ab4af3SHans de Goede model = "Merrii A31 Hummingbird"; 5453ab4af3SHans de Goede compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31"; 5553ab4af3SHans de Goede 5653ab4af3SHans de Goede aliases { 57*80e5f83cSHans de Goede rtc0 = &pcf8563; 58*80e5f83cSHans de Goede rtc1 = &rtc; 5953ab4af3SHans de Goede serial0 = &uart0; 6053ab4af3SHans de Goede }; 6153ab4af3SHans de Goede 6253ab4af3SHans de Goede chosen { 6353ab4af3SHans de Goede stdout-path = "serial0:115200n8"; 6453ab4af3SHans de Goede }; 6553ab4af3SHans de Goede 6653ab4af3SHans de Goede wifi_pwrseq: wifi_pwrseq { 6753ab4af3SHans de Goede compatible = "mmc-pwrseq-simple"; 6853ab4af3SHans de Goede reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 */ 6953ab4af3SHans de Goede }; 7053ab4af3SHans de Goede}; 7153ab4af3SHans de Goede 72*80e5f83cSHans de Goede&cpu0 { 73*80e5f83cSHans de Goede cpu-supply = <®_dcdc3>; 74*80e5f83cSHans de Goede}; 75*80e5f83cSHans de Goede 7653ab4af3SHans de Goede&ehci0 { 7753ab4af3SHans de Goede status = "okay"; 7853ab4af3SHans de Goede}; 7953ab4af3SHans de Goede 8053ab4af3SHans de Goede&gmac { 8153ab4af3SHans de Goede pinctrl-names = "default"; 82*80e5f83cSHans de Goede pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_hummingbird>; 8353ab4af3SHans de Goede phy = <&phy1>; 8453ab4af3SHans de Goede phy-mode = "rgmii"; 8553ab4af3SHans de Goede snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; 8653ab4af3SHans de Goede snps,reset-active-low; 8753ab4af3SHans de Goede snps,reset-delays-us = <0 10000 30000>; 8853ab4af3SHans de Goede status = "okay"; 8953ab4af3SHans de Goede 9053ab4af3SHans de Goede phy1: ethernet-phy@1 { 9153ab4af3SHans de Goede reg = <1>; 9253ab4af3SHans de Goede }; 9353ab4af3SHans de Goede}; 9453ab4af3SHans de Goede 9553ab4af3SHans de Goede&i2c0 { 9653ab4af3SHans de Goede pinctrl-names = "default"; 9753ab4af3SHans de Goede pinctrl-0 = <&i2c0_pins_a>; 9853ab4af3SHans de Goede /* pull-ups and devices require AXP221 DLDO3 */ 9953ab4af3SHans de Goede status = "failed"; 10053ab4af3SHans de Goede}; 10153ab4af3SHans de Goede 10253ab4af3SHans de Goede&i2c1 { 10353ab4af3SHans de Goede pinctrl-names = "default"; 10453ab4af3SHans de Goede pinctrl-0 = <&i2c1_pins_a>; 10553ab4af3SHans de Goede status = "okay"; 10653ab4af3SHans de Goede}; 10753ab4af3SHans de Goede 10853ab4af3SHans de Goede&i2c2 { 10953ab4af3SHans de Goede pinctrl-names = "default"; 11053ab4af3SHans de Goede pinctrl-0 = <&i2c2_pins_a>; 11153ab4af3SHans de Goede status = "okay"; 11253ab4af3SHans de Goede 11353ab4af3SHans de Goede pcf8563: rtc@51 { 11453ab4af3SHans de Goede compatible = "nxp,pcf8563"; 11553ab4af3SHans de Goede reg = <0x51>; 11653ab4af3SHans de Goede }; 11753ab4af3SHans de Goede}; 11853ab4af3SHans de Goede 11953ab4af3SHans de Goede&ir { 12053ab4af3SHans de Goede pinctrl-names = "default"; 12153ab4af3SHans de Goede pinctrl-0 = <&ir_pins_a>; 12253ab4af3SHans de Goede status = "okay"; 12353ab4af3SHans de Goede}; 12453ab4af3SHans de Goede 12553ab4af3SHans de Goede&mmc0 { 12653ab4af3SHans de Goede pinctrl-names = "default"; 12753ab4af3SHans de Goede pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>; 128*80e5f83cSHans de Goede vmmc-supply = <®_dcdc1>; 12953ab4af3SHans de Goede bus-width = <4>; 13053ab4af3SHans de Goede cd-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 13153ab4af3SHans de Goede cd-inverted; 13253ab4af3SHans de Goede status = "okay"; 13353ab4af3SHans de Goede}; 13453ab4af3SHans de Goede 13553ab4af3SHans de Goede&mmc0_pins_a { 13653ab4af3SHans de Goede /* external pull-ups missing for some pins */ 13753ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 13853ab4af3SHans de Goede}; 13953ab4af3SHans de Goede 14053ab4af3SHans de Goede&mmc1 { 14153ab4af3SHans de Goede pinctrl-names = "default"; 14253ab4af3SHans de Goede pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_hummingbird>; 143*80e5f83cSHans de Goede vmmc-supply = <®_aldo1>; 14453ab4af3SHans de Goede mmc-pwrseq = <&wifi_pwrseq>; 14553ab4af3SHans de Goede bus-width = <4>; 14653ab4af3SHans de Goede non-removable; 14753ab4af3SHans de Goede status = "okay"; 14853ab4af3SHans de Goede}; 14953ab4af3SHans de Goede 15053ab4af3SHans de Goede&ohci0 { 15153ab4af3SHans de Goede status = "okay"; 15253ab4af3SHans de Goede}; 15353ab4af3SHans de Goede 15453ab4af3SHans de Goede&pio { 155*80e5f83cSHans de Goede gmac_phy_reset_pin_hummingbird: gmac_phy_reset_pin@0 { 156*80e5f83cSHans de Goede allwinner,pins = "PA21"; 157*80e5f83cSHans de Goede allwinner,function = "gpio_out"; 158*80e5f83cSHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 159*80e5f83cSHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 160*80e5f83cSHans de Goede }; 161*80e5f83cSHans de Goede 16253ab4af3SHans de Goede mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 { 16353ab4af3SHans de Goede allwinner,pins = "PA8"; 16453ab4af3SHans de Goede allwinner,function = "gpio_in"; 16553ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 16653ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_PULL_UP>; 16753ab4af3SHans de Goede }; 16853ab4af3SHans de Goede 16953ab4af3SHans de Goede wifi_reset_pin_hummingbird: wifi_reset_pin@0 { 17053ab4af3SHans de Goede allwinner,pins = "PG10"; 17153ab4af3SHans de Goede allwinner,function = "gpio_out"; 17253ab4af3SHans de Goede allwinner,drive = <SUN4I_PINCTRL_10_MA>; 17353ab4af3SHans de Goede allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 17453ab4af3SHans de Goede }; 17553ab4af3SHans de Goede}; 17653ab4af3SHans de Goede 17753ab4af3SHans de Goede&p2wi { 17853ab4af3SHans de Goede status = "okay"; 17953ab4af3SHans de Goede 180*80e5f83cSHans de Goede axp22x: pmic@68 { 18153ab4af3SHans de Goede compatible = "x-powers,axp221"; 18253ab4af3SHans de Goede reg = <0x68>; 18353ab4af3SHans de Goede interrupt-parent = <&nmi_intc>; 18453ab4af3SHans de Goede interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 185*80e5f83cSHans de Goede }; 186*80e5f83cSHans de Goede}; 18753ab4af3SHans de Goede 188*80e5f83cSHans de Goede#include "axp22x.dtsi" 18953ab4af3SHans de Goede 190*80e5f83cSHans de Goede®_aldo1 { 191*80e5f83cSHans de Goede regulator-min-microvolt = <3300000>; 192*80e5f83cSHans de Goede regulator-max-microvolt = <3300000>; 193*80e5f83cSHans de Goede regulator-name = "vcc-wifi"; 194*80e5f83cSHans de Goede}; 195*80e5f83cSHans de Goede 196*80e5f83cSHans de Goede®_aldo3 { 197*80e5f83cSHans de Goede regulator-always-on; 198*80e5f83cSHans de Goede regulator-min-microvolt = <2700000>; 199*80e5f83cSHans de Goede regulator-max-microvolt = <3300000>; 200*80e5f83cSHans de Goede regulator-name = "avcc"; 201*80e5f83cSHans de Goede}; 202*80e5f83cSHans de Goede 203*80e5f83cSHans de Goede®_dc5ldo { 204*80e5f83cSHans de Goede regulator-min-microvolt = <700000>; 205*80e5f83cSHans de Goede regulator-max-microvolt = <1320000>; 206*80e5f83cSHans de Goede regulator-name = "vdd-cpus"; 207*80e5f83cSHans de Goede}; 208*80e5f83cSHans de Goede 209*80e5f83cSHans de Goede®_dcdc1 { 21053ab4af3SHans de Goede regulator-always-on; 21153ab4af3SHans de Goede regulator-min-microvolt = <3000000>; 21253ab4af3SHans de Goede regulator-max-microvolt = <3000000>; 21353ab4af3SHans de Goede regulator-name = "vcc-3v0"; 21453ab4af3SHans de Goede}; 21553ab4af3SHans de Goede 216*80e5f83cSHans de Goede®_dcdc2 { 217*80e5f83cSHans de Goede regulator-min-microvolt = <700000>; 218*80e5f83cSHans de Goede regulator-max-microvolt = <1320000>; 219*80e5f83cSHans de Goede regulator-name = "vdd-gpu"; 220*80e5f83cSHans de Goede}; 221*80e5f83cSHans de Goede 222*80e5f83cSHans de Goede®_dcdc3 { 22353ab4af3SHans de Goede regulator-always-on; 22453ab4af3SHans de Goede regulator-min-microvolt = <700000>; 22553ab4af3SHans de Goede regulator-max-microvolt = <1320000>; 22653ab4af3SHans de Goede regulator-name = "vdd-cpu"; 22753ab4af3SHans de Goede}; 22853ab4af3SHans de Goede 229*80e5f83cSHans de Goede®_dcdc4 { 23053ab4af3SHans de Goede regulator-always-on; 23153ab4af3SHans de Goede regulator-min-microvolt = <700000>; 23253ab4af3SHans de Goede regulator-max-microvolt = <1320000>; 23353ab4af3SHans de Goede regulator-name = "vdd-sys-dll"; 23453ab4af3SHans de Goede}; 23553ab4af3SHans de Goede 236*80e5f83cSHans de Goede®_dcdc5 { 23753ab4af3SHans de Goede regulator-always-on; 23853ab4af3SHans de Goede regulator-min-microvolt = <1500000>; 23953ab4af3SHans de Goede regulator-max-microvolt = <1500000>; 24053ab4af3SHans de Goede regulator-name = "vcc-dram"; 24153ab4af3SHans de Goede}; 24253ab4af3SHans de Goede 24353ab4af3SHans de Goede®_usb1_vbus { 24453ab4af3SHans de Goede gpio = <&pio 7 24 GPIO_ACTIVE_HIGH>; /* PH24 */ 24553ab4af3SHans de Goede status = "okay"; 24653ab4af3SHans de Goede}; 24753ab4af3SHans de Goede 24853ab4af3SHans de Goede&uart0 { 24953ab4af3SHans de Goede pinctrl-names = "default"; 25053ab4af3SHans de Goede pinctrl-0 = <&uart0_pins_a>; 25153ab4af3SHans de Goede status = "okay"; 25253ab4af3SHans de Goede}; 25353ab4af3SHans de Goede 25453ab4af3SHans de Goede&usb1_vbus_pin_a { 25553ab4af3SHans de Goede /* different pin from sunxi-common-regulators */ 25653ab4af3SHans de Goede allwinner,pins = "PH24"; 25753ab4af3SHans de Goede}; 25853ab4af3SHans de Goede 25953ab4af3SHans de Goede&usbphy { 26053ab4af3SHans de Goede usb1_vbus-supply = <®_usb1_vbus>; 26153ab4af3SHans de Goede status = "okay"; 26253ab4af3SHans de Goede}; 263