Skip to contentSkip to conversation

Add support for nuvoton ma35d1 pwm controller

PATCH Superseded Chi-Wen Weng 3 participants 9 messages Oct 23, 2024 – Oct 24, 2024

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Add support for nuvoton ma35d1 pwm controller

This patch series adds pwm driver for the nuvoton ma35d1 ARMv8 SoC. It includes DT binding documentation and the ma35d1 pwm driver.

v2:
- Update nuvoton,ma35d1-pwm.yaml
- Fix 'maxItems' of 'reg' to 1.
- Remove unused label
- Update ma35d1 pwm driver
- Remove MODULE_ALIAS()
- Add chip->atomic = true

Chi-Wen Weng (2):
dt-bindings: pwm: nuvoton: Add MA35D1 pwm
pwm: Add Nuvoton MA35D1 PWM controller support

 .../bindings/pwm/nuvoton,ma35d1-pwm.yaml      |  45 +++++
 drivers/pwm/Kconfig                           |   9 +
 drivers/pwm/Makefile                          |   1 +
 drivers/pwm/pwm-ma35d1.c                      | 169 ++++++++++++++++++
 4 files changed, 224 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/nuvoton,ma35d1-pwm.yaml
 create mode 100644 drivers/pwm/pwm-ma35d1.c
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/2 dt-bindings: pwm: nuvoton: Add MA35D1 pwm

Add dt-bindings for Nuvoton MA35D1 SoC PWM controller.

---
 .../bindings/pwm/nuvoton,ma35d1-pwm.yaml      | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/nuvoton,ma35d1-pwm.yaml
Documentation/devicetree/bindings/pwm/nuvoton,ma35d1-pwm.yaml new file +45 -0
new file mode 100644
index 000000000000..ed32fc573a24
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/nuvoton,ma35d1-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton MA35D1 PWM controller
+
+maintainers:
+  - Chi-Wen Weng <[email protected]>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,ma35d1-pwm
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 2
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
+
+    pwm@40580000 {
+      compatible = "nuvoton,ma35d1-pwm";
+      reg = <0x40580000 0x400>;
+      clocks = <&clk EPWM0_GATE>;
+      #pwm-cells = <2>;
+    };
Signature · 1 line
2.25.1
#4 lore raw

PATCH v2 2/2 pwm: Add Nuvoton MA35D1 PWM controller support

In reply to Chi-Wen Weng

This commit adds a generic PWM framework driver for Nuvoton MA35D1 PWM controller.

---
 drivers/pwm/Kconfig      |   9 +++
 drivers/pwm/Makefile     |   1 +
 drivers/pwm/pwm-ma35d1.c | 169 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 179 insertions(+)
 create mode 100644 drivers/pwm/pwm-ma35d1.c
drivers/pwm/Kconfig +9 -0
index 0915c1e7df16..97b9e83af020 100644
@@ -411,6 +411,15 @@ config PWM_LPSS_PLATFORM
 	  To compile this driver as a module, choose M here: the module
 	  will be called pwm-lpss-platform.
 
+config PWM_MA35D1
+	tristate "Nuvoton MA35D1 PWM support"
+	depends on ARCH_MA35 || COMPILE_TEST
+	help
+	  Generic PWM framework driver for Nuvoton MA35D1.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called pwm-ma35d1.
+
 config PWM_MESON
 	tristate "Amlogic Meson PWM driver"
 	depends on ARCH_MESON || COMPILE_TEST
drivers/pwm/Makefile +1 -0
index 9081e0c0e9e0..c1d3a1d8add0 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_PWM_LPC32XX)	+= pwm-lpc32xx.o
 obj-$(CONFIG_PWM_LPSS)		+= pwm-lpss.o
 obj-$(CONFIG_PWM_LPSS_PCI)	+= pwm-lpss-pci.o
 obj-$(CONFIG_PWM_LPSS_PLATFORM)	+= pwm-lpss-platform.o
+obj-$(CONFIG_PWM_MA35D1)	+= pwm-ma35d1.o
 obj-$(CONFIG_PWM_MESON)		+= pwm-meson.o
 obj-$(CONFIG_PWM_MEDIATEK)	+= pwm-mediatek.o
 obj-$(CONFIG_PWM_MICROCHIP_CORE)	+= pwm-microchip-core.o
drivers/pwm/pwm-ma35d1.c new file +169 -0

169 lines not on this page · raw message

Signature · 1 line
2.25.1
#5 lore raw

Re: [PATCH v2 2/2] pwm: Add Nuvoton MA35D1 PWM controller support

In reply to Chi-Wen Weng
Quoted 7 lines · Chi-Wen Weng

This commit adds a generic PWM framework driver for Nuvoton MA35D1 PWM controller.

NAK.

Stop adding fake tags.

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v2 2/2] pwm: Add Nuvoton MA35D1 PWM controller support

Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Chi-Wen Weng

This commit adds a generic PWM framework driver for Nuvoton MA35D1 PWM controller.

Quoted 8 lines
Quoted 4 lines

NAK.

Stop adding fake tags.

I never sent a Reviewed-by either.

Please re-send without those tags.

Sean

#3 lore raw

Re: [PATCH v2 1/2] dt-bindings: pwm: nuvoton: Add MA35D1 pwm

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Thank you for your reply.

Quoted 6 lines · Krzysztof Kozlowski
Quoted 4 lines · Chi-Wen Weng

Add dt-bindings for Nuvoton MA35D1 SoC PWM controller.

Really? Where?

I'm very sorry I misunderstood the meaning of "Reviewed-by".

I will resend patch v2.

Quoted 3 lines

Best regards,
Krzysztof

Thanks.

Chi-Wen Weng

#8 lore raw

Re: [PATCH v2 2/2] pwm: Add Nuvoton MA35D1 PWM controller support

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Thank you for your reply.

Quoted 11 lines · Krzysztof Kozlowski
Quoted 7 lines · Chi-Wen Weng

This commit adds a generic PWM framework driver for Nuvoton MA35D1 PWM controller.

NAK.

Stop adding fake tags.

OK. Sorry again.

I will resend patch v2.

Quoted 2 lines

Best regards,
Krzysztof

Thanks.

Chi-Wen Weng

#7 lore raw

Re: [PATCH v2 2/2] pwm: Add Nuvoton MA35D1 PWM controller support

In reply to Sean Young

Hi Sean,

Thank you for your reply.

Quoted 11 lines · Sean Young
Quoted 10 lines · Krzysztof Kozlowski
Quoted 7 lines · Chi-Wen Weng

This commit adds a generic PWM framework driver for Nuvoton MA35D1 PWM controller.

NAK.

Quoted 7 lines
Quoted 1 line

Stop adding fake tags.

I never sent a Reviewed-by either.

Please re-send without those tags.

Sean

Sorry. I will re-send without those tags.

Thanks.
Chi-Wen Weng