Linux Audio

Check our new training course

Loading...
Note: File does not exist in v4.10.11.
  1/*
  2 * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
  3 * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
  4 *
  5 * This file is dual-licensed: you can use it either under the terms
  6 * of the GPL or the X11 license, at your option. Note that this dual
  7 * licensing only applies to this file, and not this project as a
  8 * whole.
  9 *
 10 *  a) This file is free software; you can redistribute it and/or
 11 *     modify it under the terms of the GNU General Public License as
 12 *     published by the Free Software Foundation; either version 2 of the
 13 *     License, or (at your option) any later version.
 14 *
 15 *     This file is distributed in the hope that it will be useful,
 16 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 17 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 18 *     GNU General Public License for more details.
 19 *
 20 * Or, alternatively,
 21 *
 22 *  b) Permission is hereby granted, free of charge, to any person
 23 *     obtaining a copy of this software and associated documentation
 24 *     files (the "Software"), to deal in the Software without
 25 *     restriction, including without limitation the rights to use,
 26 *     copy, modify, merge, publish, distribute, sublicense, and/or
 27 *     sell copies of the Software, and to permit persons to whom the
 28 *     Software is furnished to do so, subject to the following
 29 *     conditions:
 30 *
 31 *     The above copyright notice and this permission notice shall be
 32 *     included in all copies or substantial portions of the Software.
 33 *
 34 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 35 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 36 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 37 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 38 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 39 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 40 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 41 *     OTHER DEALINGS IN THE SOFTWARE.
 42 */
 43
 44/dts-v1/;
 45#include "sun8i-r40.dtsi"
 46
 47#include <dt-bindings/gpio/gpio.h>
 48
 49/ {
 50	model = "Banana Pi BPI-M2-Ultra";
 51	compatible = "sinovoip,bpi-m2-ultra", "allwinner,sun8i-r40";
 52
 53	aliases {
 54		serial0 = &uart0;
 55	};
 56
 57	chosen {
 58		stdout-path = "serial0:115200n8";
 59	};
 60
 61	leds {
 62		compatible = "gpio-leds";
 63
 64		pwr-led {
 65			label = "bananapi:red:pwr";
 66			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
 67			default-state = "on";
 68		};
 69
 70		user-led-green {
 71			label = "bananapi:green:user";
 72			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
 73		};
 74
 75		user-led-blue {
 76			label = "bananapi:blue:user";
 77			gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>;
 78		};
 79	};
 80
 81	reg_vcc5v0: vcc5v0 {
 82		compatible = "regulator-fixed";
 83		regulator-name = "vcc5v0";
 84		regulator-min-microvolt = <5000000>;
 85		regulator-max-microvolt = <5000000>;
 86		gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
 87		enable-active-high;
 88	};
 89
 90	wifi_pwrseq: wifi_pwrseq {
 91		compatible = "mmc-pwrseq-simple";
 92		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
 93	};
 94};
 95
 96&ehci1 {
 97	status = "okay";
 98};
 99
100&ehci2 {
101	status = "okay";
102};
103
104&i2c0 {
105	status = "okay";
106
107	axp22x: pmic@34 {
108		compatible = "x-powers,axp221";
109		reg = <0x34>;
110		interrupt-parent = <&nmi_intc>;
111		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
112	};
113};
114
115#include "axp22x.dtsi"
116
117&reg_aldo3 {
118	regulator-always-on;
119	regulator-min-microvolt = <2700000>;
120	regulator-max-microvolt = <3300000>;
121	regulator-name = "avcc";
122};
123
124&reg_dcdc1 {
125	regulator-always-on;
126	regulator-min-microvolt = <3000000>;
127	regulator-max-microvolt = <3000000>;
128	regulator-name = "vcc-3v0";
129};
130
131&reg_dcdc2 {
132	regulator-always-on;
133	regulator-min-microvolt = <1000000>;
134	regulator-max-microvolt = <1300000>;
135	regulator-name = "vdd-cpu";
136};
137
138&reg_dcdc3 {
139	regulator-always-on;
140	regulator-min-microvolt = <1000000>;
141	regulator-max-microvolt = <1300000>;
142	regulator-name = "vdd-sys";
143};
144
145&reg_dcdc5 {
146	regulator-always-on;
147	regulator-min-microvolt = <1500000>;
148	regulator-max-microvolt = <1500000>;
149	regulator-name = "vcc-dram";
150};
151
152&reg_dldo1 {
153	regulator-min-microvolt = <1800000>;
154	regulator-max-microvolt = <3300000>;
155	regulator-name = "vcc-wifi-io";
156};
157
158&reg_dldo2 {
159	regulator-min-microvolt = <3300000>;
160	regulator-max-microvolt = <3300000>;
161	regulator-name = "vcc-wifi";
162};
163
164&mmc0 {
165	vmmc-supply = <&reg_dcdc1>;
166	bus-width = <4>;
167	cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
168	status = "okay";
169};
170
171&mmc1 {
172	pinctrl-names = "default";
173	pinctrl-0 = <&mmc1_pg_pins>;
174	vmmc-supply = <&reg_dldo2>;
175	vqmmc-supply = <&reg_dldo1>;
176	mmc-pwrseq = <&wifi_pwrseq>;
177	bus-width = <4>;
178	non-removable;
179	status = "okay";
180};
181
182&mmc2 {
183	vmmc-supply = <&reg_dcdc1>;
184	vqmmc-supply = <&reg_dcdc1>;
185	bus-width = <8>;
186	non-removable;
187	status = "okay";
188};
189
190&ohci1 {
191	status = "okay";
192};
193
194&ohci2 {
195	status = "okay";
196};
197
198&uart0 {
199	pinctrl-names = "default";
200	pinctrl-0 = <&uart0_pb_pins>;
201	status = "okay";
202};
203
204&usbphy {
205	usb1_vbus-supply = <&reg_vcc5v0>;
206	usb2_vbus-supply = <&reg_vcc5v0>;
207	status = "okay";
208};