Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | // Copyright (C) 2019 Clément Péron <peron.clem@gmail.com> |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 3 | |
| 4 | /dts-v1/; |
| 5 | |
| 6 | #include "sun50i-h6.dtsi" |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 7 | #include "sun50i-h6-cpu-opp.dtsi" |
Andre Przywara | ed2724b | 2023-01-12 11:22:20 +0000 | [diff] [blame] | 8 | #include "sun50i-h6-gpu-opp.dtsi" |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 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 { |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 17 | ethernet0 = &emac; |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 18 | serial0 = &uart0; |
| 19 | }; |
| 20 | |
| 21 | chosen { |
| 22 | stdout-path = "serial0:115200n8"; |
| 23 | }; |
| 24 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 25 | connector { |
| 26 | compatible = "hdmi-connector"; |
| 27 | type = "a"; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 28 | ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 29 | |
| 30 | port { |
| 31 | hdmi_con_in: endpoint { |
| 32 | remote-endpoint = <&hdmi_out_con>; |
| 33 | }; |
| 34 | }; |
| 35 | }; |
| 36 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 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 | |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 44 | leds { |
| 45 | compatible = "gpio-leds"; |
| 46 | |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 47 | led { |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 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 | }; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 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>; |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 84 | }; |
| 85 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 86 | &de { |
| 87 | status = "okay"; |
| 88 | }; |
| 89 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 90 | &dwc3 { |
| 91 | status = "okay"; |
| 92 | }; |
| 93 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 94 | &ehci0 { |
| 95 | status = "okay"; |
| 96 | }; |
| 97 | |
| 98 | &emac { |
| 99 | pinctrl-names = "default"; |
| 100 | pinctrl-0 = <&ext_rgmii_pins>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 101 | phy-mode = "rgmii-id"; |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 102 | phy-handle = <&ext_rgmii_phy>; |
| 103 | phy-supply = <®_aldo2>; |
| 104 | status = "okay"; |
| 105 | }; |
| 106 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 107 | &gpu { |
| 108 | mali-supply = <®_dcdcc>; |
| 109 | status = "okay"; |
| 110 | }; |
| 111 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 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 | |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 129 | &mmc0 { |
| 130 | vmmc-supply = <®_cldo1>; |
| 131 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; |
| 132 | bus-width = <4>; |
| 133 | status = "okay"; |
| 134 | }; |
| 135 | |
| 136 | &mmc2 { |
| 137 | vmmc-supply = <®_cldo1>; |
| 138 | vqmmc-supply = <®_bldo2>; |
| 139 | non-removable; |
| 140 | cap-mmc-hw-reset; |
| 141 | bus-width = <8>; |
| 142 | status = "okay"; |
| 143 | }; |
| 144 | |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 145 | &ohci0 { |
| 146 | status = "okay"; |
| 147 | }; |
| 148 | |
| 149 | &pio { |
| 150 | vcc-pd-supply = <®_cldo1>; |
| 151 | vcc-pg-supply = <®_aldo1>; |
| 152 | }; |
| 153 | |
Samuel Holland | 399a01f | 2022-04-27 15:31:31 -0500 | [diff] [blame] | 154 | &r_ir { |
| 155 | linux,rc-map-name = "rc-beelink-gs1"; |
| 156 | status = "okay"; |
| 157 | }; |
| 158 | |
| 159 | &r_pio { |
| 160 | /* |
| 161 | * FIXME: We can't add that supply for now since it would |
| 162 | * create a circular dependency between pinctrl, the regulator |
| 163 | * and the RSB Bus. |
| 164 | * |
| 165 | * vcc-pl-supply = <®_aldo1>; |
| 166 | */ |
| 167 | vcc-pm-supply = <®_aldo1>; |
| 168 | }; |
| 169 | |
| 170 | &r_rsb { |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 171 | status = "okay"; |
| 172 | |
Samuel Holland | 399a01f | 2022-04-27 15:31:31 -0500 | [diff] [blame] | 173 | axp805: pmic@745 { |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 174 | compatible = "x-powers,axp805", "x-powers,axp806"; |
Samuel Holland | 399a01f | 2022-04-27 15:31:31 -0500 | [diff] [blame] | 175 | reg = <0x745>; |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 176 | interrupt-parent = <&r_intc>; |
| 177 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
| 178 | interrupt-controller; |
| 179 | #interrupt-cells = <1>; |
| 180 | x-powers,self-working-mode; |
| 181 | vina-supply = <®_vcc5v>; |
| 182 | vinb-supply = <®_vcc5v>; |
| 183 | vinc-supply = <®_vcc5v>; |
| 184 | vind-supply = <®_vcc5v>; |
| 185 | vine-supply = <®_vcc5v>; |
| 186 | aldoin-supply = <®_vcc5v>; |
| 187 | bldoin-supply = <®_vcc5v>; |
| 188 | cldoin-supply = <®_vcc5v>; |
| 189 | |
| 190 | regulators { |
| 191 | reg_aldo1: aldo1 { |
| 192 | regulator-always-on; |
| 193 | regulator-min-microvolt = <3300000>; |
| 194 | regulator-max-microvolt = <3300000>; |
| 195 | regulator-name = "vcc-pl"; |
| 196 | }; |
| 197 | |
| 198 | reg_aldo2: aldo2 { |
| 199 | regulator-min-microvolt = <3300000>; |
| 200 | regulator-max-microvolt = <3300000>; |
| 201 | regulator-name = "vcc-ac200"; |
| 202 | regulator-enable-ramp-delay = <100000>; |
| 203 | }; |
| 204 | |
| 205 | reg_aldo3: aldo3 { |
| 206 | regulator-always-on; |
| 207 | regulator-min-microvolt = <3300000>; |
| 208 | regulator-max-microvolt = <3300000>; |
| 209 | regulator-name = "vcc25-dram"; |
| 210 | }; |
| 211 | |
| 212 | reg_bldo1: bldo1 { |
| 213 | regulator-always-on; |
| 214 | regulator-min-microvolt = <1800000>; |
| 215 | regulator-max-microvolt = <1800000>; |
| 216 | regulator-name = "vcc-bias-pll"; |
| 217 | }; |
| 218 | |
| 219 | reg_bldo2: bldo2 { |
| 220 | regulator-always-on; |
| 221 | regulator-min-microvolt = <1800000>; |
| 222 | regulator-max-microvolt = <1800000>; |
| 223 | regulator-name = "vcc-efuse-pcie-hdmi-io"; |
| 224 | }; |
| 225 | |
| 226 | reg_bldo3: bldo3 { |
| 227 | regulator-always-on; |
| 228 | regulator-min-microvolt = <1800000>; |
| 229 | regulator-max-microvolt = <1800000>; |
| 230 | regulator-name = "vcc-dcxoio"; |
| 231 | }; |
| 232 | |
| 233 | bldo4 { |
| 234 | /* unused */ |
| 235 | }; |
| 236 | |
| 237 | reg_cldo1: cldo1 { |
| 238 | regulator-always-on; |
| 239 | regulator-min-microvolt = <3300000>; |
| 240 | regulator-max-microvolt = <3300000>; |
| 241 | regulator-name = "vcc-3v3"; |
| 242 | }; |
| 243 | |
| 244 | reg_cldo2: cldo2 { |
| 245 | regulator-min-microvolt = <3300000>; |
| 246 | regulator-max-microvolt = <3300000>; |
| 247 | regulator-name = "vcc-wifi-1"; |
| 248 | }; |
| 249 | |
| 250 | reg_cldo3: cldo3 { |
| 251 | regulator-min-microvolt = <3300000>; |
| 252 | regulator-max-microvolt = <3300000>; |
| 253 | regulator-name = "vcc-wifi-2"; |
| 254 | }; |
| 255 | |
| 256 | reg_dcdca: dcdca { |
| 257 | regulator-always-on; |
| 258 | regulator-min-microvolt = <810000>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 259 | regulator-max-microvolt = <1160000>; |
| 260 | regulator-ramp-delay = <2500>; |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 261 | regulator-name = "vdd-cpu"; |
| 262 | }; |
| 263 | |
| 264 | reg_dcdcc: dcdcc { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 265 | regulator-enable-ramp-delay = <32000>; |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 266 | regulator-min-microvolt = <810000>; |
| 267 | regulator-max-microvolt = <1080000>; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 268 | regulator-ramp-delay = <2500>; |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 269 | regulator-name = "vdd-gpu"; |
| 270 | }; |
| 271 | |
| 272 | reg_dcdcd: dcdcd { |
| 273 | regulator-always-on; |
| 274 | regulator-min-microvolt = <960000>; |
| 275 | regulator-max-microvolt = <960000>; |
| 276 | regulator-name = "vdd-sys"; |
| 277 | }; |
| 278 | |
| 279 | reg_dcdce: dcdce { |
| 280 | regulator-always-on; |
| 281 | regulator-min-microvolt = <1200000>; |
| 282 | regulator-max-microvolt = <1200000>; |
| 283 | regulator-name = "vcc-dram"; |
| 284 | }; |
| 285 | |
| 286 | sw { |
| 287 | /* unused */ |
| 288 | }; |
| 289 | }; |
| 290 | }; |
| 291 | }; |
| 292 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 293 | &spdif { |
| 294 | status = "okay"; |
| 295 | }; |
| 296 | |
Clément Péron | 71a9177 | 2019-04-12 16:15:26 +0200 | [diff] [blame] | 297 | &uart0 { |
| 298 | pinctrl-names = "default"; |
| 299 | pinctrl-0 = <&uart0_ph_pins>; |
| 300 | status = "okay"; |
| 301 | }; |
Clément Péron | 725089c | 2019-08-25 18:04:18 +0200 | [diff] [blame] | 302 | |
| 303 | &usb2otg { |
| 304 | dr_mode = "host"; |
| 305 | status = "okay"; |
| 306 | }; |
| 307 | |
| 308 | &usb2phy { |
| 309 | usb0_vbus-supply = <®_vcc5v>; |
| 310 | status = "okay"; |
| 311 | }; |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 312 | |
| 313 | &usb3phy { |
| 314 | status = "okay"; |
| 315 | }; |