1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2// Copyright (C) 2019 Clément Péron <peron.clem@gmail.com> 3 4/dts-v1/; 5 6#include "sun50i-h6.dtsi" 7#include "sun50i-h6-cpu-opp.dtsi" 8#include "sun50i-h6-gpu-opp.dtsi" 9 10#include <dt-bindings/gpio/gpio.h> 11 12/ { 13 model = "Beelink GS1"; 14 compatible = "azw,beelink-gs1", "allwinner,sun50i-h6"; 15 16 aliases { 17 ethernet0 = &emac; 18 serial0 = &uart0; 19 }; 20 21 chosen { 22 stdout-path = "serial0:115200n8"; 23 }; 24 25 connector { 26 compatible = "hdmi-connector"; 27 type = "a"; 28 ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ 29 30 port { 31 hdmi_con_in: endpoint { 32 remote-endpoint = <&hdmi_out_con>; 33 }; 34 }; 35 }; 36 37 ext_osc32k: ext-osc32k-clk { 38 #clock-cells = <0>; 39 compatible = "fixed-clock"; 40 clock-frequency = <32768>; 41 clock-output-names = "ext_osc32k"; 42 }; 43 44 leds { 45 compatible = "gpio-leds"; 46 47 led { 48 label = "beelink:white:power"; 49 gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ 50 default-state = "on"; 51 }; 52 }; 53 54 reg_vcc5v: vcc5v { 55 /* board wide 5V supply directly from the DC jack */ 56 compatible = "regulator-fixed"; 57 regulator-name = "vcc-5v"; 58 regulator-min-microvolt = <5000000>; 59 regulator-max-microvolt = <5000000>; 60 regulator-always-on; 61 }; 62 63 sound-spdif { 64 compatible = "simple-audio-card"; 65 simple-audio-card,name = "sun50i-h6-spdif"; 66 67 simple-audio-card,cpu { 68 sound-dai = <&spdif>; 69 }; 70 71 simple-audio-card,codec { 72 sound-dai = <&spdif_out>; 73 }; 74 }; 75 76 spdif_out: spdif-out { 77 #sound-dai-cells = <0>; 78 compatible = "linux,spdif-dit"; 79 }; 80}; 81 82&cpu0 { 83 cpu-supply = <®_dcdca>; 84}; 85 86&de { 87 status = "okay"; 88}; 89 90&dwc3 { 91 status = "okay"; 92}; 93 94&ehci0 { 95 status = "okay"; 96}; 97 98&emac { 99 pinctrl-names = "default"; 100 pinctrl-0 = <&ext_rgmii_pins>; 101 phy-mode = "rgmii-id"; 102 phy-handle = <&ext_rgmii_phy>; 103 phy-supply = <®_aldo2>; 104 status = "okay"; 105}; 106 107&gpu { 108 mali-supply = <®_dcdcc>; 109 status = "okay"; 110}; 111 112&hdmi { 113 status = "okay"; 114}; 115 116&hdmi_out { 117 hdmi_out_con: endpoint { 118 remote-endpoint = <&hdmi_con_in>; 119 }; 120}; 121 122&mdio { 123 ext_rgmii_phy: ethernet-phy@1 { 124 compatible = "ethernet-phy-ieee802.3-c22"; 125 reg = <1>; 126 }; 127}; 128 129&mmc0 { 130 vmmc-supply = <®_cldo1>; 131 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 132 disable-wp; 133 bus-width = <4>; 134 status = "okay"; 135}; 136 137&mmc2 { 138 vmmc-supply = <®_cldo1>; 139 vqmmc-supply = <®_bldo2>; 140 non-removable; 141 cap-mmc-hw-reset; 142 bus-width = <8>; 143 status = "okay"; 144}; 145 146&ohci0 { 147 status = "okay"; 148}; 149 150&pio { 151 vcc-pd-supply = <®_cldo1>; 152 vcc-pg-supply = <®_aldo1>; 153}; 154 155&r_i2c { 156 status = "okay"; 157 158 axp805: pmic@36 { 159 compatible = "x-powers,axp805", "x-powers,axp806"; 160 reg = <0x36>; 161 interrupt-parent = <&r_intc>; 162 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>; 163 interrupt-controller; 164 #interrupt-cells = <1>; 165 x-powers,self-working-mode; 166 vina-supply = <®_vcc5v>; 167 vinb-supply = <®_vcc5v>; 168 vinc-supply = <®_vcc5v>; 169 vind-supply = <®_vcc5v>; 170 vine-supply = <®_vcc5v>; 171 aldoin-supply = <®_vcc5v>; 172 bldoin-supply = <®_vcc5v>; 173 cldoin-supply = <®_vcc5v>; 174 175 regulators { 176 reg_aldo1: aldo1 { 177 regulator-always-on; 178 regulator-min-microvolt = <3300000>; 179 regulator-max-microvolt = <3300000>; 180 regulator-name = "vcc-pl"; 181 }; 182 183 reg_aldo2: aldo2 { 184 regulator-min-microvolt = <3300000>; 185 regulator-max-microvolt = <3300000>; 186 regulator-name = "vcc-ac200"; 187 regulator-enable-ramp-delay = <100000>; 188 }; 189 190 reg_aldo3: aldo3 { 191 regulator-always-on; 192 regulator-min-microvolt = <3300000>; 193 regulator-max-microvolt = <3300000>; 194 regulator-name = "vcc25-dram"; 195 }; 196 197 reg_bldo1: bldo1 { 198 regulator-always-on; 199 regulator-min-microvolt = <1800000>; 200 regulator-max-microvolt = <1800000>; 201 regulator-name = "vcc-bias-pll"; 202 }; 203 204 reg_bldo2: bldo2 { 205 regulator-always-on; 206 regulator-min-microvolt = <1800000>; 207 regulator-max-microvolt = <1800000>; 208 regulator-name = "vcc-efuse-pcie-hdmi-io"; 209 }; 210 211 reg_bldo3: bldo3 { 212 regulator-always-on; 213 regulator-min-microvolt = <1800000>; 214 regulator-max-microvolt = <1800000>; 215 regulator-name = "vcc-dcxoio"; 216 }; 217 218 bldo4 { 219 /* unused */ 220 }; 221 222 reg_cldo1: cldo1 { 223 regulator-always-on; 224 regulator-min-microvolt = <3300000>; 225 regulator-max-microvolt = <3300000>; 226 regulator-name = "vcc-3v3"; 227 }; 228 229 reg_cldo2: cldo2 { 230 regulator-min-microvolt = <3300000>; 231 regulator-max-microvolt = <3300000>; 232 regulator-name = "vcc-wifi-1"; 233 }; 234 235 reg_cldo3: cldo3 { 236 regulator-min-microvolt = <3300000>; 237 regulator-max-microvolt = <3300000>; 238 regulator-name = "vcc-wifi-2"; 239 }; 240 241 reg_dcdca: dcdca { 242 regulator-always-on; 243 regulator-min-microvolt = <810000>; 244 regulator-max-microvolt = <1160000>; 245 regulator-ramp-delay = <2500>; 246 regulator-name = "vdd-cpu"; 247 }; 248 249 reg_dcdcc: dcdcc { 250 regulator-enable-ramp-delay = <32000>; 251 regulator-min-microvolt = <810000>; 252 regulator-max-microvolt = <1080000>; 253 regulator-ramp-delay = <2500>; 254 regulator-name = "vdd-gpu"; 255 }; 256 257 reg_dcdcd: dcdcd { 258 regulator-always-on; 259 regulator-min-microvolt = <960000>; 260 regulator-max-microvolt = <960000>; 261 regulator-name = "vdd-sys"; 262 }; 263 264 reg_dcdce: dcdce { 265 regulator-always-on; 266 regulator-min-microvolt = <1200000>; 267 regulator-max-microvolt = <1200000>; 268 regulator-name = "vcc-dram"; 269 }; 270 271 sw { 272 /* unused */ 273 }; 274 }; 275 }; 276}; 277 278&r_ir { 279 linux,rc-map-name = "rc-beelink-gs1"; 280 status = "okay"; 281}; 282 283&r_pio { 284 /* 285 * PL0 and PL1 are used for PMIC I2C 286 * don't enable the pl-supply else 287 * it will fail at boot 288 * 289 * vcc-pl-supply = <®_aldo1>; 290 */ 291 vcc-pm-supply = <®_aldo1>; 292}; 293 294&spdif { 295 pinctrl-names = "default"; 296 pinctrl-0 = <&spdif_tx_pin>; 297 status = "okay"; 298}; 299 300&uart0 { 301 pinctrl-names = "default"; 302 pinctrl-0 = <&uart0_ph_pins>; 303 status = "okay"; 304}; 305 306&usb2otg { 307 dr_mode = "host"; 308 status = "okay"; 309}; 310 311&usb2phy { 312 usb0_vbus-supply = <®_vcc5v>; 313 status = "okay"; 314}; 315 316&usb3phy { 317 status = "okay"; 318}; 319