0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
0003 // Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org>
0004
0005 /dts-v1/;
0006
0007 #include "sun50i-a64.dtsi"
0008 #include "sun50i-a64-cpu-opp.dtsi"
0009
0010 #include <dt-bindings/gpio/gpio.h>
0011
0012 / {
0013 model = "OrangePi Win/Win Plus";
0014 compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
0015
0016 aliases {
0017 ethernet0 = &emac;
0018 serial0 = &uart0;
0019 serial1 = &uart1;
0020 serial2 = &uart2;
0021 serial3 = &uart3;
0022 serial4 = &uart4;
0023 };
0024
0025 chosen {
0026 stdout-path = "serial0:115200n8";
0027 };
0028
0029 hdmi-connector {
0030 compatible = "hdmi-connector";
0031 type = "a";
0032
0033 port {
0034 hdmi_con_in: endpoint {
0035 remote-endpoint = <&hdmi_out_con>;
0036 };
0037 };
0038 };
0039
0040 leds {
0041 compatible = "gpio-leds";
0042
0043 led-0 {
0044 label = "orangepi:green:status";
0045 gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
0046 };
0047 };
0048
0049 reg_gmac_3v3: gmac-3v3 {
0050 compatible = "regulator-fixed";
0051 regulator-name = "gmac-3v3";
0052 regulator-min-microvolt = <3300000>;
0053 regulator-max-microvolt = <3300000>;
0054 regulator-boot-on;
0055 enable-active-high;
0056 gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */
0057 status = "okay";
0058 };
0059
0060 reg_usb1_vbus: usb1-vbus {
0061 compatible = "regulator-fixed";
0062 regulator-name = "usb1-vbus";
0063 regulator-min-microvolt = <5000000>;
0064 regulator-max-microvolt = <5000000>;
0065 regulator-boot-on;
0066 enable-active-high;
0067 gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */
0068 status = "okay";
0069 };
0070
0071 wifi_pwrseq: wifi_pwrseq {
0072 compatible = "mmc-pwrseq-simple";
0073 reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
0074 clocks = <&rtc CLK_OSC32K_FANOUT>;
0075 clock-names = "ext_clock";
0076 };
0077 };
0078
0079 &codec {
0080 status = "okay";
0081 };
0082
0083 &codec_analog {
0084 cpvdd-supply = <®_eldo1>;
0085 status = "okay";
0086 };
0087
0088 &cpu0 {
0089 cpu-supply = <®_dcdc2>;
0090 };
0091
0092 &cpu1 {
0093 cpu-supply = <®_dcdc2>;
0094 };
0095
0096 &cpu2 {
0097 cpu-supply = <®_dcdc2>;
0098 };
0099
0100 &cpu3 {
0101 cpu-supply = <®_dcdc2>;
0102 };
0103
0104 &dai {
0105 status = "okay";
0106 };
0107
0108 &de {
0109 status = "okay";
0110 };
0111
0112 &ehci0 {
0113 status = "okay";
0114 };
0115
0116 &ehci1 {
0117 status = "okay";
0118 };
0119
0120 &emac {
0121 pinctrl-names = "default";
0122 pinctrl-0 = <&rgmii_pins>;
0123 phy-mode = "rgmii-id";
0124 phy-handle = <&ext_rgmii_phy>;
0125 phy-supply = <®_gmac_3v3>;
0126 status = "okay";
0127 };
0128
0129 &hdmi {
0130 hvcc-supply = <®_dldo1>;
0131 status = "okay";
0132 };
0133
0134 &hdmi_out {
0135 hdmi_out_con: endpoint {
0136 remote-endpoint = <&hdmi_con_in>;
0137 };
0138 };
0139
0140 &mdio {
0141 ext_rgmii_phy: ethernet-phy@1 {
0142 compatible = "ethernet-phy-ieee802.3-c22";
0143 reg = <1>;
0144 };
0145 };
0146
0147 &mmc0 {
0148 pinctrl-names = "default";
0149 pinctrl-0 = <&mmc0_pins>;
0150 vmmc-supply = <®_dcdc1>;
0151 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0152 disable-wp;
0153 bus-width = <4>;
0154 status = "okay";
0155 };
0156
0157 &mmc1 {
0158 pinctrl-names = "default";
0159 pinctrl-0 = <&mmc1_pins>;
0160 vmmc-supply = <®_dldo2>;
0161 vqmmc-supply = <®_dldo4>;
0162 mmc-pwrseq = <&wifi_pwrseq>;
0163 bus-width = <4>;
0164 non-removable;
0165 status = "okay";
0166
0167 brcmf: wifi@1 {
0168 reg = <1>;
0169 compatible = "brcm,bcm4329-fmac";
0170 interrupt-parent = <&r_pio>;
0171 interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */
0172 interrupt-names = "host-wake";
0173 };
0174 };
0175
0176 &ohci0 {
0177 status = "okay";
0178 };
0179
0180 &ohci1 {
0181 status = "okay";
0182 };
0183
0184 &r_ir {
0185 status = "okay";
0186 };
0187
0188 &r_rsb {
0189 status = "okay";
0190
0191 axp803: pmic@3a3 {
0192 compatible = "x-powers,axp803";
0193 reg = <0x3a3>;
0194 interrupt-parent = <&r_intc>;
0195 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0196 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
0197 };
0198 };
0199
0200 #include "axp803.dtsi"
0201
0202 &ac_power_supply {
0203 status = "okay";
0204 };
0205
0206 &battery_power_supply {
0207 status = "okay";
0208 };
0209
0210 ®_aldo1 {
0211 regulator-min-microvolt = <2800000>;
0212 regulator-max-microvolt = <2800000>;
0213 regulator-name = "afvcc-csi";
0214 };
0215
0216 ®_aldo2 {
0217 regulator-always-on;
0218 regulator-min-microvolt = <1800000>;
0219 regulator-max-microvolt = <3300000>;
0220 regulator-name = "vcc-pl";
0221 };
0222
0223 ®_aldo3 {
0224 regulator-always-on;
0225 regulator-min-microvolt = <3000000>;
0226 regulator-max-microvolt = <3000000>;
0227 regulator-name = "vcc-pll-avcc";
0228 };
0229
0230 ®_dcdc1 {
0231 regulator-always-on;
0232 regulator-min-microvolt = <3300000>;
0233 regulator-max-microvolt = <3300000>;
0234 regulator-name = "vcc-3v3";
0235 };
0236
0237 ®_dcdc2 {
0238 regulator-always-on;
0239 regulator-min-microvolt = <1040000>;
0240 regulator-max-microvolt = <1300000>;
0241 regulator-name = "vdd-cpux";
0242 };
0243
0244 /* DCDC3 is polyphased with DCDC2 */
0245
0246 ®_dcdc5 {
0247 regulator-always-on;
0248 regulator-min-microvolt = <1500000>;
0249 regulator-max-microvolt = <1500000>;
0250 regulator-name = "vcc-dram";
0251 };
0252
0253 ®_dcdc6 {
0254 regulator-always-on;
0255 regulator-min-microvolt = <1100000>;
0256 regulator-max-microvolt = <1100000>;
0257 regulator-name = "vdd-sys";
0258 };
0259
0260 ®_dldo1 {
0261 regulator-min-microvolt = <3300000>;
0262 regulator-max-microvolt = <3300000>;
0263 regulator-name = "vcc-hdmi-dsi";
0264 };
0265
0266 ®_dldo2 {
0267 regulator-min-microvolt = <3300000>;
0268 regulator-max-microvolt = <3300000>;
0269 regulator-name = "vcc-wifi";
0270 };
0271
0272 ®_dldo3 {
0273 regulator-min-microvolt = <3300000>;
0274 regulator-max-microvolt = <3300000>;
0275 regulator-name = "avdd-csi";
0276 };
0277
0278 ®_dldo4 {
0279 regulator-min-microvolt = <3300000>;
0280 regulator-max-microvolt = <3300000>;
0281 regulator-name = "vcc-wifi-io";
0282 };
0283
0284 ®_drivevbus {
0285 regulator-name = "usb0-vbus";
0286 status = "okay";
0287 };
0288
0289 ®_eldo1 {
0290 regulator-min-microvolt = <1800000>;
0291 regulator-max-microvolt = <1800000>;
0292 regulator-name = "cpvdd";
0293 };
0294
0295 ®_eldo3 {
0296 regulator-min-microvolt = <1500000>;
0297 regulator-max-microvolt = <1800000>;
0298 regulator-name = "dvdd-csi";
0299 };
0300
0301 ®_fldo1 {
0302 regulator-min-microvolt = <1200000>;
0303 regulator-max-microvolt = <1200000>;
0304 regulator-name = "vcc-1v2-hsic";
0305 };
0306
0307 /*
0308 * The A64 chip cannot work without this regulator off, although
0309 * it seems to be only driving the AR100 core.
0310 * Maybe we don't still know well about CPUs domain.
0311 */
0312 ®_fldo2 {
0313 regulator-always-on;
0314 regulator-min-microvolt = <1100000>;
0315 regulator-max-microvolt = <1100000>;
0316 regulator-name = "vdd-cpus";
0317 };
0318
0319 ®_rtc_ldo {
0320 regulator-name = "vcc-rtc";
0321 };
0322
0323 &simplefb_hdmi {
0324 vcc-hdmi-supply = <®_dldo1>;
0325 };
0326
0327 &sound {
0328 status = "okay";
0329 simple-audio-card,widgets = "Headphone", "Headphone Jack",
0330 "Microphone", "Microphone Jack",
0331 "Microphone", "Onboard Microphone";
0332 simple-audio-card,routing =
0333 "Left DAC", "DACL",
0334 "Right DAC", "DACR",
0335 "ADCL", "Left ADC",
0336 "ADCR", "Right ADC",
0337 "Headphone Jack", "HP",
0338 "MIC2", "Microphone Jack",
0339 "Onboard Microphone", "MBIAS",
0340 "MIC1", "Onboard Microphone";
0341 };
0342
0343 &spi0 {
0344 status = "okay";
0345
0346 flash@0 {
0347 compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
0348 reg = <0>;
0349 spi-max-frequency = <80000000>;
0350 m25p,fast-read;
0351 status = "okay";
0352 };
0353 };
0354
0355 /* On debug connector */
0356 &uart0 {
0357 pinctrl-names = "default";
0358 pinctrl-0 = <&uart0_pb_pins>;
0359 status = "okay";
0360 };
0361
0362 /* Bluetooth */
0363 &uart1 {
0364 pinctrl-names = "default";
0365 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
0366 uart-has-rtscts;
0367 status = "okay";
0368
0369 bluetooth {
0370 compatible = "brcm,bcm43438-bt";
0371 max-speed = <1500000>;
0372 clocks = <&rtc CLK_OSC32K_FANOUT>;
0373 clock-names = "lpo";
0374 vbat-supply = <®_dldo2>;
0375 vddio-supply = <®_dldo4>;
0376 device-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
0377 host-wakeup-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
0378 shutdown-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
0379 };
0380 };
0381
0382 /* On Pi-2 connector, RTS/CTS optional */
0383 &uart2 {
0384 pinctrl-names = "default";
0385 pinctrl-0 = <&uart2_pins>;
0386 status = "disabled";
0387 };
0388
0389 /* On Pi-2 connector, RTS/CTS optional */
0390 &uart3 {
0391 pinctrl-names = "default";
0392 pinctrl-0 = <&uart3_pins>;
0393 status = "disabled";
0394 };
0395
0396 /* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
0397 &uart4 {
0398 pinctrl-names = "default";
0399 pinctrl-0 = <&uart4_pins>;
0400 status = "disabled";
0401 };
0402
0403 &usb_otg {
0404 dr_mode = "otg";
0405 status = "okay";
0406 };
0407
0408 &usbphy {
0409 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
0410 usb0_vbus-supply = <®_drivevbus>;
0411 usb1_vbus-supply = <®_usb1_vbus>;
0412 status = "okay";
0413 };