Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
0003  * Copyright 2015 - Karsten Merker <merker@debian.org>
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 = "Olimex A20-Olimex-SOM-EVB";
0054         compatible = "olimex,a20-olimex-som-evb", "allwinner,sun7i-a20";
0055 
0056         aliases {
0057                 serial0 = &uart0;
0058         };
0059 
0060         chosen {
0061                 stdout-path = "serial0:115200n8";
0062         };
0063 
0064         hdmi-connector {
0065                 compatible = "hdmi-connector";
0066                 type = "a";
0067 
0068                 port {
0069                         hdmi_con_in: endpoint {
0070                                 remote-endpoint = <&hdmi_out_con>;
0071                         };
0072                 };
0073         };
0074 
0075         leds {
0076                 compatible = "gpio-leds";
0077 
0078                 led {
0079                         label = "a20-olimex-som-evb:green:usr";
0080                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
0081                         default-state = "on";
0082                 };
0083         };
0084 };
0085 
0086 &ahci {
0087         target-supply = <&reg_ahci_5v>;
0088         status = "okay";
0089 };
0090 
0091 &de {
0092         status = "okay";
0093 };
0094 
0095 &ehci0 {
0096         status = "okay";
0097 };
0098 
0099 &ehci1 {
0100         status = "okay";
0101 };
0102 
0103 &cpu0 {
0104         cpu-supply = <&reg_dcdc2>;
0105 };
0106 
0107 &codec {
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";
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 
0143 &i2c2 {
0144         status = "okay";
0145 };
0146 
0147 &lradc {
0148         vref-supply = <&reg_vcc3v0>;
0149         status = "okay";
0150 
0151         button-190 {
0152                 label = "Volume Up";
0153                 linux,code = <KEY_VOLUMEUP>;
0154                 channel = <0>;
0155                 voltage = <190000>;
0156         };
0157 
0158         button-390 {
0159                 label = "Volume Down";
0160                 linux,code = <KEY_VOLUMEDOWN>;
0161                 channel = <0>;
0162                 voltage = <390000>;
0163         };
0164 
0165         button-600 {
0166                 label = "Menu";
0167                 linux,code = <KEY_MENU>;
0168                 channel = <0>;
0169                 voltage = <600000>;
0170         };
0171 
0172         button-800 {
0173                 label = "Search";
0174                 linux,code = <KEY_SEARCH>;
0175                 channel = <0>;
0176                 voltage = <800000>;
0177         };
0178 
0179         button-980 {
0180                 label = "Home";
0181                 linux,code = <KEY_HOMEPAGE>;
0182                 channel = <0>;
0183                 voltage = <980000>;
0184         };
0185 
0186         button-1180 {
0187                 label = "Esc";
0188                 linux,code = <KEY_ESC>;
0189                 channel = <0>;
0190                 voltage = <1180000>;
0191         };
0192 
0193         button-1400 {
0194                 label = "Enter";
0195                 linux,code = <KEY_ENTER>;
0196                 channel = <0>;
0197                 voltage = <1400000>;
0198         };
0199 };
0200 
0201 &gmac_mdio {
0202         phy1: ethernet-phy@1 {
0203                 reg = <1>;
0204         };
0205 };
0206 
0207 &mmc0 {
0208         vmmc-supply = <&reg_vcc3v3>;
0209         bus-width = <4>;
0210         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0211         status = "okay";
0212 };
0213 
0214 &mmc3 {
0215         vmmc-supply = <&reg_vcc3v3>;
0216         bus-width = <4>;
0217         cd-gpios = <&pio 7 0 GPIO_ACTIVE_LOW>; /* PH0 */
0218         status = "okay";
0219 };
0220 
0221 &ohci0 {
0222         status = "okay";
0223 };
0224 
0225 &ohci1 {
0226         status = "okay";
0227 };
0228 
0229 &otg_sram {
0230         status = "okay";
0231 };
0232 
0233 &pio {
0234         led_pins_olimex_som_evb: led-pins {
0235                 pins = "PH2";
0236                 function = "gpio_out";
0237                 drive-strength = <20>;
0238         };
0239 };
0240 
0241 &reg_ahci_5v {
0242         gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
0243         status = "okay";
0244 };
0245 
0246 #include "axp209.dtsi"
0247 
0248 &reg_dcdc2 {
0249         regulator-always-on;
0250         regulator-min-microvolt = <1000000>;
0251         regulator-max-microvolt = <1400000>;
0252         regulator-name = "vdd-cpu";
0253 };
0254 
0255 &reg_dcdc3 {
0256         regulator-always-on;
0257         regulator-min-microvolt = <1000000>;
0258         regulator-max-microvolt = <1400000>;
0259         regulator-name = "vdd-int-dll";
0260 };
0261 
0262 &reg_ldo1 {
0263         regulator-name = "vdd-rtc";
0264 };
0265 
0266 &reg_ldo2 {
0267         regulator-always-on;
0268         regulator-min-microvolt = <3000000>;
0269         regulator-max-microvolt = <3000000>;
0270         regulator-name = "avcc";
0271 };
0272 
0273 &reg_usb0_vbus {
0274         status = "okay";
0275 };
0276 
0277 &reg_usb1_vbus {
0278         status = "okay";
0279 };
0280 
0281 &reg_usb2_vbus {
0282         status = "okay";
0283 };
0284 
0285 &spi1 {
0286         pinctrl-names = "default";
0287         pinctrl-0 = <&spi1_pi_pins>,
0288                     <&spi1_cs0_pi_pin>;
0289         status = "okay";
0290 };
0291 
0292 &spi2 {
0293         pinctrl-names = "default";
0294         pinctrl-0 = <&spi2_pc_pins>,
0295                     <&spi2_cs0_pc_pin>;
0296         status = "okay";
0297 };
0298 
0299 &uart0 {
0300         pinctrl-names = "default";
0301         pinctrl-0 = <&uart0_pb_pins>;
0302         status = "okay";
0303 };
0304 
0305 &uart6 {
0306         pinctrl-names = "default";
0307         pinctrl-0 = <&uart6_pi_pins>;
0308         status = "okay";
0309 };
0310 
0311 &uart7 {
0312         pinctrl-names = "default";
0313         pinctrl-0 = <&uart7_pi_pins>;
0314         status = "okay";
0315 };
0316 
0317 &usb_otg {
0318         dr_mode = "otg";
0319         status = "okay";
0320 };
0321 
0322 &usbphy {
0323         usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH04 */
0324         usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH05 */
0325         usb0_vbus-supply = <&reg_usb0_vbus>;
0326         usb1_vbus-supply = <&reg_usb1_vbus>;
0327         usb2_vbus-supply = <&reg_usb2_vbus>;
0328         status = "okay";
0329 };