Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2013 Maxime Ripard
0003  *
0004  * Maxime Ripard <maxime.ripard@free-electrons.com>
0005  *
0006  * This file is dual-licensed: you can use it either under the terms
0007  * of the GPL or the X11 license, at your option. Note that this dual
0008  * licensing only applies to this file, and not this project as a
0009  * whole.
0010  *
0011  *  a) This file is free software; you can redistribute it and/or
0012  *     modify it under the terms of the GNU General Public License as
0013  *     published by the Free Software Foundation; either version 2 of the
0014  *     License, or (at your option) any later version.
0015  *
0016  *     This file is distributed in the hope that it will be useful,
0017  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0018  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0019  *     GNU General Public License for more details.
0020  *
0021  * Or, alternatively,
0022  *
0023  *  b) Permission is hereby granted, free of charge, to any person
0024  *     obtaining a copy of this software and associated documentation
0025  *     files (the "Software"), to deal in the Software without
0026  *     restriction, including without limitation the rights to use,
0027  *     copy, modify, merge, publish, distribute, sublicense, and/or
0028  *     sell copies of the Software, and to permit persons to whom the
0029  *     Software is furnished to do so, subject to the following
0030  *     conditions:
0031  *
0032  *     The above copyright notice and this permission notice shall be
0033  *     included in all copies or substantial portions of the Software.
0034  *
0035  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0036  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0037  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0038  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0039  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0040  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0041  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0042  *     OTHER DEALINGS IN THE SOFTWARE.
0043  */
0044 
0045 /dts-v1/;
0046 #include "sun5i-a10s.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/input/input.h>
0051 
0052 / {
0053         model = "Olimex A10s-Olinuxino Micro";
0054         compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s";
0055 
0056         aliases {
0057                 serial0 = &uart0;
0058                 serial1 = &uart2;
0059                 serial2 = &uart3;
0060         };
0061 
0062         chosen {
0063                 stdout-path = "serial0:115200n8";
0064         };
0065 
0066         connector {
0067                 compatible = "hdmi-connector";
0068                 type = "a";
0069 
0070                 port {
0071                         hdmi_con_in: endpoint {
0072                                 remote-endpoint = <&hdmi_out_con>;
0073                         };
0074                 };
0075         };
0076 
0077         leds {
0078                 compatible = "gpio-leds";
0079                 pinctrl-names = "default";
0080                 pinctrl-0 = <&led_pins_olinuxino>;
0081 
0082                 led {
0083                         label = "a10s-olinuxino-micro:green:usr";
0084                         gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>;
0085                         default-state = "on";
0086                 };
0087         };
0088 };
0089 
0090 &be0 {
0091         status = "okay";
0092 };
0093 
0094 &ehci0 {
0095         status = "okay";
0096 };
0097 
0098 &emac {
0099         pinctrl-names = "default";
0100         pinctrl-0 = <&emac_pa_pins>;
0101         phy-handle = <&phy1>;
0102         status = "okay";
0103 };
0104 
0105 &emac_sram {
0106         status = "okay";
0107 };
0108 
0109 &hdmi {
0110         status = "okay";
0111 };
0112 
0113 &hdmi_out {
0114         hdmi_out_con: endpoint {
0115                 remote-endpoint = <&hdmi_con_in>;
0116         };
0117 };
0118 
0119 &i2c0 {
0120         status = "okay";
0121 
0122         axp152: pmic@30 {
0123                 reg = <0x30>;
0124                 interrupts = <0>;
0125         };
0126 };
0127 
0128 #include "axp152.dtsi"
0129 
0130 &i2c1 {
0131         status = "okay";
0132 
0133         eeprom@50 {
0134                 compatible = "atmel,24c16";
0135                 pagesize = <16>;
0136                 reg = <0x50>;
0137                 read-only;
0138         };
0139 };
0140 
0141 &i2c2 {
0142         status = "okay";
0143 };
0144 
0145 &lradc {
0146         vref-supply = <&reg_vcc3v0>;
0147         status = "okay";
0148 
0149         button-191 {
0150                 label = "Volume Up";
0151                 linux,code = <KEY_VOLUMEUP>;
0152                 channel = <0>;
0153                 voltage = <191274>;
0154         };
0155 
0156         button-392 {
0157                 label = "Volume Down";
0158                 linux,code = <KEY_VOLUMEDOWN>;
0159                 channel = <0>;
0160                 voltage = <392644>;
0161         };
0162 
0163         button-601 {
0164                 label = "Menu";
0165                 linux,code = <KEY_MENU>;
0166                 channel = <0>;
0167                 voltage = <601151>;
0168         };
0169 
0170         button-795 {
0171                 label = "Enter";
0172                 linux,code = <KEY_ENTER>;
0173                 channel = <0>;
0174                 voltage = <795090>;
0175         };
0176 
0177         button-987 {
0178                 label = "Home";
0179                 linux,code = <KEY_HOMEPAGE>;
0180                 channel = <0>;
0181                 voltage = <987387>;
0182         };
0183 };
0184 
0185 &mdio {
0186         status = "okay";
0187 
0188         phy1: ethernet-phy@1 {
0189                 reg = <1>;
0190         };
0191 };
0192 
0193 &mmc0 {
0194         vmmc-supply = <&reg_vcc3v3>;
0195         bus-width = <4>;
0196         cd-gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
0197         status = "okay";
0198 };
0199 
0200 &mmc1 {
0201         vmmc-supply = <&reg_vcc3v3>;
0202         bus-width = <4>;
0203         cd-gpios = <&pio 6 13 GPIO_ACTIVE_LOW>; /* PG13 */
0204         status = "okay";
0205 };
0206 
0207 &ohci0 {
0208         status = "okay";
0209 };
0210 
0211 &otg_sram {
0212         status = "okay";
0213 };
0214 
0215 &pio {
0216         led_pins_olinuxino: led-pin {
0217                 pins = "PE3";
0218                 function = "gpio_out";
0219                 drive-strength = <20>;
0220         };
0221 };
0222 
0223 &reg_usb0_vbus {
0224         gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
0225         status = "okay";
0226 };
0227 
0228 &reg_usb1_vbus {
0229         gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>;
0230         status = "okay";
0231 };
0232 
0233 &spi2 {
0234         pinctrl-names = "default";
0235         pinctrl-0 = <&spi2_pb_pins>,
0236                     <&spi2_cs0_pb_pin>;
0237         status = "okay";
0238 };
0239 
0240 &tcon0 {
0241         status = "okay";
0242 };
0243 
0244 &uart0 {
0245         pinctrl-names = "default";
0246         pinctrl-0 = <&uart0_pb_pins>;
0247         status = "okay";
0248 };
0249 
0250 &uart2 {
0251         pinctrl-names = "default";
0252         pinctrl-0 = <&uart2_pc_pins>;
0253         status = "okay";
0254 };
0255 
0256 &uart3 {
0257         pinctrl-names = "default";
0258         pinctrl-0 = <&uart3_pg_pins>;
0259         status = "okay";
0260 };
0261 
0262 &usb_otg {
0263         dr_mode = "otg";
0264         status = "okay";
0265 };
0266 
0267 &usbphy {
0268         usb0_id_det-gpios = <&pio 6 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG12 */
0269         usb0_vbus-supply = <&reg_usb0_vbus>;
0270         usb1_vbus-supply = <&reg_usb1_vbus>;
0271         status = "okay";
0272 };