1f126890aSEmmanuel Vadot/* 2f126890aSEmmanuel Vadot * Copyright 2013 Wills Wang 3f126890aSEmmanuel Vadot * 4f126890aSEmmanuel Vadot * Wills Wang <wills.wang.open@gmail.com> 5f126890aSEmmanuel Vadot * 6f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms 7f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual 8f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a 9f126890aSEmmanuel Vadot * whole. 10f126890aSEmmanuel Vadot * 11f126890aSEmmanuel Vadot * a) This file is free software; you can redistribute it and/or 12f126890aSEmmanuel Vadot * modify it under the terms of the GNU General Public License as 13f126890aSEmmanuel Vadot * published by the Free Software Foundation; either version 2 of the 14f126890aSEmmanuel Vadot * License, or (at your option) any later version. 15f126890aSEmmanuel Vadot * 16f126890aSEmmanuel Vadot * This file is distributed in the hope that it will be useful, 17f126890aSEmmanuel Vadot * but WITHOUT ANY WARRANTY; without even the implied warranty of 18f126890aSEmmanuel Vadot * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19f126890aSEmmanuel Vadot * GNU General Public License for more details. 20f126890aSEmmanuel Vadot * 21f126890aSEmmanuel Vadot * Or, alternatively, 22f126890aSEmmanuel Vadot * 23f126890aSEmmanuel Vadot * b) Permission is hereby granted, free of charge, to any person 24f126890aSEmmanuel Vadot * obtaining a copy of this software and associated documentation 25f126890aSEmmanuel Vadot * files (the "Software"), to deal in the Software without 26f126890aSEmmanuel Vadot * restriction, including without limitation the rights to use, 27f126890aSEmmanuel Vadot * copy, modify, merge, publish, distribute, sublicense, and/or 28f126890aSEmmanuel Vadot * sell copies of the Software, and to permit persons to whom the 29f126890aSEmmanuel Vadot * Software is furnished to do so, subject to the following 30f126890aSEmmanuel Vadot * conditions: 31f126890aSEmmanuel Vadot * 32f126890aSEmmanuel Vadot * The above copyright notice and this permission notice shall be 33f126890aSEmmanuel Vadot * included in all copies or substantial portions of the Software. 34f126890aSEmmanuel Vadot * 35f126890aSEmmanuel Vadot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36f126890aSEmmanuel Vadot * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37f126890aSEmmanuel Vadot * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38f126890aSEmmanuel Vadot * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39f126890aSEmmanuel Vadot * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40f126890aSEmmanuel Vadot * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41f126890aSEmmanuel Vadot * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42f126890aSEmmanuel Vadot * OTHER DEALINGS IN THE SOFTWARE. 43f126890aSEmmanuel Vadot */ 44f126890aSEmmanuel Vadot 45f126890aSEmmanuel Vadot/dts-v1/; 46f126890aSEmmanuel Vadot#include "sun7i-a20.dtsi" 47f126890aSEmmanuel Vadot#include "sunxi-common-regulators.dtsi" 48f126890aSEmmanuel Vadot 49f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 50f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 51f126890aSEmmanuel Vadot 52f126890aSEmmanuel Vadot/ { 53f126890aSEmmanuel Vadot model = "Merrii A20 Hummingbird"; 54f126890aSEmmanuel Vadot compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; 55f126890aSEmmanuel Vadot 56f126890aSEmmanuel Vadot aliases { 57f126890aSEmmanuel Vadot serial0 = &uart0; 58f126890aSEmmanuel Vadot serial1 = &uart2; 59f126890aSEmmanuel Vadot serial2 = &uart3; 60f126890aSEmmanuel Vadot serial3 = &uart4; 61f126890aSEmmanuel Vadot serial4 = &uart5; 62f126890aSEmmanuel Vadot }; 63f126890aSEmmanuel Vadot 64f126890aSEmmanuel Vadot chosen { 65f126890aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 66f126890aSEmmanuel Vadot }; 67f126890aSEmmanuel Vadot 68*7d0873ebSEmmanuel Vadot reg_mmc3_vdd: regulator-mmc3-vdd { 69f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 70f126890aSEmmanuel Vadot regulator-name = "mmc3_vdd"; 71f126890aSEmmanuel Vadot regulator-min-microvolt = <3000000>; 72f126890aSEmmanuel Vadot regulator-max-microvolt = <3000000>; 73f126890aSEmmanuel Vadot enable-active-high; 74f126890aSEmmanuel Vadot gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ 75f126890aSEmmanuel Vadot }; 76f126890aSEmmanuel Vadot 77*7d0873ebSEmmanuel Vadot reg_gmac_vdd: regulator-gmac-vdd { 78f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 79f126890aSEmmanuel Vadot regulator-name = "gmac_vdd"; 80f126890aSEmmanuel Vadot regulator-min-microvolt = <3000000>; 81f126890aSEmmanuel Vadot regulator-max-microvolt = <3000000>; 82f126890aSEmmanuel Vadot enable-active-high; 83f126890aSEmmanuel Vadot gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */ 84f126890aSEmmanuel Vadot }; 85f126890aSEmmanuel Vadot}; 86f126890aSEmmanuel Vadot 87f126890aSEmmanuel Vadot&ahci { 88f126890aSEmmanuel Vadot target-supply = <®_ahci_5v>; 89f126890aSEmmanuel Vadot status = "okay"; 90f126890aSEmmanuel Vadot}; 91f126890aSEmmanuel Vadot 92f126890aSEmmanuel Vadot&ehci0 { 93f126890aSEmmanuel Vadot status = "okay"; 94f126890aSEmmanuel Vadot}; 95f126890aSEmmanuel Vadot 96f126890aSEmmanuel Vadot&ehci1 { 97f126890aSEmmanuel Vadot status = "okay"; 98f126890aSEmmanuel Vadot}; 99f126890aSEmmanuel Vadot 100f126890aSEmmanuel Vadot&gmac { 101f126890aSEmmanuel Vadot pinctrl-names = "default"; 102f126890aSEmmanuel Vadot pinctrl-0 = <&gmac_rgmii_pins>; 103f126890aSEmmanuel Vadot phy-handle = <&phy1>; 104f126890aSEmmanuel Vadot phy-mode = "rgmii"; 105f126890aSEmmanuel Vadot phy-supply = <®_gmac_vdd>; 106f126890aSEmmanuel Vadot status = "okay"; 107f126890aSEmmanuel Vadot}; 108f126890aSEmmanuel Vadot 109f126890aSEmmanuel Vadot&i2c0 { 110f126890aSEmmanuel Vadot status = "okay"; 111f126890aSEmmanuel Vadot 112f126890aSEmmanuel Vadot axp209: pmic@34 { 113f126890aSEmmanuel Vadot compatible = "x-powers,axp209"; 114f126890aSEmmanuel Vadot reg = <0x34>; 115f126890aSEmmanuel Vadot interrupt-parent = <&nmi_intc>; 116f126890aSEmmanuel Vadot interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 117f126890aSEmmanuel Vadot interrupt-controller; 118f126890aSEmmanuel Vadot #interrupt-cells = <1>; 119f126890aSEmmanuel Vadot }; 120f126890aSEmmanuel Vadot}; 121f126890aSEmmanuel Vadot 122f126890aSEmmanuel Vadot&i2c1 { 123f126890aSEmmanuel Vadot status = "okay"; 124f126890aSEmmanuel Vadot}; 125f126890aSEmmanuel Vadot 126f126890aSEmmanuel Vadot&i2c2 { 127f126890aSEmmanuel Vadot status = "okay"; 128f126890aSEmmanuel Vadot}; 129f126890aSEmmanuel Vadot 130f126890aSEmmanuel Vadot&i2c3 { 131f126890aSEmmanuel Vadot status = "okay"; 132f126890aSEmmanuel Vadot}; 133f126890aSEmmanuel Vadot 134f126890aSEmmanuel Vadot&ir0 { 135f126890aSEmmanuel Vadot pinctrl-names = "default"; 136f126890aSEmmanuel Vadot pinctrl-0 = <&ir0_rx_pin>; 137f126890aSEmmanuel Vadot status = "okay"; 138f126890aSEmmanuel Vadot}; 139f126890aSEmmanuel Vadot 140f126890aSEmmanuel Vadot&gmac_mdio { 141f126890aSEmmanuel Vadot phy1: ethernet-phy@1 { 142f126890aSEmmanuel Vadot reg = <1>; 143f126890aSEmmanuel Vadot reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */ 144f126890aSEmmanuel Vadot reset-assert-us = <10000>; 145f126890aSEmmanuel Vadot /* wait 1s after reset, otherwise fail to read phy id */ 146f126890aSEmmanuel Vadot reset-deassert-us = <1000000>; 147f126890aSEmmanuel Vadot }; 148f126890aSEmmanuel Vadot}; 149f126890aSEmmanuel Vadot 150f126890aSEmmanuel Vadot&mmc0 { 151f126890aSEmmanuel Vadot vmmc-supply = <®_vcc3v0>; 152f126890aSEmmanuel Vadot bus-width = <4>; 153f126890aSEmmanuel Vadot cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */ 154f126890aSEmmanuel Vadot status = "okay"; 155f126890aSEmmanuel Vadot}; 156f126890aSEmmanuel Vadot 157f126890aSEmmanuel Vadot&mmc3 { 158f126890aSEmmanuel Vadot vmmc-supply = <®_mmc3_vdd>; 159f126890aSEmmanuel Vadot bus-width = <4>; 160f126890aSEmmanuel Vadot non-removable; 161f126890aSEmmanuel Vadot status = "okay"; 162f126890aSEmmanuel Vadot}; 163f126890aSEmmanuel Vadot 164f126890aSEmmanuel Vadot&ohci0 { 165f126890aSEmmanuel Vadot status = "okay"; 166f126890aSEmmanuel Vadot}; 167f126890aSEmmanuel Vadot 168f126890aSEmmanuel Vadot&ohci1 { 169f126890aSEmmanuel Vadot status = "okay"; 170f126890aSEmmanuel Vadot}; 171f126890aSEmmanuel Vadot 172f126890aSEmmanuel Vadot&pwm { 173f126890aSEmmanuel Vadot pinctrl-names = "default"; 174f126890aSEmmanuel Vadot pinctrl-0 = <&pwm0_pin>; 175f126890aSEmmanuel Vadot status = "okay"; 176f126890aSEmmanuel Vadot}; 177f126890aSEmmanuel Vadot 178f126890aSEmmanuel Vadot®_ahci_5v { 179f126890aSEmmanuel Vadot gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */ 180f126890aSEmmanuel Vadot status = "okay"; 181f126890aSEmmanuel Vadot}; 182f126890aSEmmanuel Vadot 183f126890aSEmmanuel Vadot®_usb1_vbus { 184f126890aSEmmanuel Vadot gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ 185f126890aSEmmanuel Vadot status = "okay"; 186f126890aSEmmanuel Vadot}; 187f126890aSEmmanuel Vadot 188f126890aSEmmanuel Vadot®_usb2_vbus { 189f126890aSEmmanuel Vadot status = "okay"; 190f126890aSEmmanuel Vadot}; 191f126890aSEmmanuel Vadot 192f126890aSEmmanuel Vadot&spi2 { 193f126890aSEmmanuel Vadot pinctrl-names = "default"; 194f126890aSEmmanuel Vadot pinctrl-0 = <&spi2_pb_pins>, 195f126890aSEmmanuel Vadot <&spi2_cs0_pb_pin>; 196f126890aSEmmanuel Vadot status = "okay"; 197f126890aSEmmanuel Vadot}; 198f126890aSEmmanuel Vadot 199f126890aSEmmanuel Vadot&uart0 { 200f126890aSEmmanuel Vadot pinctrl-names = "default"; 201f126890aSEmmanuel Vadot pinctrl-0 = <&uart0_pb_pins>; 202f126890aSEmmanuel Vadot status = "okay"; 203f126890aSEmmanuel Vadot}; 204f126890aSEmmanuel Vadot 205f126890aSEmmanuel Vadot&uart2 { 206f126890aSEmmanuel Vadot pinctrl-names = "default"; 207f126890aSEmmanuel Vadot pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>; 208f126890aSEmmanuel Vadot status = "okay"; 209f126890aSEmmanuel Vadot}; 210f126890aSEmmanuel Vadot 211f126890aSEmmanuel Vadot&uart3 { 212f126890aSEmmanuel Vadot pinctrl-names = "default"; 213f126890aSEmmanuel Vadot pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>; 214f126890aSEmmanuel Vadot status = "okay"; 215f126890aSEmmanuel Vadot}; 216f126890aSEmmanuel Vadot 217f126890aSEmmanuel Vadot&uart4 { 218f126890aSEmmanuel Vadot pinctrl-names = "default"; 219f126890aSEmmanuel Vadot pinctrl-0 = <&uart4_pg_pins>; 220f126890aSEmmanuel Vadot status = "okay"; 221f126890aSEmmanuel Vadot}; 222f126890aSEmmanuel Vadot 223f126890aSEmmanuel Vadot&uart5 { 224f126890aSEmmanuel Vadot pinctrl-names = "default"; 225f126890aSEmmanuel Vadot pinctrl-0 = <&uart5_pi_pins>; 226f126890aSEmmanuel Vadot status = "okay"; 227f126890aSEmmanuel Vadot}; 228f126890aSEmmanuel Vadot 229f126890aSEmmanuel Vadot&usbphy { 230f126890aSEmmanuel Vadot usb1_vbus-supply = <®_usb1_vbus>; 231f126890aSEmmanuel Vadot usb2_vbus-supply = <®_usb2_vbus>; 232f126890aSEmmanuel Vadot status = "okay"; 233f126890aSEmmanuel Vadot}; 234