Skip to content

Commit 9476ccd

Browse files
committed
dts/arm/st: stm32h7: Add perck clock-mux node
Add perck clock-mux node as disabled by default and the include bindings helping to select it. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent fc61680 commit 9476ccd

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

dts/arm/st/h7/stm32h7.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@
9090
reg = <2>;
9191
status = "disabled";
9292
};
93+
94+
perck: perck {
95+
#clock-cells = <0>;
96+
compatible = "st,stm32-clock-mux";
97+
status = "disabled";
98+
};
9399
};
94100

95101
soc {

include/drivers/clock_control/stm32_clock_control.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@
198198
#define STM32_HSE_FREQ 0
199199
#endif
200200

201+
#if DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(perck), st_stm32_clock_mux, okay)
202+
#define STM32_CKPER_ENABLED 1
203+
#endif
204+
201205
/** Driver structure definition */
202206

203207
struct stm32_pclken {

include/dt-bindings/clock/stm32h7_clock.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
#define STM32_SRC_LSI 0x00C
2828
/** Oscillators not yet supported */
2929
/* #define STM32_SRC_HSI48 0x00D */
30-
/* #define STM32_SRC_HSI_KER 0x00E */ /* HSI + HSIKERON */
31-
/* #define STM32_SRC_CSI_KER 0x00F */ /* CSI + CSIKERON */
30+
#define STM32_SRC_HSI_KER 0x00E /* HSI + HSIKERON */
31+
#define STM32_SRC_CSI_KER 0x00F /* CSI + CSIKERON */
3232
/** Core clock */
3333
#define STM32_SRC_SYSCLK 0x010
3434
/** Others: Not yet supported */
3535
/* #define STM32_SRC_I2SCKIN 0x011 */
3636
/* #define STM32_SRC_SPDIFRX 0x012 */
3737
/** Clock muxes */
38-
/* #define STM32_SRC_PER 0x013 */
38+
#define STM32_SRC_CKPER 0x013
3939

4040
#define STM32_SRC_CLOCK_MIN STM32_SRC_PLL1_P
4141
#define STM32_SRC_CLOCK_MAX STM32_SRC_CKPER

0 commit comments

Comments
 (0)