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