Skip to content

Commit 7c9c062

Browse files
jbrun3tkhilman
authored andcommitted
arm64: dts: meson: vim3: make sound card common to all variants
The vim3 sound card definition should be same all the vim3 variants Move the definition to the appropriate device tree file. Signed-off-by: Jerome Brunet <[email protected]> Signed-off-by: Kevin Hilman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1f9d87d commit 7c9c062

File tree

2 files changed

+90
-88
lines changed

2 files changed

+90
-88
lines changed

arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
* Copyright (c) 2019 Christian Hewitt <[email protected]>
66
*/
77

8-
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
9-
108
/ {
119
model = "Khadas VIM3";
1210

@@ -47,69 +45,6 @@
4745
regulator-boot-on;
4846
regulator-always-on;
4947
};
50-
51-
sound {
52-
compatible = "amlogic,axg-sound-card";
53-
model = "G12B-KHADAS-VIM3";
54-
audio-aux-devs = <&tdmout_a>;
55-
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
56-
"TDMOUT_A IN 1", "FRDDR_B OUT 0",
57-
"TDMOUT_A IN 2", "FRDDR_C OUT 0",
58-
"TDM_A Playback", "TDMOUT_A OUT";
59-
60-
assigned-clocks = <&clkc CLKID_MPLL2>,
61-
<&clkc CLKID_MPLL0>,
62-
<&clkc CLKID_MPLL1>;
63-
assigned-clock-parents = <0>, <0>, <0>;
64-
assigned-clock-rates = <294912000>,
65-
<270950400>,
66-
<393216000>;
67-
status = "okay";
68-
69-
dai-link-0 {
70-
sound-dai = <&frddr_a>;
71-
};
72-
73-
dai-link-1 {
74-
sound-dai = <&frddr_b>;
75-
};
76-
77-
dai-link-2 {
78-
sound-dai = <&frddr_c>;
79-
};
80-
81-
/* 8ch hdmi interface */
82-
dai-link-3 {
83-
sound-dai = <&tdmif_a>;
84-
dai-format = "i2s";
85-
dai-tdm-slot-tx-mask-0 = <1 1>;
86-
dai-tdm-slot-tx-mask-1 = <1 1>;
87-
dai-tdm-slot-tx-mask-2 = <1 1>;
88-
dai-tdm-slot-tx-mask-3 = <1 1>;
89-
mclk-fs = <256>;
90-
91-
codec {
92-
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
93-
};
94-
};
95-
96-
/* hdmi glue */
97-
dai-link-4 {
98-
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
99-
100-
codec {
101-
sound-dai = <&hdmi_tx>;
102-
};
103-
};
104-
};
105-
};
106-
107-
&arb {
108-
status = "okay";
109-
};
110-
111-
&clkc_audio {
112-
status = "okay";
11348
};
11449

11550
&cpu0 {
@@ -154,18 +89,6 @@
15489
clock-latency = <50000>;
15590
};
15691

157-
&frddr_a {
158-
status = "okay";
159-
};
160-
161-
&frddr_b {
162-
status = "okay";
163-
};
164-
165-
&frddr_c {
166-
status = "okay";
167-
};
168-
16992
&pwm_ab {
17093
pinctrl-0 = <&pwm_a_e_pins>;
17194
pinctrl-names = "default";
@@ -182,14 +105,3 @@
182105
status = "okay";
183106
};
184107

185-
&tdmif_a {
186-
status = "okay";
187-
};
188-
189-
&tdmout_a {
190-
status = "okay";
191-
};
192-
193-
&tohdmitx {
194-
status = "okay";
195-
};

arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <dt-bindings/input/input.h>
99
#include <dt-bindings/gpio/meson-g12a-gpio.h>
10+
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
1011

1112
/ {
1213
aliases {
@@ -161,6 +162,62 @@
161162
};
162163
};
163164

165+
166+
sound {
167+
compatible = "amlogic,axg-sound-card";
168+
model = "G12B-KHADAS-VIM3";
169+
audio-aux-devs = <&tdmout_a>;
170+
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
171+
"TDMOUT_A IN 1", "FRDDR_B OUT 0",
172+
"TDMOUT_A IN 2", "FRDDR_C OUT 0",
173+
"TDM_A Playback", "TDMOUT_A OUT";
174+
175+
assigned-clocks = <&clkc CLKID_MPLL2>,
176+
<&clkc CLKID_MPLL0>,
177+
<&clkc CLKID_MPLL1>;
178+
assigned-clock-parents = <0>, <0>, <0>;
179+
assigned-clock-rates = <294912000>,
180+
<270950400>,
181+
<393216000>;
182+
status = "okay";
183+
184+
dai-link-0 {
185+
sound-dai = <&frddr_a>;
186+
};
187+
188+
dai-link-1 {
189+
sound-dai = <&frddr_b>;
190+
};
191+
192+
dai-link-2 {
193+
sound-dai = <&frddr_c>;
194+
};
195+
196+
/* 8ch hdmi interface */
197+
dai-link-3 {
198+
sound-dai = <&tdmif_a>;
199+
dai-format = "i2s";
200+
dai-tdm-slot-tx-mask-0 = <1 1>;
201+
dai-tdm-slot-tx-mask-1 = <1 1>;
202+
dai-tdm-slot-tx-mask-2 = <1 1>;
203+
dai-tdm-slot-tx-mask-3 = <1 1>;
204+
mclk-fs = <256>;
205+
206+
codec {
207+
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
208+
};
209+
};
210+
211+
/* hdmi glue */
212+
dai-link-4 {
213+
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
214+
215+
codec {
216+
sound-dai = <&hdmi_tx>;
217+
};
218+
};
219+
};
220+
164221
wifi32k: wifi32k {
165222
compatible = "pwm-clock";
166223
#clock-cells = <0>;
@@ -169,6 +226,14 @@
169226
};
170227
};
171228

229+
&arb {
230+
status = "okay";
231+
};
232+
233+
&clkc_audio {
234+
status = "okay";
235+
};
236+
172237
&cec_AO {
173238
pinctrl-0 = <&cec_ao_a_h_pins>;
174239
pinctrl-names = "default";
@@ -221,6 +286,18 @@
221286
amlogic,tx-delay-ns = <2>;
222287
};
223288

289+
&frddr_a {
290+
status = "okay";
291+
};
292+
293+
&frddr_b {
294+
status = "okay";
295+
};
296+
297+
&frddr_c {
298+
status = "okay";
299+
};
300+
224301
&hdmi_tx {
225302
status = "okay";
226303
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
@@ -368,6 +445,19 @@
368445
};
369446
};
370447

448+
449+
&tdmif_a {
450+
status = "okay";
451+
};
452+
453+
&tdmout_a {
454+
status = "okay";
455+
};
456+
457+
&tohdmitx {
458+
status = "okay";
459+
};
460+
371461
&uart_A {
372462
status = "okay";
373463
pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;

0 commit comments

Comments
 (0)