Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2014 - Iain Paton <ipaton0@gmail.com>
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 = "Olimex A20-OLinuXino-LIME2";
0052         compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20";
0053 
0054         aliases {
0055                 serial0 = &uart0;
0056         };
0057 
0058         chosen {
0059                 stdout-path = "serial0:115200n8";
0060         };
0061 
0062         hdmi-connector {
0063                 compatible = "hdmi-connector";
0064                 type = "a";
0065 
0066                 port {
0067                         hdmi_con_in: endpoint {
0068                                 remote-endpoint = <&hdmi_out_con>;
0069                         };
0070                 };
0071         };
0072 
0073         leds {
0074                 compatible = "gpio-leds";
0075                 pinctrl-names = "default";
0076                 pinctrl-0 = <&led_pins_olinuxinolime>;
0077 
0078                 led {
0079                         label = "a20-olinuxino-lime2:green:usr";
0080                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
0081                         default-state = "on";
0082                 };
0083         };
0084 
0085         reg_axp_ipsout: axp_ipsout {
0086                 compatible = "regulator-fixed";
0087                 regulator-name = "axp-ipsout";
0088                 regulator-min-microvolt = <5000000>;
0089                 regulator-max-microvolt = <5000000>;
0090                 regulator-always-on;
0091         };
0092 };
0093 
0094 &ahci {
0095         target-supply = <&reg_ahci_5v>;
0096         status = "okay";
0097 };
0098 
0099 &de {
0100         status = "okay";
0101 };
0102 
0103 &ehci0 {
0104         status = "okay";
0105 };
0106 
0107 &ehci1 {
0108         status = "okay";
0109 };
0110 
0111 &gmac {
0112         pinctrl-names = "default";
0113         pinctrl-0 = <&gmac_rgmii_pins>;
0114         phy-handle = <&phy1>;
0115         phy-mode = "rgmii-id";
0116         status = "okay";
0117 };
0118 
0119 &hdmi {
0120         status = "okay";
0121 };
0122 
0123 &hdmi_out {
0124         hdmi_out_con: endpoint {
0125                 remote-endpoint = <&hdmi_con_in>;
0126         };
0127 };
0128 
0129 &i2c0 {
0130         status = "okay";
0131 
0132         axp209: pmic@34 {
0133                 reg = <0x34>;
0134                 interrupt-parent = <&nmi_intc>;
0135                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0136         };
0137 };
0138 
0139 &i2c1 {
0140         status = "okay";
0141 
0142         eeprom: eeprom@50 {
0143                 compatible = "atmel,24c16";
0144                 reg = <0x50>;
0145                 pagesize = <16>;
0146         };
0147 };
0148 
0149 &lradc {
0150         vref-supply = <&reg_vcc3v0>;
0151 };
0152 
0153 &gmac_mdio {
0154         phy1: ethernet-phy@1 {
0155                 reg = <1>;
0156         };
0157 };
0158 
0159 &mmc0 {
0160         vmmc-supply = <&reg_vcc3v3>;
0161         bus-width = <4>;
0162         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0163         status = "okay";
0164 };
0165 
0166 &ohci0 {
0167         status = "okay";
0168 };
0169 
0170 &ohci1 {
0171         status = "okay";
0172 };
0173 
0174 &otg_sram {
0175         status = "okay";
0176 };
0177 
0178 &pio {
0179         vcc-pa-supply = <&reg_vcc3v3>;
0180         vcc-pc-supply = <&reg_vcc3v3>;
0181         vcc-pe-supply = <&reg_ldo3>;
0182         vcc-pf-supply = <&reg_vcc3v3>;
0183         vcc-pg-supply = <&reg_ldo4>;
0184 
0185         led_pins_olinuxinolime: led-pins {
0186                 pins = "PH2";
0187                 function = "gpio_out";
0188                 drive-strength = <20>;
0189         };
0190 };
0191 
0192 &reg_ahci_5v {
0193         gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
0194         status = "okay";
0195 };
0196 
0197 #include "axp209.dtsi"
0198 
0199 &ac_power_supply {
0200         status = "okay";
0201 };
0202 
0203 &battery_power_supply {
0204         status = "okay";
0205 };
0206 
0207 &reg_dcdc2 {
0208         regulator-always-on;
0209         regulator-min-microvolt = <1000000>;
0210         regulator-max-microvolt = <1400000>;
0211         regulator-name = "vdd-cpu";
0212 };
0213 
0214 &reg_dcdc3 {
0215         regulator-always-on;
0216         regulator-min-microvolt = <1000000>;
0217         regulator-max-microvolt = <1400000>;
0218         regulator-name = "vdd-int-dll";
0219 };
0220 
0221 &reg_ldo1 {
0222         regulator-always-on;
0223         regulator-min-microvolt = <1300000>;
0224         regulator-max-microvolt = <1300000>;
0225         regulator-name = "vdd-rtc";
0226 };
0227 
0228 &reg_ldo2 {
0229         regulator-always-on;
0230         regulator-min-microvolt = <3000000>;
0231         regulator-max-microvolt = <3000000>;
0232         regulator-name = "avcc";
0233 };
0234 
0235 &reg_ldo3 {
0236         regulator-min-microvolt = <2800000>;
0237         regulator-max-microvolt = <2800000>;
0238         regulator-name = "vddio-csi0";
0239         regulator-soft-start;
0240         regulator-ramp-delay = <1600>;
0241 };
0242 
0243 &reg_ldo4 {
0244         regulator-min-microvolt = <2800000>;
0245         regulator-max-microvolt = <2800000>;
0246         regulator-name = "vddio-csi1";
0247 };
0248 
0249 &reg_usb0_vbus {
0250         gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
0251         status = "okay";
0252 };
0253 
0254 &reg_usb1_vbus {
0255         status = "okay";
0256 };
0257 
0258 &reg_usb2_vbus {
0259         status = "okay";
0260 };
0261 
0262 &uart0 {
0263         pinctrl-names = "default";
0264         pinctrl-0 = <&uart0_pb_pins>;
0265         status = "okay";
0266 };
0267 
0268 &usb_otg {
0269         dr_mode = "otg";
0270         status = "okay";
0271 };
0272 
0273 &usbphy {
0274         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0275         usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
0276         usb0_vbus-supply = <&reg_usb0_vbus>;
0277         usb1_vbus-supply = <&reg_usb1_vbus>;
0278         usb2_vbus-supply = <&reg_usb2_vbus>;
0279         status = "okay";
0280 };