Commit 4f413d85 authored by Ren Chen's avatar Ren Chen Committed by Johan Hedberg
Browse files

soc: ite: it8xxx2: disable sspi clock and automatic clock gating



This commits disables sspi clock and automatic clock gating.

Signed-off-by: default avatarRen Chen <Ren.Chen@ite.com.tw>
parent a74a524e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ COND_CODE_1(DT_NODE_EXISTS(DT_INST(1, ite_it8xxx2_usbpd)), (2), (1))
#define PLL_FREQ_AUTO_CAL_START    BIT(0)
#define AUTO_CAL_ENABLE_AND_START  (AUTO_CAL_ENABLE | PLL_FREQ_AUTO_CAL_START)

#define SSPI_CLOCK_GATING      BIT(1)
#define AUTO_SSPI_CLOCK_GATING BIT(4)

uint32_t chip_get_pll_freq(void)
{
	uint32_t pllfreq;
@@ -455,6 +458,10 @@ static int ite_it8xxx2_init(void)

#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */

	/* disable sspi clock and disable automatic clock gating */
	IT8XXX2_ECPM_CGCTRL3R |= SSPI_CLOCK_GATING;
	IT8XXX2_ECPM_AUTOCG &= ~AUTO_SSPI_CLOCK_GATING;

#if (SOC_USBPD_ITE_PHY_PORT_COUNT > 0)
	int port;