1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) !! 1 /* 2 // Copyright (c) 2016 ARM Ltd. !! 2 * Copyright (c) 2016 ARM Ltd. >> 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 library 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 library 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 */ 3 42 4 /dts-v1/; 43 /dts-v1/; 5 44 6 #include "sun50i-a64.dtsi" 45 #include "sun50i-a64.dtsi" 7 #include "sun50i-a64-cpu-opp.dtsi" << 8 46 9 #include <dt-bindings/gpio/gpio.h> 47 #include <dt-bindings/gpio/gpio.h> 10 48 11 / { 49 / { 12 model = "BananaPi-M64"; 50 model = "BananaPi-M64"; 13 compatible = "sinovoip,bananapi-m64", 51 compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64"; 14 52 15 aliases { 53 aliases { 16 ethernet0 = &emac; 54 ethernet0 = &emac; 17 serial0 = &uart0; 55 serial0 = &uart0; 18 serial1 = &uart1; 56 serial1 = &uart1; 19 }; 57 }; 20 58 21 chosen { 59 chosen { 22 stdout-path = "serial0:115200n 60 stdout-path = "serial0:115200n8"; 23 }; 61 }; 24 62 25 hdmi-connector { !! 63 wifi_pwrseq: wifi_pwrseq { 26 compatible = "hdmi-connector"; << 27 type = "a"; << 28 << 29 port { << 30 hdmi_con_in: endpoint << 31 remote-endpoin << 32 }; << 33 }; << 34 }; << 35 << 36 leds { << 37 compatible = "gpio-leds"; << 38 << 39 led-0 { << 40 label = "bananapi-m64: << 41 gpios = <&pio 3 24 GPI << 42 default-state = "on"; << 43 }; << 44 << 45 led-1 { << 46 label = "bananapi-m64: << 47 gpios = <&pio 4 14 GPI << 48 }; << 49 << 50 led-2 { << 51 label = "bananapi-m64: << 52 gpios = <&pio 4 15 GPI << 53 }; << 54 }; << 55 << 56 wifi_pwrseq: pwrseq { << 57 compatible = "mmc-pwrseq-simpl 64 compatible = "mmc-pwrseq-simple"; 58 reset-gpios = <&r_pio 0 2 GPIO 65 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 59 clocks = <&rtc CLK_OSC32K_FANO << 60 clock-names = "ext_clock"; << 61 }; 66 }; 62 }; 67 }; 63 68 64 &codec { << 65 status = "okay"; << 66 }; << 67 << 68 &codec_analog { << 69 cpvdd-supply = <®_eldo1>; << 70 status = "okay"; << 71 }; << 72 << 73 &cpu0 { << 74 cpu-supply = <®_dcdc2>; << 75 }; << 76 << 77 &cpu1 { << 78 cpu-supply = <®_dcdc2>; << 79 }; << 80 << 81 &cpu2 { << 82 cpu-supply = <®_dcdc2>; << 83 }; << 84 << 85 &cpu3 { << 86 cpu-supply = <®_dcdc2>; << 87 }; << 88 << 89 &dai { << 90 status = "okay"; << 91 }; << 92 << 93 &de { << 94 status = "okay"; << 95 }; << 96 << 97 &ehci0 { << 98 status = "okay"; << 99 }; << 100 << 101 &ehci1 { 69 &ehci1 { 102 status = "okay"; 70 status = "okay"; 103 }; 71 }; 104 72 105 &emac { 73 &emac { 106 pinctrl-names = "default"; 74 pinctrl-names = "default"; 107 pinctrl-0 = <&rgmii_pins>; 75 pinctrl-0 = <&rgmii_pins>; 108 phy-mode = "rgmii-id"; !! 76 phy-mode = "rgmii"; 109 phy-handle = <&ext_rgmii_phy>; 77 phy-handle = <&ext_rgmii_phy>; 110 phy-supply = <®_dc1sw>; 78 phy-supply = <®_dc1sw>; 111 status = "okay"; 79 status = "okay"; 112 }; 80 }; 113 81 114 &hdmi { << 115 hvcc-supply = <®_dldo1>; << 116 status = "okay"; << 117 }; << 118 << 119 &hdmi_out { << 120 hdmi_out_con: endpoint { << 121 remote-endpoint = <&hdmi_con_i << 122 }; << 123 }; << 124 << 125 &i2c1 { 82 &i2c1 { >> 83 pinctrl-names = "default"; >> 84 pinctrl-0 = <&i2c1_pins>; 126 status = "okay"; 85 status = "okay"; 127 }; 86 }; 128 87 129 &i2c1_pins { 88 &i2c1_pins { 130 bias-pull-up; 89 bias-pull-up; 131 }; 90 }; 132 91 133 &mdio { 92 &mdio { 134 ext_rgmii_phy: ethernet-phy@1 { 93 ext_rgmii_phy: ethernet-phy@1 { 135 compatible = "ethernet-phy-iee 94 compatible = "ethernet-phy-ieee802.3-c22"; 136 reg = <1>; 95 reg = <1>; 137 }; 96 }; 138 }; 97 }; 139 98 140 &mmc0 { 99 &mmc0 { 141 pinctrl-names = "default"; 100 pinctrl-names = "default"; 142 pinctrl-0 = <&mmc0_pins>; 101 pinctrl-0 = <&mmc0_pins>; 143 vmmc-supply = <®_dcdc1>; 102 vmmc-supply = <®_dcdc1>; 144 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; !! 103 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; >> 104 cd-inverted; 145 disable-wp; 105 disable-wp; 146 bus-width = <4>; 106 bus-width = <4>; 147 status = "okay"; 107 status = "okay"; 148 }; 108 }; 149 109 150 &mmc1 { 110 &mmc1 { 151 pinctrl-names = "default"; 111 pinctrl-names = "default"; 152 pinctrl-0 = <&mmc1_pins>; 112 pinctrl-0 = <&mmc1_pins>; 153 vmmc-supply = <®_dldo2>; 113 vmmc-supply = <®_dldo2>; 154 vqmmc-supply = <®_dldo4>; 114 vqmmc-supply = <®_dldo4>; 155 mmc-pwrseq = <&wifi_pwrseq>; 115 mmc-pwrseq = <&wifi_pwrseq>; 156 bus-width = <4>; 116 bus-width = <4>; 157 non-removable; 117 non-removable; 158 status = "okay"; 118 status = "okay"; 159 119 160 brcmf: wifi@1 { 120 brcmf: wifi@1 { 161 reg = <1>; 121 reg = <1>; 162 compatible = "brcm,bcm4329-fma 122 compatible = "brcm,bcm4329-fmac"; 163 interrupt-parent = <&r_pio>; 123 interrupt-parent = <&r_pio>; 164 interrupts = <0 3 IRQ_TYPE_LEV 124 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ 165 interrupt-names = "host-wake"; 125 interrupt-names = "host-wake"; 166 }; 126 }; 167 }; 127 }; 168 128 169 &mmc2 { 129 &mmc2 { 170 pinctrl-names = "default"; 130 pinctrl-names = "default"; 171 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pi !! 131 pinctrl-0 = <&mmc2_pins>; 172 vmmc-supply = <®_dcdc1>; 132 vmmc-supply = <®_dcdc1>; 173 bus-width = <8>; 133 bus-width = <8>; 174 non-removable; 134 non-removable; 175 cap-mmc-hw-reset; 135 cap-mmc-hw-reset; 176 status = "okay"; 136 status = "okay"; 177 }; 137 }; 178 138 179 &ohci0 { << 180 status = "okay"; << 181 }; << 182 << 183 &ohci1 { 139 &ohci1 { 184 status = "okay"; 140 status = "okay"; 185 }; 141 }; 186 142 187 &r_rsb { 143 &r_rsb { 188 status = "okay"; 144 status = "okay"; 189 145 190 axp803: pmic@3a3 { 146 axp803: pmic@3a3 { 191 compatible = "x-powers,axp803" 147 compatible = "x-powers,axp803"; 192 reg = <0x3a3>; 148 reg = <0x3a3>; 193 interrupt-parent = <&r_intc>; 149 interrupt-parent = <&r_intc>; 194 interrupts = <GIC_SPI 32 IRQ_T !! 150 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 195 x-powers,drive-vbus-en; /* set << 196 }; 151 }; 197 }; 152 }; 198 153 199 #include "axp803.dtsi" 154 #include "axp803.dtsi" 200 155 201 &ac_power_supply { << 202 status = "okay"; << 203 }; << 204 << 205 &battery_power_supply { << 206 status = "okay"; << 207 }; << 208 << 209 ®_aldo1 { << 210 /* << 211 * This regulator also drives the PE p << 212 * which also controls two LEDs. << 213 */ << 214 regulator-always-on; << 215 regulator-min-microvolt = <2800000>; << 216 regulator-max-microvolt = <2800000>; << 217 regulator-name = "afvcc-csi"; << 218 }; << 219 << 220 ®_aldo2 { 156 ®_aldo2 { 221 regulator-always-on; 157 regulator-always-on; 222 regulator-min-microvolt = <1800000>; 158 regulator-min-microvolt = <1800000>; 223 regulator-max-microvolt = <3300000>; 159 regulator-max-microvolt = <3300000>; 224 regulator-name = "vcc-pl"; 160 regulator-name = "vcc-pl"; 225 }; 161 }; 226 162 227 ®_aldo3 { 163 ®_aldo3 { 228 regulator-always-on; 164 regulator-always-on; 229 regulator-min-microvolt = <3000000>; 165 regulator-min-microvolt = <3000000>; 230 regulator-max-microvolt = <3000000>; 166 regulator-max-microvolt = <3000000>; 231 regulator-name = "vcc-pll-avcc"; 167 regulator-name = "vcc-pll-avcc"; 232 }; 168 }; 233 169 234 ®_dc1sw { 170 ®_dc1sw { 235 /* << 236 * This regulator also indirectly driv << 237 * which also controls the power LED. << 238 */ << 239 regulator-always-on; << 240 regulator-name = "vcc-phy"; 171 regulator-name = "vcc-phy"; 241 }; 172 }; 242 173 243 ®_dcdc1 { 174 ®_dcdc1 { 244 regulator-always-on; 175 regulator-always-on; 245 regulator-min-microvolt = <3300000>; 176 regulator-min-microvolt = <3300000>; 246 regulator-max-microvolt = <3300000>; 177 regulator-max-microvolt = <3300000>; 247 regulator-name = "vcc-3v3"; 178 regulator-name = "vcc-3v3"; 248 }; 179 }; 249 180 250 ®_dcdc2 { 181 ®_dcdc2 { 251 regulator-always-on; 182 regulator-always-on; 252 regulator-min-microvolt = <1040000>; 183 regulator-min-microvolt = <1040000>; 253 regulator-max-microvolt = <1300000>; 184 regulator-max-microvolt = <1300000>; 254 regulator-name = "vdd-cpux"; 185 regulator-name = "vdd-cpux"; 255 }; 186 }; 256 187 257 /* DCDC3 is polyphased with DCDC2 */ 188 /* DCDC3 is polyphased with DCDC2 */ 258 189 259 ®_dcdc5 { 190 ®_dcdc5 { 260 regulator-always-on; 191 regulator-always-on; 261 regulator-min-microvolt = <1500000>; 192 regulator-min-microvolt = <1500000>; 262 regulator-max-microvolt = <1500000>; 193 regulator-max-microvolt = <1500000>; 263 regulator-name = "vcc-dram"; 194 regulator-name = "vcc-dram"; 264 }; 195 }; 265 196 266 ®_dcdc6 { 197 ®_dcdc6 { 267 regulator-always-on; 198 regulator-always-on; 268 regulator-min-microvolt = <1100000>; 199 regulator-min-microvolt = <1100000>; 269 regulator-max-microvolt = <1100000>; 200 regulator-max-microvolt = <1100000>; 270 regulator-name = "vdd-sys"; 201 regulator-name = "vdd-sys"; 271 }; 202 }; 272 203 273 ®_dldo1 { 204 ®_dldo1 { 274 regulator-min-microvolt = <3300000>; 205 regulator-min-microvolt = <3300000>; 275 regulator-max-microvolt = <3300000>; 206 regulator-max-microvolt = <3300000>; 276 regulator-name = "vcc-hdmi-dsi"; 207 regulator-name = "vcc-hdmi-dsi"; 277 }; 208 }; 278 209 279 ®_dldo2 { 210 ®_dldo2 { 280 regulator-min-microvolt = <3300000>; 211 regulator-min-microvolt = <3300000>; 281 regulator-max-microvolt = <3300000>; 212 regulator-max-microvolt = <3300000>; 282 regulator-name = "vcc-wifi"; 213 regulator-name = "vcc-wifi"; 283 }; 214 }; 284 215 285 ®_dldo4 { 216 ®_dldo4 { 286 regulator-min-microvolt = <1800000>; 217 regulator-min-microvolt = <1800000>; 287 regulator-max-microvolt = <3300000>; 218 regulator-max-microvolt = <3300000>; 288 regulator-name = "vcc-wifi-io"; 219 regulator-name = "vcc-wifi-io"; 289 }; 220 }; 290 221 291 ®_drivevbus { << 292 regulator-name = "usb0-vbus"; << 293 status = "okay"; << 294 }; << 295 << 296 ®_eldo1 { 222 ®_eldo1 { 297 regulator-min-microvolt = <1800000>; 223 regulator-min-microvolt = <1800000>; 298 regulator-max-microvolt = <1800000>; 224 regulator-max-microvolt = <1800000>; 299 regulator-name = "cpvdd"; 225 regulator-name = "cpvdd"; 300 }; 226 }; 301 227 302 ®_fldo1 { 228 ®_fldo1 { 303 regulator-min-microvolt = <1200000>; 229 regulator-min-microvolt = <1200000>; 304 regulator-max-microvolt = <1200000>; 230 regulator-max-microvolt = <1200000>; 305 regulator-name = "vcc-1v2-hsic"; 231 regulator-name = "vcc-1v2-hsic"; 306 }; 232 }; 307 233 308 /* 234 /* 309 * The A64 chip cannot work without this regul 235 * The A64 chip cannot work without this regulator off, although 310 * it seems to be only driving the AR100 core. 236 * it seems to be only driving the AR100 core. 311 * Maybe we don't still know well about CPUs d 237 * Maybe we don't still know well about CPUs domain. 312 */ 238 */ 313 ®_fldo2 { 239 ®_fldo2 { 314 regulator-always-on; 240 regulator-always-on; 315 regulator-min-microvolt = <1100000>; 241 regulator-min-microvolt = <1100000>; 316 regulator-max-microvolt = <1100000>; 242 regulator-max-microvolt = <1100000>; 317 regulator-name = "vdd-cpus"; 243 regulator-name = "vdd-cpus"; 318 }; 244 }; 319 245 320 ®_rtc_ldo { 246 ®_rtc_ldo { 321 regulator-name = "vcc-rtc"; 247 regulator-name = "vcc-rtc"; 322 }; 248 }; 323 249 324 &simplefb_hdmi { << 325 vcc-hdmi-supply = <®_dldo1>; << 326 }; << 327 << 328 &sound { << 329 status = "okay"; << 330 simple-audio-card,widgets = "Headphone << 331 "Microphon << 332 "Microphon << 333 simple-audio-card,routing = << 334 "Left DAC", "DACL", << 335 "Right DAC", "DACR", << 336 "ADCL", "Left ADC", << 337 "ADCR", "Right ADC", << 338 "Headphone Jack", "HP" << 339 "MIC2", "Microphone Ja << 340 "Onboard Microphone", << 341 "MIC1", "Onboard Micro << 342 }; << 343 << 344 &uart0 { 250 &uart0 { 345 pinctrl-names = "default"; 251 pinctrl-names = "default"; 346 pinctrl-0 = <&uart0_pb_pins>; !! 252 pinctrl-0 = <&uart0_pins_a>; 347 status = "okay"; 253 status = "okay"; 348 }; 254 }; 349 255 350 &uart1 { 256 &uart1 { 351 pinctrl-names = "default"; 257 pinctrl-names = "default"; 352 pinctrl-0 = <&uart1_pins>, <&uart1_rts 258 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; 353 uart-has-rtscts; << 354 status = "okay"; << 355 << 356 bluetooth { << 357 compatible = "brcm,bcm43438-bt << 358 clocks = <&rtc CLK_OSC32K_FANO << 359 clock-names = "lpo"; << 360 vbat-supply = <®_dldo2>; << 361 vddio-supply = <®_dldo4>; << 362 device-wakeup-gpios = <&r_pio << 363 host-wakeup-gpios = <&r_pio 0 << 364 shutdown-gpios = <&r_pio 0 4 G << 365 }; << 366 }; << 367 << 368 &usb_otg { << 369 dr_mode = "otg"; << 370 status = "okay"; << 371 }; << 372 << 373 &usb_power_supply { << 374 status = "okay"; 259 status = "okay"; 375 }; 260 }; 376 261 377 &usbphy { 262 &usbphy { 378 usb0_id_det-gpios = <&pio 7 9 GPIO_ACT << 379 usb0_vbus_power-supply = <&usb_power_s << 380 usb0_vbus-supply = <®_drivevbus>; << 381 status = "okay"; 263 status = "okay"; 382 }; 264 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.