Home | History | Annotate | Line # | Download | only in dts
      1      1.1  jmcneill /*
      2      1.1  jmcneill  * Copyright 2016 Quentin Schulz
      3      1.1  jmcneill  *
      4      1.1  jmcneill  * Quentin Schulz <quentin.schulz (at) free-electrons.com>
      5      1.1  jmcneill  *
      6      1.1  jmcneill  * This file is dual-licensed: you can use it either under the terms
      7      1.1  jmcneill  * of the GPL or the X11 license, at your option. Note that this dual
      8      1.1  jmcneill  * licensing only applies to this file, and not this project as a
      9      1.1  jmcneill  * whole.
     10      1.1  jmcneill  *
     11      1.1  jmcneill  *  a) This file is free software; you can redistribute it and/or
     12      1.1  jmcneill  *     modify it under the terms of the GNU General Public License as
     13      1.1  jmcneill  *     published by the Free Software Foundation; either version 2 of the
     14      1.1  jmcneill  *     License, or (at your option) any later version.
     15      1.1  jmcneill  *
     16      1.1  jmcneill  *     This file is distributed in the hope that it will be useful,
     17      1.1  jmcneill  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
     18      1.1  jmcneill  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     19      1.1  jmcneill  *     GNU General Public License for more details.
     20      1.1  jmcneill  *
     21      1.1  jmcneill  * Or, alternatively,
     22      1.1  jmcneill  *
     23      1.1  jmcneill  *  b) Permission is hereby granted, free of charge, to any person
     24      1.1  jmcneill  *     obtaining a copy of this software and associated documentation
     25      1.1  jmcneill  *     files (the "Software"), to deal in the Software without
     26      1.1  jmcneill  *     restriction, including without limitation the rights to use,
     27      1.1  jmcneill  *     copy, modify, merge, publish, distribute, sublicense, and/or
     28      1.1  jmcneill  *     sell copies of the Software, and to permit persons to whom the
     29      1.1  jmcneill  *     Software is furnished to do so, subject to the following
     30      1.1  jmcneill  *     conditions:
     31      1.1  jmcneill  *
     32      1.1  jmcneill  *     The above copyright notice and this permission notice shall be
     33      1.1  jmcneill  *     included in all copies or substantial portions of the Software.
     34      1.1  jmcneill  *
     35      1.1  jmcneill  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     36      1.1  jmcneill  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
     37      1.1  jmcneill  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     38      1.1  jmcneill  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
     39      1.1  jmcneill  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
     40      1.1  jmcneill  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     41      1.1  jmcneill  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     42      1.1  jmcneill  *     OTHER DEALINGS IN THE SOFTWARE.
     43      1.1  jmcneill  */
     44      1.1  jmcneill 
     45      1.1  jmcneill /dts-v1/;
     46      1.1  jmcneill #include "sun8i-a33.dtsi"
     47      1.1  jmcneill #include "sunxi-common-regulators.dtsi"
     48      1.1  jmcneill 
     49      1.1  jmcneill #include <dt-bindings/gpio/gpio.h>
     50      1.1  jmcneill #include <dt-bindings/input/input.h>
     51      1.1  jmcneill 
     52      1.1  jmcneill / {
     53      1.1  jmcneill 	model = "Allwinner R16 EVB (Parrot)";
     54      1.1  jmcneill 	compatible = "allwinner,parrot", "allwinner,sun8i-a33";
     55      1.1  jmcneill 
     56      1.1  jmcneill 	aliases {
     57      1.1  jmcneill 		serial0 = &uart0;
     58      1.1  jmcneill 	};
     59      1.1  jmcneill 
     60      1.1  jmcneill 	chosen {
     61      1.1  jmcneill 		stdout-path = "serial0:115200n8";
     62      1.1  jmcneill 	};
     63      1.1  jmcneill 
     64      1.1  jmcneill 	leds {
     65      1.1  jmcneill 		compatible = "gpio-leds";
     66      1.1  jmcneill 
     67  1.1.1.4  jmcneill 		led-1 {
     68      1.1  jmcneill 			label = "parrot:led1:usr";
     69  1.1.1.4  jmcneill 			gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
     70      1.1  jmcneill 		};
     71      1.1  jmcneill 
     72  1.1.1.4  jmcneill 		led-2 {
     73      1.1  jmcneill 			label = "parrot:led2:usr";
     74  1.1.1.4  jmcneill 			gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
     75      1.1  jmcneill 		};
     76      1.1  jmcneill 	};
     77      1.1  jmcneill 
     78      1.1  jmcneill 	wifi_pwrseq: wifi_pwrseq {
     79      1.1  jmcneill 		compatible = "mmc-pwrseq-simple";
     80      1.1  jmcneill 		reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
     81      1.1  jmcneill 	};
     82      1.1  jmcneill 
     83      1.1  jmcneill };
     84      1.1  jmcneill 
     85      1.1  jmcneill &codec {
     86      1.1  jmcneill 	status = "okay";
     87      1.1  jmcneill };
     88      1.1  jmcneill 
     89      1.1  jmcneill &dai {
     90      1.1  jmcneill 	status = "okay";
     91      1.1  jmcneill };
     92      1.1  jmcneill 
     93      1.1  jmcneill &ehci0 {
     94      1.1  jmcneill 	status = "okay";
     95      1.1  jmcneill };
     96      1.1  jmcneill 
     97      1.1  jmcneill &i2c1 {
     98      1.1  jmcneill 	status = "okay";
     99      1.1  jmcneill 
    100      1.1  jmcneill 	/*
    101      1.1  jmcneill 	 * FIXME: An as-yet-unknown accelerometer is connected to this
    102      1.1  jmcneill 	 * i2c bus.
    103      1.1  jmcneill 	 */
    104      1.1  jmcneill };
    105      1.1  jmcneill 
    106      1.1  jmcneill &lradc {
    107      1.1  jmcneill 	vref-supply = <&reg_aldo3>;
    108      1.1  jmcneill 	status = "okay";
    109      1.1  jmcneill 
    110  1.1.1.2  jmcneill 	button-190 {
    111      1.1  jmcneill 		label = "V+";
    112      1.1  jmcneill 		linux,code = <KEY_VOLUMEUP>;
    113      1.1  jmcneill 		channel = <0>;
    114      1.1  jmcneill 		voltage = <190000>;
    115      1.1  jmcneill 	};
    116      1.1  jmcneill 
    117  1.1.1.2  jmcneill 	button-390 {
    118      1.1  jmcneill 		label = "V-";
    119      1.1  jmcneill 		linux,code = <KEY_VOLUMEDOWN>;
    120      1.1  jmcneill 		channel = <0>;
    121      1.1  jmcneill 		voltage = <390000>;
    122      1.1  jmcneill 	};
    123      1.1  jmcneill 
    124      1.1  jmcneill };
    125      1.1  jmcneill 
    126      1.1  jmcneill &mmc0 {
    127      1.1  jmcneill 	vmmc-supply = <&reg_dcdc1>;
    128      1.1  jmcneill 	cd-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
    129      1.1  jmcneill 	bus-width = <4>;
    130      1.1  jmcneill 	status = "okay";
    131      1.1  jmcneill };
    132      1.1  jmcneill 
    133      1.1  jmcneill &mmc1 {
    134      1.1  jmcneill 	pinctrl-names = "default";
    135  1.1.1.2  jmcneill 	pinctrl-0 = <&mmc1_pg_pins>;
    136      1.1  jmcneill 	vmmc-supply = <&reg_aldo1>;
    137      1.1  jmcneill 	mmc-pwrseq = <&wifi_pwrseq>;
    138      1.1  jmcneill 	bus-width = <4>;
    139      1.1  jmcneill 	non-removable;
    140      1.1  jmcneill 	status = "okay";
    141      1.1  jmcneill };
    142      1.1  jmcneill 
    143      1.1  jmcneill &mmc2 {
    144      1.1  jmcneill 	pinctrl-names = "default";
    145      1.1  jmcneill 	pinctrl-0 = <&mmc2_8bit_pins>;
    146      1.1  jmcneill 	vmmc-supply = <&reg_dcdc1>;
    147      1.1  jmcneill 	bus-width = <8>;
    148      1.1  jmcneill 	non-removable;
    149      1.1  jmcneill 	cap-mmc-hw-reset;
    150      1.1  jmcneill 	status = "okay";
    151      1.1  jmcneill };
    152      1.1  jmcneill 
    153      1.1  jmcneill &mmc2_8bit_pins {
    154      1.1  jmcneill 	drive-strength = <40>;
    155      1.1  jmcneill };
    156      1.1  jmcneill 
    157      1.1  jmcneill &ohci0 {
    158      1.1  jmcneill 	status = "okay";
    159      1.1  jmcneill };
    160      1.1  jmcneill 
    161      1.1  jmcneill &r_rsb {
    162      1.1  jmcneill 	status = "okay";
    163      1.1  jmcneill 
    164      1.1  jmcneill 	axp22x: pmic@3a3 {
    165      1.1  jmcneill 		compatible = "x-powers,axp223";
    166      1.1  jmcneill 		reg = <0x3a3>;
    167  1.1.1.4  jmcneill 		interrupt-parent = <&r_intc>;
    168  1.1.1.4  jmcneill 		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
    169      1.1  jmcneill 		drivevbus-supply = <&reg_vcc5v0>;
    170      1.1  jmcneill 		x-powers,drive-vbus-en;
    171      1.1  jmcneill 	};
    172      1.1  jmcneill };
    173      1.1  jmcneill 
    174      1.1  jmcneill #include "axp223.dtsi"
    175      1.1  jmcneill 
    176      1.1  jmcneill &reg_aldo1 {
    177      1.1  jmcneill 	regulator-always-on;
    178      1.1  jmcneill 	regulator-min-microvolt = <3000000>;
    179      1.1  jmcneill 	regulator-max-microvolt = <3000000>;
    180      1.1  jmcneill 	regulator-name = "vcc-io";
    181      1.1  jmcneill };
    182      1.1  jmcneill 
    183      1.1  jmcneill &reg_aldo2 {
    184      1.1  jmcneill 	regulator-always-on;
    185      1.1  jmcneill 	regulator-min-microvolt = <2350000>;
    186      1.1  jmcneill 	regulator-max-microvolt = <2650000>;
    187      1.1  jmcneill 	regulator-name = "vdd-dll";
    188      1.1  jmcneill };
    189      1.1  jmcneill 
    190      1.1  jmcneill &reg_aldo3 {
    191      1.1  jmcneill 	regulator-always-on;
    192      1.1  jmcneill 	regulator-min-microvolt = <2700000>;
    193      1.1  jmcneill 	regulator-max-microvolt = <3300000>;
    194      1.1  jmcneill 	regulator-name = "vcc-pll-avcc";
    195      1.1  jmcneill };
    196      1.1  jmcneill 
    197      1.1  jmcneill &reg_dc5ldo {
    198      1.1  jmcneill 	regulator-always-on;
    199      1.1  jmcneill 	regulator-min-microvolt = <900000>;
    200      1.1  jmcneill 	regulator-max-microvolt = <1400000>;
    201      1.1  jmcneill 	regulator-name = "vdd-cpus";
    202      1.1  jmcneill };
    203      1.1  jmcneill 
    204      1.1  jmcneill &reg_dcdc1 {
    205      1.1  jmcneill 	regulator-always-on;
    206      1.1  jmcneill 	regulator-min-microvolt = <3000000>;
    207      1.1  jmcneill 	regulator-max-microvolt = <3000000>;
    208      1.1  jmcneill 	regulator-name = "vcc-3v0";
    209      1.1  jmcneill };
    210      1.1  jmcneill 
    211      1.1  jmcneill &reg_dcdc2 {
    212      1.1  jmcneill 	regulator-always-on;
    213      1.1  jmcneill 	regulator-min-microvolt = <900000>;
    214      1.1  jmcneill 	regulator-max-microvolt = <1400000>;
    215      1.1  jmcneill 	regulator-name = "vdd-sys";
    216      1.1  jmcneill };
    217      1.1  jmcneill 
    218      1.1  jmcneill &reg_dcdc3 {
    219      1.1  jmcneill 	regulator-always-on;
    220      1.1  jmcneill 	regulator-min-microvolt = <900000>;
    221      1.1  jmcneill 	regulator-max-microvolt = <1400000>;
    222      1.1  jmcneill 	regulator-name = "vdd-cpu";
    223      1.1  jmcneill };
    224      1.1  jmcneill 
    225      1.1  jmcneill &reg_dcdc5 {
    226      1.1  jmcneill 	regulator-always-on;
    227      1.1  jmcneill 	regulator-min-microvolt = <1500000>;
    228      1.1  jmcneill 	regulator-max-microvolt = <1500000>;
    229      1.1  jmcneill 	regulator-name = "vcc-dram";
    230      1.1  jmcneill };
    231      1.1  jmcneill 
    232      1.1  jmcneill &reg_dldo1 {
    233      1.1  jmcneill 	/*
    234      1.1  jmcneill 	 * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
    235      1.1  jmcneill 	 * Remove next line once it is possible to sync two regulators.
    236      1.1  jmcneill 	 */
    237      1.1  jmcneill 	regulator-always-on;
    238      1.1  jmcneill 	regulator-min-microvolt = <3300000>;
    239      1.1  jmcneill 	regulator-max-microvolt = <3300000>;
    240      1.1  jmcneill 	regulator-name = "vcc-wifi0";
    241      1.1  jmcneill };
    242      1.1  jmcneill 
    243      1.1  jmcneill &reg_dldo2 {
    244      1.1  jmcneill 	/*
    245      1.1  jmcneill 	 * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
    246      1.1  jmcneill 	 * Remove next line once it is possible to sync two regulators.
    247      1.1  jmcneill 	 */
    248      1.1  jmcneill 	regulator-always-on;
    249      1.1  jmcneill 	regulator-min-microvolt = <3300000>;
    250      1.1  jmcneill 	regulator-max-microvolt = <3300000>;
    251      1.1  jmcneill 	regulator-name = "vcc-wifi1";
    252      1.1  jmcneill };
    253      1.1  jmcneill 
    254      1.1  jmcneill &reg_dldo3 {
    255      1.1  jmcneill 	regulator-min-microvolt = <3000000>;
    256      1.1  jmcneill 	regulator-max-microvolt = <3000000>;
    257      1.1  jmcneill 	regulator-name = "vcc-3v0-csi";
    258      1.1  jmcneill };
    259      1.1  jmcneill 
    260      1.1  jmcneill &reg_drivevbus {
    261      1.1  jmcneill 	regulator-name = "usb0-vbus";
    262      1.1  jmcneill 	status = "okay";
    263      1.1  jmcneill };
    264      1.1  jmcneill 
    265      1.1  jmcneill &reg_eldo1 {
    266      1.1  jmcneill 	regulator-min-microvolt = <1200000>;
    267      1.1  jmcneill 	regulator-max-microvolt = <1200000>;
    268      1.1  jmcneill 	regulator-name = "vcc-1v2-hsic";
    269      1.1  jmcneill };
    270      1.1  jmcneill 
    271      1.1  jmcneill &reg_eldo2 {
    272      1.1  jmcneill 	regulator-min-microvolt = <3000000>;
    273      1.1  jmcneill 	regulator-max-microvolt = <3000000>;
    274      1.1  jmcneill 	regulator-name = "vcc-dsp";
    275      1.1  jmcneill };
    276      1.1  jmcneill 
    277      1.1  jmcneill &reg_eldo3 {
    278      1.1  jmcneill 	regulator-min-microvolt = <3000000>;
    279      1.1  jmcneill 	regulator-max-microvolt = <3000000>;
    280      1.1  jmcneill 	regulator-name = "eldo3";
    281      1.1  jmcneill };
    282      1.1  jmcneill 
    283      1.1  jmcneill &reg_usb1_vbus {
    284      1.1  jmcneill 	gpio = <&pio 3 12 GPIO_ACTIVE_HIGH>; /* PD12 */
    285      1.1  jmcneill 	status = "okay";
    286      1.1  jmcneill };
    287      1.1  jmcneill 
    288      1.1  jmcneill &sound {
    289      1.1  jmcneill 	status = "okay";
    290      1.1  jmcneill };
    291      1.1  jmcneill 
    292      1.1  jmcneill &uart0 {
    293      1.1  jmcneill 	pinctrl-names = "default";
    294  1.1.1.2  jmcneill 	pinctrl-0 = <&uart0_pb_pins>;
    295      1.1  jmcneill 	status = "okay";
    296      1.1  jmcneill };
    297      1.1  jmcneill 
    298      1.1  jmcneill &usb_otg {
    299      1.1  jmcneill 	dr_mode = "otg";
    300      1.1  jmcneill 	status = "okay";
    301      1.1  jmcneill };
    302      1.1  jmcneill 
    303      1.1  jmcneill &usb_power_supply {
    304      1.1  jmcneill 	status = "okay";
    305      1.1  jmcneill };
    306      1.1  jmcneill 
    307      1.1  jmcneill &usbphy {
    308      1.1  jmcneill 	status = "okay";
    309      1.1  jmcneill 	usb0_vbus-supply = <&reg_drivevbus>;
    310  1.1.1.3     skrll 	usb0_id_det-gpios = <&pio 3 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PD10 */
    311      1.1  jmcneill 	usb0_vbus_power-supply = <&usb_power_supply>;
    312      1.1  jmcneill 	usb1_vbus-supply = <&reg_usb1_vbus>;
    313      1.1  jmcneill };
    314