linux/sound/soc/intel
Jie Yang 0d2135ecad ASoC: Intel: Work around to fix HW D3 potential crash issue
When using clock gatings to save power, there are some known issues:
1. core clock gating (DCLCGE) must be disabled during D0 and D3 entry
and updating SRAM banks (VDRTCTL0).
2. DSP trunk clock gating (DTCGE) can cause FW crashes, disable it in D0.

To align with the new W/A flow from FW team, we must set VDRTCTL0.D3PGD
to 1 (D3 power gating disabled) at first startup and keep it all the time.
ADSP will be in D0 on first boot by BIOS part of WA. Required delays must
be preserved (waiting for HW to stabilize, after enabling CCG, changing
SRAM PG, D3PG).

D3->D0:
1. Disable core clock gating (VDRTCTL2.DCLCGE = 0)
2. Enable other CG apart from DTCG and DCLCG (VDRTCTL2. DCLCGE and DTCGE = 0)
3. Disable D3PG (VDRTCTL0.D3PGD = 1)
4. Power up necessary SRAM and wait at least for 18 clock cycles for every
bank you have powered up
5. Set D0 state(PMCS.PS = 0), wait for HW
6. Restore MCLK (clkctl.smos, disabled in D3 entry point 4)
7. Stall and reset core, set CSR
8. Enable core clock gating (VDRTCTL2.DCLCGE = 1), delay 50 us
9. Unreset core
10.Load FW, configure PLL and other necessary things
11.Unstall core

Changing SRAM PG during D0:
1. Disable core clock gating (VDRTCTL2.DCLCGE = 0)
2. Set PG mask
3. Wait at least for 18 clock cycles for every bank you have powered up
4. Enable core clock gating, delay 50 us

D0->D3:
1. Disable core clock gating (DCLCGE = 0)
2. Stall and reset core
3. Power down entire SRAM and wait at least for 18 clock cycles for every bank
(Enable SRAM PG (ISRAMPGE = 0x3FF, DSRAMPGE = 0xFFFFF, D3SRAMPGD = 0), remember
about preserving VDRTCTL0.D3PGD = 1)
4. Shutdown PLL, disable MCLK(clkctl.smos = 0), Enable DTCG to save power
5. Set D3 state(PMCS.PS = 3), delay 50 us
6. Enable core clock gating, delay 50 us

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-30 17:06:21 +00:00
..
sst ASoC: Intel: mrfld: Replace pci_id with unique device id 2014-10-27 18:02:38 +00:00
broadwell.c ASoC: Intel: Add Broadwell Machine support 2014-07-16 23:16:51 +01:00
byt-max98090.c ASoC: Intel: byt-max98090: Set card as fully routed 2014-09-28 12:22:37 +01:00
byt-rt5640.c ASoC: Intel: byt-rt5640: fix coccinelle warnings 2014-10-04 19:09:40 +01:00
haswell.c Merge remote-tracking branches 'asoc/topic/gpio' and 'asoc/topic/intel' into asoc-next 2014-06-03 10:39:50 +01:00
Kconfig ASoC: Intel: Add dependency on DesignWare DMA controller 2014-10-29 10:33:31 +00:00
Makefile ASoC: Intel: sst: Add makefile and kconfig changes 2014-10-20 12:20:35 +01:00
mfld_machine.c ASoC: mfld_machine: Fix compile error 2014-03-21 19:33:36 +00:00
sst-acpi.c ASoC: Intel: Update Baytrail ADSP firmware name 2014-08-06 20:36:13 +01:00
sst-atom-controls.c ASoC: Intel: mrfld: fix semicolon.cocci warnings 2014-10-20 12:20:34 +01:00
sst-atom-controls.h ASoC: Intel: mrfld: add DSP core controls 2014-10-20 12:20:33 +01:00
sst-baytrail-dsp.c ASoC: Intel: Make ADSP memory block allocation more generic 2014-10-28 22:25:02 +00:00
sst-baytrail-ipc.c Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fsl', 'asoc/fix/fsl-esai', 'asoc/fix/intel', 'asoc/fix/mcasp' and 'asoc/fix/pxa' into asoc-linus 2014-08-15 12:51:29 +01:00
sst-baytrail-ipc.h ASoC: Intel: Merge Baytrail ADSP suspend_noirq into suspend_late 2014-08-11 13:40:23 +01:00
sst-baytrail-pcm.c ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset 2014-08-11 13:40:24 +01:00
sst-dsp-priv.h ASoC: Intel: Add generic support for DSP wake, sleep and stall 2014-10-29 16:56:55 +00:00
sst-dsp.c ASoC: Intel: Add generic support for DSP wake, sleep and stall 2014-10-29 16:56:55 +00:00
sst-dsp.h ASoC: Intel: Work around to fix HW D3 potential crash issue 2014-10-30 17:06:21 +00:00
sst-firmware.c ASoC: Intel: Fix block is enabled multiple times issue 2014-10-30 13:41:22 +00:00
sst-haswell-dsp.c ASoC: Intel: Work around to fix HW D3 potential crash issue 2014-10-30 17:06:21 +00:00
sst-haswell-ipc.c ASoC: Intel: fix build with runtime PM disabled. 2014-10-30 15:56:01 +00:00
sst-haswell-ipc.h ASoC: Intel: Add PM support to HSW/BDW IPC driver 2014-10-29 20:50:42 +00:00
sst-haswell-pcm.c ASoC: Intel: fix build with runtime PM disabled. 2014-10-30 15:56:01 +00:00
sst-mfld-dsp.h ASoC: Intel: mfld: add dsp error codes 2014-07-14 19:44:47 +01:00
sst-mfld-platform-compress.c ASoC: mfld-compress: Use dedicated function instead of ioctl 2014-08-27 21:48:37 +01:00
sst-mfld-platform-pcm.c ASoC: Intel: mfld-pcm: add FE and BE ops 2014-10-20 12:20:33 +01:00
sst-mfld-platform.h ASoC: Intel: mrfld: add the DSP DAPM widgets 2014-10-20 12:20:33 +01:00