soc: mchp: Perform OTP override for 32KHz internal oscillator

Perform OTP override when selecting 32Khz internal oscillator
to ensure 32KHz is enabled.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This commit is contained in:
Jose Alberto Meza 2019-08-07 16:37:11 -07:00 committed by Andrew Boie
commit e98ea27cc1

View file

@ -84,7 +84,12 @@ static int soc_clk32_init(void)
new_clk32 = MCHP_VBATR_USE_32KIN_PIN;
#endif
#else
/* Use internal 32KHz +/-2% silicon oscillator */
/* Use internal 32KHz +/-2% silicon oscillator
* if required performed OTP value override
*/
if (MCHP_REVISION_ID() == MCHP_GCFG_REV_B0) {
VBATR_REGS->CKK32_TRIM = 0x06;
}
new_clk32 = MCHP_VBATR_USE_SIL_OSC;
#endif
clk32_change(new_clk32);