0001 /*
0002 * Copyright 2015 Stefan Roese <sr@denx.de>
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License as
0011 * published by the Free Software Foundation; either version 2 of the
0012 * License, or (at your option) any later version.
0013 *
0014 * This file is distributed in the hope that it will be useful,
0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0017 * GNU General Public License for more details.
0018 *
0019 * Or, alternatively,
0020 *
0021 * b) Permission is hereby granted, free of charge, to any person
0022 * obtaining a copy of this software and associated documentation
0023 * files (the "Software"), to deal in the Software without
0024 * restriction, including without limitation the rights to use,
0025 * copy, modify, merge, publish, distribute, sublicense, and/or
0026 * sell copies of the Software, and to permit persons to whom the
0027 * Software is furnished to do so, subject to the following
0028 * conditions:
0029 *
0030 * The above copyright notice and this permission notice shall be
0031 * included in all copies or substantial portions of the Software.
0032 *
0033 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040 * OTHER DEALINGS IN THE SOFTWARE.
0041 */
0042
0043 /dts-v1/;
0044 #include "sun7i-a20.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046
0047 #include <dt-bindings/gpio/gpio.h>
0048 #include <dt-bindings/interrupt-controller/irq.h>
0049
0050 / {
0051 model = "ICnova-A20 SWAC";
0052 compatible = "incircuit,icnova-a20-swac", "incircuit,icnova-a20",
0053 "allwinner,sun7i-a20";
0054
0055 aliases {
0056 serial0 = &uart0;
0057 };
0058
0059 chosen {
0060 stdout-path = "serial0:115200n8";
0061 };
0062 };
0063
0064 &cpu0 {
0065 cpu-supply = <®_dcdc2>;
0066 };
0067
0068 &ehci0 {
0069 status = "okay";
0070 };
0071
0072 &ehci1 {
0073 status = "okay";
0074 };
0075
0076 &gmac {
0077 pinctrl-names = "default";
0078 pinctrl-0 = <&gmac_mii_pins>;
0079 phy-handle = <&phy1>;
0080 phy-mode = "mii";
0081 status = "okay";
0082 };
0083
0084 &i2c0 {
0085 status = "okay";
0086
0087 axp209: pmic@34 {
0088 reg = <0x34>;
0089 interrupt-parent = <&nmi_intc>;
0090 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0091 };
0092 };
0093
0094 &i2c1 {
0095 status = "okay";
0096 };
0097
0098 &gmac_mdio {
0099 phy1: ethernet-phy@1 {
0100 reg = <1>;
0101 };
0102 };
0103
0104 &mmc0 {
0105 vmmc-supply = <®_vcc3v3>;
0106 bus-width = <4>;
0107 cd-gpios = <&pio 8 5 GPIO_ACTIVE_LOW>; /* PI5 */
0108 status = "okay";
0109 };
0110
0111 &ohci0 {
0112 status = "okay";
0113 };
0114
0115 &ohci1 {
0116 status = "okay";
0117 };
0118
0119 #include "axp209.dtsi"
0120
0121 ®_dcdc2 {
0122 regulator-always-on;
0123 regulator-min-microvolt = <1000000>;
0124 regulator-max-microvolt = <1400000>;
0125 regulator-name = "vdd-cpu";
0126 };
0127
0128 ®_dcdc3 {
0129 regulator-always-on;
0130 regulator-min-microvolt = <1000000>;
0131 regulator-max-microvolt = <1400000>;
0132 regulator-name = "vdd-int-dll";
0133 };
0134
0135 ®_ldo1 {
0136 regulator-name = "vdd-rtc";
0137 };
0138
0139 ®_ldo2 {
0140 regulator-always-on;
0141 regulator-min-microvolt = <3000000>;
0142 regulator-max-microvolt = <3000000>;
0143 regulator-name = "avcc";
0144 };
0145
0146 ®_usb1_vbus {
0147 status = "okay";
0148 };
0149
0150 ®_usb2_vbus {
0151 status = "okay";
0152 };
0153
0154 &uart0 {
0155 pinctrl-names = "default";
0156 pinctrl-0 = <&uart0_pb_pins>;
0157 status = "okay";
0158 };
0159
0160 &usbphy {
0161 usb1_vbus-supply = <®_usb1_vbus>;
0162 usb2_vbus-supply = <®_usb2_vbus>;
0163 status = "okay";
0164 };