2023-10-04 09:40:08

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH v2 1/2] dt-bindings: pwm: Add T-HEAD PWM controller

T-HEAD SoCs such as the TH1520 contain a PWM controller used
to control the LCD backlight, fan and so on.

Signed-off-by: Jisheng Zhang <[email protected]>
---
.../bindings/pwm/thead,th1520-pwm.yaml | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml b/Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml
new file mode 100644
index 000000000000..b9c88f758a39
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/thead,th1520-pwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: T-HEAD TH1520 PWM
+
+maintainers:
+ - Jisheng Zhang <[email protected]>
+
+allOf:
+ - $ref: pwm.yaml#
+
+properties:
+ compatible:
+ enum:
+ - thead,th1520-pwm
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ "#pwm-cells":
+ const: 2
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+
+ pwm@ec01c000 {
+ compatible = "thead,th1520-pwm";
+ reg = <0xec01c000 0x1000>;
+ clocks = <&clk 1>;
+ #pwm-cells = <2>;
+ };
--
2.40.1


2023-10-04 14:03:19

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: pwm: Add T-HEAD PWM controller

Hello,

On Wed, Oct 04, 2023 at 05:27:30PM +0800, Jisheng Zhang wrote:
> + "#pwm-cells":
> + const: 2

Please make this a 3.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (316.00 B)
signature.asc (499.00 B)
Download all attachments

2023-10-04 15:08:19

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: pwm: Add T-HEAD PWM controller


On Wed, 04 Oct 2023 17:27:30 +0800, Jisheng Zhang wrote:
> T-HEAD SoCs such as the TH1520 contain a PWM controller used
> to control the LCD backlight, fan and so on.
>
> Signed-off-by: Jisheng Zhang <[email protected]>
> ---
> .../bindings/pwm/thead,th1520-pwm.yaml | 44 +++++++++++++++++++
> 1 file changed, 44 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pwm/thead,th1520-pwm.yaml
>

Reviewed-by: Rob Herring <[email protected]>