public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Update designware pwm driver
@ 2026-03-06  9:30 dongxuyang
  2026-03-06  9:30 ` [PATCH v2 1/2] dt-bindings: pwm: dwc: add reset optional dongxuyang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: dongxuyang @ 2026-03-06  9:30 UTC (permalink / raw)
  To: ukleinek, robh, krzk+dt, conor+dt, ben-linux, ben.dooks, p.zabel,
	linux-pwm, devicetree, linux-kernel
  Cc: ningyu, linmin, xuxiang, wangguosheng, pinkesh.vaghela,
	Xuyang Dong

From: Xuyang Dong <dongxuyang@eswincomputing.com>

There is already a patch [1] for the DesignWare PWM driver, 
which is posted by Ben and still under review. 
Based on this patch, this series is a continuation of [1] 
to add support for IP versions 2.11a and later, which 
includes support for "Pulse Width Modulation with 0% 
and 100% Duty Cycle".

Supported chips:
ESWIN EIC7700 series SoC.

Test:
Tested this patch on the Sifive HiFive Premier P550 (which uses the EIC7700
SoC).

[1] https://lore.kernel.org/lkml/20230907161242.67190-1-ben.dooks@codethink.co.uk/

Updates:
  Change in v2:
  - YAML:
    - Remove eswin,eic7700-pwm.yaml. Use snps,dw-apb-timers-pwm2.yaml.
      The description in snps,dw-apb-timers-pwm2.yaml is better.
    - Add the resets property as optional, as defined in the databook.
    - Remove snps,pwm-full-range-enable as no additional property is needed.
  - Driver:
    - Change the file from pwm-dwc-eic7700.c to pwm-dwc-of.c from [1].
    - Define DWC_TIM_VERSION_ID_2_11A 2.11a as the baseline version.
    - Enable the 0% and 100% duty cycle mode by setting dwc->feature if
      the version read from the TIMERS_COMP_VERSION register is later
      than or equal to DWC_TIM_VERSION_ID_2_11A.
    - Use the DIV_ROUND_UP_ULL() to calculate width in the .apply and
      .get_state.
    - Additionally, Power Management (PM) support has been added to the
      pwm-dwc-of.c driver.
    - Drop the headers that are not used.
    - Use devm_clk_get_enabled() instead of devm_clk_get().
    - Drop of_match_ptr.
    - Fix build error with 1ULL << 32.
      Reported-by: kernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202512061720.j31AsgM7-lkp@intel.com/

  - Link to v1: https://lore.kernel.org/all/20251205090411.1388-1-dongxuyang@eswincomputing.com/
  - Link to v9: https://lore.kernel.org/lkml/20230907161242.67190-1-ben.dooks@codethink.co.uk/

Xuyang Dong (2):
  dt-bindings: pwm: dwc: add reset optional
  pwm: dwc: add of/platform support

 .../bindings/pwm/snps,dw-apb-timers-pwm2.yaml |   3 +
 drivers/pwm/Kconfig                           |  10 +
 drivers/pwm/Makefile                          |   1 +
 drivers/pwm/pwm-dwc-core.c                    | 101 ++++++--
 drivers/pwm/pwm-dwc-of.c                      | 216 ++++++++++++++++++
 drivers/pwm/pwm-dwc.h                         |  25 +-
 6 files changed, 327 insertions(+), 29 deletions(-)
 create mode 100644 drivers/pwm/pwm-dwc-of.c

--
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-17 13:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06  9:30 [PATCH v2 0/2] Update designware pwm driver dongxuyang
2026-03-06  9:30 ` [PATCH v2 1/2] dt-bindings: pwm: dwc: add reset optional dongxuyang
2026-03-07 13:22   ` Krzysztof Kozlowski
2026-03-09  9:23     ` Xuyang Dong
2026-03-17  9:42       ` Uwe Kleine-König
2026-03-06  9:31 ` [PATCH v2 2/2] pwm: dwc: add of/platform support dongxuyang
2026-03-07 13:24 ` [PATCH v2 0/2] Update designware pwm driver Krzysztof Kozlowski
2026-03-07 13:26   ` Krzysztof Kozlowski
2026-03-09  9:24     ` Xuyang Dong
2026-03-17 13:50   ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox