0001 /*
0002 * Copyright 2013 Wills Wang
0003 *
0004 * Wills Wang <wills.wang.open@gmail.com>
0005 *
0006 * This file is dual-licensed: you can use it either under the terms
0007 * of the GPL or the X11 license, at your option. Note that this dual
0008 * licensing only applies to this file, and not this project as a
0009 * whole.
0010 *
0011 * a) This file is free software; you can redistribute it and/or
0012 * modify it under the terms of the GNU General Public License as
0013 * published by the Free Software Foundation; either version 2 of the
0014 * License, or (at your option) any later version.
0015 *
0016 * This file is distributed in the hope that it will be useful,
0017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0019 * GNU General Public License for more details.
0020 *
0021 * Or, alternatively,
0022 *
0023 * b) Permission is hereby granted, free of charge, to any person
0024 * obtaining a copy of this software and associated documentation
0025 * files (the "Software"), to deal in the Software without
0026 * restriction, including without limitation the rights to use,
0027 * copy, modify, merge, publish, distribute, sublicense, and/or
0028 * sell copies of the Software, and to permit persons to whom the
0029 * Software is furnished to do so, subject to the following
0030 * conditions:
0031 *
0032 * The above copyright notice and this permission notice shall be
0033 * included in all copies or substantial portions of the Software.
0034 *
0035 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0036 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0037 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0038 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0039 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0040 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0041 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0042 * OTHER DEALINGS IN THE SOFTWARE.
0043 */
0044
0045 /dts-v1/;
0046 #include "sun7i-a20.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051
0052 / {
0053 model = "Merrii A20 Hummingbird";
0054 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
0055
0056 aliases {
0057 serial0 = &uart0;
0058 serial1 = &uart2;
0059 serial2 = &uart3;
0060 serial3 = &uart4;
0061 serial4 = &uart5;
0062 };
0063
0064 chosen {
0065 stdout-path = "serial0:115200n8";
0066 };
0067
0068 reg_mmc3_vdd: mmc3_vdd {
0069 compatible = "regulator-fixed";
0070 regulator-name = "mmc3_vdd";
0071 regulator-min-microvolt = <3000000>;
0072 regulator-max-microvolt = <3000000>;
0073 enable-active-high;
0074 gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
0075 };
0076
0077 reg_gmac_vdd: gmac_vdd {
0078 compatible = "regulator-fixed";
0079 regulator-name = "gmac_vdd";
0080 regulator-min-microvolt = <3000000>;
0081 regulator-max-microvolt = <3000000>;
0082 enable-active-high;
0083 gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
0084 };
0085 };
0086
0087 &ahci {
0088 target-supply = <®_ahci_5v>;
0089 status = "okay";
0090 };
0091
0092 &ehci0 {
0093 status = "okay";
0094 };
0095
0096 &ehci1 {
0097 status = "okay";
0098 };
0099
0100 &gmac {
0101 pinctrl-names = "default";
0102 pinctrl-0 = <&gmac_rgmii_pins>;
0103 phy-handle = <&phy1>;
0104 phy-mode = "rgmii";
0105 phy-supply = <®_gmac_vdd>;
0106 status = "okay";
0107 };
0108
0109 &i2c0 {
0110 status = "okay";
0111
0112 axp209: pmic@34 {
0113 compatible = "x-powers,axp209";
0114 reg = <0x34>;
0115 interrupt-parent = <&nmi_intc>;
0116 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0117 interrupt-controller;
0118 #interrupt-cells = <1>;
0119 };
0120 };
0121
0122 &i2c1 {
0123 status = "okay";
0124 };
0125
0126 &i2c2 {
0127 status = "okay";
0128 };
0129
0130 &i2c3 {
0131 status = "okay";
0132 };
0133
0134 &ir0 {
0135 pinctrl-names = "default";
0136 pinctrl-0 = <&ir0_rx_pin>;
0137 status = "okay";
0138 };
0139
0140 &gmac_mdio {
0141 phy1: ethernet-phy@1 {
0142 reg = <1>;
0143 reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
0144 reset-assert-us = <10000>;
0145 /* wait 1s after reset, otherwise fail to read phy id */
0146 reset-deassert-us = <1000000>;
0147 };
0148 };
0149
0150 &mmc0 {
0151 vmmc-supply = <®_vcc3v0>;
0152 bus-width = <4>;
0153 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0154 status = "okay";
0155 };
0156
0157 &mmc3 {
0158 vmmc-supply = <®_mmc3_vdd>;
0159 bus-width = <4>;
0160 non-removable;
0161 status = "okay";
0162 };
0163
0164 &ohci0 {
0165 status = "okay";
0166 };
0167
0168 &ohci1 {
0169 status = "okay";
0170 };
0171
0172 &pwm {
0173 pinctrl-names = "default";
0174 pinctrl-0 = <&pwm0_pin>;
0175 status = "okay";
0176 };
0177
0178 ®_ahci_5v {
0179 gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
0180 status = "okay";
0181 };
0182
0183 ®_usb1_vbus {
0184 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
0185 status = "okay";
0186 };
0187
0188 ®_usb2_vbus {
0189 status = "okay";
0190 };
0191
0192 &spi2 {
0193 pinctrl-names = "default";
0194 pinctrl-0 = <&spi2_pb_pins>,
0195 <&spi2_cs0_pb_pin>;
0196 status = "okay";
0197 };
0198
0199 &uart0 {
0200 pinctrl-names = "default";
0201 pinctrl-0 = <&uart0_pb_pins>;
0202 status = "okay";
0203 };
0204
0205 &uart2 {
0206 pinctrl-names = "default";
0207 pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
0208 status = "okay";
0209 };
0210
0211 &uart3 {
0212 pinctrl-names = "default";
0213 pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>;
0214 status = "okay";
0215 };
0216
0217 &uart4 {
0218 pinctrl-names = "default";
0219 pinctrl-0 = <&uart4_pg_pins>;
0220 status = "okay";
0221 };
0222
0223 &uart5 {
0224 pinctrl-names = "default";
0225 pinctrl-0 = <&uart5_pi_pins>;
0226 status = "okay";
0227 };
0228
0229 &usbphy {
0230 usb1_vbus-supply = <®_usb1_vbus>;
0231 usb2_vbus-supply = <®_usb2_vbus>;
0232 status = "okay";
0233 };