1 /* 2 * Copyright (C) 2017 Icenowy Zheng <icenowy@ao 3 * 4 * This file is dual-licensed: you can use it 5 * of the GPL or the X11 license, at your opti 6 * licensing only applies to this file, and no 7 * whole. 8 * 9 * a) This file is free software; you can red 10 * modify it under the terms of the GNU Ge 11 * published by the Free Software Foundati 12 * License, or (at your option) any later 13 * 14 * This file is distributed in the hope th 15 * but WITHOUT ANY WARRANTY; without even 16 * MERCHANTABILITY or FITNESS FOR A PARTIC 17 * GNU General Public License for more det 18 * 19 * Or, alternatively, 20 * 21 * b) Permission is hereby granted, free of c 22 * obtaining a copy of this software and a 23 * files (the "Software"), to deal in the 24 * restriction, including without limitati 25 * copy, modify, merge, publish, distribut 26 * sell copies of the Software, and to per 27 * Software is furnished to do so, subject 28 * conditions: 29 * 30 * The above copyright notice and this per 31 * included in all copies or substantial p 32 * 33 * THE SOFTWARE IS PROVIDED "AS IS", WITHO 34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT L 35 * OF MERCHANTABILITY, FITNESS FOR A PARTI 36 * NONINFRINGEMENT. IN NO EVENT SHALL THE 37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGE 38 * WHETHER IN AN ACTION OF CONTRACT, TORT 39 * FROM, OUT OF OR IN CONNECTION WITH THE 40 * OTHER DEALINGS IN THE SOFTWARE. 41 */ 42 43 /dts-v1/; 44 #include "sun8i-r40.dtsi" 45 #include "sun8i-r40-cpu-opp.dtsi" 46 47 #include <dt-bindings/gpio/gpio.h> 48 49 / { 50 model = "Banana Pi M2 Berry"; 51 compatible = "sinovoip,bpi-m2-berry", 52 53 aliases { 54 ethernet0 = &gmac; 55 serial0 = &uart0; 56 }; 57 58 chosen { 59 stdout-path = "serial0:115200n 60 }; 61 62 connector { 63 compatible = "hdmi-connector"; 64 type = "a"; 65 66 port { 67 hdmi_con_in: endpoint 68 remote-endpoin 69 }; 70 }; 71 }; 72 73 leds { 74 compatible = "gpio-leds"; 75 76 pwr-led { 77 label = "bananapi:red: 78 gpios = <&pio 7 20 GPI 79 default-state = "on"; 80 }; 81 82 user-led { 83 label = "bananapi:gree 84 gpios = <&pio 7 21 GPI 85 }; 86 }; 87 88 reg_vcc5v0: vcc5v0 { 89 compatible = "regulator-fixed" 90 regulator-name = "vcc5v0"; 91 regulator-min-microvolt = <500 92 regulator-max-microvolt = <500 93 gpio = <&pio 7 23 GPIO_ACTIVE_ 94 enable-active-high; 95 }; 96 97 wifi_pwrseq: pwrseq { 98 compatible = "mmc-pwrseq-simpl 99 reset-gpios = <&pio 6 10 GPIO_ 100 clocks = <&ccu CLK_OUTA>; 101 clock-names = "ext_clock"; 102 }; 103 }; 104 105 &ahci { 106 ahci-supply = <®_dldo4>; 107 phy-supply = <®_eldo3>; 108 status = "okay"; 109 }; 110 111 &cpu0 { 112 cpu-supply = <®_dcdc2>; 113 }; 114 115 &de { 116 status = "okay"; 117 }; 118 119 &ehci1 { 120 /* Terminus Tech FE 1.1s 4-port USB 2. 121 status = "okay"; 122 }; 123 124 &gmac { 125 pinctrl-names = "default"; 126 pinctrl-0 = <&gmac_rgmii_pins>; 127 phy-handle = <&phy1>; 128 phy-mode = "rgmii-id"; 129 phy-supply = <®_dc1sw>; 130 status = "okay"; 131 }; 132 133 &gmac_mdio { 134 phy1: ethernet-phy@1 { 135 compatible = "ethernet-phy-iee 136 reg = <1>; 137 }; 138 }; 139 140 &hdmi { 141 status = "okay"; 142 }; 143 144 &hdmi_out { 145 hdmi_out_con: endpoint { 146 remote-endpoint = <&hdmi_con_i 147 }; 148 }; 149 150 &i2c0 { 151 status = "okay"; 152 153 axp22x: pmic@34 { 154 compatible = "x-powers,axp221" 155 reg = <0x34>; 156 interrupt-parent = <&nmi_intc> 157 interrupts = <0 IRQ_TYPE_LEVEL 158 }; 159 }; 160 161 #include "axp22x.dtsi" 162 163 &mmc0 { 164 vmmc-supply = <®_dcdc1>; 165 bus-width = <4>; 166 cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW> 167 status = "okay"; 168 }; 169 170 &mmc1 { 171 pinctrl-names = "default"; 172 pinctrl-0 = <&mmc1_pg_pins>; 173 vmmc-supply = <®_dldo2>; 174 vqmmc-supply = <®_dldo1>; 175 mmc-pwrseq = <&wifi_pwrseq>; 176 bus-width = <4>; 177 non-removable; 178 status = "okay"; 179 }; 180 181 &pio { 182 pinctrl-names = "default"; 183 pinctrl-0 = <&clk_out_a_pin>; 184 vcc-pa-supply = <®_aldo2>; 185 vcc-pc-supply = <®_dcdc1>; 186 vcc-pd-supply = <®_dcdc1>; 187 vcc-pe-supply = <®_eldo1>; 188 vcc-pf-supply = <®_dcdc1>; 189 vcc-pg-supply = <®_dldo1>; 190 }; 191 192 ®_aldo2 { 193 regulator-min-microvolt = <2500000>; 194 regulator-max-microvolt = <2500000>; 195 regulator-name = "vcc-pa"; 196 }; 197 198 ®_aldo3 { 199 regulator-always-on; 200 regulator-min-microvolt = <2700000>; 201 regulator-max-microvolt = <3300000>; 202 regulator-name = "avcc"; 203 }; 204 205 ®_dc1sw { 206 regulator-min-microvolt = <3300000>; 207 regulator-max-microvolt = <3300000>; 208 regulator-name = "vcc-gmac-phy"; 209 }; 210 211 ®_dcdc1 { 212 regulator-always-on; 213 regulator-min-microvolt = <3300000>; 214 regulator-max-microvolt = <3300000>; 215 regulator-name = "vcc-3v3"; 216 }; 217 218 ®_dcdc2 { 219 regulator-always-on; 220 regulator-min-microvolt = <1000000>; 221 regulator-max-microvolt = <1300000>; 222 regulator-name = "vdd-cpu"; 223 }; 224 225 ®_dcdc3 { 226 regulator-always-on; 227 regulator-min-microvolt = <1000000>; 228 regulator-max-microvolt = <1300000>; 229 regulator-name = "vdd-sys"; 230 }; 231 232 ®_dcdc5 { 233 regulator-always-on; 234 regulator-min-microvolt = <1500000>; 235 regulator-max-microvolt = <1500000>; 236 regulator-name = "vcc-dram"; 237 }; 238 239 ®_dldo1 { 240 regulator-min-microvolt = <1800000>; 241 regulator-max-microvolt = <3300000>; 242 regulator-name = "vcc-wifi-io"; 243 }; 244 245 /* 246 * Our WiFi chip needs both DLDO2 and DLDO3 to 247 * time, with the two being in sync, to be abl 248 * consumption during transmits. Since this is 249 * right now, just use the two as always on, a 250 */ 251 252 ®_dldo2 { 253 regulator-always-on; 254 regulator-min-microvolt = <3300000>; 255 regulator-max-microvolt = <3300000>; 256 regulator-name = "vcc-wifi"; 257 }; 258 259 ®_dldo3 { 260 regulator-always-on; 261 regulator-min-microvolt = <3300000>; 262 regulator-max-microvolt = <3300000>; 263 regulator-name = "vcc-wifi-2"; 264 }; 265 266 ®_dldo4 { 267 regulator-min-microvolt = <2500000>; 268 regulator-max-microvolt = <2500000>; 269 regulator-name = "vdd2v5-sata"; 270 }; 271 272 ®_eldo3 { 273 regulator-min-microvolt = <1200000>; 274 regulator-max-microvolt = <1200000>; 275 regulator-name = "vdd1v2-sata"; 276 }; 277 278 &tcon_tv0 { 279 status = "okay"; 280 }; 281 282 &uart0 { 283 pinctrl-names = "default"; 284 pinctrl-0 = <&uart0_pb_pins>; 285 status = "okay"; 286 }; 287 288 &uart3 { 289 pinctrl-names = "default"; 290 pinctrl-0 = <&uart3_pg_pins>, <&uart3_ 291 uart-has-rtscts; 292 status = "okay"; 293 294 bluetooth { 295 compatible = "brcm,bcm43438-bt 296 clocks = <&ccu CLK_OUTA>; 297 clock-names = "lpo"; 298 vbat-supply = <®_dldo2>; 299 vddio-supply = <®_dldo1>; 300 device-wakeup-gpios = <&pio 6 301 /* TODO host wake line connect 302 shutdown-gpios = <&pio 7 12 GP 303 max-speed = <1500000>; 304 }; 305 }; 306 307 &usbphy { 308 usb1_vbus-supply = <®_vcc5v0>; 309 status = "okay"; 310 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.