Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 Luo Yi <luoyi.ly@gmail.com>
0003  *
0004  * Thanks to the original work by Hans de Goede <hdegoede@redhat.com>
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 "sun7i-a20.dtsi"
0047 #include "sunxi-common-regulators.dtsi"
0048 #include <dt-bindings/gpio/gpio.h>
0049 #include <dt-bindings/interrupt-controller/arm-gic.h>
0050 
0051 / {
0052         model = "Banana Pi BPI-M1-Plus";
0053         compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
0054 
0055         aliases {
0056                 serial0 = &uart0;
0057         };
0058 
0059         chosen {
0060                 stdout-path = "serial0:115200n8";
0061         };
0062 
0063         hdmi-connector {
0064                 compatible = "hdmi-connector";
0065                 type = "a";
0066 
0067                 port {
0068                         hdmi_con_in: endpoint {
0069                                 remote-endpoint = <&hdmi_out_con>;
0070                         };
0071                 };
0072         };
0073 
0074         leds {
0075                 compatible = "gpio-leds";
0076 
0077                 led-0 {
0078                         label = "bananapi-m1-plus:green:usr";
0079                         gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
0080                 };
0081 
0082                 led-1 {
0083                         label = "bananapi-m1-plus:pwr:usr";
0084                         gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>;
0085                         default-state = "on";
0086                 };
0087         };
0088 
0089         mmc3_pwrseq: mmc3_pwrseq {
0090                 compatible = "mmc-pwrseq-simple";
0091                 reset-gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 WL-PMU-EN */
0092         };
0093 
0094         reg_gmac_3v3: gmac-3v3 {
0095                 compatible = "regulator-fixed";
0096                 regulator-name = "gmac-3v3";
0097                 regulator-min-microvolt = <3300000>;
0098                 regulator-max-microvolt = <3300000>;
0099                 startup-delay-us = <100000>;
0100                 enable-active-high;
0101                 gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
0102         };
0103 };
0104 
0105 &ahci {
0106         status = "okay";
0107 };
0108 
0109 &codec {
0110         status = "okay";
0111 };
0112 
0113 &cpu0 {
0114         cpu-supply = <&reg_dcdc2>;
0115 };
0116 
0117 &de {
0118         status = "okay";
0119 };
0120 
0121 &ehci0 {
0122         status = "okay";
0123 };
0124 
0125 &ehci1 {
0126         status = "okay";
0127 };
0128 
0129 &gmac {
0130         pinctrl-names = "default";
0131         pinctrl-0 = <&gmac_rgmii_pins>;
0132         phy-handle = <&phy1>;
0133         phy-mode = "rgmii-id";
0134         phy-supply = <&reg_gmac_3v3>;
0135         status = "okay";
0136 };
0137 
0138 &hdmi {
0139         status = "okay";
0140 };
0141 
0142 &hdmi_out {
0143         hdmi_out_con: endpoint {
0144                 remote-endpoint = <&hdmi_con_in>;
0145         };
0146 };
0147 
0148 &i2c0 {
0149         status = "okay";
0150 
0151         axp209: pmic@34 {
0152                 reg = <0x34>;
0153                 interrupt-parent = <&nmi_intc>;
0154                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0155         };
0156 };
0157 
0158 #include "axp209.dtsi"
0159 
0160 &ac_power_supply {
0161         status = "okay";
0162 };
0163 
0164 &ir0 {
0165         pinctrl-names = "default";
0166         pinctrl-0 = <&ir0_rx_pin>;
0167         status = "okay";
0168 };
0169 
0170 &gmac_mdio {
0171         phy1: ethernet-phy@1 {
0172                 reg = <1>;
0173         };
0174 };
0175 
0176 &mmc0 {
0177         vmmc-supply = <&reg_vcc3v3>;
0178         bus-width = <4>;
0179         cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
0180         status = "okay";
0181 };
0182 
0183 &mmc3 {
0184         #address-cells = <1>;
0185         #size-cells = <0>;
0186         vmmc-supply = <&reg_vcc3v3>;
0187         mmc-pwrseq = <&mmc3_pwrseq>;
0188         bus-width = <4>;
0189         non-removable;
0190         wakeup-source;
0191         status = "okay";
0192 
0193         brcmf: wifi@1 {
0194                 reg = <1>;
0195                 compatible = "brcm,bcm4329-fmac";
0196                 interrupt-parent = <&pio>;
0197                 interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
0198                 interrupt-names = "host-wake";
0199         };
0200 };
0201 
0202 &ohci0 {
0203         status = "okay";
0204 };
0205 
0206 &ohci1 {
0207         status = "okay";
0208 };
0209 
0210 &otg_sram {
0211         status = "okay";
0212 };
0213 
0214 &reg_dcdc2 {
0215         regulator-always-on;
0216         regulator-min-microvolt = <1000000>;
0217         regulator-max-microvolt = <1400000>;
0218         regulator-name = "vdd-cpu";
0219 };
0220 
0221 &reg_dcdc3 {
0222         regulator-always-on;
0223         regulator-min-microvolt = <1000000>;
0224         regulator-max-microvolt = <1400000>;
0225         regulator-name = "vdd-int-dll";
0226 };
0227 
0228 &reg_ldo1 {
0229         regulator-name = "vdd-rtc";
0230 };
0231 
0232 &reg_ldo2 {
0233         regulator-always-on;
0234         regulator-min-microvolt = <3000000>;
0235         regulator-max-microvolt = <3000000>;
0236         regulator-name = "avcc";
0237 };
0238 
0239 &reg_usb0_vbus {
0240         status = "okay";
0241 };
0242 
0243 &uart0 {
0244         pinctrl-names = "default";
0245         pinctrl-0 = <&uart0_pb_pins>;
0246         status = "okay";
0247 };
0248 
0249 &usb_otg {
0250         dr_mode = "otg";
0251         status = "okay";
0252 };
0253 
0254 &usb_power_supply {
0255         status = "okay";
0256 };
0257 
0258 &usbphy {
0259         usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
0260         usb0_vbus_power-supply = <&usb_power_supply>;
0261         usb0_vbus-supply = <&reg_usb0_vbus>;
0262         /* VBUS on usb host ports are tied to DC5V and therefore always on */
0263         status = "okay";
0264 };