Debian Codegraph @

scripts/dtc/include-prefixes/arm64/amlogic/meson-gxl-s805y-xiaomi-aquaman.dts

raw
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3 * Copyright (c) 2025 Ferass El Hafidi <[email protected]>
4 * Heavily based on meson-gxl-s805x-p241.dtb:
5 * - Copyright (c) 2018 BayLibre, SAS.
6 * Author: Neil Armstrong <[email protected]>
7 * Author: Jerome Brunet <[email protected]>
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-rates = <294912000>,
129 <270950400>,
130 <393216000>;
131
132 dai-link-0 {
133 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
134 };
135
136 dai-link-1 {
137 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
138 dai-format = "i2s";
139 mclk-fs = <256>;
140
141 codec-0 {
142 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
143 };
144 };
145
146 dai-link-2 {
147 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
148
149 codec-0 {
150 sound-dai = <&hdmi_tx>;
151 };
152 };
153 };
154 };
155
156 &aiu {
157 status = "okay";
158 };
159
160 &cec_AO {
161 status = "okay";
162 pinctrl-0 = <&ao_cec_pins>;
163 pinctrl-names = "default";
164 hdmi-phandle = <&hdmi_tx>;
165 };
166
167 &hdmi_tx {
168 status = "okay";
169 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
170 pinctrl-names = "default";
171 hdmi-supply = <&vcc_5v>;
172 };
173
174 &hdmi_tx_tmds_port {
175 hdmi_tx_tmds_out: endpoint {
176 remote-endpoint = <&hdmi_connector_in>;
177 };
178 };
179
180 &saradc {
181 status = "okay";
182 vref-supply = <&vddio_ao18>;
183 };
184
185 /* Wireless SDIO Module (Amlogic W155S1 / Realtek RTL8821CS) */
186 &sd_emmc_b {
187 status = "okay";
188 pinctrl-0 = <&sdio_pins>;
189 pinctrl-1 = <&sdio_clk_gate_pins>;
190 pinctrl-names = "default", "clk-gate";
191 #address-cells = <1>;
192 #size-cells = <0>;
193
194 bus-width = <4>;
195 cap-sd-highspeed;
196 max-frequency = <50000000>;
197
198 non-removable;
199 disable-wp;
200
201 /* WiFi firmware requires power to be kept while in suspend */
202 keep-power-in-suspend;
203
204 mmc-pwrseq = <&sdio_pwrseq>;
205
206 vmmc-supply = <&vddao_3v3>;
207 vqmmc-supply = <&vddio_boot>;
208
209 sdio: wifi@1 {
210 reg = <1>;
211 };
212 };
213
214 /* eMMC */
215 &sd_emmc_c {
216 status = "okay";
217 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
218 pinctrl-1 = <&emmc_clk_gate_pins>;
219 pinctrl-names = "default", "clk-gate";
220
221 bus-width = <8>;
222 cap-mmc-highspeed;
223 max-frequency = <200000000>;
224 non-removable;
225 disable-wp;
226 mmc-ddr-1_8v;
227 mmc-hs200-1_8v;
228
229 mmc-pwrseq = <&emmc_pwrseq>;
230 vmmc-supply = <&vcc_3v3>;
231 vqmmc-supply = <&vddio_boot>;
232 };
233
234 &pwm_ef {
235 status = "okay";
236 pinctrl-0 = <&pwm_e_pins>;
237 pinctrl-names = "default";
238 };
239
240 /*
241 * This is connected to the Bluetooth module
242 * Note: There's no driver for the Bluetooth module of some variants yet.
243 */
244 &uart_A {
245 status = "okay";
246 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
247 pinctrl-names = "default";
248 uart-has-rtscts;
249 };
250
251 &uart_AO {
252 status = "okay";
253 pinctrl-0 = <&uart_ao_a_pins>;
254 pinctrl-names = "default";
255 };
256
257 &usb {
258 status = "okay";
259 dr_mode = "otg";
260 vbus-supply = <&vcc_5v>;
261 };