Skip to content

Commit cbb2fda

Browse files
smalaenashif
authored andcommitted
drivers: clock_control: siwx91x: Set INTF_PLL_FREQUENCY to 160 MHz
The GSPI and QSPI peripherals run on the interface PLL clock. To ensure correct operation, the interface PLL frequency should be set to 160 MHz. This provides a base clock of 80 MHz to the QSPI peripheral, which matches its required operating frequency. The GSPI peripheral can continue to operate at higher frequencies as it receives the full interface PLL clock. Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
1 parent 5dec22a commit cbb2fda

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/clock_control/clock_control_silabs_siwx91x.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define DT_DRV_COMPAT silabs_siwx91x_clock
2222
#define LF_FSM_CLOCK_FREQUENCY 32768
2323
#define XTAL_FREQUENCY 40000000
24+
#define INTF_PLL_FREQUENCY 160000000
2425

2526
LOG_MODULE_REGISTER(siwx91x_clock, CONFIG_CLOCK_CONTROL_LOG_LEVEL);
2627

@@ -184,7 +185,7 @@ static int siwx91x_clock_get_rate(const struct device *dev, clock_control_subsys
184185
*rate = LF_FSM_CLOCK_FREQUENCY;
185186
return 0;
186187
case SIWX91X_CLK_GSPI:
187-
*rate = RSI_CLK_GetBaseClock(M4_GSPI);
188+
*rate = INTF_PLL_FREQUENCY;
188189
return 0;
189190
default:
190191
/* For now, no other driver need clock rate */
@@ -249,9 +250,7 @@ static int siwx91x_clock_init(const struct device *dev)
249250
DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency));
250251

251252
/* Use interface PLL at configured frequency as peripheral clock */
252-
sl_si91x_clock_manager_set_pll_freq(INFT_PLL,
253-
DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency),
254-
PLL_REF_CLK_VAL_XTAL);
253+
sl_si91x_clock_manager_set_pll_freq(INFT_PLL, INTF_PLL_FREQUENCY, PLL_REF_CLK_VAL_XTAL);
255254

256255
/* FIXME: Currently the clock consumer use clocks without power on them.
257256
* This should be fixed in drivers. Meanwhile, get the list of required

0 commit comments

Comments
 (0)