Commit c35fad6f authored by Vijendar Mukunda's avatar Vijendar Mukunda Committed by Mark Brown

ASoC: amd: acp: add ZSC control register programming sequence

Add ZSC Control register programming sequence for ACP D0 and D3 state
transitions for ACP7.0 onwards. This will allow ACP to enter low power
state when ACP enters D3 state. When ACP enters D0 State, ZSC control
should be disabled.
Tested-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarVijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240807085154.1987681-1-Vijendar.Mukunda@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 20288905
...@@ -321,6 +321,8 @@ int acp_init(struct acp_chip_info *chip) ...@@ -321,6 +321,8 @@ int acp_init(struct acp_chip_info *chip)
pr_err("ACP reset failed\n"); pr_err("ACP reset failed\n");
return ret; return ret;
} }
if (chip->acp_rev >= ACP70_DEV)
writel(0, chip->base + ACP_ZSC_DSP_CTRL);
return 0; return 0;
} }
EXPORT_SYMBOL_NS_GPL(acp_init, SND_SOC_ACP_COMMON); EXPORT_SYMBOL_NS_GPL(acp_init, SND_SOC_ACP_COMMON);
...@@ -336,6 +338,9 @@ int acp_deinit(struct acp_chip_info *chip) ...@@ -336,6 +338,9 @@ int acp_deinit(struct acp_chip_info *chip)
if (chip->acp_rev != ACP70_DEV) if (chip->acp_rev != ACP70_DEV)
writel(0, chip->base + ACP_CONTROL); writel(0, chip->base + ACP_CONTROL);
if (chip->acp_rev >= ACP70_DEV)
writel(0x01, chip->base + ACP_ZSC_DSP_CTRL);
return 0; return 0;
} }
EXPORT_SYMBOL_NS_GPL(acp_deinit, SND_SOC_ACP_COMMON); EXPORT_SYMBOL_NS_GPL(acp_deinit, SND_SOC_ACP_COMMON);
......
...@@ -103,6 +103,8 @@ ...@@ -103,6 +103,8 @@
#define ACP70_PGFSM_CONTROL ACP6X_PGFSM_CONTROL #define ACP70_PGFSM_CONTROL ACP6X_PGFSM_CONTROL
#define ACP70_PGFSM_STATUS ACP6X_PGFSM_STATUS #define ACP70_PGFSM_STATUS ACP6X_PGFSM_STATUS
#define ACP_ZSC_DSP_CTRL 0x0001014
#define ACP_ZSC_STS 0x0001018
#define ACP_SOFT_RST_DONE_MASK 0x00010001 #define ACP_SOFT_RST_DONE_MASK 0x00010001
#define ACP_PGFSM_CNTL_POWER_ON_MASK 0xffffffff #define ACP_PGFSM_CNTL_POWER_ON_MASK 0xffffffff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment