|
| 1 | +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | +// Copyright (C) 2026 Jun Yan < [email protected]> |
| 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 = "TaiqiCat (TQC) A01"; |
| 14 | + compatible = "ultrapower,taiqicat-a01", "allwinner,sun50i-h6"; |
| 15 | + |
| 16 | + aliases { |
| 17 | + ethernet1 = &sdio_wifi; |
| 18 | + serial0 = &uart0; |
| 19 | + }; |
| 20 | + |
| 21 | + chosen { |
| 22 | + stdout-path = "serial0:115200n8"; |
| 23 | + }; |
| 24 | + |
| 25 | + connector { |
| 26 | + compatible = "hdmi-connector"; |
| 27 | + ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
| 28 | + type = "a"; |
| 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-0 { |
| 48 | + label = "taiqicat:blue: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 | + wifi_pwrseq: wifi-pwrseq { |
| 82 | + compatible = "mmc-pwrseq-simple"; |
| 83 | + clocks = <&rtc CLK_OSC32K_FANOUT>; |
| 84 | + clock-names = "ext_clock"; |
| 85 | + reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ |
| 86 | + post-power-on-delay-ms = <200>; |
| 87 | + }; |
| 88 | +}; |
| 89 | + |
| 90 | +&cpu0 { |
| 91 | + cpu-supply = <®_dcdca>; |
| 92 | +}; |
| 93 | + |
| 94 | +&de { |
| 95 | + status = "okay"; |
| 96 | +}; |
| 97 | + |
| 98 | +&dwc3 { |
| 99 | + status = "okay"; |
| 100 | +}; |
| 101 | + |
| 102 | +&ehci0 { |
| 103 | + status = "okay"; |
| 104 | +}; |
| 105 | + |
| 106 | +&ehci3 { |
| 107 | + status = "okay"; |
| 108 | +}; |
| 109 | + |
| 110 | +&gpu { |
| 111 | + mali-supply = <®_dcdcc>; |
| 112 | + status = "okay"; |
| 113 | +}; |
| 114 | + |
| 115 | +&hdmi { |
| 116 | + hvcc-supply = <®_bldo2>; |
| 117 | + status = "okay"; |
| 118 | +}; |
| 119 | + |
| 120 | +&hdmi_out { |
| 121 | + hdmi_out_con: endpoint { |
| 122 | + remote-endpoint = <&hdmi_con_in>; |
| 123 | + }; |
| 124 | +}; |
| 125 | + |
| 126 | +&mmc0 { |
| 127 | + vmmc-supply = <®_cldo1>; |
| 128 | + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 129 | + bus-width = <4>; |
| 130 | + disable-wp; |
| 131 | + status = "okay"; |
| 132 | +}; |
| 133 | + |
| 134 | +&mmc1 { |
| 135 | + vmmc-supply = <®_cldo3>; |
| 136 | + vqmmc-supply = <®_bldo3>; |
| 137 | + mmc-pwrseq = <&wifi_pwrseq>; |
| 138 | + bus-width = <4>; |
| 139 | + non-removable; |
| 140 | + keep-power-in-suspend; |
| 141 | + status = "okay"; |
| 142 | + |
| 143 | + sdio_wifi: wifi@1 { |
| 144 | + reg = <1>; |
| 145 | + compatible = "brcm,bcm43430a1-fmac", "brcm,bcm4329-fmac"; |
| 146 | + interrupt-parent = <&r_pio>; |
| 147 | + interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 */ |
| 148 | + interrupt-names = "host-wake"; |
| 149 | + }; |
| 150 | +}; |
| 151 | + |
| 152 | +&mmc2 { |
| 153 | + vmmc-supply = <®_cldo1>; |
| 154 | + vqmmc-supply = <®_bldo2>; |
| 155 | + cap-mmc-hw-reset; |
| 156 | + non-removable; |
| 157 | + mmc-hs200-1_8v; |
| 158 | + bus-width = <8>; |
| 159 | + status = "okay"; |
| 160 | +}; |
| 161 | + |
| 162 | +&ohci0 { |
| 163 | + status = "okay"; |
| 164 | +}; |
| 165 | + |
| 166 | +&ohci3 { |
| 167 | + status = "okay"; |
| 168 | +}; |
| 169 | + |
| 170 | +&pio { |
| 171 | + vcc-pc-supply = <®_bldo2>; |
| 172 | + vcc-pd-supply = <®_cldo1>; |
| 173 | + vcc-pg-supply = <®_bldo3>; |
| 174 | +}; |
| 175 | + |
| 176 | +&r_i2c { |
| 177 | + status = "okay"; |
| 178 | + |
| 179 | + axp805: pmic@36 { |
| 180 | + compatible = "x-powers,axp805", "x-powers,axp806"; |
| 181 | + reg = <0x36>; |
| 182 | + interrupt-parent = <&r_intc>; |
| 183 | + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>; |
| 184 | + interrupt-controller; |
| 185 | + #interrupt-cells = <1>; |
| 186 | + x-powers,self-working-mode; |
| 187 | + vina-supply = <®_vcc5v>; |
| 188 | + vinb-supply = <®_vcc5v>; |
| 189 | + vinc-supply = <®_vcc5v>; |
| 190 | + vind-supply = <®_vcc5v>; |
| 191 | + vine-supply = <®_vcc5v>; |
| 192 | + aldoin-supply = <®_vcc5v>; |
| 193 | + bldoin-supply = <®_vcc5v>; |
| 194 | + cldoin-supply = <®_vcc5v>; |
| 195 | + |
| 196 | + regulators { |
| 197 | + reg_aldo1: aldo1 { |
| 198 | + regulator-always-on; |
| 199 | + regulator-min-microvolt = <3300000>; |
| 200 | + regulator-max-microvolt = <3300000>; |
| 201 | + regulator-name = "vcc-pl-led-ir-pg-pm-ts"; |
| 202 | + }; |
| 203 | + |
| 204 | + reg_aldo2: aldo2 { |
| 205 | + regulator-min-microvolt = <3300000>; |
| 206 | + regulator-max-microvolt = <3300000>; |
| 207 | + regulator-name = "vcc-ac200"; |
| 208 | + regulator-enable-ramp-delay = <100000>; |
| 209 | + }; |
| 210 | + |
| 211 | + aldo3 { |
| 212 | + /* unused */ |
| 213 | + }; |
| 214 | + |
| 215 | + reg_bldo1: bldo1 { |
| 216 | + regulator-always-on; |
| 217 | + regulator-min-microvolt = <1800000>; |
| 218 | + regulator-max-microvolt = <1800000>; |
| 219 | + regulator-name = "vcc18-dram-bias-pll"; |
| 220 | + }; |
| 221 | + |
| 222 | + reg_bldo2: bldo2 { |
| 223 | + regulator-always-on; |
| 224 | + regulator-min-microvolt = <1800000>; |
| 225 | + regulator-max-microvolt = <1800000>; |
| 226 | + regulator-name = "vcc-pc-emmc-efuse-hdmi"; |
| 227 | + }; |
| 228 | + |
| 229 | + reg_bldo3: bldo3 { |
| 230 | + regulator-always-on; |
| 231 | + regulator-min-microvolt = <1800000>; |
| 232 | + regulator-max-microvolt = <1800000>; |
| 233 | + regulator-name = "vcc-pg-wifiio"; |
| 234 | + }; |
| 235 | + |
| 236 | + bldo4 { |
| 237 | + /* unused */ |
| 238 | + }; |
| 239 | + |
| 240 | + reg_cldo1: cldo1 { |
| 241 | + regulator-always-on; |
| 242 | + regulator-min-microvolt = <3300000>; |
| 243 | + regulator-max-microvolt = <3300000>; |
| 244 | + regulator-name = "vcc33-io-pd-emmc-sd-usb-uart"; |
| 245 | + }; |
| 246 | + |
| 247 | + /* This regulator is connected with CLDO3 */ |
| 248 | + reg_cldo2: cldo2 { |
| 249 | + regulator-always-on; |
| 250 | + regulator-min-microvolt = <3300000>; |
| 251 | + regulator-max-microvolt = <3300000>; |
| 252 | + regulator-name = "vcc-wifi-1"; |
| 253 | + }; |
| 254 | + |
| 255 | + reg_cldo3: cldo3 { |
| 256 | + regulator-min-microvolt = <3300000>; |
| 257 | + regulator-max-microvolt = <3300000>; |
| 258 | + regulator-name = "vcc-wifi-2"; |
| 259 | + }; |
| 260 | + |
| 261 | + reg_dcdca: dcdca { |
| 262 | + regulator-always-on; |
| 263 | + regulator-min-microvolt = <810000>; |
| 264 | + regulator-max-microvolt = <1160000>; |
| 265 | + regulator-ramp-delay = <2500>; |
| 266 | + regulator-name = "vdd-cpu"; |
| 267 | + }; |
| 268 | + |
| 269 | + reg_dcdcc: dcdcc { |
| 270 | + regulator-enable-ramp-delay = <32000>; |
| 271 | + regulator-min-microvolt = <810000>; |
| 272 | + regulator-max-microvolt = <1080000>; |
| 273 | + regulator-ramp-delay = <2500>; |
| 274 | + regulator-name = "vdd-gpu"; |
| 275 | + }; |
| 276 | + |
| 277 | + reg_dcdcd: dcdcd { |
| 278 | + regulator-always-on; |
| 279 | + regulator-min-microvolt = <960000>; |
| 280 | + regulator-max-microvolt = <960000>; |
| 281 | + regulator-name = "vdd-sys-hdmi-usb"; |
| 282 | + }; |
| 283 | + |
| 284 | + reg_dcdce: dcdce { |
| 285 | + regulator-always-on; |
| 286 | + regulator-min-microvolt = <1200000>; |
| 287 | + regulator-max-microvolt = <1200000>; |
| 288 | + regulator-name = "vcc-dram"; |
| 289 | + }; |
| 290 | + |
| 291 | + sw { |
| 292 | + /* unused */ |
| 293 | + }; |
| 294 | + }; |
| 295 | + }; |
| 296 | +}; |
| 297 | + |
| 298 | +&r_ir { |
| 299 | + status = "okay"; |
| 300 | +}; |
| 301 | + |
| 302 | +&r_pio { |
| 303 | + /* |
| 304 | + * PL0 and PL1 are used for PMIC I2C |
| 305 | + * don't enable the pl-supply else |
| 306 | + * it will fail at boot |
| 307 | + * |
| 308 | + * vcc-pl-supply = <®_aldo1>; |
| 309 | + */ |
| 310 | + vcc-pm-supply = <®_aldo1>; |
| 311 | +}; |
| 312 | + |
| 313 | +&rtc { |
| 314 | + clocks = <&ext_osc32k>; |
| 315 | +}; |
| 316 | + |
| 317 | +&spdif { |
| 318 | + pinctrl-names = "default"; |
| 319 | + pinctrl-0 = <&spdif_tx_pin>; |
| 320 | + status = "okay"; |
| 321 | +}; |
| 322 | + |
| 323 | +&uart0 { |
| 324 | + pinctrl-names = "default"; |
| 325 | + pinctrl-0 = <&uart0_ph_pins>; |
| 326 | + status = "okay"; |
| 327 | +}; |
| 328 | + |
| 329 | +&uart1 { |
| 330 | + pinctrl-names = "default"; |
| 331 | + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; |
| 332 | + uart-has-rtscts; |
| 333 | + status = "okay"; |
| 334 | + |
| 335 | + bluetooth { |
| 336 | + compatible = "brcm,bcm43430a1-bt"; |
| 337 | + clocks = <&rtc CLK_OSC32K_FANOUT>; |
| 338 | + clock-names = "lpo"; |
| 339 | + vbat-supply = <®_cldo3>; |
| 340 | + vddio-supply = <®_bldo3>; |
| 341 | + device-wakeup-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */ |
| 342 | + host-wakeup-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */ |
| 343 | + shutdown-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */ |
| 344 | + max-speed = <1500000>; |
| 345 | + }; |
| 346 | +}; |
| 347 | + |
| 348 | +&usb2otg { |
| 349 | + dr_mode = "host"; |
| 350 | + status = "okay"; |
| 351 | +}; |
| 352 | + |
| 353 | +&usb2phy { |
| 354 | + usb0_vbus-supply = <®_vcc5v>; |
| 355 | + usb3_vbus-supply = <®_vcc5v>; |
| 356 | + status = "okay"; |
| 357 | +}; |
| 358 | + |
| 359 | +&usb3phy { |
| 360 | + status = "okay"; |
| 361 | +}; |
0 commit comments