Skip to content

Commit 2521f47

Browse files
Julien MassotAngeloGioacchino Del Regno
authored andcommitted
arm64: dts: mediatek: mt8395-nio-12l: Enable Audio DSP and sound card
Add memory regions for the Audio DSP (ADSP) and Audio Front-End (AFE), and enable both components in the device tree. Also, define the required pin configuration and add a sound card node configured to use the ADSP. This enables audio output through the 3.5mm headphone jack available on the board. Signed-off-by: Julien Massot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
1 parent 7081ba4 commit 2521f47

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,21 @@
139139
no-map;
140140
};
141141

142-
afe_mem: memory@60000000 {
142+
adsp_mem: memory@60000000 {
143143
compatible = "shared-dma-pool";
144-
reg = <0 0x60000000 0 0x1100000>;
144+
reg = <0 0x60000000 0 0xf00000>;
145+
no-map;
146+
};
147+
148+
afe_dma_mem: memory@60f00000 {
149+
compatible = "shared-dma-pool";
150+
reg = <0 0x60f00000 0 0x100000>;
151+
no-map;
152+
};
153+
154+
adsp_dma_mem: memory@61000000 {
155+
compatible = "shared-dma-pool";
156+
reg = <0 0x61000000 0 0x100000>;
145157
no-map;
146158
};
147159

@@ -152,6 +164,16 @@
152164
};
153165
};
154166

167+
&adsp {
168+
memory-region = <&adsp_dma_mem>, <&adsp_mem>;
169+
status = "okay";
170+
};
171+
172+
&afe {
173+
memory-region = <&afe_dma_mem>;
174+
status = "okay";
175+
};
176+
155177
&cpu0 {
156178
cpu-supply = <&mt6359_vcore_buck_reg>;
157179
};
@@ -514,6 +536,18 @@
514536
&pio {
515537
mediatek,rsel-resistance-in-si-unit;
516538

539+
audio_default_pins: audio-default-pins {
540+
pins-cmd-dat {
541+
pinmux = <PINMUX_GPIO70__FUNC_AUD_SYNC_MOSI>,
542+
<PINMUX_GPIO69__FUNC_AUD_CLK_MOSI>,
543+
<PINMUX_GPIO71__FUNC_AUD_DAT_MOSI0>,
544+
<PINMUX_GPIO72__FUNC_AUD_DAT_MOSI1>,
545+
<PINMUX_GPIO73__FUNC_AUD_DAT_MISO0>,
546+
<PINMUX_GPIO74__FUNC_AUD_DAT_MISO1>,
547+
<PINMUX_GPIO75__FUNC_AUD_DAT_MISO2>;
548+
};
549+
};
550+
517551
dsi0_backlight_pins: dsi0-backlight-pins {
518552
pins-backlight-en {
519553
pinmux = <PINMUX_GPIO107__FUNC_GPIO107>;
@@ -854,6 +888,26 @@
854888
status = "okay";
855889
};
856890

891+
&sound {
892+
compatible = "mediatek,mt8195_mt6359";
893+
model = "mt8395-evk";
894+
pinctrl-names = "default";
895+
pinctrl-0 = <&audio_default_pins>;
896+
audio-routing =
897+
"Headphone", "Headphone L",
898+
"Headphone", "Headphone R";
899+
mediatek,adsp = <&adsp>;
900+
status = "okay";
901+
902+
headphone-dai-link {
903+
link-name = "DL_SRC_BE";
904+
905+
codec {
906+
sound-dai = <&pmic 0>;
907+
};
908+
};
909+
};
910+
857911
&spi1 {
858912
/* Exposed at 40 pin connector */
859913
pinctrl-0 = <&spi1_pins>;

0 commit comments

Comments
 (0)