Back to home page

OSCL-LXR

 
 

    


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 "sun7i-a20.dtsi"
0046 #include "sunxi-common-regulators.dtsi"
0047 
0048 #include <dt-bindings/gpio/gpio.h>
0049 #include <dt-bindings/input/input.h>
0050 #include <dt-bindings/interrupt-controller/irq.h>
0051 
0052 / {
0053         model = "LinkSprite pcDuino3";
0054         compatible = "linksprite,pcduino3", "allwinner,sun7i-a20";
0055 
0056         aliases {
0057                 serial0 = &uart0;
0058         };
0059 
0060         chosen {
0061                 stdout-path = "serial0:115200n8";
0062         };
0063 
0064         leds {
0065                 compatible = "gpio-leds";
0066 
0067                 led-0 {
0068                         label = "pcduino3:green:tx";
0069                         gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
0070                 };
0071 
0072                 led-1 {
0073                         label = "pcduino3:green:rx";
0074                         gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
0075                 };
0076         };
0077 
0078         gpio-keys {
0079                 compatible = "gpio-keys";
0080 
0081                 key-back {
0082                         label = "Key Back";
0083                         linux,code = <KEY_BACK>;
0084                         gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
0085                 };
0086 
0087                 key-home {
0088                         label = "Key Home";
0089                         linux,code = <KEY_HOME>;
0090                         gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
0091                 };
0092 
0093                 key-menu {
0094                         label = "Key Menu";
0095                         linux,code = <KEY_MENU>;
0096                         gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
0097                 };
0098         };
0099 };
0100 
0101 &ahci {
0102         target-supply = <&reg_ahci_5v>;
0103         status = "okay";
0104 };
0105 
0106 &codec {
0107         status = "okay";
0108 };
0109 
0110 &cpu0 {
0111         cpu-supply = <&reg_dcdc2>;
0112 };
0113 
0114 &ehci0 {
0115         status = "okay";
0116 };
0117 
0118 &ehci1 {
0119         status = "okay";
0120 };
0121 
0122 &gmac {
0123         pinctrl-names = "default";
0124         pinctrl-0 = <&gmac_mii_pins>;
0125         phy-handle = <&phy1>;
0126         phy-mode = "mii";
0127         status = "okay";
0128 };
0129 
0130 &i2c0 {
0131         status = "okay";
0132 
0133         axp209: pmic@34 {
0134                 reg = <0x34>;
0135                 interrupt-parent = <&nmi_intc>;
0136                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0137         };
0138 };
0139 
0140 #include "axp209.dtsi"
0141 
0142 &ir0 {
0143         pinctrl-names = "default";
0144         pinctrl-0 = <&ir0_rx_pin>;
0145         status = "okay";
0146 };
0147 
0148 &gmac_mdio {
0149         phy1: ethernet-phy@1 {
0150                 reg = <1>;
0151         };
0152 };
0153 
0154 &mmc0 {
0155         vmmc-supply = <&reg_vcc3v3>;
0156         bus-width = <4>;
0157         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0158         status = "okay";
0159 };
0160 
0161 &ohci0 {
0162         status = "okay";
0163 };
0164 
0165 &ohci1 {
0166         status = "okay";
0167 };
0168 
0169 &otg_sram {
0170         status = "okay";
0171 };
0172 
0173 &reg_ahci_5v {
0174         gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
0175         status = "okay";
0176 };
0177 
0178 &reg_dcdc2 {
0179         regulator-always-on;
0180         regulator-min-microvolt = <1000000>;
0181         regulator-max-microvolt = <1400000>;
0182         regulator-name = "vdd-cpu";
0183 };
0184 
0185 &reg_dcdc3 {
0186         regulator-always-on;
0187         regulator-min-microvolt = <1000000>;
0188         regulator-max-microvolt = <1400000>;
0189         regulator-name = "vdd-int-pll";
0190 };
0191 
0192 &reg_ldo1 {
0193         regulator-name = "vdd-rtc";
0194 };
0195 
0196 &reg_ldo2 {
0197         regulator-always-on;
0198         regulator-min-microvolt = <3000000>;
0199         regulator-max-microvolt = <3000000>;
0200         regulator-name = "avcc";
0201 };
0202 
0203 &reg_usb1_vbus {
0204         status = "okay";
0205 };
0206 
0207 &reg_usb2_vbus {
0208         status = "okay";
0209 };
0210 
0211 &uart0 {
0212         pinctrl-names = "default";
0213         pinctrl-0 = <&uart0_pb_pins>;
0214         status = "okay";
0215 };
0216 
0217 &usb_otg {
0218         dr_mode = "otg";
0219         status = "okay";
0220 };
0221 
0222 &usbphy {
0223         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0224         usb1_vbus-supply = <&reg_usb1_vbus>;
0225         usb2_vbus-supply = <&reg_usb2_vbus>;
0226         status = "okay";
0227 };