linux-yocto/drivers/pwm
David Lechner 4df6f2a167 pwm: axi-pwmgen: fix missing separate external clock
commit a8841dc3df upstream.

Add proper support for external clock to the AXI PWM generator driver.

In most cases, the HDL for this IP block is compiled with the default
ASYNC_CLK_EN=1. With this option, there is a separate external clock
that drives the PWM output separate from the peripheral clock. So the
driver should be enabling the "axi" clock to power the peripheral and
the "ext" clock to drive the PWM output.

When ASYNC_CLK_EN=0, the "axi" clock is also used to drive the PWM
output and there is no "ext" clock.

Previously, if there was a separate external clock, users had to specify
only the external clock and (incorrectly) omit the AXI clock in order
to get the correct operating frequency for the PWM output.

The devicetree bindings are updated to fix this shortcoming and this
patch changes the driver to match the new bindings. To preserve
compatibility with any existing dtbs that specify only one clock, we
don't require the clock name on the first clock.

Fixes: 41814fe5c7 ("pwm: Add driver for AXI PWM generator")
Cc: stable@vger.kernel.org
Acked-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20250529-pwm-axi-pwmgen-add-external-clock-v3-3-5d8809a7da91@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:11:23 +01:00
..
core.c module: Convert default symbol namespace to string literal 2025-02-08 09:57:05 +01:00
Kconfig
Makefile
pwm-ab8500.c
pwm-adp5585.c pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled 2024-09-16 15:24:58 +02:00
pwm-apple.c
pwm-atmel-hlcdc.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-atmel-tcb.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-atmel.c
pwm-axi-pwmgen.c pwm: axi-pwmgen: fix missing separate external clock 2025-06-27 11:11:23 +01:00
pwm-bcm-iproc.c
pwm-bcm-kona.c
pwm-bcm2835.c
pwm-berlin.c
pwm-brcmstb.c
pwm-clk.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-clps711x.c
pwm-crc.c
pwm-cros-ec.c
pwm-dwc-core.c module: Convert default symbol namespace to string literal 2025-02-08 09:57:05 +01:00
pwm-dwc.c
pwm-dwc.h
pwm-ep93xx.c
pwm-fsl-ftm.c pwm: fsl-ftm: Handle clk_get_rate() returning 0 2025-04-20 10:15:28 +02:00
pwm-gpio.c
pwm-hibvt.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-img.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-imx-tpm.c pwm: imx-tpm: Use correct MODULO value for EPWM mode 2024-10-25 11:29:17 +02:00
pwm-imx1.c
pwm-imx27.c pwm: imx27: Workaround of the pwm output bug when decrease the duty cycle 2024-12-05 14:01:30 +01:00
pwm-intel-lgm.c
pwm-iqs620a.c
pwm-jz4740.c
pwm-keembay.c
pwm-lp3943.c pwm: lp3943: Fix an incorrect type in lp3943_pwm_parse_dt() 2024-09-16 15:23:36 +02:00
pwm-lpc18xx-sct.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-lpc32xx.c
pwm-lpss-pci.c
pwm-lpss-platform.c
pwm-lpss.c module: Convert default symbol namespace to string literal 2025-02-08 09:57:05 +01:00
pwm-lpss.h
pwm-mediatek.c pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config() 2025-04-20 10:15:27 +02:00
pwm-meson.c
pwm-microchip-core.c pwm: microchip-core: fix incorrect comparison with max period 2025-02-17 10:05:29 +01:00
pwm-mtk-disp.c
pwm-mxs.c
pwm-ntxec.c
pwm-omap-dmtimer.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-pca9685.c
pwm-pxa.c
pwm-raspberrypi-poe.c
pwm-rcar.c pwm: rcar: Improve register calculation 2025-04-20 10:15:27 +02:00
pwm-renesas-tpu.c
pwm-rockchip.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-rz-mtu3.c
pwm-samsung.c
pwm-sifive.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-sl28cpld.c
pwm-spear.c
pwm-sprd.c
pwm-sti.c
pwm-stm32-lp.c pwm: stm32-lp: Add check for clk_enable() 2025-02-08 09:57:06 +01:00
pwm-stm32.c pwm: stm32: Add check for clk_enable() 2025-02-08 09:57:23 +01:00
pwm-stmpe.c
pwm-sun4i.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-sunplus.c
pwm-tegra.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-tiecap.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-tiehrpwm.c pwm: Switch back to struct platform_driver::remove() 2024-09-16 15:24:59 +02:00
pwm-twl-led.c
pwm-twl.c
pwm-visconti.c
pwm-vt8500.c
pwm-xilinx.c