1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig PWM
3	bool "Pulse-Width Modulation (PWM) Support"
4	help
5	  Generic Pulse-Width Modulation (PWM) support.
6
7	  In Pulse-Width Modulation, a variation of the width of pulses
8	  in a rectangular pulse signal is used as a means to alter the
9	  average power of the signal. Applications include efficient
10	  power delivery and voltage regulation. In computer systems,
11	  PWMs are commonly used to control fans or the brightness of
12	  display backlights.
13
14	  This framework provides a generic interface to PWM devices
15	  within the Linux kernel. On the driver side it provides an API
16	  to register and unregister a PWM chip, an abstraction of a PWM
17	  controller, that supports one or more PWM devices. Client
18	  drivers can request PWM devices and use the generic framework
19	  to configure as well as enable and disable them.
20
21	  This generic framework replaces the legacy PWM framework which
22	  allows only a single driver implementing the required API. Not
23	  all legacy implementations have been ported to the framework
24	  yet. The framework provides an API that is backward compatible
25	  with the legacy framework so that existing client drivers
26	  continue to work as expected.
27
28	  If unsure, say no.
29
30if PWM
31
32config PWM_SYSFS
33	bool
34	default y if SYSFS
35
36config PWM_DEBUG
37	bool "PWM lowlevel drivers additional checks and debug messages"
38	depends on DEBUG_KERNEL
39	help
40	  This option enables some additional checks to help lowlevel driver
41	  authors to get their callbacks implemented correctly.
42	  It is expected to introduce some runtime overhead and diagnostic
43	  output to the kernel log, so only enable while working on a driver.
44
45config PWM_AB8500
46	tristate "AB8500 PWM support"
47	depends on AB8500_CORE && ARCH_U8500
48	help
49	  Generic PWM framework driver for Analog Baseband AB8500.
50
51	  To compile this driver as a module, choose M here: the module
52	  will be called pwm-ab8500.
53
54config PWM_ATMEL
55	tristate "Atmel PWM support"
56	depends on ARCH_AT91 || COMPILE_TEST
57	depends on HAS_IOMEM && OF
58	help
59	  Generic PWM framework driver for Atmel SoC.
60
61	  To compile this driver as a module, choose M here: the module
62	  will be called pwm-atmel.
63
64config PWM_ATMEL_HLCDC_PWM
65	tristate "Atmel HLCDC PWM support"
66	depends on MFD_ATMEL_HLCDC
67	depends on HAVE_CLK
68	help
69	  Generic PWM framework driver for the PWM output of the HLCDC
70	  (Atmel High-end LCD Controller). This PWM output is mainly used
71	  to control the LCD backlight.
72
73	  To compile this driver as a module, choose M here: the module
74	  will be called pwm-atmel-hlcdc.
75
76config PWM_ATMEL_TCB
77	tristate "Atmel TC Block PWM support"
78	depends on OF
79	select REGMAP_MMIO
80	help
81	  Generic PWM framework driver for Atmel Timer Counter Block.
82
83	  A Timer Counter Block provides 6 PWM devices grouped by 2.
84	  Devices in a given group must have the same period.
85
86	  To compile this driver as a module, choose M here: the module
87	  will be called pwm-atmel-tcb.
88
89config PWM_BCM_IPROC
90	tristate "iProc PWM support"
91	depends on ARCH_BCM_IPROC || COMPILE_TEST
92	depends on COMMON_CLK && HAS_IOMEM
93	default ARCH_BCM_IPROC
94	help
95	  Generic PWM framework driver for Broadcom iProc PWM block. This
96	  block is used in Broadcom iProc SoC's.
97
98	  To compile this driver as a module, choose M here: the module
99	  will be called pwm-bcm-iproc.
100
101config PWM_BCM_KONA
102	tristate "Kona PWM support"
103	depends on ARCH_BCM_MOBILE || ARCH_BCM_CYGNUS || COMPILE_TEST
104	depends on HAVE_CLK && HAS_IOMEM
105	default ARCH_BCM_MOBILE || ARCH_BCM_CYGNUS
106	help
107	  Generic PWM framework driver for Broadcom Kona PWM block.
108
109	  To compile this driver as a module, choose M here: the module
110	  will be called pwm-bcm-kona.
111
112config PWM_BCM2835
113	tristate "BCM2835 PWM support"
114	depends on ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST
115	depends on HAS_IOMEM
116	help
117	  PWM framework driver for BCM2835 controller (Raspberry Pi)
118
119	  To compile this driver as a module, choose M here: the module
120	  will be called pwm-bcm2835.
121
122config PWM_BERLIN
123	tristate "Marvell Berlin PWM support"
124	depends on ARCH_BERLIN || COMPILE_TEST
125	depends on HAS_IOMEM
126	help
127	  PWM framework driver for Marvell Berlin SoCs.
128
129	  To compile this driver as a module, choose M here: the module
130	  will be called pwm-berlin.
131
132config PWM_BRCMSTB
133	tristate "Broadcom STB PWM support"
134	depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
135	depends on HAS_IOMEM
136	help
137	  Generic PWM framework driver for the Broadcom Set-top-Box
138	  SoCs (BCM7xxx).
139
140	  To compile this driver as a module, choose M Here: the module
141	  will be called pwm-brcmstb.c.
142
143config PWM_CLPS711X
144	tristate "CLPS711X PWM support"
145	depends on ARCH_CLPS711X || COMPILE_TEST
146	depends on HAS_IOMEM
147	help
148	  Generic PWM framework driver for Cirrus Logic CLPS711X.
149
150	  To compile this driver as a module, choose M here: the module
151	  will be called pwm-clps711x.
152
153config PWM_CRC
154	bool "Intel Crystalcove (CRC) PWM support"
155	depends on X86 && INTEL_SOC_PMIC
156	help
157	  Generic PWM framework driver for Crystalcove (CRC) PMIC based PWM
158	  control.
159
160config PWM_CROS_EC
161	tristate "ChromeOS EC PWM driver"
162	depends on CROS_EC
163	help
164	  PWM driver for exposing a PWM attached to the ChromeOS Embedded
165	  Controller.
166
167config PWM_DWC
168	tristate "DesignWare PWM Controller"
169	depends on PCI
170	help
171	  PWM driver for Synopsys DWC PWM Controller attached to a PCI bus.
172
173	  To compile this driver as a module, choose M here: the module
174	  will be called pwm-dwc.
175
176config PWM_EP93XX
177	tristate "Cirrus Logic EP93xx PWM support"
178	depends on ARCH_EP93XX || COMPILE_TEST
179	depends on HAS_IOMEM
180	help
181	  Generic PWM framework driver for Cirrus Logic EP93xx.
182
183	  To compile this driver as a module, choose M here: the module
184	  will be called pwm-ep93xx.
185
186config PWM_FSL_FTM
187	tristate "Freescale FlexTimer Module (FTM) PWM support"
188	depends on HAS_IOMEM
189	depends on OF
190	select REGMAP_MMIO
191	help
192	  Generic FTM PWM framework driver for Freescale VF610 and
193	  Layerscape LS-1 SoCs.
194
195	  To compile this driver as a module, choose M here: the module
196	  will be called pwm-fsl-ftm.
197
198config PWM_HIBVT
199	tristate "HiSilicon BVT PWM support"
200	depends on ARCH_HISI || COMPILE_TEST
201	depends on HAS_IOMEM
202	help
203	  Generic PWM framework driver for HiSilicon BVT SoCs.
204
205	  To compile this driver as a module, choose M here: the module
206	  will be called pwm-hibvt.
207
208config PWM_IMG
209	tristate "Imagination Technologies PWM driver"
210	depends on HAS_IOMEM
211	depends on MFD_SYSCON
212	depends on COMMON_CLK
213	depends on MIPS || COMPILE_TEST
214	help
215	  Generic PWM framework driver for Imagination Technologies
216	  PWM block which supports 4 channels.
217
218	  To compile this driver as a module, choose M here: the module
219	  will be called pwm-img
220
221config PWM_IMX1
222	tristate "i.MX1 PWM support"
223	depends on ARCH_MXC || COMPILE_TEST
224	depends on HAS_IOMEM
225	help
226	  Generic PWM framework driver for i.MX1 and i.MX21
227
228	  To compile this driver as a module, choose M here: the module
229	  will be called pwm-imx1.
230
231config PWM_IMX27
232	tristate "i.MX27 PWM support"
233	depends on ARCH_MXC || COMPILE_TEST
234	depends on HAS_IOMEM
235	help
236	  Generic PWM framework driver for i.MX27 and later i.MX SoCs.
237
238	  To compile this driver as a module, choose M here: the module
239	  will be called pwm-imx27.
240
241config PWM_IMX_TPM
242	tristate "i.MX TPM PWM support"
243	depends on ARCH_MXC || COMPILE_TEST
244	depends on HAVE_CLK && HAS_IOMEM
245	help
246	  Generic PWM framework driver for i.MX7ULP TPM module, TPM's full
247	  name is Low Power Timer/Pulse Width Modulation Module.
248
249	  To compile this driver as a module, choose M here: the module
250	  will be called pwm-imx-tpm.
251
252config PWM_INTEL_LGM
253	tristate "Intel LGM PWM support"
254	depends on HAS_IOMEM
255	depends on (OF && X86) || COMPILE_TEST
256	select REGMAP_MMIO
257	help
258	  Generic PWM fan controller driver for LGM SoC.
259
260	  To compile this driver as a module, choose M here: the module
261	  will be called pwm-intel-lgm.
262
263config PWM_IQS620A
264	tristate "Azoteq IQS620A PWM support"
265	depends on MFD_IQS62X || COMPILE_TEST
266	help
267	  Generic PWM framework driver for the Azoteq IQS620A multi-function
268	  sensor.
269
270	  To compile this driver as a module, choose M here: the module will
271	  be called pwm-iqs620a.
272
273config PWM_JZ4740
274	tristate "Ingenic JZ47xx PWM support"
275	depends on MIPS || COMPILE_TEST
276	depends on COMMON_CLK
277	select MFD_SYSCON
278	help
279	  Generic PWM framework driver for Ingenic JZ47xx based
280	  machines.
281
282	  To compile this driver as a module, choose M here: the module
283	  will be called pwm-jz4740.
284
285config PWM_KEEMBAY
286	tristate "Intel Keem Bay PWM driver"
287	depends on ARCH_KEEMBAY || COMPILE_TEST
288	depends on COMMON_CLK && HAS_IOMEM
289	help
290	  The platform driver for Intel Keem Bay PWM controller.
291
292	  To compile this driver as a module, choose M here: the module
293	  will be called pwm-keembay.
294
295config PWM_LP3943
296	tristate "TI/National Semiconductor LP3943 PWM support"
297	depends on MFD_LP3943
298	help
299	  Generic PWM framework driver for LP3943 which supports two PWM
300	  channels.
301
302	  To compile this driver as a module, choose M here: the module
303	  will be called pwm-lp3943.
304
305config PWM_LPC18XX_SCT
306	tristate "LPC18xx/43xx PWM/SCT support"
307	depends on ARCH_LPC18XX || COMPILE_TEST
308	depends on HAS_IOMEM
309	help
310	  Generic PWM framework driver for NXP LPC18xx PWM/SCT which
311	  supports 16 channels.
312	  A maximum of 15 channels can be requested simultaneously and
313	  must have the same period.
314
315	  To compile this driver as a module, choose M here: the module
316	  will be called pwm-lpc18xx-sct.
317
318config PWM_LPC32XX
319	tristate "LPC32XX PWM support"
320	depends on ARCH_LPC32XX || COMPILE_TEST
321	depends on HAS_IOMEM
322	help
323	  Generic PWM framework driver for LPC32XX. The LPC32XX SOC has two
324	  PWM controllers.
325
326	  To compile this driver as a module, choose M here: the module
327	  will be called pwm-lpc32xx.
328
329config PWM_LPSS
330	depends on HAS_IOMEM
331	tristate
332
333config PWM_LPSS_PCI
334	tristate "Intel LPSS PWM PCI driver"
335	depends on X86 || COMPILE_TEST
336	depends on HAS_IOMEM && PCI
337	select PWM_LPSS
338	help
339	  The PCI driver for Intel Low Power Subsystem PWM controller.
340
341	  To compile this driver as a module, choose M here: the module
342	  will be called pwm-lpss-pci.
343
344config PWM_LPSS_PLATFORM
345	tristate "Intel LPSS PWM platform driver"
346	depends on (X86 && ACPI) || COMPILE_TEST
347	depends on HAS_IOMEM
348	select PWM_LPSS
349	help
350	  The platform driver for Intel Low Power Subsystem PWM controller.
351
352	  To compile this driver as a module, choose M here: the module
353	  will be called pwm-lpss-platform.
354
355config PWM_MESON
356	tristate "Amlogic Meson PWM driver"
357	depends on ARCH_MESON || COMPILE_TEST
358	depends on COMMON_CLK && HAS_IOMEM
359	help
360	  The platform driver for Amlogic Meson PWM controller.
361
362	  To compile this driver as a module, choose M here: the module
363	  will be called pwm-meson.
364
365config PWM_MTK_DISP
366	tristate "MediaTek display PWM driver"
367	depends on ARCH_MEDIATEK || COMPILE_TEST
368	depends on HAS_IOMEM
369	help
370	  Generic PWM framework driver for MediaTek disp-pwm device.
371	  The PWM is used to control the backlight brightness for display.
372
373	  To compile this driver as a module, choose M here: the module
374	  will be called pwm-mtk-disp.
375
376config PWM_MEDIATEK
377	tristate "MediaTek PWM support"
378	depends on ARCH_MEDIATEK || RALINK || COMPILE_TEST
379	depends on HAS_IOMEM
380	help
381	  Generic PWM framework driver for Mediatek ARM SoC.
382
383	  To compile this driver as a module, choose M here: the module
384	  will be called pwm-mediatek.
385
386config PWM_MXS
387	tristate "Freescale MXS PWM support"
388	depends on ARCH_MXS || COMPILE_TEST
389	depends on HAS_IOMEM && OF
390	select STMP_DEVICE
391	help
392	  Generic PWM framework driver for Freescale MXS.
393
394	  To compile this driver as a module, choose M here: the module
395	  will be called pwm-mxs.
396
397config PWM_NTXEC
398	tristate "Netronix embedded controller PWM support"
399	depends on MFD_NTXEC
400	help
401	  Say yes here if you want to support the PWM output of the embedded
402	  controller found in certain e-book readers designed by the original
403	  design manufacturer Netronix.
404
405config PWM_OMAP_DMTIMER
406	tristate "OMAP Dual-Mode Timer PWM support"
407	depends on OF
408	depends on OMAP_DM_TIMER || COMPILE_TEST
409	help
410	  Generic PWM framework driver for OMAP Dual-Mode Timer PWM output
411
412	  To compile this driver as a module, choose M here: the module
413	  will be called pwm-omap-dmtimer
414
415config PWM_PCA9685
416	tristate "NXP PCA9685 PWM driver"
417	depends on I2C
418	select REGMAP_I2C
419	help
420	  Generic PWM framework driver for NXP PCA9685 LED controller.
421
422	  To compile this driver as a module, choose M here: the module
423	  will be called pwm-pca9685.
424
425config PWM_PXA
426	tristate "PXA PWM support"
427	depends on ARCH_PXA || COMPILE_TEST
428	depends on HAS_IOMEM
429	help
430	  Generic PWM framework driver for PXA.
431
432	  To compile this driver as a module, choose M here: the module
433	  will be called pwm-pxa.
434
435config PWM_RASPBERRYPI_POE
436	tristate "Raspberry Pi Firwmware PoE Hat PWM support"
437	# Make sure not 'y' when RASPBERRYPI_FIRMWARE is 'm'. This can only
438	# happen when COMPILE_TEST=y, hence the added !RASPBERRYPI_FIRMWARE.
439	depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
440	help
441	  Enable Raspberry Pi firmware controller PWM bus used to control the
442	  official RPI PoE hat
443
444config PWM_RCAR
445	tristate "Renesas R-Car PWM support"
446	depends on ARCH_RENESAS || COMPILE_TEST
447	depends on HAS_IOMEM
448	help
449	  This driver exposes the PWM Timer controller found in Renesas
450	  R-Car chips through the PWM API.
451
452	  To compile this driver as a module, choose M here: the module
453	  will be called pwm-rcar.
454
455config PWM_RENESAS_TPU
456	tristate "Renesas TPU PWM support"
457	depends on ARCH_RENESAS || COMPILE_TEST
458	depends on HAS_IOMEM
459	help
460	  This driver exposes the Timer Pulse Unit (TPU) PWM controller found
461	  in Renesas chips through the PWM API.
462
463	  To compile this driver as a module, choose M here: the module
464	  will be called pwm-renesas-tpu.
465
466config PWM_ROCKCHIP
467	tristate "Rockchip PWM support"
468	depends on ARCH_ROCKCHIP || COMPILE_TEST
469	depends on HAS_IOMEM
470	help
471	  Generic PWM framework driver for the PWM controller found on
472	  Rockchip SoCs.
473
474config PWM_SAMSUNG
475	tristate "Samsung PWM support"
476	depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
477	depends on HAS_IOMEM
478	help
479	  Generic PWM framework driver for Samsung S3C24xx, S3C64xx, S5Pv210
480	  and Exynos SoCs.
481	  Choose Y here only if you build for such Samsung SoC.
482
483	  To compile this driver as a module, choose M here: the module
484	  will be called pwm-samsung.
485
486config PWM_SIFIVE
487	tristate "SiFive PWM support"
488	depends on OF
489	depends on COMMON_CLK && HAS_IOMEM
490	depends on RISCV || COMPILE_TEST
491	help
492	  Generic PWM framework driver for SiFive SoCs.
493
494	  To compile this driver as a module, choose M here: the module
495	  will be called pwm-sifive.
496
497config PWM_SL28CPLD
498	tristate "Kontron sl28cpld PWM support"
499	depends on MFD_SL28CPLD || COMPILE_TEST
500	help
501	  Generic PWM framework driver for board management controller
502	  found on the Kontron sl28 CPLD.
503
504	  To compile this driver as a module, choose M here: the module
505	  will be called pwm-sl28cpld.
506
507config PWM_SPEAR
508	tristate "STMicroelectronics SPEAr PWM support"
509	depends on PLAT_SPEAR || COMPILE_TEST
510	depends on HAS_IOMEM && OF
511	help
512	  Generic PWM framework driver for the PWM controller on ST
513	  SPEAr SoCs.
514
515	  To compile this driver as a module, choose M here: the module
516	  will be called pwm-spear.
517
518config PWM_SPRD
519	tristate "Spreadtrum PWM support"
520	depends on ARCH_SPRD || COMPILE_TEST
521	depends on HAS_IOMEM
522	help
523	  Generic PWM framework driver for the PWM controller on
524	  Spreadtrum SoCs.
525
526	  To compile this driver as a module, choose M here: the module
527	  will be called pwm-sprd.
528
529config PWM_STI
530	tristate "STiH4xx PWM support"
531	depends on ARCH_STI || COMPILE_TEST
532	depends on HAS_IOMEM && OF
533	help
534	  Generic PWM framework driver for STiH4xx SoCs.
535
536	  To compile this driver as a module, choose M here: the module
537	  will be called pwm-sti.
538
539config PWM_STM32
540	tristate "STMicroelectronics STM32 PWM"
541	depends on MFD_STM32_TIMERS || COMPILE_TEST
542	help
543	  Generic PWM framework driver for STM32 SoCs.
544
545	  To compile this driver as a module, choose M here: the module
546	  will be called pwm-stm32.
547
548config PWM_STM32_LP
549	tristate "STMicroelectronics STM32 PWM LP"
550	depends on MFD_STM32_LPTIMER || COMPILE_TEST
551	help
552	  Generic PWM framework driver for STMicroelectronics STM32 SoCs
553	  with Low-Power Timer (LPTIM).
554
555	  To compile this driver as a module, choose M here: the module
556	  will be called pwm-stm32-lp.
557
558config PWM_STMPE
559	bool "STMPE expander PWM export"
560	depends on MFD_STMPE
561	help
562	  This enables support for the PWMs found in the STMPE I/O
563	  expanders.
564
565config PWM_SUN4I
566	tristate "Allwinner PWM support"
567	depends on ARCH_SUNXI || COMPILE_TEST
568	depends on HAS_IOMEM && COMMON_CLK
569	help
570	  Generic PWM framework driver for Allwinner SoCs.
571
572	  To compile this driver as a module, choose M here: the module
573	  will be called pwm-sun4i.
574
575config PWM_SUNPLUS
576	tristate "Sunplus PWM support"
577	depends on ARCH_SUNPLUS || COMPILE_TEST
578	depends on HAS_IOMEM && OF
579	help
580	  Generic PWM framework driver for the PWM controller on
581	  Sunplus SoCs.
582
583	  To compile this driver as a module, choose M here: the module
584	  will be called pwm-sunplus.
585
586config PWM_TEGRA
587	tristate "NVIDIA Tegra PWM support"
588	depends on ARCH_TEGRA || COMPILE_TEST
589	depends on HAS_IOMEM
590	help
591	  Generic PWM framework driver for the PWFM controller found on NVIDIA
592	  Tegra SoCs.
593
594	  To compile this driver as a module, choose M here: the module
595	  will be called pwm-tegra.
596
597config PWM_TIECAP
598	tristate "ECAP PWM support"
599	depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
600	depends on HAS_IOMEM
601	help
602	  PWM driver support for the ECAP APWM controller found on TI SOCs
603
604	  To compile this driver as a module, choose M here: the module
605	  will be called pwm-tiecap.
606
607config PWM_TIEHRPWM
608	tristate "EHRPWM PWM support"
609	depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_K3 || COMPILE_TEST
610	depends on HAS_IOMEM
611	help
612	  PWM driver support for the EHRPWM controller found on TI SOCs
613
614	  To compile this driver as a module, choose M here: the module
615	  will be called pwm-tiehrpwm.
616
617config PWM_TWL
618	tristate "TWL4030/6030 PWM support"
619	depends on TWL4030_CORE
620	help
621	  Generic PWM framework driver for TWL4030/6030.
622
623	  To compile this driver as a module, choose M here: the module
624	  will be called pwm-twl.
625
626config PWM_TWL_LED
627	tristate "TWL4030/6030 PWM support for LED drivers"
628	depends on TWL4030_CORE
629	help
630	  Generic PWM framework driver for TWL4030/6030 LED terminals.
631
632	  To compile this driver as a module, choose M here: the module
633	  will be called pwm-twl-led.
634
635config PWM_VISCONTI
636	tristate "Toshiba Visconti PWM support"
637	depends on ARCH_VISCONTI || COMPILE_TEST
638	help
639	  PWM Subsystem driver support for Toshiba Visconti SoCs.
640
641	  To compile this driver as a module, choose M here: the module
642	  will be called pwm-visconti.
643
644config PWM_VT8500
645	tristate "vt8500 PWM support"
646	depends on ARCH_VT8500 || COMPILE_TEST
647	depends on HAS_IOMEM
648	help
649	  Generic PWM framework driver for vt8500.
650
651	  To compile this driver as a module, choose M here: the module
652	  will be called pwm-vt8500.
653
654config PWM_XILINX
655	tristate "Xilinx AXI Timer PWM support"
656	depends on OF_ADDRESS
657	depends on COMMON_CLK
658	select REGMAP_MMIO
659	help
660	  PWM driver for Xilinx LogiCORE IP AXI timers. This timer is
661	  typically a soft core which may be present in Xilinx FPGAs.
662	  This device may also be present in Microblaze soft processors.
663	  If you don't have this IP in your design, choose N.
664
665	  To compile this driver as a module, choose M here: the module
666	  will be called pwm-xilinx.
667
668endif
669