Skip to content

Commit ac093af

Browse files
drivers: clock: ccm_rev2: do custom handling of MX93's TPM clocks
As per the i.MX93 TRM, section "30.2 System Clocks", the root clock of TPM3 is not TPM3_CLK_ROOT, but, rather, BUS_WAKEUP_CLK_ROOT. Therefore, if clock_control_get_rate() is using the IMX_CCM_TPM3_CLK clock ID, the root clock will have to be set to kCLOCK_Root_BusWakeup instead of kCLOCK_Root_Tpm3. Signed-off-by: Laurentiu Mihalcea <[email protected]>
1 parent 6e1ff6a commit ac093af

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/clock_control/clock_control_mcux_ccm_rev2.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,16 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev,
217217
clock_root = (kCLOCK_Root_Tpm4 + instance - 3);
218218
}
219219
break;
220+
#elif defined(CONFIG_SOC_MIMX9352_A55) || defined(CONFIG_SOC_MIMX9352_M33)
221+
case IMX_CCM_TPM_CLK:
222+
switch (instance) {
223+
case 2:
224+
clock_root = kCLOCK_Root_BusWakeup;
225+
break;
226+
default:
227+
clock_root = kCLOCK_Root_Tpm1 + instance;
228+
}
229+
break;
220230
#else
221231
case IMX_CCM_TPM_CLK:
222232
clock_root = kCLOCK_Root_Tpm1 + instance;

0 commit comments

Comments
 (0)