Commit 2f149fb6 authored by Emilio Benavente's avatar Emilio Benavente Committed by Fabio Baltieri
Browse files

soc: arm: nxp: lpc55xxx: Added FlexPWM to the SOC Kconfig



Added MCUX_PWM Kconfig dependency;
Added missing pin function definition needed for PWM;
Enabled submodule clocks for FlexPWM

Signed-off-by: default avatarEmilio Benavente <emilio.benavente@nxp.com>
parent 40af5bf1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ config SOC_LPC55S36
	select ARM_TRUSTZONE_M
	select CLOCK_CONTROL
	select HAS_MCUX_MCAN
	select HAS_MCUX_PWM

config SOC_LPC55S69_CPU0
	bool "SOC_LPC55S69 M33 [CPU 0]"
+10 −0
Original line number Diff line number Diff line
@@ -204,6 +204,16 @@ DT_FOREACH_STATUS_OKAY(nxp_lpc_ctimer, CTIMER_CLOCK_SETUP)
#endif

#endif /* CONFIG_SOC_LPC55S69_CPU0 */

#if defined(CONFIG_SOC_LPC55S36) && defined(CONFIG_PWM)
	/* Set the Submodule Clocks for FlexPWM */
	SYSCON->PWM0SUBCTL |=
	  (SYSCON_PWM0SUBCTL_CLK0_EN_MASK | SYSCON_PWM0SUBCTL_CLK1_EN_MASK |
	   SYSCON_PWM0SUBCTL_CLK2_EN_MASK);
	SYSCON->PWM1SUBCTL |=
	  (SYSCON_PWM1SUBCTL_CLK0_EN_MASK | SYSCON_PWM1SUBCTL_CLK1_EN_MASK |
	   SYSCON_PWM1SUBCTL_CLK2_EN_MASK);
#endif
}

/**
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
#define IOCON_PIO_FUNC7 0x07u         /*!<@brief Selects pin function 7 */
#define IOCON_PIO_FUNC9 0x09u         /*!<@brief Selects pin function 9 */
#define IOCON_PIO_FUNC10 0x0Au        /*!<@brief Selects pin function 10 */
#define IOCON_PIO_FUNC11 0x0Bu        /*!<@brief Selects pin function 11 */

#define IOCON_PIO_INV_DI 0x00u        /*!<@brief Input function not inverted */
#define IOCON_PIO_MODE_INACT 0x00u    /*!<@brief No addition pin function */
#define IOCON_PIO_OPENDRAIN_DI 0x00u  /*!<@brief Open drain is disabled */