Skip to content

Commit ca764d5

Browse files
morimotogeertu
authored andcommitted
arm64: dts: renesas: sparrow-hawk: Add MSIOF Sound support
Sparrow Hawk has Headset (CONN3) AUX_IN (CONN4) for Sound input/output which is using MSIOF. Support it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 06534ed commit ca764d5

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk.dts

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@
44
*
55
* Copyright (C) 2025 Marek Vasut <[email protected]>
66
*/
7+
/*
8+
* DA7212 Codec settings
9+
*
10+
* for Playback
11+
* > amixer set "Headphone" 40%
12+
* > amixer set "Headphone" on
13+
* > amixer set "Mixout Left DAC Left" on
14+
* > amixer set "Mixout Right DAC Right" on
15+
* > aplay xxx.wav
16+
*
17+
* for Capture (Aux/Mic)
18+
*
19+
* on/off (B)
20+
* CONN3 (HeadSet) ---+----> MSIOF1
21+
* |
22+
* CONN4 AUX ---------+ on/off (A)
23+
*
24+
* > amixer set "Mixin PGA" on
25+
* > amixer set "Mixin PGA" 50%
26+
* > amixer set "ADC" on
27+
* > amixer set "ADC" 80%
28+
* > amixer set "Aux" on ^
29+
* > amixer set "Aux" 80% | (A)
30+
* > amixer set "Mixin Left Aux Left" on |
31+
* > amixer set "Mixin Right Aux Right" on v
32+
* > amixer set "Mic 1" on ^
33+
* > amixer set "Mic 1" 80% | (B)
34+
* > amixer set "Mixin Left Mic 1" on |
35+
* > amixer set "Mixin Right Mic 1" on v
36+
* > arecord -f cd xxx.wav
37+
*/
738

839
/dts-v1/;
940
#include <dt-bindings/gpio/gpio.h>
@@ -133,6 +164,12 @@
133164
clock-frequency = <38400000>;
134165
};
135166

167+
/* Page 30 / Audio_Codec */
168+
sound_card: sound {
169+
compatible = "audio-graph-card2";
170+
links = <&msiof1_snd>;
171+
};
172+
136173
/* Page 17 uSD-Slot */
137174
vcc_sdhi: regulator-vcc-sdhi {
138175
compatible = "regulator-gpio";
@@ -145,6 +182,10 @@
145182
};
146183
};
147184

185+
&audio_clkin {
186+
clock-frequency = <24576000>;
187+
};
188+
148189
/* Page 22 / Ether_AVB0 */
149190
&avb0 {
150191
pinctrl-0 = <&avb0_pins>;
@@ -334,6 +375,29 @@
334375
reg = <1>;
335376
#address-cells = <1>;
336377
#size-cells = <0>;
378+
379+
/* Page 30 / Audio_Codec */
380+
codec@1a {
381+
compatible = "dlg,da7212";
382+
383+
#sound-dai-cells = <0>;
384+
reg = <0x1a>;
385+
386+
clocks = <&rcar_sound>;
387+
clock-names = "mclk";
388+
389+
VDDA-supply = <&reg_1p8v>;
390+
VDDMIC-supply = <&reg_3p3v>;
391+
VDDIO-supply = <&reg_3p3v>;
392+
393+
port {
394+
da7212_endpoint: endpoint {
395+
bitclock-master;
396+
frame-master;
397+
remote-endpoint = <&msiof1_snd_endpoint>;
398+
};
399+
};
400+
};
337401
};
338402

339403
i2c0_mux2: i2c@2 {
@@ -404,6 +468,23 @@
404468
status = "okay";
405469
};
406470

471+
&msiof1 {
472+
pinctrl-0 = <&msiof1_pins>;
473+
pinctrl-names = "default";
474+
475+
status = "okay";
476+
477+
/* ignore DT warning */
478+
/delete-property/#address-cells;
479+
/delete-property/#size-cells;
480+
481+
msiof1_snd: port {
482+
msiof1_snd_endpoint: endpoint {
483+
remote-endpoint = <&da7212_endpoint>;
484+
};
485+
};
486+
};
487+
407488
/* Page 26 / 2230 Key M M.2 */
408489
&pcie0_clkref {
409490
clock-frequency = <100000000>;
@@ -584,6 +665,31 @@
584665
function = "mmc";
585666
power-source = <1800>;
586667
};
668+
669+
/* Page 30 / Audio_Codec */
670+
msiof1_pins: sound {
671+
groups = "msiof1_clk", "msiof1_sync", "msiof1_txd", "msiof1_rxd";
672+
function = "msiof1";
673+
};
674+
675+
/* Page 30 / Audio_Codec */
676+
sound_clk_pins: sound-clk {
677+
groups = "audio_clkin", "audio_clkout";
678+
function = "audio_clk";
679+
};
680+
};
681+
682+
/* Page 30 / Audio_Codec */
683+
&rcar_sound {
684+
pinctrl-0 = <&sound_clk_pins>;
685+
pinctrl-names = "default";
686+
687+
/* It is used for ADG output as DA7212_MCLK */
688+
689+
/* audio_clkout */
690+
clock-frequency = <12288000>; /* 48 kHz groups */
691+
692+
status = "okay";
587693
};
588694

589695
/* Page 31 / FAN */

0 commit comments

Comments
 (0)