0001 /*
0002 * Copyright 2014 Zoltan HERPAI
0003 * Zoltan HERPAI <wigyori@uid0.hu>
0004 *
0005 * This file is dual-licensed: you can use it either under the terms
0006 * of the GPL or the X11 license, at your option. Note that this dual
0007 * licensing only applies to this file, and not this project as a
0008 * whole.
0009 *
0010 * a) This file is free software; you can redistribute it and/or
0011 * modify it under the terms of the GNU General Public License as
0012 * published by the Free Software Foundation; either version 2 of the
0013 * License, or (at your option) any later version.
0014 *
0015 * This file is distributed in the hope that it will be useful,
0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018 * GNU General Public License for more details.
0019 *
0020 * Or, alternatively,
0021 *
0022 * b) Permission is hereby granted, free of charge, to any person
0023 * obtaining a copy of this software and associated documentation
0024 * files (the "Software"), to deal in the Software without
0025 * restriction, including without limitation the rights to use,
0026 * copy, modify, merge, publish, distribute, sublicense, and/or
0027 * sell copies of the Software, and to permit persons to whom the
0028 * Software is furnished to do so, subject to the following
0029 * conditions:
0030 *
0031 * The above copyright notice and this permission notice shall be
0032 * included in all copies or substantial portions of the Software.
0033 *
0034 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0035 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0036 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0037 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0038 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0039 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0040 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0041 * OTHER DEALINGS IN THE SOFTWARE.
0042 */
0043
0044 /dts-v1/;
0045 #include "sun4i-a10.dtsi"
0046 #include "sunxi-common-regulators.dtsi"
0047
0048 #include <dt-bindings/gpio/gpio.h>
0049 #include <dt-bindings/input/input.h>
0050
0051 / {
0052 model = "LinkSprite pcDuino";
0053 compatible = "linksprite,a10-pcduino", "allwinner,sun4i-a10";
0054
0055 aliases {
0056 serial0 = &uart0;
0057 };
0058
0059 chosen {
0060 stdout-path = "serial0:115200n8";
0061 };
0062
0063 leds {
0064 compatible = "gpio-leds";
0065
0066 led-0 {
0067 label = "pcduino:green:tx";
0068 gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
0069 };
0070
0071 led-1 {
0072 label = "pcduino:green:rx";
0073 gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
0074 };
0075 };
0076
0077 gpio-keys {
0078 compatible = "gpio-keys";
0079
0080 key-back {
0081 label = "Key Back";
0082 linux,code = <KEY_BACK>;
0083 gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
0084 };
0085
0086 key-home {
0087 label = "Key Home";
0088 linux,code = <KEY_HOME>;
0089 gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
0090 };
0091
0092 key-menu {
0093 label = "Key Menu";
0094 linux,code = <KEY_MENU>;
0095 gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
0096 };
0097 };
0098 };
0099
0100 &cpu0 {
0101 cpu-supply = <®_dcdc2>;
0102 };
0103
0104 &ehci0 {
0105 status = "okay";
0106 };
0107
0108 &ehci1 {
0109 status = "okay";
0110 };
0111
0112 &emac {
0113 phy-handle = <&phy1>;
0114 status = "okay";
0115 };
0116
0117 &emac_sram {
0118 status = "okay";
0119 };
0120
0121 &i2c0 {
0122 status = "okay";
0123
0124 axp209: pmic@34 {
0125 reg = <0x34>;
0126 interrupts = <0>;
0127 };
0128 };
0129
0130 &mdio {
0131 status = "okay";
0132
0133 phy1: ethernet-phy@1 {
0134 reg = <1>;
0135 };
0136 };
0137
0138 &mmc0 {
0139 vmmc-supply = <®_vcc3v3>;
0140 bus-width = <4>;
0141 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0142 status = "okay";
0143 };
0144
0145 &ohci0 {
0146 status = "okay";
0147 };
0148
0149 &ohci1 {
0150 status = "okay";
0151 };
0152
0153 &otg_sram {
0154 status = "okay";
0155 };
0156
0157 #include "axp209.dtsi"
0158
0159 ®_dcdc2 {
0160 regulator-always-on;
0161 regulator-min-microvolt = <1000000>;
0162 regulator-max-microvolt = <1400000>;
0163 regulator-name = "vdd-cpu";
0164 };
0165
0166 ®_dcdc3 {
0167 regulator-always-on;
0168 regulator-min-microvolt = <1000000>;
0169 regulator-max-microvolt = <1400000>;
0170 regulator-name = "vdd-int-dll";
0171 };
0172
0173 ®_ldo1 {
0174 regulator-name = "vdd-rtc";
0175 };
0176
0177 ®_ldo2 {
0178 regulator-always-on;
0179 regulator-min-microvolt = <3000000>;
0180 regulator-max-microvolt = <3000000>;
0181 regulator-name = "avcc";
0182 };
0183
0184 &uart0 {
0185 pinctrl-names = "default";
0186 pinctrl-0 = <&uart0_pb_pins>;
0187 status = "okay";
0188 };
0189
0190 &usb_otg {
0191 dr_mode = "otg";
0192 status = "okay";
0193 };
0194
0195 &usbphy {
0196 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0197 usb1_vbus-supply = <®_vcc5v0>; /* USB1 VBUS is always on */
0198 usb2_vbus-supply = <®_vcc5v0>; /* USB2 VBUS is always on */
0199 status = "okay";
0200 };