File tree Expand file tree Collapse file tree 3 files changed +68
-13
lines changed
tests/drivers/pwm/pwm_api Expand file tree Collapse file tree 3 files changed +68
-13
lines changed Original file line number Diff line number Diff line change @@ -481,6 +481,24 @@ __weak void clock_init(void)
481
481
482
482
#endif /* CONFIG_CAN_MCUX_FLEXCAN */
483
483
484
+ #ifdef CONFIG_MCUX_FLEXIO
485
+
486
+ #if DT_NODE_HAS_STATUS (DT_NODELABEL (flexio1 ), okay )
487
+ /* Configure FLEXIO1 using SYS_PLL3_DIV2_CLK */
488
+ rootCfg .mux = kCLOCK_FLEXIO1_ClockRoot_MuxSysPll3Div2 ;
489
+ rootCfg .div = 2 ;
490
+ CLOCK_SetRootClock (kCLOCK_Root_Flexio1 , & rootCfg );
491
+ #endif
492
+
493
+ #if DT_NODE_HAS_STATUS (DT_NODELABEL (flexio2 ), okay )
494
+ /* Configure FLEXIO2 using SYS_PLL3_DIV2_CLK */
495
+ rootCfg .mux = kCLOCK_FLEXIO2_ClockRoot_MuxSysPll3Div2 ;
496
+ rootCfg .div = 1 ;
497
+ CLOCK_SetRootClock (kCLOCK_Root_Flexio2 , & rootCfg );
498
+ #endif
499
+
500
+ #endif /* CONFIG_MCUX_FLEXIO */
501
+
484
502
#if defined(CONFIG_MCUX_LPTMR_TIMER ) || defined(CONFIG_COUNTER_MCUX_LPTMR )
485
503
486
504
#if DT_NODE_HAS_STATUS (DT_NODELABEL (lptmr1 ), okay )
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2025 NXP
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ / {
8
+ aliases {
9
+ pwm-0 = &flexio2_pwm;
10
+ };
11
+ };
12
+
13
+ &tpm5 {
14
+ status = "disabled";
15
+ };
16
+
17
+ &pinctrl {
18
+ pinmux_flexio2_pwm_default: pinmux_flexio2_pwm_default {
19
+ group0 {
20
+ pinmux = <&iomuxc_gpio_ad_02_flexio2_d02>;
21
+ drive-strength = "normal";
22
+ slew-rate = "slow";
23
+ };
24
+ };
25
+ };
26
+
27
+ &flexio2 {
28
+ status = "okay";
29
+ flexio2_pwm: flexio2_pwm {
30
+ compatible = "nxp,flexio-pwm";
31
+ #pwm-cells = <3>;
32
+ status = "okay";
33
+ pinctrl-0 = <&pinmux_flexio2_pwm_default>;
34
+ pinctrl-names = "default";
35
+ pwm_0 {
36
+ pin-id = <2>;
37
+ prescaler = <1>;
38
+ };
39
+ };
40
+ };
Original file line number Diff line number Diff line change 8
8
or dt_alias_exists("pwm-3") or dt_compat_enabled("st,stm32-pwm")
9
9
or dt_compat_enabled("intel,blinky-pwm") or dt_compat_enabled("nordic,nrf-pwm")
10
10
depends_on : pwm
11
- drivers.pwm.ke1xz_pwm_flexio :
11
+ drivers.pwm.pwm_flexio :
12
12
tags :
13
13
- drivers
14
14
- pwm
15
15
- userspace
16
- extra_args : DTC_OVERLAY_FILE="boards/frdm_ke1xz_flexio_pwm.overlay"
16
+
17
+ extra_args :
18
+ - platform:frdm_ke17z:DTC_OVERLAY_FILE="boards/frdm_ke1xz_flexio_pwm.overlay"
19
+ - platform:frdm_ke17z512:DTC_OVERLAY_FILE="boards/frdm_ke1xz_flexio_pwm.overlay"
20
+ - platform:mimxrt700_evk/mimxrt798s/cm33_cpu0:DTC_OVERLAY_FILE="boards/mimxrt700_evk_mimxrt798s_cm33_cpu0_flexio_pwm.overlay"
21
+ - platform:mimxrt1180_evk/mimxrt1189/cm33:DTC_OVERLAY_FILE="boards/mimxrt1180_evk_flexio_pwm.overlay"
22
+ - platform:mimxrt1180_evk/mimxrt1189/cm7:DTC_OVERLAY_FILE="boards/mimxrt1180_evk_flexio_pwm.overlay"
17
23
platform_allow :
18
24
- frdm_ke17z
19
25
- frdm_ke17z512
20
- filter : (dt_alias_exists("pwm-0") or dt_alias_exists("pwm-1") or dt_alias_exists("pwm-2")
21
- or dt_alias_exists("pwm-3")) and CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and
22
- CONFIG_DT_HAS_NXP_FLEXIO_PWM_ENABLED
23
- depends_on : pwm
24
- drivers.pwm.mimxrt700_evk_mimxrt798s_cm33_cpu0_flexio_pwm :
25
- tags :
26
- - drivers
27
- - pwm
28
- - userspace
29
- extra_args : DTC_OVERLAY_FILE="boards/mimxrt700_evk_mimxrt798s_cm33_cpu0_flexio_pwm.overlay"
30
- platform_allow :
31
26
- mimxrt700_evk/mimxrt798s/cm33_cpu0
27
+ - mimxrt1180_evk/mimxrt1189/cm33
28
+ - mimxrt1180_evk/mimxrt1189/cm7
32
29
filter : (dt_alias_exists("pwm-0") or dt_alias_exists("pwm-1") or dt_alias_exists("pwm-2")
33
30
or dt_alias_exists("pwm-3")) and CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and
34
31
CONFIG_DT_HAS_NXP_FLEXIO_PWM_ENABLED
You can’t perform that action at this time.
0 commit comments