Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (c) 2016 ARM Ltd.
0003 
0004 /dts-v1/;
0005 
0006 #include "sun50i-a64.dtsi"
0007 #include "sun50i-a64-cpu-opp.dtsi"
0008 
0009 #include <dt-bindings/gpio/gpio.h>
0010 
0011 / {
0012         model = "BananaPi-M64";
0013         compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
0014 
0015         aliases {
0016                 ethernet0 = &emac;
0017                 serial0 = &uart0;
0018                 serial1 = &uart1;
0019         };
0020 
0021         chosen {
0022                 stdout-path = "serial0:115200n8";
0023         };
0024 
0025         hdmi-connector {
0026                 compatible = "hdmi-connector";
0027                 type = "a";
0028 
0029                 port {
0030                         hdmi_con_in: endpoint {
0031                                 remote-endpoint = <&hdmi_out_con>;
0032                         };
0033                 };
0034         };
0035 
0036         leds {
0037                 compatible = "gpio-leds";
0038 
0039                 led-0 {
0040                         label = "bananapi-m64:red:pwr";
0041                         gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
0042                         default-state = "on";
0043                 };
0044 
0045                 led-1 {
0046                         label = "bananapi-m64:green:user";
0047                         gpios = <&pio 4 14 GPIO_ACTIVE_HIGH>; /* PE14 */
0048                 };
0049 
0050                 led-2 {
0051                         label = "bananapi-m64:blue:user";
0052                         gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* PE15 */
0053                 };
0054         };
0055 
0056         wifi_pwrseq: wifi_pwrseq {
0057                 compatible = "mmc-pwrseq-simple";
0058                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
0059                 clocks = <&rtc CLK_OSC32K_FANOUT>;
0060                 clock-names = "ext_clock";
0061         };
0062 };
0063 
0064 &codec {
0065         status = "okay";
0066 };
0067 
0068 &codec_analog {
0069         cpvdd-supply = <&reg_eldo1>;
0070         status = "okay";
0071 };
0072 
0073 &cpu0 {
0074         cpu-supply = <&reg_dcdc2>;
0075 };
0076 
0077 &cpu1 {
0078         cpu-supply = <&reg_dcdc2>;
0079 };
0080 
0081 &cpu2 {
0082         cpu-supply = <&reg_dcdc2>;
0083 };
0084 
0085 &cpu3 {
0086         cpu-supply = <&reg_dcdc2>;
0087 };
0088 
0089 &dai {
0090         status = "okay";
0091 };
0092 
0093 &de {
0094         status = "okay";
0095 };
0096 
0097 &ehci0 {
0098         status = "okay";
0099 };
0100 
0101 &ehci1 {
0102         status = "okay";
0103 };
0104 
0105 &emac {
0106         pinctrl-names = "default";
0107         pinctrl-0 = <&rgmii_pins>;
0108         phy-mode = "rgmii-id";
0109         phy-handle = <&ext_rgmii_phy>;
0110         phy-supply = <&reg_dc1sw>;
0111         status = "okay";
0112 };
0113 
0114 &hdmi {
0115         hvcc-supply = <&reg_dldo1>;
0116         status = "okay";
0117 };
0118 
0119 &hdmi_out {
0120         hdmi_out_con: endpoint {
0121                 remote-endpoint = <&hdmi_con_in>;
0122         };
0123 };
0124 
0125 &i2c1 {
0126         status = "okay";
0127 };
0128 
0129 &i2c1_pins {
0130         bias-pull-up;
0131 };
0132 
0133 &mdio {
0134         ext_rgmii_phy: ethernet-phy@1 {
0135                 compatible = "ethernet-phy-ieee802.3-c22";
0136                 reg = <1>;
0137         };
0138 };
0139 
0140 &mmc0 {
0141         pinctrl-names = "default";
0142         pinctrl-0 = <&mmc0_pins>;
0143         vmmc-supply = <&reg_dcdc1>;
0144         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
0145         disable-wp;
0146         bus-width = <4>;
0147         status = "okay";
0148 };
0149 
0150 &mmc1 {
0151         pinctrl-names = "default";
0152         pinctrl-0 = <&mmc1_pins>;
0153         vmmc-supply = <&reg_dldo2>;
0154         vqmmc-supply = <&reg_dldo4>;
0155         mmc-pwrseq = <&wifi_pwrseq>;
0156         bus-width = <4>;
0157         non-removable;
0158         status = "okay";
0159 
0160         brcmf: wifi@1 {
0161                 reg = <1>;
0162                 compatible = "brcm,bcm4329-fmac";
0163                 interrupt-parent = <&r_pio>;
0164                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
0165                 interrupt-names = "host-wake";
0166         };
0167 };
0168 
0169 &mmc2 {
0170         pinctrl-names = "default";
0171         pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
0172         vmmc-supply = <&reg_dcdc1>;
0173         bus-width = <8>;
0174         non-removable;
0175         cap-mmc-hw-reset;
0176         status = "okay";
0177 };
0178 
0179 &ohci0 {
0180         status = "okay";
0181 };
0182 
0183 &ohci1 {
0184         status = "okay";
0185 };
0186 
0187 &r_rsb {
0188         status = "okay";
0189 
0190         axp803: pmic@3a3 {
0191                 compatible = "x-powers,axp803";
0192                 reg = <0x3a3>;
0193                 interrupt-parent = <&r_intc>;
0194                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0195                 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
0196         };
0197 };
0198 
0199 #include "axp803.dtsi"
0200 
0201 &ac_power_supply {
0202         status = "okay";
0203 };
0204 
0205 &battery_power_supply {
0206         status = "okay";
0207 };
0208 
0209 &reg_aldo1 {
0210         /*
0211          * This regulator also drives the PE pingroup GPIOs,
0212          * which also controls two LEDs.
0213          */
0214         regulator-always-on;
0215         regulator-min-microvolt = <2800000>;
0216         regulator-max-microvolt = <2800000>;
0217         regulator-name = "afvcc-csi";
0218 };
0219 
0220 &reg_aldo2 {
0221         regulator-always-on;
0222         regulator-min-microvolt = <1800000>;
0223         regulator-max-microvolt = <3300000>;
0224         regulator-name = "vcc-pl";
0225 };
0226 
0227 &reg_aldo3 {
0228         regulator-always-on;
0229         regulator-min-microvolt = <3000000>;
0230         regulator-max-microvolt = <3000000>;
0231         regulator-name = "vcc-pll-avcc";
0232 };
0233 
0234 &reg_dc1sw {
0235         /*
0236          * This regulator also indirectly drives the PD pingroup GPIOs,
0237          * which also controls the power LED.
0238          */
0239         regulator-always-on;
0240         regulator-name = "vcc-phy";
0241 };
0242 
0243 &reg_dcdc1 {
0244         regulator-always-on;
0245         regulator-min-microvolt = <3300000>;
0246         regulator-max-microvolt = <3300000>;
0247         regulator-name = "vcc-3v3";
0248 };
0249 
0250 &reg_dcdc2 {
0251         regulator-always-on;
0252         regulator-min-microvolt = <1040000>;
0253         regulator-max-microvolt = <1300000>;
0254         regulator-name = "vdd-cpux";
0255 };
0256 
0257 /* DCDC3 is polyphased with DCDC2 */
0258 
0259 &reg_dcdc5 {
0260         regulator-always-on;
0261         regulator-min-microvolt = <1500000>;
0262         regulator-max-microvolt = <1500000>;
0263         regulator-name = "vcc-dram";
0264 };
0265 
0266 &reg_dcdc6 {
0267         regulator-always-on;
0268         regulator-min-microvolt = <1100000>;
0269         regulator-max-microvolt = <1100000>;
0270         regulator-name = "vdd-sys";
0271 };
0272 
0273 &reg_dldo1 {
0274         regulator-min-microvolt = <3300000>;
0275         regulator-max-microvolt = <3300000>;
0276         regulator-name = "vcc-hdmi-dsi";
0277 };
0278 
0279 &reg_dldo2 {
0280         regulator-min-microvolt = <3300000>;
0281         regulator-max-microvolt = <3300000>;
0282         regulator-name = "vcc-wifi";
0283 };
0284 
0285 &reg_dldo4 {
0286         regulator-min-microvolt = <1800000>;
0287         regulator-max-microvolt = <3300000>;
0288         regulator-name = "vcc-wifi-io";
0289 };
0290 
0291 &reg_drivevbus {
0292         regulator-name = "usb0-vbus";
0293         status = "okay";
0294 };
0295 
0296 &reg_eldo1 {
0297         regulator-min-microvolt = <1800000>;
0298         regulator-max-microvolt = <1800000>;
0299         regulator-name = "cpvdd";
0300 };
0301 
0302 &reg_fldo1 {
0303         regulator-min-microvolt = <1200000>;
0304         regulator-max-microvolt = <1200000>;
0305         regulator-name = "vcc-1v2-hsic";
0306 };
0307 
0308 /*
0309  * The A64 chip cannot work without this regulator off, although
0310  * it seems to be only driving the AR100 core.
0311  * Maybe we don't still know well about CPUs domain.
0312  */
0313 &reg_fldo2 {
0314         regulator-always-on;
0315         regulator-min-microvolt = <1100000>;
0316         regulator-max-microvolt = <1100000>;
0317         regulator-name = "vdd-cpus";
0318 };
0319 
0320 &reg_rtc_ldo {
0321         regulator-name = "vcc-rtc";
0322 };
0323 
0324 &simplefb_hdmi {
0325         vcc-hdmi-supply = <&reg_dldo1>;
0326 };
0327 
0328 &sound {
0329         status = "okay";
0330         simple-audio-card,widgets = "Headphone", "Headphone Jack",
0331                                     "Microphone", "Microphone Jack",
0332                                     "Microphone", "Onboard Microphone";
0333         simple-audio-card,routing =
0334                         "Left DAC", "DACL",
0335                         "Right DAC", "DACR",
0336                         "ADCL", "Left ADC",
0337                         "ADCR", "Right ADC",
0338                         "Headphone Jack", "HP",
0339                         "MIC2", "Microphone Jack",
0340                         "Onboard Microphone", "MBIAS",
0341                         "MIC1", "Onboard Microphone";
0342 };
0343 
0344 &uart0 {
0345         pinctrl-names = "default";
0346         pinctrl-0 = <&uart0_pb_pins>;
0347         status = "okay";
0348 };
0349 
0350 &uart1 {
0351         pinctrl-names = "default";
0352         pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
0353         uart-has-rtscts;
0354         status = "okay";
0355 
0356         bluetooth {
0357                 compatible = "brcm,bcm43438-bt";
0358                 clocks = <&rtc CLK_OSC32K_FANOUT>;
0359                 clock-names = "lpo";
0360                 vbat-supply = <&reg_dldo2>;
0361                 vddio-supply = <&reg_dldo4>;
0362                 device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
0363                 host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
0364                 shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
0365         };
0366 };
0367 
0368 &usb_otg {
0369         dr_mode = "otg";
0370         status = "okay";
0371 };
0372 
0373 &usb_power_supply {
0374         status = "okay";
0375 };
0376 
0377 &usbphy {
0378         usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
0379         usb0_vbus_power-supply = <&usb_power_supply>;
0380         usb0_vbus-supply = <&reg_drivevbus>;
0381         status = "okay";
0382 };