Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This is based on sun4i-a10-olinuxino-lime.dts
0003  *
0004  * Copyright 2014 - Hans de Goede <hdegoede@redhat.com>
0005  * Copyright (c) 2014 FUKAUMI Naoki <naobsd@gmail.com>
0006  *
0007  * This file is dual-licensed: you can use it either under the terms
0008  * of the GPL or the X11 license, at your option. Note that this dual
0009  * licensing only applies to this file, and not this project as a
0010  * whole.
0011  *
0012  *  a) This file is free software; you can redistribute it and/or
0013  *     modify it under the terms of the GNU General Public License as
0014  *     published by the Free Software Foundation; either version 2 of the
0015  *     License, or (at your option) any later version.
0016  *
0017  *     This file is distributed in the hope that it will be useful,
0018  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0019  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0020  *     GNU General Public License for more details.
0021  *
0022  * Or, alternatively,
0023  *
0024  *  b) Permission is hereby granted, free of charge, to any person
0025  *     obtaining a copy of this software and associated documentation
0026  *     files (the "Software"), to deal in the Software without
0027  *     restriction, including without limitation the rights to use,
0028  *     copy, modify, merge, publish, distribute, sublicense, and/or
0029  *     sell copies of the Software, and to permit persons to whom the
0030  *     Software is furnished to do so, subject to the following
0031  *     conditions:
0032  *
0033  *     The above copyright notice and this permission notice shall be
0034  *     included in all copies or substantial portions of the Software.
0035  *
0036  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0037  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0038  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0039  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0040  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0041  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0042  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0043  *     OTHER DEALINGS IN THE SOFTWARE.
0044  */
0045 
0046 /dts-v1/;
0047 #include "sun7i-a20.dtsi"
0048 #include "sunxi-common-regulators.dtsi"
0049 
0050 #include <dt-bindings/gpio/gpio.h>
0051 #include <dt-bindings/interrupt-controller/irq.h>
0052 
0053 / {
0054         model = "Olimex A20-OLinuXino-LIME";
0055         compatible = "olimex,a20-olinuxino-lime", "allwinner,sun7i-a20";
0056 
0057         aliases {
0058                 serial0 = &uart0;
0059         };
0060 
0061         chosen {
0062                 stdout-path = "serial0:115200n8";
0063         };
0064 
0065         hdmi-connector {
0066                 compatible = "hdmi-connector";
0067                 type = "a";
0068 
0069                 port {
0070                         hdmi_con_in: endpoint {
0071                                 remote-endpoint = <&hdmi_out_con>;
0072                         };
0073                 };
0074         };
0075 
0076         leds {
0077                 compatible = "gpio-leds";
0078                 pinctrl-names = "default";
0079                 pinctrl-0 = <&led_pins_olinuxinolime>;
0080 
0081                 led {
0082                         label = "a20-olinuxino-lime:green:usr";
0083                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
0084                         default-state = "on";
0085                 };
0086         };
0087 };
0088 
0089 &ahci {
0090         target-supply = <&reg_ahci_5v>;
0091         status = "okay";
0092 };
0093 
0094 &de {
0095         status = "okay";
0096 };
0097 
0098 &ehci0 {
0099         status = "okay";
0100 };
0101 
0102 &ehci1 {
0103         status = "okay";
0104 };
0105 
0106 &gmac {
0107         pinctrl-names = "default";
0108         pinctrl-0 = <&gmac_mii_pins>;
0109         phy-handle = <&phy1>;
0110         phy-mode = "mii";
0111         status = "okay";
0112 };
0113 
0114 &hdmi {
0115         status = "okay";
0116 };
0117 
0118 &hdmi_out {
0119         hdmi_out_con: endpoint {
0120                 remote-endpoint = <&hdmi_con_in>;
0121         };
0122 };
0123 
0124 &i2c0 {
0125         status = "okay";
0126 
0127         axp209: pmic@34 {
0128                 compatible = "x-powers,axp209";
0129                 reg = <0x34>;
0130                 interrupt-parent = <&nmi_intc>;
0131                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0132 
0133                 interrupt-controller;
0134                 #interrupt-cells = <1>;
0135         };
0136 };
0137 
0138 &i2c1 {
0139         status = "okay";
0140 
0141         eeprom: eeprom@50 {
0142                 compatible = "atmel,24c16";
0143                 reg = <0x50>;
0144                 pagesize = <16>;
0145         };
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 &pio {
0174         led_pins_olinuxinolime: led-pins {
0175                 pins = "PH2";
0176                 function = "gpio_out";
0177                 drive-strength = <20>;
0178         };
0179 };
0180 
0181 &reg_ahci_5v {
0182         gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
0183         status = "okay";
0184 };
0185 
0186 &reg_usb0_vbus {
0187         status = "okay";
0188 };
0189 
0190 &reg_usb1_vbus {
0191         status = "okay";
0192 };
0193 
0194 &reg_usb2_vbus {
0195         status = "okay";
0196 };
0197 
0198 &uart0 {
0199         pinctrl-names = "default";
0200         pinctrl-0 = <&uart0_pb_pins>;
0201         status = "okay";
0202 };
0203 
0204 &usb_otg {
0205         dr_mode = "otg";
0206         status = "okay";
0207 };
0208 
0209 &usbphy {
0210         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0211         usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
0212         usb0_vbus-supply = <&reg_usb0_vbus>;
0213         usb1_vbus-supply = <&reg_usb1_vbus>;
0214         usb2_vbus-supply = <&reg_usb2_vbus>;
0215         status = "okay";
0216 };