1// SPDX-License-Identifier: (GPL-2.0-only OR MIT) 2// Copyright (c) 2017-2019 Arm Ltd. 3 4/dts-v1/; 5#include "rk3328.dtsi" 6 7/ { 8 model = "Beelink A1"; 9 compatible = "azw,beelink-a1", "rockchip,rk3328"; 10 11 aliases { 12 ethernet0 = &gmac2io; 13 mmc0 = &sdmmc; 14 mmc1 = &emmc; 15 }; 16 17 /* 18 * UART pins, as viewed with bottom of case removed: 19 * 20 * Front 21 * /------- 22 * L / o <- Gnd 23 * e / o <-- Rx 24 * f / o <--- Tx 25 * t / o <---- +3.3v 26 * | 27 */ 28 chosen { 29 stdout-path = "serial2:1500000n8"; 30 }; 31 32 gmac_clkin: external-gmac-clock { 33 compatible = "fixed-clock"; 34 clock-frequency = <125000000>; 35 clock-output-names = "gmac_clkin"; 36 #clock-cells = <0>; 37 }; 38 39 vcc_host_5v: regulator-usb3-current-switch { 40 compatible = "regulator-fixed"; 41 enable-active-high; 42 gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; 43 pinctrl-names = "default"; 44 pinctrl-0 = <&usb30_host_drv>; 45 regulator-name = "vcc_host_5v"; 46 vin-supply = <&vcc_sys>; 47 }; 48 49 vcc_sys: regulator-vcc-sys { 50 compatible = "regulator-fixed"; 51 regulator-name = "vcc_sys"; 52 regulator-min-microvolt = <5000000>; 53 regulator-max-microvolt = <5000000>; 54 }; 55 56 ir-receiver { 57 compatible = "gpio-ir-receiver"; 58 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; 59 linux,rc-map-name = "rc-beelink-gs1"; 60 }; 61 62 spdif_dit: spdif-dit { 63 compatible = "linux,spdif-dit"; 64 #sound-dai-cells = <0>; 65 }; 66 67 spdif_sound: spdif-sound { 68 compatible = "simple-audio-card"; 69 simple-audio-card,name = "SPDIF"; 70 71 simple-audio-card,cpu { 72 sound-dai = <&spdif>; 73 }; 74 75 simple-audio-card,codec { 76 sound-dai = <&spdif_dit>; 77 }; 78 }; 79}; 80 81&analog_sound { 82 simple-audio-card,name = "Analog A/V"; 83 status = "okay"; 84}; 85 86&codec { 87 mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>; 88 status = "okay"; 89}; 90 91&cpu0 { 92 cpu-supply = <&vdd_arm>; 93}; 94 95&cpu1 { 96 cpu-supply = <&vdd_arm>; 97}; 98 99&cpu2 { 100 cpu-supply = <&vdd_arm>; 101}; 102 103&cpu3 { 104 cpu-supply = <&vdd_arm>; 105}; 106 107&emmc { 108 bus-width = <8>; 109 cap-mmc-highspeed; 110 mmc-ddr-1_8v; 111 mmc-hs200-1_8v; 112 no-sd; 113 no-sdio; 114 non-removable; 115 pinctrl-names = "default"; 116 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; 117 vmmc-supply = <&vcc_io>; 118 vqmmc-supply = <&vcc18_emmc>; 119 status = "okay"; 120}; 121 122&gmac2io { 123 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; 124 assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; 125 clock_in_out = "input"; 126 phy-handle = <&rtl8211f>; 127 phy-mode = "rgmii"; 128 phy-supply = <&vcc_io>; 129 pinctrl-names = "default"; 130 pinctrl-0 = <&rgmiim1_pins>; 131 snps,pbl = <0x4>; 132 tx_delay = <0x26>; 133 rx_delay = <0x11>; 134 status = "okay"; 135 136 mdio { 137 compatible = "snps,dwmac-mdio"; 138 #address-cells = <1>; 139 #size-cells = <0>; 140 141 rtl8211f: ethernet-phy@0 { 142 reg = <0>; 143 reset-assert-us = <10000>; 144 reset-deassert-us = <30000>; 145 reset-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_LOW>; 146 }; 147 }; 148}; 149 150&gpu { 151 mali-supply = <&vdd_logic>; 152}; 153 154&hdmi { 155 status = "okay"; 156}; 157 158&hdmiphy { 159 status = "okay"; 160}; 161 162&hdmi_sound { 163 status = "okay"; 164}; 165 166&i2c1 { 167 clock-frequency = <1000000>; 168 i2c-scl-falling-time-ns = <5>; 169 i2c-scl-rising-time-ns = <83>; 170 status = "okay"; 171 172 pmic@18 { 173 compatible = "rockchip,rk805"; 174 reg = <0x18>; 175 interrupt-parent = <&gpio2>; 176 interrupts = <RK_PA6 IRQ_TYPE_LEVEL_LOW>; 177 pinctrl-names = "default"; 178 pinctrl-0 = <&pmic_int_l>; 179 system-power-controller; 180 wakeup-source; 181 #clock-cells = <0>; 182 183 vcc1-supply = <&vcc_sys>; 184 vcc2-supply = <&vcc_sys>; 185 vcc3-supply = <&vcc_sys>; 186 vcc4-supply = <&vcc_sys>; 187 vcc5-supply = <&vcc_io>; 188 vcc6-supply = <&vcc_io>; 189 190 regulators { 191 vdd_logic: DCDC_REG1 { 192 regulator-name = "vdd_logic"; 193 regulator-min-microvolt = <700000>; 194 regulator-max-microvolt = <1350000>; 195 regulator-always-on; 196 regulator-boot-on; 197 regulator-state-mem { 198 regulator-on-in-suspend; 199 regulator-suspend-microvolt = <1000000>; 200 }; 201 }; 202 203 vdd_arm: DCDC_REG2 { 204 regulator-name = "vdd_arm"; 205 regulator-min-microvolt = <700000>; 206 regulator-max-microvolt = <1350000>; 207 regulator-always-on; 208 regulator-boot-on; 209 regulator-state-mem { 210 regulator-on-in-suspend; 211 regulator-suspend-microvolt = <950000>; 212 }; 213 }; 214 215 vcc_ddr: DCDC_REG3 { 216 regulator-name = "vcc_ddr"; 217 regulator-always-on; 218 regulator-boot-on; 219 regulator-state-mem { 220 regulator-on-in-suspend; 221 }; 222 }; 223 224 vcc_io: DCDC_REG4 { 225 regulator-name = "vcc_io"; 226 regulator-min-microvolt = <3300000>; 227 regulator-max-microvolt = <3300000>; 228 regulator-always-on; 229 regulator-boot-on; 230 regulator-state-mem { 231 regulator-on-in-suspend; 232 regulator-suspend-microvolt = <3300000>; 233 }; 234 }; 235 236 vdd_18: LDO_REG1 { 237 regulator-name = "vdd_18"; 238 regulator-min-microvolt = <1800000>; 239 regulator-max-microvolt = <1800000>; 240 regulator-always-on; 241 regulator-boot-on; 242 regulator-state-mem { 243 regulator-on-in-suspend; 244 regulator-suspend-microvolt = <1800000>; 245 }; 246 }; 247 248 vcc18_emmc: LDO_REG2 { 249 regulator-name = "vcc_18emmc"; 250 regulator-min-microvolt = <1800000>; 251 regulator-max-microvolt = <1800000>; 252 regulator-always-on; 253 regulator-boot-on; 254 regulator-state-mem { 255 regulator-on-in-suspend; 256 regulator-suspend-microvolt = <1800000>; 257 }; 258 }; 259 260 vdd_11: LDO_REG3 { 261 regulator-name = "vdd_11"; 262 regulator-min-microvolt = <1100000>; 263 regulator-max-microvolt = <1100000>; 264 regulator-always-on; 265 regulator-boot-on; 266 regulator-state-mem { 267 regulator-on-in-suspend; 268 regulator-suspend-microvolt = <1100000>; 269 }; 270 }; 271 }; 272 }; 273}; 274 275&i2s0 { 276 status = "okay"; 277}; 278 279&i2s1 { 280 status = "okay"; 281}; 282 283&io_domains { 284 vccio1-supply = <&vcc_io>; 285 vccio2-supply = <&vcc18_emmc>; 286 vccio3-supply = <&vcc_io>; 287 vccio4-supply = <&vdd_18>; 288 vccio5-supply = <&vcc_io>; 289 vccio6-supply = <&vdd_18>; 290 pmuio-supply = <&vcc_io>; 291 status = "okay"; 292}; 293 294&pinctrl { 295 pmic { 296 pmic_int_l: pmic-int-l { 297 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 298 }; 299 }; 300 301 usb3 { 302 usb30_host_drv: usb30-host-drv { 303 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; 304 }; 305 }; 306 307 wifi { 308 bt_dis: bt-dis { 309 rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_output_low>; 310 }; 311 312 bt_wake_host: bt-wake-host { 313 rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>; 314 }; 315 316 chip_en: chip-en { 317 rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_output_low>; 318 }; 319 320 host_wake_bt: host-wake-bt { 321 rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_output_high>; 322 }; 323 324 wl_dis: wl-dis { 325 rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_output_low>; 326 }; 327 328 wl_wake_host: wl-wake-host { 329 rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 330 }; 331 }; 332}; 333 334&sdmmc { 335 bus-width = <4>; 336 cap-mmc-highspeed; 337 cap-sd-highspeed; 338 disable-wp; 339 pinctrl-names = "default"; 340 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 341 vmmc-supply = <&vcc_io>; 342 vqmmc-supply = <&vcc_io>; 343 status = "okay"; 344}; 345 346&spdif { 347 pinctrl-0 = <&spdifm0_tx>; 348 status = "okay"; 349}; 350 351&tsadc { 352 rockchip,hw-tshut-mode = <0>; 353 rockchip,hw-tshut-polarity = <0>; 354 status = "okay"; 355}; 356 357&uart2 { 358 status = "okay"; 359}; 360 361&u2phy { 362 status = "okay"; 363}; 364 365&u2phy_host { 366 status = "okay"; 367}; 368 369&u2phy_otg { 370 status = "okay"; 371}; 372 373&usb20_otg { 374 dr_mode = "host"; 375 status = "okay"; 376}; 377 378&usb_host0_ehci { 379 pinctrl-names = "default"; 380 pinctrl-0 = <&bt_dis &bt_wake_host &chip_en &host_wake_bt &wl_dis &wl_wake_host>; 381 status = "okay"; 382}; 383 384&usbdrd3 { 385 dr_mode = "host"; 386 status = "okay"; 387}; 388 389&vop { 390 status = "okay"; 391}; 392 393&vop_mmu { 394 status = "okay"; 395}; 396