Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ifx_clock_source_psoc4xx.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2026 Infineon Technologies AG,
3 * SPDX-FileCopyrightText: or an affiliate of Infineon Technologies AG. All rights reserved.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_IFX_CLOCK_SOURCE_PSOC4XX_H_
9#define ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_IFX_CLOCK_SOURCE_PSOC4XX_H_
10
11/*
12 * Note : use IFX_PATH_PSOC4_IMO for internal main oscillator as src
13 * use IFX_PATH_PSOC4_EXT for External clock as src
14 * use IFX_PATH_PSOC4_HPOSC for high precision oscillator as src (HVMS/PA only)
15 *
16 * Usage : input src for clk_hf
17 */
18#define IFX_PATH_PSOC4_IMO 0
19#define IFX_PATH_PSOC4_EXT 1
20#define IFX_PATH_PSOC4_HPOSC 3
21
22/*
23 * Usage : input src for clk_lf (HVMS/PA only)
24 */
25#define IFX_PATH_PSOC4_LF_ILO 0
26#define IFX_PATH_PSOC4_LF_PILO 1
27
28/*
29 * Note : use IFX_PATH_PSOC4_PUMP_GND for No clock, connect to gnd
30 * use IFX_PATH_PSOC4_PUMP_IMO for main IMO pump output
31 * use IFX_PATH_PSOC4_PUMP_HFCLK for clk_hf pump
32 *
33 * Usage : input src for clk_pump
34 */
35#define IFX_PATH_PSOC4_PUMP_GND 0
36#define IFX_PATH_PSOC4_PUMP_IMO 1
37#define IFX_PATH_PSOC4_PUMP_HFCLK 2
38
39/*
40 * @brief Device Tree compatible clock source to Infineon PDL clock source
41 *
42 * This macro converts Device Tree clock source identifiers (defined in
43 * ifx_clock_source_common.h) to the corresponding Infineon PDL API values.
44 *
45 * Usage : in clock_control_infineon_fixed_factor_clock.c, use this macro
46 * when passing clock source values from Device Tree to Infineon PDL APIs.
47 * This allows users to use the generic ifx_clock_source_common.h macros
48 * directly in Device Tree files while ensuring compatibility with the
49 * underlying PDL implementation.
50 */
51#define IFX_PSOC4_HFCLK_DIV(div) \
52 ((div) == 0 ? CY_SYSCLK_NO_DIV \
53 : (div) == 1 ? CY_SYSCLK_DIV_2 \
54 : (div) == 3 ? CY_SYSCLK_DIV_4 \
55 : (div) == 7 ? CY_SYSCLK_DIV_8 \
56 : CY_SYSCLK_NO_DIV)
57
58#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_IFX_CLOCK_SOURCE_PSOC4XX_H_ */