mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
ASoC: mediatek: mt2701: add optional HDMI audio path clocks
The HDMI audio output path on MT2701/MT7623N is rooted in HADDS2PLL and gated by the audio_hdmi, audio_spdf and audio_apll power gates. Acquire these four clocks from device tree using devm_clk_get_optional so that existing platforms which do not wire up HDMI audio keep probing unchanged. Actual clock enable/prepare is deferred to the upcoming HDMI DAI startup path. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Link: https://patch.msgid.link/5e24890acf597b04485145b5056ad8b161b4cbda.1776998727.git.daniel@makrotopia.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3401cff9a9
commit
06efb5f1b7
|
|
@ -95,6 +95,28 @@ int mt2701_init_clock(struct mtk_base_afe *afe)
|
|||
afe_priv->mrgif_ck = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Optional HDMI audio clocks. Platforms that do not wire up the
|
||||
* HDMI output (e.g. MT2701 devkits using only the I2S BE DAIs)
|
||||
* may omit these; in that case the HDMI BE DAI simply cannot be
|
||||
* enabled, but the rest of the AFE still probes.
|
||||
*/
|
||||
afe_priv->hadds2pll_ck = devm_clk_get_optional(afe->dev, "hadds2pll_294m");
|
||||
if (IS_ERR(afe_priv->hadds2pll_ck))
|
||||
return PTR_ERR(afe_priv->hadds2pll_ck);
|
||||
|
||||
afe_priv->audio_hdmi_ck = devm_clk_get_optional(afe->dev, "audio_hdmi_pd");
|
||||
if (IS_ERR(afe_priv->audio_hdmi_ck))
|
||||
return PTR_ERR(afe_priv->audio_hdmi_ck);
|
||||
|
||||
afe_priv->audio_spdf_ck = devm_clk_get_optional(afe->dev, "audio_spdf_pd");
|
||||
if (IS_ERR(afe_priv->audio_spdf_ck))
|
||||
return PTR_ERR(afe_priv->audio_spdf_ck);
|
||||
|
||||
afe_priv->audio_apll_ck = devm_clk_get_optional(afe->dev, "audio_apll_pd");
|
||||
if (IS_ERR(afe_priv->audio_apll_ck))
|
||||
return PTR_ERR(afe_priv->audio_apll_ck);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,10 @@ struct mt2701_afe_private {
|
|||
struct mt2701_i2s_path *i2s_path;
|
||||
struct clk *base_ck[MT2701_BASE_CLK_NUM];
|
||||
struct clk *mrgif_ck;
|
||||
struct clk *hadds2pll_ck;
|
||||
struct clk *audio_hdmi_ck;
|
||||
struct clk *audio_spdf_ck;
|
||||
struct clk *audio_apll_ck;
|
||||
bool mrg_enable[MTK_STREAM_NUM];
|
||||
|
||||
const struct mt2701_soc_variants *soc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user