Home | History | Annotate | Line # | Download | only in dts
      1      1.1  jmcneill /*
      2      1.1  jmcneill  * Copyright 2016 Icenowy Zheng <icenowy (at) aosc.xyz>
      3      1.1  jmcneill  *
      4      1.1  jmcneill  * Based on sun5i-a13-olinuxino.dts, which is
      5      1.1  jmcneill  *   Copyright 2012 Maxime Ripard <maxime.ripard (at) free-electrons.com>
      6      1.1  jmcneill  *   Copyright 2013 Hans de Goede <hdegoede (at) redhat.com>
      7      1.1  jmcneill  *
      8      1.1  jmcneill  * This file is dual-licensed: you can use it either under the terms
      9      1.1  jmcneill  * of the GPL or the X11 license, at your option. Note that this dual
     10      1.1  jmcneill  * licensing only applies to this file, and not this project as a
     11      1.1  jmcneill  * whole.
     12      1.1  jmcneill  *
     13      1.1  jmcneill  *  a) This file is free software; you can redistribute it and/or
     14      1.1  jmcneill  *     modify it under the terms of the GNU General Public License as
     15      1.1  jmcneill  *     published by the Free Software Foundation; either version 2 of the
     16      1.1  jmcneill  *     License, or (at your option) any later version.
     17      1.1  jmcneill  *
     18      1.1  jmcneill  *     This file is distributed in the hope that it will be useful,
     19      1.1  jmcneill  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
     20      1.1  jmcneill  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     21      1.1  jmcneill  *     GNU General Public License for more details.
     22      1.1  jmcneill  *
     23      1.1  jmcneill  * Or, alternatively,
     24      1.1  jmcneill  *
     25      1.1  jmcneill  *  b) Permission is hereby granted, free of charge, to any person
     26      1.1  jmcneill  *     obtaining a copy of this software and associated documentation
     27      1.1  jmcneill  *     files (the "Software"), to deal in the Software without
     28      1.1  jmcneill  *     restriction, including without limitation the rights to use,
     29      1.1  jmcneill  *     copy, modify, merge, publish, distribute, sublicense, and/or
     30      1.1  jmcneill  *     sell copies of the Software, and to permit persons to whom the
     31      1.1  jmcneill  *     Software is furnished to do so, subject to the following
     32      1.1  jmcneill  *     conditions:
     33      1.1  jmcneill  *
     34      1.1  jmcneill  *     The above copyright notice and this permission notice shall be
     35      1.1  jmcneill  *     included in all copies or substantial portions of the Software.
     36      1.1  jmcneill  *
     37      1.1  jmcneill  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     38      1.1  jmcneill  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
     39      1.1  jmcneill  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     40      1.1  jmcneill  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
     41      1.1  jmcneill  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
     42      1.1  jmcneill  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     43      1.1  jmcneill  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     44      1.1  jmcneill  *     OTHER DEALINGS IN THE SOFTWARE.
     45      1.1  jmcneill  */
     46      1.1  jmcneill 
     47      1.1  jmcneill /dts-v1/;
     48      1.1  jmcneill #include "sun5i-a13.dtsi"
     49      1.1  jmcneill #include "sunxi-common-regulators.dtsi"
     50      1.1  jmcneill 
     51      1.1  jmcneill #include <dt-bindings/gpio/gpio.h>
     52      1.1  jmcneill #include <dt-bindings/input/input.h>
     53      1.1  jmcneill 
     54      1.1  jmcneill / {
     55      1.1  jmcneill 	model = "Lichee Pi One";
     56      1.1  jmcneill 	compatible = "licheepi,licheepi-one", "allwinner,sun5i-a13";
     57      1.1  jmcneill 
     58      1.1  jmcneill 	aliases {
     59      1.1  jmcneill 		serial0 = &uart1;
     60      1.1  jmcneill 	};
     61      1.1  jmcneill 
     62      1.1  jmcneill 	chosen {
     63      1.1  jmcneill 		stdout-path = "serial0:115200n8";
     64      1.1  jmcneill 	};
     65      1.1  jmcneill 
     66      1.1  jmcneill 	leds {
     67      1.1  jmcneill 		compatible = "gpio-leds";
     68      1.1  jmcneill 
     69  1.1.1.5  jmcneill 		led-0 {
     70      1.1  jmcneill 			label ="licheepi:red:usr";
     71      1.1  jmcneill 			gpios = <&pio 2 5 GPIO_ACTIVE_LOW>;
     72      1.1  jmcneill 		};
     73      1.1  jmcneill 
     74  1.1.1.5  jmcneill 		led-1 {
     75      1.1  jmcneill 			label ="licheepi:green:usr";
     76      1.1  jmcneill 			gpios = <&pio 2 19 GPIO_ACTIVE_LOW>;
     77      1.1  jmcneill 			default-state = "on";
     78      1.1  jmcneill 		};
     79      1.1  jmcneill 
     80  1.1.1.5  jmcneill 		led-2 {
     81      1.1  jmcneill 			label ="licheepi:blue:usr";
     82      1.1  jmcneill 			gpios = <&pio 2 4 GPIO_ACTIVE_LOW>;
     83      1.1  jmcneill 		};
     84      1.1  jmcneill 
     85      1.1  jmcneill 	};
     86      1.1  jmcneill };
     87      1.1  jmcneill 
     88      1.1  jmcneill &cpu0 {
     89      1.1  jmcneill 	cpu-supply = <&reg_dcdc2>;
     90      1.1  jmcneill };
     91      1.1  jmcneill 
     92      1.1  jmcneill &ehci0 {
     93      1.1  jmcneill 	status = "okay";
     94      1.1  jmcneill };
     95      1.1  jmcneill 
     96      1.1  jmcneill &i2c0 {
     97      1.1  jmcneill 	status = "okay";
     98      1.1  jmcneill 
     99      1.1  jmcneill 	axp209: pmic@34 {
    100      1.1  jmcneill 		compatible = "x-powers,axp209";
    101      1.1  jmcneill 		reg = <0x34>;
    102      1.1  jmcneill 		interrupts = <0>;
    103      1.1  jmcneill 
    104      1.1  jmcneill 		interrupt-controller;
    105      1.1  jmcneill 		#interrupt-cells = <1>;
    106      1.1  jmcneill 	};
    107      1.1  jmcneill };
    108      1.1  jmcneill 
    109      1.1  jmcneill &i2c1 {
    110      1.1  jmcneill 	status = "disabled";
    111      1.1  jmcneill };
    112      1.1  jmcneill 
    113      1.1  jmcneill &i2c2 {
    114      1.1  jmcneill 	status = "disabled";
    115      1.1  jmcneill };
    116      1.1  jmcneill 
    117      1.1  jmcneill &lradc {
    118      1.1  jmcneill 	vref-supply = <&reg_ldo2>;
    119      1.1  jmcneill 	status = "okay";
    120      1.1  jmcneill 
    121  1.1.1.3  jmcneill 	button-984 {
    122      1.1  jmcneill 		label = "Home";
    123      1.1  jmcneill 		linux,code = <KEY_HOMEPAGE>;
    124      1.1  jmcneill 		channel = <0>;
    125      1.1  jmcneill 		voltage = <984126>;
    126      1.1  jmcneill 	};
    127      1.1  jmcneill };
    128      1.1  jmcneill 
    129      1.1  jmcneill &mmc0 {
    130      1.1  jmcneill 	vmmc-supply = <&reg_vcc3v3>;
    131      1.1  jmcneill 	bus-width = <4>;
    132      1.1  jmcneill 	broken-cd;
    133      1.1  jmcneill 	status = "okay";
    134      1.1  jmcneill };
    135      1.1  jmcneill 
    136      1.1  jmcneill &mmc2 {
    137      1.1  jmcneill 	pinctrl-names = "default";
    138  1.1.1.3  jmcneill 	pinctrl-0 = <&mmc2_4bit_pc_pins>;
    139      1.1  jmcneill 	vmmc-supply = <&reg_vcc3v3>;
    140      1.1  jmcneill 	bus-width = <4>;
    141      1.1  jmcneill 	broken-cd;
    142      1.1  jmcneill 	status = "okay";
    143      1.1  jmcneill };
    144      1.1  jmcneill 
    145      1.1  jmcneill &ohci0 {
    146      1.1  jmcneill 	status = "okay";
    147      1.1  jmcneill };
    148      1.1  jmcneill 
    149      1.1  jmcneill &otg_sram {
    150      1.1  jmcneill 	status = "okay";
    151      1.1  jmcneill };
    152      1.1  jmcneill 
    153      1.1  jmcneill #include "axp209.dtsi"
    154      1.1  jmcneill 
    155      1.1  jmcneill &reg_dcdc2 {
    156      1.1  jmcneill 	regulator-always-on;
    157      1.1  jmcneill 	regulator-min-microvolt = <1000000>;
    158      1.1  jmcneill 	regulator-max-microvolt = <1500000>;
    159      1.1  jmcneill 	regulator-name = "vdd-cpu";
    160      1.1  jmcneill };
    161      1.1  jmcneill 
    162      1.1  jmcneill &reg_dcdc3 {
    163      1.1  jmcneill 	regulator-always-on;
    164      1.1  jmcneill 	regulator-min-microvolt = <1000000>;
    165      1.1  jmcneill 	regulator-max-microvolt = <1400000>;
    166      1.1  jmcneill 	regulator-name = "vdd-int-dll";
    167      1.1  jmcneill };
    168      1.1  jmcneill 
    169      1.1  jmcneill &reg_ldo1 {
    170      1.1  jmcneill 	regulator-name = "vdd-rtc";
    171      1.1  jmcneill };
    172      1.1  jmcneill 
    173      1.1  jmcneill &reg_ldo2 {
    174      1.1  jmcneill 	regulator-always-on;
    175      1.1  jmcneill 	regulator-min-microvolt = <3000000>;
    176      1.1  jmcneill 	regulator-max-microvolt = <3000000>;
    177      1.1  jmcneill 	regulator-name = "avcc";
    178      1.1  jmcneill };
    179      1.1  jmcneill 
    180      1.1  jmcneill &reg_ldo3 {
    181      1.1  jmcneill 	regulator-min-microvolt = <1800000>;
    182      1.1  jmcneill 	regulator-max-microvolt = <1800000>;
    183      1.1  jmcneill 	regulator-name = "csi-1.8v";
    184      1.1  jmcneill };
    185      1.1  jmcneill 
    186      1.1  jmcneill &reg_ldo4 {
    187      1.1  jmcneill 	regulator-min-microvolt = <2800000>;
    188      1.1  jmcneill 	regulator-max-microvolt = <2800000>;
    189      1.1  jmcneill 	regulator-name = "csi-2.8v";
    190      1.1  jmcneill };
    191      1.1  jmcneill 
    192      1.1  jmcneill &reg_usb0_vbus {
    193      1.1  jmcneill 	gpio = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
    194      1.1  jmcneill 	status = "okay";
    195      1.1  jmcneill };
    196      1.1  jmcneill 
    197      1.1  jmcneill &uart1 {
    198      1.1  jmcneill 	pinctrl-names = "default";
    199  1.1.1.3  jmcneill 	pinctrl-0 = <&uart1_pg_pins>;
    200      1.1  jmcneill 	status = "okay";
    201      1.1  jmcneill };
    202      1.1  jmcneill 
    203      1.1  jmcneill &usb_otg {
    204      1.1  jmcneill 	dr_mode = "otg";
    205      1.1  jmcneill 	status = "okay";
    206      1.1  jmcneill };
    207      1.1  jmcneill 
    208      1.1  jmcneill &usbphy {
    209  1.1.1.4     skrll 	usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
    210  1.1.1.4     skrll 	usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
    211      1.1  jmcneill 	usb0_vbus-supply = <&reg_usb0_vbus>;
    212      1.1  jmcneill 	usb1_vbus-supply = <&reg_vcc5v0>;
    213      1.1  jmcneill 	status = "okay";
    214      1.1  jmcneill };
    215