0001 /*
0002 * Copyright 2015 Jelle de Jong <jelledejong@powercraft.nl>
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/input/input.h>
0049 #include <dt-bindings/interrupt-controller/irq.h>
0050
0051 / {
0052 model = "Wits Pro A20 DKT";
0053 compatible = "wits,pro-a20-dkt", "allwinner,sun7i-a20";
0054
0055 aliases {
0056 serial0 = &uart0;
0057 };
0058
0059 chosen {
0060 stdout-path = "serial0:115200n8";
0061 };
0062
0063 mmc3_pwrseq: mmc3_pwrseq {
0064 compatible = "mmc-pwrseq-simple";
0065 reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
0066 };
0067 };
0068
0069 &cpu0 {
0070 cpu-supply = <®_dcdc2>;
0071 };
0072
0073 &ehci0 {
0074 status = "okay";
0075 };
0076
0077 &ehci1 {
0078 status = "okay";
0079 };
0080
0081 &gmac {
0082 pinctrl-names = "default";
0083 pinctrl-0 = <&gmac_rgmii_pins>;
0084 phy-handle = <&phy1>;
0085 phy-mode = "rgmii";
0086 status = "okay";
0087 };
0088
0089 &i2c0 {
0090 status = "okay";
0091
0092 axp209: pmic@34 {
0093 reg = <0x34>;
0094 interrupt-parent = <&nmi_intc>;
0095 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0096 };
0097 };
0098
0099 &i2c1 {
0100 status = "okay";
0101 };
0102
0103 &i2c2 {
0104 status = "okay";
0105 };
0106
0107 #include "axp209.dtsi"
0108
0109 &gmac_mdio {
0110 phy1: ethernet-phy@1 {
0111 reg = <1>;
0112 };
0113 };
0114
0115 &mmc0 {
0116 vmmc-supply = <®_vcc3v3>;
0117 bus-width = <4>;
0118 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0119 status = "okay";
0120 };
0121
0122 &mmc3 {
0123 vmmc-supply = <®_vcc3v3>;
0124 mmc-pwrseq = <&mmc3_pwrseq>;
0125 bus-width = <4>;
0126 non-removable;
0127 status = "okay";
0128
0129 brcmf: wifi@1 {
0130 reg = <1>;
0131 compatible = "brcm,bcm4329-fmac";
0132 interrupt-parent = <&pio>;
0133 interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
0134 interrupt-names = "host-wake";
0135 };
0136 };
0137
0138 &ohci0 {
0139 status = "okay";
0140 };
0141
0142 &ohci1 {
0143 status = "okay";
0144 };
0145
0146 &otg_sram {
0147 status = "okay";
0148 };
0149
0150 ®_dcdc2 {
0151 regulator-always-on;
0152 regulator-min-microvolt = <1000000>;
0153 regulator-max-microvolt = <1450000>;
0154 regulator-name = "vdd-cpu";
0155 };
0156
0157 ®_dcdc3 {
0158 regulator-always-on;
0159 regulator-min-microvolt = <1000000>;
0160 regulator-max-microvolt = <1400000>;
0161 regulator-name = "vdd-int-dll";
0162 };
0163
0164 ®_ldo1 {
0165 regulator-name = "vdd-rtc";
0166 };
0167
0168 ®_ldo2 {
0169 regulator-always-on;
0170 regulator-min-microvolt = <3000000>;
0171 regulator-max-microvolt = <3000000>;
0172 regulator-name = "avcc";
0173 };
0174
0175 ®_usb0_vbus {
0176 status = "okay";
0177 };
0178
0179 ®_usb1_vbus {
0180 status = "okay";
0181 };
0182
0183 ®_usb2_vbus {
0184 status = "okay";
0185 };
0186
0187 &uart0 {
0188 pinctrl-names = "default";
0189 pinctrl-0 = <&uart0_pb_pins>;
0190 status = "okay";
0191 };
0192
0193 &usb_otg {
0194 dr_mode = "otg";
0195 status = "okay";
0196 };
0197
0198 &usb_power_supply {
0199 status = "okay";
0200 };
0201
0202 &usbphy {
0203 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0204 usb0_vbus_power-supply = <&usb_power_supply>;
0205 usb0_vbus-supply = <®_usb0_vbus>;
0206 usb1_vbus-supply = <®_usb1_vbus>;
0207 usb2_vbus-supply = <®_usb2_vbus>;
0208 status = "okay";
0209 };