Skip to content

Commit

Permalink
pwm: Add i.MX TPM PWM driver support
Browse files Browse the repository at this point in the history
i.MX7ULP has TPM(Low Power Timer/Pulse Width Modulation Module) inside,
it can support multiple PWM channels, all the channels share same
counter and period setting, but each channel can configure its duty and
polarity independently.

There are several TPM modules in i.MX7ULP, the number of channels in TPM
modules are different, it can be read from each TPM module's PARAM
register.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Anson Huang authored and Thierry Reding committed May 9, 2019
1 parent 2caf038 commit 738a1cf
Show file tree
Hide file tree
Showing 3 changed files with 461 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/pwm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ config PWM_IMX27
To compile this driver as a module, choose M here: the module
will be called pwm-imx27.

config PWM_IMX_TPM
tristate "i.MX TPM PWM support"
depends on ARCH_MXC || COMPILE_TEST
depends on HAVE_CLK && HAS_IOMEM
help
Generic PWM framework driver for i.MX7ULP TPM module, TPM's full
name is Low Power Timer/Pulse Width Modulation Module.

To compile this driver as a module, choose M here: the module
will be called pwm-imx-tpm.

config PWM_JZ4740
tristate "Ingenic JZ47xx PWM support"
depends on MACH_INGENIC
Expand Down
1 change: 1 addition & 0 deletions drivers/pwm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-$(CONFIG_PWM_HIBVT) += pwm-hibvt.o
obj-$(CONFIG_PWM_IMG) += pwm-img.o
obj-$(CONFIG_PWM_IMX1) += pwm-imx1.o
obj-$(CONFIG_PWM_IMX27) += pwm-imx27.o
obj-$(CONFIG_PWM_IMX_TPM) += pwm-imx-tpm.o
obj-$(CONFIG_PWM_JZ4740) += pwm-jz4740.o
obj-$(CONFIG_PWM_LP3943) += pwm-lp3943.o
obj-$(CONFIG_PWM_LPC18XX_SCT) += pwm-lpc18xx-sct.o
Expand Down
Loading

0 comments on commit 738a1cf

Please sign in to comment.