hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
....@@ -8,16 +8,25 @@
88 /dts-v1/;
99
1010 #include <dt-bindings/input/input.h>
11
+#include <dt-bindings/sound/meson-aiu.h>
1112
1213 #include "meson-gxl-s905x.dtsi"
1314
1415 / {
15
- compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
16
- model = "Libre Computer Board AML-S905X-CC";
16
+ compatible = "libretech,aml-s905x-cc", "amlogic,s905x",
17
+ "amlogic,meson-gxl";
18
+ model = "Libre Computer AML-S905X-CC";
1719
1820 aliases {
1921 serial0 = &uart_AO;
2022 ethernet0 = &ethmac;
23
+ };
24
+
25
+ dio2133: analog-amplifier {
26
+ compatible = "simple-audio-amplifier";
27
+ sound-name-prefix = "AU2";
28
+ VCC-supply = <&hdmi_5v>;
29
+ enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
2130 };
2231
2332 chosen {
....@@ -53,14 +62,14 @@
5362 leds {
5463 compatible = "gpio-leds";
5564
56
- system {
65
+ led-system {
5766 label = "librecomputer:system-status";
5867 gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
5968 default-state = "on";
6069 panic-indicator;
6170 };
6271
63
- blue {
72
+ led-blue {
6473 label = "librecomputer:blue";
6574 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
6675 linux,default-trigger = "heartbeat";
....@@ -115,12 +124,76 @@
115124 regulator-max-microvolt = <1800000>;
116125 };
117126
127
+ /* This is provided by LDOs on the eMMC daugther card */
118128 vddio_boot: regulator-vddio_boot {
119129 compatible = "regulator-fixed";
120130 regulator-name = "VDDIO_BOOT";
121
- regulator-min-microvolt = <3300000>;
122
- regulator-max-microvolt = <3300000>;
131
+ regulator-min-microvolt = <1800000>;
132
+ regulator-max-microvolt = <1800000>;
133
+ vin-supply = <&vcc_3v3>;
123134 };
135
+
136
+ sound {
137
+ compatible = "amlogic,gx-sound-card";
138
+ model = "GXL-LIBRETECH-S905X-CC";
139
+ audio-aux-devs = <&dio2133>;
140
+ audio-widgets = "Line", "Lineout";
141
+ audio-routing = "AU2 INL", "ACODEC LOLN",
142
+ "AU2 INR", "ACODEC LORN",
143
+ "Lineout", "AU2 OUTL",
144
+ "Lineout", "AU2 OUTR";
145
+ assigned-clocks = <&clkc CLKID_MPLL0>,
146
+ <&clkc CLKID_MPLL1>,
147
+ <&clkc CLKID_MPLL2>;
148
+ assigned-clock-parents = <0>, <0>, <0>;
149
+ assigned-clock-rates = <294912000>,
150
+ <270950400>,
151
+ <393216000>;
152
+ status = "okay";
153
+
154
+ dai-link-0 {
155
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
156
+ };
157
+
158
+ dai-link-1 {
159
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
160
+ dai-format = "i2s";
161
+ mclk-fs = <256>;
162
+
163
+ codec-0 {
164
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
165
+ };
166
+
167
+ codec-1 {
168
+ sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
169
+ };
170
+ };
171
+
172
+ dai-link-2 {
173
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
174
+
175
+ codec-0 {
176
+ sound-dai = <&hdmi_tx>;
177
+ };
178
+ };
179
+
180
+ dai-link-3 {
181
+ sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
182
+
183
+ codec-0 {
184
+ sound-dai = <&acodec>;
185
+ };
186
+ };
187
+ };
188
+};
189
+
190
+&acodec {
191
+ AVDD-supply = <&vddio_ao18>;
192
+ status = "okay";
193
+};
194
+
195
+&aiu {
196
+ status = "okay";
124197 };
125198
126199 &cec_AO {
....@@ -235,11 +308,10 @@
235308
236309 bus-width = <4>;
237310 cap-sd-highspeed;
238
- max-frequency = <100000000>;
311
+ max-frequency = <50000000>;
239312 disable-wp;
240313
241
- cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
242
- cd-inverted;
314
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
243315
244316 vmmc-supply = <&vcc_3v3>;
245317 vqmmc-supply = <&vcc_card>;
....@@ -254,8 +326,9 @@
254326
255327 bus-width = <8>;
256328 cap-mmc-highspeed;
257
- mmc-ddr-3_3v;
258
- max-frequency = <50000000>;
329
+ mmc-ddr-1_8v;
330
+ mmc-hs200-1_8v;
331
+ max-frequency = <200000000>;
259332 disable-wp;
260333
261334 mmc-pwrseq = <&emmc_pwrseq>;
....@@ -269,8 +342,9 @@
269342 pinctrl-names = "default";
270343 };
271344
272
-&usb0 {
345
+&usb {
273346 status = "okay";
347
+ dr_mode = "host";
274348 };
275349
276350 &usb2_phy0 {