[PATCH v4 0/2] pwm: add Axiado AX3000 PWM support
From: Petar Stepanovic <hidden>
Date: 2026-09-08 08:29:06
Also in:
linux-devicetree, linux-pwm, lkml, openbmc
This series adds support for the PWM controller found on Axiado AX3000 and AX3005 SoCs. A new driver is needed because this PWM controller is a SoC-specific hardware block used on Axiado SoCs. It has its own register layout, enable control, period configuration, duty-cycle configuration, and does not match any existing upstream PWM driver. The controller provides configurable PWM output signals. The driver exposes the controller through the Linux PWM framework and supports period and duty-cycle configuration. The driver converts the requested period and duty cycle from nanoseconds to hardware clock cycles based on the input clock rate. The datasheet is not publicly available. Public high-level product information is available at: https://axiado.com/products/#AX3080 The register definitions and programming sequence used by this driver are based on Axiado internal SoC documentation. Signed-off-by: Petar Stepanovic <redacted> --- Changes in v4: - Corrected the AX3005 compatible ordering to list axiado,ax3005-pwm before its axiado,ax3000-pwm fallback. - Changed the disabled-state handling to program a constant-low waveform, because disabling the hardware controller drives the output high. - Added software state tracking so readback reports this constant-low hardware representation as a logically disabled PWM. - Link to v3: https://patch.msgid.link/20260811-axiado-ax3000-pwm-v3-0-6ceaccd812cf@axiado.com Changes in v3: - Express AX3005 compatibility with AX3000 using a fallback compatible. - Update the Devicetree binding example accordingly. - Add 0% duty-cycle support using the hardware constant-low encoding. - Cache the rounded period for 0% duty-cycle waveform readback. - Allow sub-cycle duty requests to round down to 0% instead of rounding up to one clock cycle. - Normalize high-time values greater than the period to 100% duty. - Drop the redundant AX3005 OF match entry and use the AX3000 fallback. - Clarify comments and PWM hardware limitations. - Link to v2: https://lore.kernel.org/r/20260723-axiado-ax3000-pwm-v2-0-22002f0b281d@axiado.com (local) Changes in v2: - Migrated the driver from the legacy apply/get_state API to the new waveform ops API (round_waveform_tohw/fromhw, read/write_waveform). - Cache the clock rate at probe and lock it with devm_clk_rate_exclusive_get() instead of reading it on every op. - Improved rounding: clamp period/duty to hardware limits, reject non-zero duty offset, preserve exact 100% duty, round sub-cycle duty up to the minimum. - Added a "Limitations" comment block documenting hardware constraints. - Renamed macros from AX_PWM_* to AXIADO_PWM_* and dropped unused ones. - DT binding: dropped clock-names, made #pwm-cells required, and updated the description and compatible list to cover both the AX3000 and AX3005 SoCs. - Added axiado,ax3005-pwm to the driver's OF device match table. - Link to v1: https://lore.kernel.org/r/20260618-axiado-ax3000-pwm-v1-0-c9797a909414@axiado.com (local) To: Petar Stepanovic <redacted> To: Akhila Kavi <redacted> To: Prasad Bolisetty <pbolisetty@axiado.com> To: Uwe Kleine-König <ukleinek@kernel.org> To: Rob Herring <robh@kernel.org> To: Krzysztof Kozlowski <krzk+dt@kernel.org> To: Conor Dooley <conor+dt@kernel.org> To: Harshit Shah <redacted> Cc: linux-pwm@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- Petar Stepanovic (2): dt-bindings: pwm: add Axiado AX3000 PWM pwm: add Axiado AX3000 PWM driver .../devicetree/bindings/pwm/axiado,ax3000-pwm.yaml | 53 ++++ MAINTAINERS | 9 + drivers/pwm/Kconfig | 11 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-axiado.c | 332 +++++++++++++++++++++ 5 files changed, 406 insertions(+) --- base-commit: 368d34807e6d04bb2089918383b58abf40e720a0 change-id: 20260518-axiado-ax3000-pwm-cd7c346849f1 Best regards, -- Petar Stepanovic [off-list ref]