1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2025 Ferass El Hafidi <funderscore@postmarketos.org> 4 * Heavily based on meson-gxl-s805x-p241.dtb: 5 * - Copyright (c) 2018 BayLibre, SAS. 6 * Author: Neil Armstrong <narmstrong@baylibre.com> 7 * Author: Jerome Brunet <jbrunet@baylibre.com> 8 */ 9 10/dts-v1/; 11 12#include <dt-bindings/input/input.h> 13#include <dt-bindings/leds/common.h> 14#include <dt-bindings/sound/meson-aiu.h> 15 16#include "meson-gxl-s805y.dtsi" 17 18/ { 19 compatible = "xiaomi,aquaman", "amlogic,s805y", "amlogic,meson-gxl"; 20 model = "Xiaomi Mi TV Stick (aquaman)"; 21 22 aliases { 23 serial0 = &uart_AO; 24 serial1 = &uart_A; 25 }; 26 27 chosen { 28 stdout-path = "serial0:115200n8"; 29 }; 30 31 emmc_pwrseq: emmc-pwrseq { 32 compatible = "mmc-pwrseq-emmc"; 33 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 34 }; 35 36 hdmi-connector { 37 compatible = "hdmi-connector"; 38 type = "a"; 39 40 port { 41 hdmi_connector_in: endpoint { 42 remote-endpoint = <&hdmi_tx_tmds_out>; 43 }; 44 }; 45 }; 46 47 leds { 48 compatible = "gpio-leds"; 49 50 led-white { 51 color = <LED_COLOR_ID_WHITE>; 52 function = LED_FUNCTION_POWER; 53 gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>; 54 default-state = "on"; 55 panic-indicator; 56 }; 57 }; 58 59 memory@0 { 60 device_type = "memory"; 61 reg = <0x0 0x0 0x0 0x40000000>; 62 }; 63 64 vddio_boot: regulator-vddio-boot { 65 compatible = "regulator-fixed"; 66 regulator-name = "VDDIO_BOOT"; 67 regulator-min-microvolt = <1800000>; 68 regulator-max-microvolt = <1800000>; 69 }; 70 71 vddao_3v3: regulator-vddao-3v3 { 72 compatible = "regulator-fixed"; 73 regulator-name = "VDDAO_3V3"; 74 regulator-min-microvolt = <3300000>; 75 regulator-max-microvolt = <3300000>; 76 }; 77 78 vddio_ao18: regulator-vddio-ao18 { 79 compatible = "regulator-fixed"; 80 regulator-name = "VDDIO_AO18"; 81 regulator-min-microvolt = <1800000>; 82 regulator-max-microvolt = <1800000>; 83 }; 84 85 vcc_3v3: regulator-vcc-3v3 { 86 compatible = "regulator-fixed"; 87 regulator-name = "VCC_3V3"; 88 regulator-min-microvolt = <3300000>; 89 regulator-max-microvolt = <3300000>; 90 }; 91 92 vcc_5v: regulator-vcc-5v { 93 compatible = "regulator-fixed"; 94 regulator-name = "VCC_5V"; 95 regulator-min-microvolt = <5000000>; 96 regulator-max-microvolt = <5000000>; 97 }; 98 99 emmc_pwrseq: emmc-pwrseq { 100 compatible = "mmc-pwrseq-emmc"; 101 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 102 }; 103 104 wifi32k: wifi32k { 105 compatible = "pwm-clock"; 106 #clock-cells = <0>; 107 clock-frequency = <32768>; 108 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 109 }; 110 111 sdio_pwrseq: sdio-pwrseq { 112 compatible = "mmc-pwrseq-simple"; 113 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 114 clocks = <&wifi32k>; 115 clock-names = "ext_clock"; 116 }; 117 118 sound { 119 compatible = "amlogic,gx-sound-card"; 120 model = "XIAOMI-AQUAMAN"; 121 clocks = <&clkc CLKID_MPLL0>, 122 <&clkc CLKID_MPLL1>, 123 <&clkc CLKID_MPLL2>; 124 125 assigned-clocks = <&clkc CLKID_MPLL0>, 126 <&clkc CLKID_MPLL1>, 127 <&clkc CLKID_MPLL2>; 128 assigned-clock-parents = <0>, <0>, <0>; 129 assigned-clock-rates = <294912000>, 130 <270950400>, 131 <393216000>; 132 133 dai-link-0 { 134 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>; 135 }; 136 137 dai-link-1 { 138 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>; 139 dai-format = "i2s"; 140 mclk-fs = <256>; 141 142 codec-0 { 143 sound-dai = <&aiu AIU_HDMI CTRL_I2S>; 144 }; 145 }; 146 147 dai-link-2 { 148 sound-dai = <&aiu AIU_HDMI CTRL_OUT>; 149 150 codec-0 { 151 sound-dai = <&hdmi_tx>; 152 }; 153 }; 154 }; 155}; 156 157&aiu { 158 status = "okay"; 159}; 160 161&cec_AO { 162 status = "okay"; 163 pinctrl-0 = <&ao_cec_pins>; 164 pinctrl-names = "default"; 165 hdmi-phandle = <&hdmi_tx>; 166}; 167 168&hdmi_tx { 169 status = "okay"; 170 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 171 pinctrl-names = "default"; 172 hdmi-supply = <&vcc_5v>; 173}; 174 175&hdmi_tx_tmds_port { 176 hdmi_tx_tmds_out: endpoint { 177 remote-endpoint = <&hdmi_connector_in>; 178 }; 179}; 180 181&saradc { 182 status = "okay"; 183 vref-supply = <&vddio_ao18>; 184}; 185 186/* Wireless SDIO Module (Amlogic W155S1 / Realtek RTL8821CS) */ 187&sd_emmc_b { 188 status = "okay"; 189 pinctrl-0 = <&sdio_pins>; 190 pinctrl-1 = <&sdio_clk_gate_pins>; 191 pinctrl-names = "default", "clk-gate"; 192 #address-cells = <1>; 193 #size-cells = <0>; 194 195 bus-width = <4>; 196 cap-sd-highspeed; 197 max-frequency = <50000000>; 198 199 non-removable; 200 disable-wp; 201 202 /* WiFi firmware requires power to be kept while in suspend */ 203 keep-power-in-suspend; 204 205 mmc-pwrseq = <&sdio_pwrseq>; 206 207 vmmc-supply = <&vddao_3v3>; 208 vqmmc-supply = <&vddio_boot>; 209 210 sdio: wifi@1 { 211 reg = <1>; 212 }; 213}; 214 215/* eMMC */ 216&sd_emmc_c { 217 status = "okay"; 218 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 219 pinctrl-1 = <&emmc_clk_gate_pins>; 220 pinctrl-names = "default", "clk-gate"; 221 222 bus-width = <8>; 223 cap-mmc-highspeed; 224 max-frequency = <200000000>; 225 non-removable; 226 disable-wp; 227 mmc-ddr-1_8v; 228 mmc-hs200-1_8v; 229 230 mmc-pwrseq = <&emmc_pwrseq>; 231 vmmc-supply = <&vcc_3v3>; 232 vqmmc-supply = <&vddio_boot>; 233}; 234 235&pwm_ef { 236 status = "okay"; 237 pinctrl-0 = <&pwm_e_pins>; 238 pinctrl-names = "default"; 239}; 240 241/* 242 * This is connected to the Bluetooth module 243 * Note: There's no driver for the Bluetooth module of some variants yet. 244 */ 245&uart_A { 246 status = "okay"; 247 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 248 pinctrl-names = "default"; 249 uart-has-rtscts; 250}; 251 252&uart_AO { 253 status = "okay"; 254 pinctrl-0 = <&uart_ao_a_pins>; 255 pinctrl-names = "default"; 256}; 257 258&usb { 259 status = "okay"; 260 dr_mode = "otg"; 261 vbus-supply = <&vcc_5v>; 262}; 263