Skip to content

Commit 061f087

Browse files
bijudasUwe Kleine-König
authored andcommitted
pwm: Add support for RZ/G2L GPT
RZ/G2L General PWM Timer (GPT) composed of 8 channels with 32-bit timer (GPT32E). It supports the following functions * 32 bits x 8 channels * Up-counting or down-counting (saw waves) or up/down-counting (triangle waves) for each counter. * Clock sources independently selectable for each channel * Two I/O pins per channel * Two output compare/input capture registers per channel * For the two output compare/input capture registers of each channel, four registers are provided as buffer registers and are capable of operating as comparison registers when buffering is not in use. * In output compare operation, buffer switching can be at crests or troughs, enabling the generation of laterally asymmetric PWM waveforms. * Registers for setting up frame cycles in each channel (with capability for generating interrupts at overflow or underflow) * Generation of dead times in PWM operation * Synchronous starting, stopping and clearing counters for arbitrary channels * Starting, stopping, clearing and up/down counters in response to input level comparison * Starting, clearing, stopping and up/down counters in response to a maximum of four external triggers * Output pin disable function by dead time error and detected short-circuits between output pins * A/D converter start triggers can be generated (GPT32E0 to GPT32E3) * Enables the noise filter for input capture and external trigger operation Add basic pwm support for RZ/G2L GPT driver by creating separate logical channels for each IOs. Signed-off-by: Biju Das <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 9549d22 commit 061f087

File tree

3 files changed

+455
-0
lines changed

3 files changed

+455
-0
lines changed

drivers/pwm/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,17 @@ config PWM_ROCKCHIP
552552
Generic PWM framework driver for the PWM controller found on
553553
Rockchip SoCs.
554554

555+
config PWM_RZG2L_GPT
556+
tristate "Renesas RZ/G2L General PWM Timer support"
557+
depends on ARCH_RZG2L || COMPILE_TEST
558+
depends on HAS_IOMEM
559+
help
560+
This driver exposes the General PWM Timer controller found in Renesas
561+
RZ/G2L like chips through the PWM API.
562+
563+
To compile this driver as a module, choose M here: the module
564+
will be called pwm-rzg2l-gpt.
565+
555566
config PWM_RZ_MTU3
556567
tristate "Renesas RZ/G2L MTU3a PWM Timer support"
557568
depends on RZ_MTU3

drivers/pwm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ obj-$(CONFIG_PWM_RASPBERRYPI_POE) += pwm-raspberrypi-poe.o
5050
obj-$(CONFIG_PWM_RCAR) += pwm-rcar.o
5151
obj-$(CONFIG_PWM_RENESAS_TPU) += pwm-renesas-tpu.o
5252
obj-$(CONFIG_PWM_ROCKCHIP) += pwm-rockchip.o
53+
obj-$(CONFIG_PWM_RZG2L_GPT) += pwm-rzg2l-gpt.o
5354
obj-$(CONFIG_PWM_RZ_MTU3) += pwm-rz-mtu3.o
5455
obj-$(CONFIG_PWM_SAMSUNG) += pwm-samsung.o
5556
obj-$(CONFIG_PWM_SIFIVE) += pwm-sifive.o

0 commit comments

Comments
 (0)