Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
0003  *
0004  * This file is dual-licensed: you can use it either under the terms
0005  * of the GPL or the X11 license, at your option. Note that this dual
0006  * licensing only applies to this file, and not this project as a
0007  * whole.
0008  *
0009  *  a) This file is free software; you can redistribute it and/or
0010  *     modify it under the terms of the GNU General Public License as
0011  *     published by the Free Software Foundation; either version 2 of the
0012  *     License, or (at your option) any later version.
0013  *
0014  *     This file is distributed in the hope that it will be useful,
0015  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *     GNU General Public License for more details.
0018  *
0019  * Or, alternatively,
0020  *
0021  *  b) Permission is hereby granted, free of charge, to any person
0022  *     obtaining a copy of this software and associated documentation
0023  *     files (the "Software"), to deal in the Software without
0024  *     restriction, including without limitation the rights to use,
0025  *     copy, modify, merge, publish, distribute, sublicense, and/or
0026  *     sell copies of the Software, and to permit persons to whom the
0027  *     Software is furnished to do so, subject to the following
0028  *     conditions:
0029  *
0030  *     The above copyright notice and this permission notice shall be
0031  *     included in all copies or substantial portions of the Software.
0032  *
0033  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040  *     OTHER DEALINGS IN THE SOFTWARE.
0041  */
0042 
0043 /dts-v1/;
0044 #include "sun7i-a20.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046 #include <dt-bindings/gpio/gpio.h>
0047 #include <dt-bindings/interrupt-controller/arm-gic.h>
0048 
0049 / {
0050         model = "LeMaker Banana Pro";
0051         compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
0052 
0053         aliases {
0054                 serial0 = &uart0;
0055                 serial1 = &uart4;
0056                 serial2 = &uart7;
0057         };
0058 
0059         chosen {
0060                 stdout-path = "serial0:115200n8";
0061         };
0062 
0063         leds {
0064                 compatible = "gpio-leds";
0065 
0066                 led-0 {
0067                         label = "bananapro:blue:usr";
0068                         gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
0069                 };
0070 
0071                 led-1 {
0072                         label = "bananapro:green:usr";
0073                         gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
0074                 };
0075         };
0076 
0077         wifi_pwrseq: wifi-pwrseq {
0078                 compatible = "mmc-pwrseq-simple";
0079                 reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>;
0080         };
0081 
0082         reg_gmac_3v3: gmac-3v3 {
0083                 compatible = "regulator-fixed";
0084                 regulator-name = "gmac-3v3";
0085                 regulator-min-microvolt = <3300000>;
0086                 regulator-max-microvolt = <3300000>;
0087                 startup-delay-us = <100000>;
0088                 enable-active-high;
0089                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
0090         };
0091 };
0092 
0093 &ahci {
0094         status = "okay";
0095 };
0096 
0097 &codec {
0098         status = "okay";
0099 };
0100 
0101 &ehci0 {
0102         status = "okay";
0103 };
0104 
0105 &ehci1 {
0106         status = "okay";
0107 };
0108 
0109 &gmac {
0110         pinctrl-names = "default";
0111         pinctrl-0 = <&gmac_rgmii_pins>;
0112         phy-handle = <&phy1>;
0113         phy-mode = "rgmii-id";
0114         phy-supply = <&reg_gmac_3v3>;
0115         status = "okay";
0116 };
0117 
0118 &i2c0 {
0119         status = "okay";
0120 
0121         axp209: pmic@34 {
0122                 compatible = "x-powers,axp209";
0123                 reg = <0x34>;
0124                 interrupt-parent = <&nmi_intc>;
0125                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0126 
0127                 interrupt-controller;
0128                 #interrupt-cells = <1>;
0129         };
0130 };
0131 
0132 &i2c2 {
0133         status = "okay";
0134 };
0135 
0136 &ir0 {
0137         pinctrl-names = "default";
0138         pinctrl-0 = <&ir0_rx_pin>;
0139         status = "okay";
0140 };
0141 
0142 &gmac_mdio {
0143         phy1: ethernet-phy@1 {
0144                 reg = <1>;
0145         };
0146 };
0147 
0148 &mmc0 {
0149         vmmc-supply = <&reg_vcc3v3>;
0150         bus-width = <4>;
0151         cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
0152         status = "okay";
0153 };
0154 
0155 &mmc3 {
0156         vmmc-supply = <&reg_vcc3v3>;
0157         mmc-pwrseq = <&wifi_pwrseq>;
0158         bus-width = <4>;
0159         non-removable;
0160         status = "okay";
0161 
0162         brcmf: wifi@1 {
0163                 reg = <1>;
0164                 compatible = "brcm,bcm4329-fmac";
0165                 interrupt-parent = <&pio>;
0166                 interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
0167                 interrupt-names = "host-wake";
0168         };
0169 };
0170 
0171 &ohci0 {
0172         status = "okay";
0173 };
0174 
0175 &ohci1 {
0176         status = "okay";
0177 };
0178 
0179 &reg_usb1_vbus {
0180         gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
0181         status = "okay";
0182 };
0183 
0184 &reg_usb2_vbus {
0185         gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
0186         status = "okay";
0187 };
0188 
0189 &spi0 {
0190         pinctrl-names = "default";
0191         pinctrl-0 = <&spi0_pi_pins>,
0192                     <&spi0_cs0_pi_pin>,
0193                     <&spi0_cs1_pi_pin>;
0194         status = "okay";
0195 };
0196 
0197 &uart0 {
0198         pinctrl-names = "default";
0199         pinctrl-0 = <&uart0_pb_pins>;
0200         status = "okay";
0201 };
0202 
0203 &uart4 {
0204         pinctrl-names = "default";
0205         pinctrl-0 = <&uart4_ph_pins>;
0206         status = "okay";
0207 };
0208 
0209 &uart7 {
0210         pinctrl-names = "default";
0211         pinctrl-0 = <&uart7_pi_pins>;
0212         status = "okay";
0213 };
0214 
0215 &usbphy {
0216         usb1_vbus-supply = <&reg_usb1_vbus>;
0217         usb2_vbus-supply = <&reg_usb2_vbus>;
0218         status = "okay";
0219 };