Skip to content

Commit 8575844

Browse files
ujfalusihenrikbrixandersen
authored andcommitted
intel_adsp: clk: Configure correct cardinal clock divider for PTL
The Audio integration PLL is faster on PTL compared to earlier ACE platforms: 442.368 MHz instead 393.216 MHz, however the default divider remained 16, which will result incorrect cardinal clock speed. Change the divider to 18 in order to get correct 24.576 MHz cardinal clock. Signed-off-by: Peter Ujfalusi <[email protected]>
1 parent 4a7adb3 commit 8575844

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

soc/intel/intel_adsp/ace/include/ace30_ptl/adsp_shim.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ struct ace_dfpmccu {
106106

107107
#define ACE_CLKCTL_WOVCRO BIT(4) /* Request WOVCRO clock */
108108

109+
#define ACE_CRODIV_CARCDS_MASK GENMASK(7, 0)
110+
#define ACE_CRODIV_CARCDS(x) ((x) & ACE_CRODIV_CARCDS_MASK)
111+
109112
#define SHIM_LDOCTL_HPSRAM_LDO_ON (3 << 0)
110113
#define SHIM_LDOCTL_HPSRAM_LDO_BYPASS BIT(0)
111114

soc/intel/intel_adsp/common/clk.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ void adsp_clock_init(void)
9696
} else {
9797
platform_lowest_freq_idx = ADSP_CPU_CLOCK_FREQ_IPLL;
9898
}
99+
#if CONFIG_SOC_INTEL_ACE30_PTL
100+
/* Set the Cardinal clock divider to 18 to get 24.576MHz */
101+
ACE_DfPMCCU.dfcrodiv &= ACE_CRODIV_CARCDS_MASK;
102+
ACE_DfPMCCU.dfcrodiv |= ACE_CRODIV_CARCDS(0x12);
103+
#endif
99104
#else
100105
CAVS_SHIM.clkctl |= CAVS_CLKCTL_WOVCRO;
101106
if (CAVS_SHIM.clkctl & CAVS_CLKCTL_WOVCRO) {

0 commit comments

Comments
 (0)