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