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 <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/87plha2wzr.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/874ixxcg3w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
Kuninori Morimoto 2025-04-17 23:23:36 +00:00 committed by Geert Uytterhoeven
parent 06534edc0d
commit ca764d5321

View File

@ -4,6 +4,37 @@
*
* Copyright (C) 2025 Marek Vasut <marek.vasut+renesas@mailbox.org>
*/
/*
* DA7212 Codec settings
*
* for Playback
* > amixer set "Headphone" 40%
* > amixer set "Headphone" on
* > amixer set "Mixout Left DAC Left" on
* > amixer set "Mixout Right DAC Right" on
* > aplay xxx.wav
*
* for Capture (Aux/Mic)
*
* on/off (B)
* CONN3 (HeadSet) ---+----> MSIOF1
* |
* CONN4 AUX ---------+ on/off (A)
*
* > amixer set "Mixin PGA" on
* > amixer set "Mixin PGA" 50%
* > amixer set "ADC" on
* > amixer set "ADC" 80%
* > amixer set "Aux" on ^
* > amixer set "Aux" 80% | (A)
* > amixer set "Mixin Left Aux Left" on |
* > amixer set "Mixin Right Aux Right" on v
* > amixer set "Mic 1" on ^
* > amixer set "Mic 1" 80% | (B)
* > amixer set "Mixin Left Mic 1" on |
* > amixer set "Mixin Right Mic 1" on v
* > arecord -f cd xxx.wav
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
@ -133,6 +164,12 @@ sn65dsi86_refclk: clk-x9 {
clock-frequency = <38400000>;
};
/* Page 30 / Audio_Codec */
sound_card: sound {
compatible = "audio-graph-card2";
links = <&msiof1_snd>;
};
/* Page 17 uSD-Slot */
vcc_sdhi: regulator-vcc-sdhi {
compatible = "regulator-gpio";
@ -145,6 +182,10 @@ vcc_sdhi: regulator-vcc-sdhi {
};
};
&audio_clkin {
clock-frequency = <24576000>;
};
/* Page 22 / Ether_AVB0 */
&avb0 {
pinctrl-0 = <&avb0_pins>;
@ -334,6 +375,29 @@ i2c0_mux1: i2c@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
/* Page 30 / Audio_Codec */
codec@1a {
compatible = "dlg,da7212";
#sound-dai-cells = <0>;
reg = <0x1a>;
clocks = <&rcar_sound>;
clock-names = "mclk";
VDDA-supply = <&reg_1p8v>;
VDDMIC-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
port {
da7212_endpoint: endpoint {
bitclock-master;
frame-master;
remote-endpoint = <&msiof1_snd_endpoint>;
};
};
};
};
i2c0_mux2: i2c@2 {
@ -404,6 +468,23 @@ &mmc0 {
status = "okay";
};
&msiof1 {
pinctrl-0 = <&msiof1_pins>;
pinctrl-names = "default";
status = "okay";
/* ignore DT warning */
/delete-property/#address-cells;
/delete-property/#size-cells;
msiof1_snd: port {
msiof1_snd_endpoint: endpoint {
remote-endpoint = <&da7212_endpoint>;
};
};
};
/* Page 26 / 2230 Key M M.2 */
&pcie0_clkref {
clock-frequency = <100000000>;
@ -584,6 +665,31 @@ sd_uhs_pins: sd-uhs {
function = "mmc";
power-source = <1800>;
};
/* Page 30 / Audio_Codec */
msiof1_pins: sound {
groups = "msiof1_clk", "msiof1_sync", "msiof1_txd", "msiof1_rxd";
function = "msiof1";
};
/* Page 30 / Audio_Codec */
sound_clk_pins: sound-clk {
groups = "audio_clkin", "audio_clkout";
function = "audio_clk";
};
};
/* Page 30 / Audio_Codec */
&rcar_sound {
pinctrl-0 = <&sound_clk_pins>;
pinctrl-names = "default";
/* It is used for ADG output as DA7212_MCLK */
/* audio_clkout */
clock-frequency = <12288000>; /* 48 kHz groups */
status = "okay";
};
/* Page 31 / FAN */