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