Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2014 Open Source Support GmbH
0003  *
0004  * David Lanzendörfer <david.lanzendoerfer@o2s.ch>
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 "sun4i-a10.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 
0049 #include <dt-bindings/gpio/gpio.h>
0050 #include <dt-bindings/input/input.h>
0051 #include <dt-bindings/interrupt-controller/irq.h>
0052 
0053 / {
0054         model = "INet-97F Rev 02";
0055         compatible = "primux,inet97fv2", "allwinner,sun4i-a10";
0056 
0057         aliases {
0058                 serial0 = &uart0;
0059         };
0060 
0061         chosen {
0062                 stdout-path = "serial0:115200n8";
0063         };
0064 };
0065 
0066 &cpu0 {
0067         cpu-supply = <&reg_dcdc2>;
0068 };
0069 
0070 &ehci1 {
0071         status = "okay";
0072 };
0073 
0074 &i2c0 {
0075         status = "okay";
0076 
0077         axp209: pmic@34 {
0078                 reg = <0x34>;
0079                 interrupts = <0>;
0080         };
0081 };
0082 
0083 #include "axp209.dtsi"
0084 
0085 &i2c1 {
0086         status = "okay";
0087 };
0088 
0089 &i2c2 {
0090         status = "okay";
0091 
0092         ft5406ee8: touchscreen@38 {
0093                 compatible = "edt,edt-ft5406";
0094                 reg = <0x38>;
0095                 interrupt-parent = <&pio>;
0096                 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
0097                 touchscreen-size-x = <800>;
0098                 touchscreen-size-y = <480>;
0099         };
0100 };
0101 
0102 &lradc {
0103         vref-supply = <&reg_ldo2>;
0104         status = "okay";
0105 
0106         button-200 {
0107                 label = "Menu";
0108                 linux,code = <KEY_MENU>;
0109                 channel = <0>;
0110                 voltage = <200000>;
0111         };
0112 
0113         button-600 {
0114                 label = "Volume Up";
0115                 linux,code = <KEY_VOLUMEUP>;
0116                 channel = <0>;
0117                 voltage = <600000>;
0118         };
0119 
0120         button-800 {
0121                 label = "Volume Down";
0122                 linux,code = <KEY_VOLUMEDOWN>;
0123                 channel = <0>;
0124                 voltage = <800000>;
0125         };
0126 
0127         button-1000 {
0128                 label = "Home";
0129                 linux,code = <KEY_HOMEPAGE>;
0130                 channel = <0>;
0131                 voltage = <1000000>;
0132         };
0133 
0134         button-1200 {
0135                 label = "Esc";
0136                 linux,code = <KEY_ESC>;
0137                 channel = <0>;
0138                 voltage = <1200000>;
0139         };
0140 };
0141 
0142 &mmc0 {
0143         vmmc-supply = <&reg_vcc3v3>;
0144         bus-width = <4>;
0145         cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0146         status = "okay";
0147 };
0148 
0149 &otg_sram {
0150         status = "okay";
0151 };
0152 
0153 &reg_dcdc2 {
0154         regulator-always-on;
0155         regulator-min-microvolt = <1000000>;
0156         regulator-max-microvolt = <1400000>;
0157         regulator-name = "vdd-cpu";
0158 };
0159 
0160 &reg_dcdc3 {
0161         regulator-always-on;
0162         regulator-min-microvolt = <1250000>;
0163         regulator-max-microvolt = <1250000>;
0164         regulator-name = "vdd-int-dll";
0165 };
0166 
0167 &reg_ldo1 {
0168         regulator-name = "vdd-rtc";
0169 };
0170 
0171 &reg_ldo2 {
0172         regulator-always-on;
0173         regulator-min-microvolt = <3000000>;
0174         regulator-max-microvolt = <3000000>;
0175         regulator-name = "avcc";
0176 };
0177 
0178 &reg_usb0_vbus {
0179         status = "okay";
0180 };
0181 
0182 &reg_usb2_vbus {
0183         status = "okay";
0184 };
0185 
0186 &uart0 {
0187         pinctrl-names = "default";
0188         pinctrl-0 = <&uart0_pb_pins>;
0189         status = "okay";
0190 };
0191 
0192 &usb_otg {
0193         dr_mode = "otg";
0194         status = "okay";
0195 };
0196 
0197 &usbphy {
0198         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0199         usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
0200         usb0_vbus-supply = <&reg_usb0_vbus>;
0201         usb2_vbus-supply = <&reg_usb2_vbus>;
0202         status = "okay";
0203 };