ASoC: Mediatek: Add support for MT8173 SOC
Subsystems (4)
v2 cover ASoC: Mediatek: Add support for MT8173 SOC
This adds basic support for the Mediatek AFE (Audio Front End) unit of MT8173. This patch is based on Linux 4.1-rc1 and Sascha's SCPSYS power patch [1].
The AFE unit comprises several memory interfaces that communicate with CPU, a multi input multi output digital audio interconnect,
and several external interfaces (e.g. I2S).
[1] https://lkml.org/lkml/2015/6/9/172
changes since v1:
- change Kconfig to tristate
- remove unnecessary !! in the platform driver
- let MODULE_DEVICE_TABLE follow the table
- remove regulators from machine drivers
changes since RFC:
- Use DPCM to model AFE
AFE memory interfaces such as DL1, VUL are modeled as frontend DAIs, and AFE IOs such as I2S, HDMI are backend DAIs.
Which memif and IO to be used can be set in the machine driver. There is no need to indicate this in dts anymore so include/dt-bindings/sound/mtk-afe.h is removed.
AFE connections are represented by DAPM widgets and routes, and set connection APIs/tables are no longer required. (mtk-afe-connection.c and mtk-afe-connection.h are removed)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/3 ASoC: mediatek: Add AFE platform driver
This is the DPCM based platform driver of AFE (Audio Front End) unit.
--- .../devicetree/bindings/sound/mtk-afe-pcm.txt | 45 + sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/mediatek/Kconfig | 9 + sound/soc/mediatek/Makefile | 2 + sound/soc/mediatek/mtk-afe-common.h | 109 ++ sound/soc/mediatek/mtk-afe-pcm.c | 1233 ++++++++++++++++++++ 7 files changed, 1400 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt create mode 100644 sound/soc/mediatek/Kconfig create mode 100644 sound/soc/mediatek/Makefile create mode 100644 sound/soc/mediatek/mtk-afe-common.h create mode 100644 sound/soc/mediatek/mtk-afe-pcm.c
Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt new file +45 -0
@@ -0,0 +1,45 @@ +Mediatek AFE PCM controller + +Required properties: +- compatible = "mediatek,mt8173-afe-pcm"; +- reg: register location and size +- interrupts: Should contain AFE interrupt +- clock-names: should have these clock names: + "infra_sys_audio_clk", + "top_pdn_audio", + "top_pdn_aud_intbus", + "bck0", + "bck1", + "i2s0_m", + "i2s1_m", + "i2s2_m", + "i2s3_m", + "i2s3_b"; + +Example: + + afe: mt8173-afe-pcm@11220000 { + compatible = "mediatek,mt8173-afe-pcm"; + reg = <0 0x11220000 0 0x1000>; + interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_FALLING>; + clocks = <&infracfg INFRA_AUDIO>, + <&topckgen TOP_AUDIO_SEL>, + <&topckgen TOP_AUD_INTBUS_SEL>, + <&topckgen TOP_APLL1_DIV0>, + <&topckgen TOP_APLL2_DIV0>, + <&topckgen TOP_I2S0_M_CK_SEL>, + <&topckgen TOP_I2S1_M_CK_SEL>, + <&topckgen TOP_I2S2_M_CK_SEL>, + <&topckgen TOP_I2S3_M_CK_SEL>, + <&topckgen TOP_I2S3_B_CK_SEL>; + clock-names = "infra_sys_audio_clk", + "top_pdn_audio", + "top_pdn_aud_intbus", + "bck0", + "bck1", + "i2s0_m", + "i2s1_m", + "i2s2_m", + "i2s3_m", + "i2s3_b"; + };
sound/soc/Kconfig +1 -0
@@ -45,6 +45,7 @@ source "sound/soc/nuc900/Kconfig" source "sound/soc/omap/Kconfig" source "sound/soc/kirkwood/Kconfig" source "sound/soc/intel/Kconfig" +source "sound/soc/mediatek/Kconfig" source "sound/soc/mxs/Kconfig" source "sound/soc/pxa/Kconfig" source "sound/soc/qcom/Kconfig"
sound/soc/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_SND_SOC) += dwc/ obj-$(CONFIG_SND_SOC) += fsl/ obj-$(CONFIG_SND_SOC) += jz4740/ obj-$(CONFIG_SND_SOC) += intel/ +obj-$(CONFIG_SND_SOC) += mediatek/ obj-$(CONFIG_SND_SOC) += mxs/ obj-$(CONFIG_SND_SOC) += nuc900/ obj-$(CONFIG_SND_SOC) += omap/
sound/soc/mediatek/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +config SND_SOC_MEDIATEK + tristate "ASoC support for Mediatek chip" + depends on ARCH_MEDIATEK + help + This adds ASoC platform driver support for Mediatek chip + that can be used with other codecs. + Select Y if you have such device. + Ex: MT8173 +
sound/soc/mediatek/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# MTK Platform Support +obj-$(CONFIG_SND_SOC_MEDIATEK) += mtk-afe-pcm.o
sound/soc/mediatek/mtk-afe-common.h new file +109 -0
109 lines not on this page · raw message
sound/soc/mediatek/mtk-afe-pcm.c new file +1233 -0
1,233 lines not on this page · raw message
Signature · 1 line
1.8.1.1.dirty
Re: [PATCH v2 1/3] ASoC: mediatek: Add AFE platform driver
Quoted 1 line · Koro Chen
This is the DPCM based platform driver of AFE (Audio Front End) unit.
Applied, thanks.
PATCH v2 2/3 ASoC: mediatek: Add machine driver for MAX98090 codec
In reply to Koro ChenThis is the DPCM based machine driver with MAX98090
--- .../devicetree/bindings/sound/mt8173-max98090.txt | 13 ++ sound/soc/mediatek/Kconfig | 10 + sound/soc/mediatek/Makefile | 2 + sound/soc/mediatek/mt8173-max98090.c | 213 +++++++++++++++++++++ 4 files changed, 238 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8173-max98090.txt create mode 100644 sound/soc/mediatek/mt8173-max98090.c
Documentation/devicetree/bindings/sound/mt8173-max98090.txt new file +13 -0
@@ -0,0 +1,13 @@ +MT8173 with MAX98090 CODEC + +Required properties: +- compatible : "mediatek,mt8173-max98090" +- mediatek,audio-codec: the phandle of the MAX98090 audio codec + +Example: + + sound { + compatible = "mediatek,mt8173-max98090"; + mediatek,audio-codec = <&max98090>; + }; +
sound/soc/mediatek/Kconfig +10 -0
@@ -7,3 +7,13 @@ config SND_SOC_MEDIATEK Select Y if you have such device. Ex: MT8173 +config SND_SOC_MT8173_MAX98090 + tristate "ASoC Audio driver for MT8173 with MAX98090 codec" + depends on SND_SOC_MEDIATEK + select SND_SOC_MAX98090 + help + This adds ASoC driver for Mediatek MT8173 boards + with the MAX98090 audio codec. + Select Y if you have such device. + If unsure select "N". +
sound/soc/mediatek/Makefile +2 -0
@@ -1,2 +1,4 @@ # MTK Platform Support obj-$(CONFIG_SND_SOC_MEDIATEK) += mtk-afe-pcm.o +# Machine support +obj-$(CONFIG_SND_SOC_MT8173_MAX98090) += mt8173-max98090.o
sound/soc/mediatek/mt8173-max98090.c new file +213 -0
213 lines not on this page · raw message
Signature · 6 lines
1.8.1.1.dirty -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 2/3] ASoC: mediatek: Add machine driver for MAX98090 codec
Quoted 1 line · Koro Chen
This is the DPCM based machine driver with MAX98090
Applied,, thanks.
PATCH v2 3/3 ASoC: mediatek: Add machine driver for rt5650 rt5676 codec
In reply to Koro ChenThis is the DPCM based machine driver with rt5650 and rt5676
--- .../bindings/sound/mt8173-rt5650-rt5676.txt | 13 + sound/soc/mediatek/Kconfig | 11 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8173-rt5650-rt5676.c | 278 +++++++++++++++++++++ 4 files changed, 303 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt create mode 100644 sound/soc/mediatek/mt8173-rt5650-rt5676.c
Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt new file +13 -0
@@ -0,0 +1,13 @@ +MT8173 with RT5650 RT5676 CODECS + +Required properties: +- compatible : "mediatek,mt8173-rt5650-rt5676" +- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs + +Example: + + sound { + compatible = "mediatek,mt8173-rt5650-rt5676"; + mediatek,audio-codec = <&rt5650 &rt5676>; + }; +
sound/soc/mediatek/Kconfig +11 -0
@@ -17,3 +17,14 @@ config SND_SOC_MT8173_MAX98090 Select Y if you have such device. If unsure select "N". +config SND_SOC_MT8173_RT5650_RT5676 + tristate "ASoC Audio driver for MT8173 with RT5650 RT5676 codecs" + depends on SND_SOC_MEDIATEK + select SND_SOC_RT5645 + select SND_SOC_RT5677 + help + This adds ASoC driver for Mediatek MT8173 boards + with the RT5650 and RT5676 codecs. + Select Y if you have such device. + If unsure select "N". +
sound/soc/mediatek/Makefile +1 -0
@@ -2,3 +2,4 @@ obj-$(CONFIG_SND_SOC_MEDIATEK) += mtk-afe-pcm.o # Machine support obj-$(CONFIG_SND_SOC_MT8173_MAX98090) += mt8173-max98090.o +obj-$(CONFIG_SND_SOC_MT8173_RT5650_RT5676) += mt8173-rt5650-rt5676.o
sound/soc/mediatek/mt8173-rt5650-rt5676.c new file +278 -0
278 lines not on this page · raw message
Signature · 6 lines
1.8.1.1.dirty -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 3/3] ASoC: mediatek: Add machine driver for rt5650 rt5676 codec
Quoted 1 line · Koro Chen
This is the DPCM based machine driver with rt5650 and rt5676
Applied, thanks.