All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v19 0/3] Add OpenCores PTC PWM support
@ 2026-06-15 15:57 ` Hal Feng
  0 siblings, 0 replies; 13+ messages in thread
From: Hal Feng @ 2026-06-15 15:57 UTC (permalink / raw)
  To: Uwe Kleine-König, Philipp Zabel, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Emil Renner Berthing,
	Palmer Dabbelt, Paul Walmsley, Albert Ou
  Cc: Hal Feng, linux-pwm, devicetree, linux-riscv, linux-kernel

Add OpenCores PTC PWM driver which is used in StarFive
JH7100/JH7110/JHB100 SoC.

I will maintain this pwm module in place of William.

Changes since v18:
- Address Sashiko AI review comments for the OpenCores PWM driver.
- Fix runtime PM usage count handling on probe, error paths, PWM release
  and driver teardown.
- Reject period or duty cycle values below the hardware minimum.
- Restore PWM registers across system sleep resume.
- Return the real error from devm_pwmchip_alloc().
- Preserve bootloader-configured PWM state during probe and keep runtime
  PM active if the PWM is already enabled.
- Use synchronous runtime PM put before possible teardown.

Changes since v17:
- Simplify the code. Make it more readable.
- Restructure the driver to register the pwm chip for one pwm channel,
  because each OpenCores PTC IP core only supports one PWM channel.
  Drop starfive compatibles.
  Add patches to fix the dt-bindings and device tree.
- Support runtime pm and system sleep pm.
- Disable the pwm module and reset the pwm counter before updating the
  period and duty cycle.
- Improve the descriptions.
- Update the dt-bindings maintainer to Hal Feng.

History:
v18: https://lore.kernel.org/all/20260515054723.25024-1-hal.feng@starfivetech.com/
v17: https://lore.kernel.org/all/20250106103540.10079-1-william.qiu@starfivetech.com/

Hal Feng (3):
  dt-bindings: pwm: opencores: Update compatibles, examples and
    maintainers
  riscv: dts: starfive: Correct pwm nodes
  pwm: Add OpenCores PTC PWM driver

 .../bindings/pwm/opencores,pwm.yaml           |  16 +-
 MAINTAINERS                                   |   6 +
 .../boot/dts/starfive/jh7100-common.dtsi      |  28 +-
 arch/riscv/boot/dts/starfive/jh7100.dtsi      |  67 +++-
 .../boot/dts/starfive/jh7110-common.dtsi      |  27 +-
 .../boot/dts/starfive/jh7110-milkv-mars.dts   |   6 +-
 .../dts/starfive/jh7110-milkv-marscm.dtsi     |   6 +-
 .../dts/starfive/jh7110-pine64-star64.dts     |   6 +-
 .../jh7110-starfive-visionfive-2-lite.dtsi    |   6 +-
 .../jh7110-starfive-visionfive-2.dtsi         |   6 +-
 arch/riscv/boot/dts/starfive/jh7110.dtsi      |  67 +++-
 drivers/pwm/Kconfig                           |  12 +
 drivers/pwm/Makefile                          |   1 +
 drivers/pwm/pwm-ocores.c                      | 312 ++++++++++++++++++
 14 files changed, 538 insertions(+), 28 deletions(-)
 create mode 100644 drivers/pwm/pwm-ocores.c


base-commit: 95e56f0f293ef797123eb032f78f5b5d56a035a6
-- 
2.43.2


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH v19 3/3] pwm: Add OpenCores PTC PWM driver
@ 2026-06-16 10:18 kernel test robot
  0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-06-16 10:18 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "dtcheck: binding changes may go via different trees"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260615155759.129210-4-hal.feng@starfivetech.com>
References: <20260615155759.129210-4-hal.feng@starfivetech.com>
TO: Hal Feng <hal.feng@starfivetech.com>
TO: "Uwe Kleine-König" <ukleinek@kernel.org>
TO: Philipp Zabel <p.zabel@pengutronix.de>
TO: Rob Herring <robh@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor@kernel.org>
TO: Emil Renner Berthing <emil.renner.berthing@canonical.com>
TO: Palmer Dabbelt <palmer@dabbelt.com>
TO: Paul Walmsley <pjw@kernel.org>
TO: Albert Ou <aou@eecs.berkeley.edu>
CC: Hal Feng <hal.feng@starfivetech.com>
CC: linux-pwm@vger.kernel.org
CC: devicetree@vger.kernel.org
CC: linux-riscv@lists.infradead.org
CC: linux-kernel@vger.kernel.org

Hi Hal,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 95e56f0f293ef797123eb032f78f5b5d56a035a6]

url:    https://github.com/intel-lab-lkp/linux/commits/Hal-Feng/dt-bindings-pwm-opencores-Update-compatibles-examples-and-maintainers/20260616-004009
base:   95e56f0f293ef797123eb032f78f5b5d56a035a6
patch link:    https://lore.kernel.org/r/20260615155759.129210-4-hal.feng%40starfivetech.com
patch subject: [PATCH v19 3/3] pwm: Add OpenCores PTC PWM driver
:::::: branch date: 18 hours ago
:::::: commit date: 18 hours ago
config: openrisc-randconfig-2051-20260616 (https://download.01.org/0day-ci/archive/20260616/202606161251.HZTxFf57-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 16.1.0
dtschema: 2026.5.dev10+g5d839523d
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260616/202606161251.HZTxFf57-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202606161251.HZTxFf57-lkp@intel.com/

dtcheck warnings: (new ones prefixed by >>)
>> Documentation/devicetree/bindings/pwm/opencores,pwm.yaml:25:9: [warning] wrong indentation: expected 10 but found 8 (indentation)

vim +25 Documentation/devicetree/bindings/pwm/opencores,pwm.yaml

2529085831b01f William Qiu 2023-12-22   8  
2529085831b01f William Qiu 2023-12-22   9  maintainers:
b85565809b38ad Hal Feng    2026-06-15  10    - Hal Feng <hal.feng@starfivetech.com>
2529085831b01f William Qiu 2023-12-22  11  
2529085831b01f William Qiu 2023-12-22  12  description:
2529085831b01f William Qiu 2023-12-22  13    The OpenCores PTC ip core contains a PWM controller. When operating in PWM
2529085831b01f William Qiu 2023-12-22  14    mode, the PTC core generates binary signal with user-programmable low and
2529085831b01f William Qiu 2023-12-22  15    high periods. All PTC counters and registers are 32-bit.
2529085831b01f William Qiu 2023-12-22  16  
2529085831b01f William Qiu 2023-12-22  17  allOf:
2529085831b01f William Qiu 2023-12-22  18    - $ref: pwm.yaml#
2529085831b01f William Qiu 2023-12-22  19  
2529085831b01f William Qiu 2023-12-22  20  properties:
2529085831b01f William Qiu 2023-12-22  21    compatible:
b85565809b38ad Hal Feng    2026-06-15  22      oneOf:
b85565809b38ad Hal Feng    2026-06-15  23        - const: opencores,pwm-v1
b85565809b38ad Hal Feng    2026-06-15  24        - items:
2529085831b01f William Qiu 2023-12-22 @25          - enum:
2529085831b01f William Qiu 2023-12-22  26              - starfive,jh7100-pwm
2529085831b01f William Qiu 2023-12-22  27              - starfive,jh7110-pwm
b85565809b38ad Hal Feng    2026-06-15  28              - starfive,jhb100-pwm
2529085831b01f William Qiu 2023-12-22  29          - const: opencores,pwm-v1
2529085831b01f William Qiu 2023-12-22  30  
2529085831b01f William Qiu 2023-12-22  31    reg:
2529085831b01f William Qiu 2023-12-22  32      maxItems: 1
2529085831b01f William Qiu 2023-12-22  33  
2529085831b01f William Qiu 2023-12-22  34    clocks:
2529085831b01f William Qiu 2023-12-22  35      maxItems: 1
2529085831b01f William Qiu 2023-12-22  36  
2529085831b01f William Qiu 2023-12-22  37    resets:
2529085831b01f William Qiu 2023-12-22  38      maxItems: 1
2529085831b01f William Qiu 2023-12-22  39  
2529085831b01f William Qiu 2023-12-22  40    "#pwm-cells":
2529085831b01f William Qiu 2023-12-22  41      const: 3
2529085831b01f William Qiu 2023-12-22  42  
2529085831b01f William Qiu 2023-12-22  43  required:
2529085831b01f William Qiu 2023-12-22  44    - compatible
2529085831b01f William Qiu 2023-12-22  45    - reg
2529085831b01f William Qiu 2023-12-22  46    - clocks
2529085831b01f William Qiu 2023-12-22  47  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2026-06-16 10:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 15:57 [PATCH v19 0/3] Add OpenCores PTC PWM support Hal Feng
2026-06-15 15:57 ` Hal Feng
2026-06-15 15:57 ` [PATCH v19 1/3] dt-bindings: pwm: opencores: Update compatibles, examples and maintainers Hal Feng
2026-06-15 15:57   ` Hal Feng
2026-06-15 16:21   ` Conor Dooley
2026-06-15 16:21     ` Conor Dooley
2026-06-15 16:24   ` sashiko-bot
2026-06-15 15:57 ` [PATCH v19 2/3] riscv: dts: starfive: Correct pwm nodes Hal Feng
2026-06-15 15:57   ` Hal Feng
2026-06-15 15:57 ` [PATCH v19 3/3] pwm: Add OpenCores PTC PWM driver Hal Feng
2026-06-15 15:57   ` Hal Feng
2026-06-15 16:25   ` sashiko-bot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-16 10:18 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.