Skip to content

Commit 2eb475f

Browse files
committed
drivers: clock_control: PIC32CM_JH: Add clock control driver
Add clock control driver. Implement bootup clock initialization, on, off and get_rate API. Signed-off-by: Sunil Abraham <[email protected]>
1 parent 3cc6331 commit 2eb475f

File tree

6 files changed

+2217
-2
lines changed

6 files changed

+2217
-2
lines changed

drivers/clock_control/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_FIXED_RATE_CLOCK clock_cont
1010
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_GD32 clock_control_gd32.c)
1111
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_LITEX clock_control_litex.c)
1212
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_LPC11U6X clock_control_lpc11u6x.c)
13+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCHP_PIC32CM_JH clock_control_mchp_pic32cm_jh.c)
1314
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCHP_SAM_D5X_E5X clock_control_mchp_sam_d5x_e5x.c)
1415
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCHP_XEC clock_control_mchp_xec.c)
1516
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_MCUX_CCM clock_control_mcux_ccm.c)

drivers/clock_control/Kconfig.mchp

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,59 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config CLOCK_CONTROL_MCHP_COMMON
5-
bool
5+
bool "Microchip clock controller"
66
help
77
Common options for Microchip clock control drivers.
88

99
config CLOCK_CONTROL_MCHP_SAM_D5X_E5X
10-
bool "Microchip SAM D5X/E5X clock controller Support"
10+
bool
1111
depends on DT_HAS_MICROCHIP_SAM_D5X_E5X_CLOCK_ENABLED
1212
default y
1313
select CLOCK_CONTROL_MCHP_COMMON
1414
help
1515
Enable clock controller driver for Microchip SAM D5X/E5X SoC family.
1616

17+
config CLOCK_CONTROL_MCHP_PIC32CM_JH
18+
bool
19+
default y
20+
depends on DT_HAS_MICROCHIP_PIC32CM_JH_CLOCK_ENABLED
21+
select CLOCK_CONTROL_MCHP_COMMON
22+
help
23+
Enable clock controller driver for Microchip PIC32CM_JH family.
24+
1725
if CLOCK_CONTROL_MCHP_COMMON
1826

27+
config CLOCK_CONTROL_MCHP_CONFIG_BOOTUP
28+
bool "Bootup clock configuration"
29+
default y
30+
help
31+
This option enables bootup clock configuration from device tree node.
32+
33+
config CLOCK_CONTROL_MCHP_CONFIG_RUNTIME
34+
bool "Runtime clock configuration"
35+
default y
36+
help
37+
This option enables runtime clock configuration using API.
38+
39+
config CLOCK_CONTROL_MCHP_ASYNC_ON
40+
bool "Async clock on"
41+
default n
42+
help
43+
This option enables async on API.
44+
1945
config CLOCK_CONTROL_MCHP_GET_RATE
2046
bool "Get clock rate"
2147
default y
2248
help
2349
Enable support for retrieving the clock rate. This may increase
2450
code size, depending on the depth of clock source hierarchy.
2551

52+
config CLOCK_CONTROL_MCHP_SET_RATE
53+
bool "Set clock rate"
54+
default n
55+
depends on CLOCK_CONTROL_MCHP_GET_RATE
56+
help
57+
This option enables set rate API. This may increase
58+
code size, depending on the depth of clock source hierarchy.
59+
2660
endif # CLOCK_CONTROL_MCHP_COMMON

0 commit comments

Comments
 (0)