Skip to content

Commit

Permalink
dt-bindings: pwm: sprd,ums512-pwm: convert to YAML
Browse files Browse the repository at this point in the history
Convert the Spreadtrum/Unisoc UMS512 PWM controller bindings to DT schema.
Adjust filename to match compatible. Drop assigned-* properties as these
should not be needed.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Chunyan Zhang <zhang.lyra@gmail.com>
Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://lore.kernel.org/r/ZyH-JASRcpMXYsmH@standask-GA-A55M-S2HP
[Replaced Baolin Wang's email address in maintainers list]
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
  • Loading branch information
Stanislav Jakubek authored and Uwe Kleine-König committed Dec 18, 2024
1 parent 10435e0 commit a0b6742
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 40 deletions.
40 changes: 0 additions & 40 deletions Documentation/devicetree/bindings/pwm/pwm-sprd.txt

This file was deleted.

66 changes: 66 additions & 0 deletions Documentation/devicetree/bindings/pwm/sprd,ums512-pwm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pwm/sprd,ums512-pwm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Spreadtrum/Unisoc UMS512 PWM Controller

maintainers:
- Orson Zhai <orsonzhai@gmail.com>
- Baolin Wang <baolin.wang@linux.alibaba.com>
- Chunyan Zhang <zhang.lyra@gmail.com>

properties:
compatible:
const: sprd,ums512-pwm

reg:
maxItems: 1

clocks:
maxItems: 8

clock-names:
items:
- const: pwm0
- const: enable0
- const: pwm1
- const: enable1
- const: pwm2
- const: enable2
- const: pwm3
- const: enable3

'#pwm-cells':
const: 2

required:
- compatible
- reg
- clocks
- clock-names

allOf:
- $ref: pwm.yaml#

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/clock/sprd,ums512-clk.h>
pwm@32260000 {
compatible = "sprd,ums512-pwm";
reg = <0x32260000 0x10000>;
clocks = <&aon_clk CLK_PWM0>, <&aonapb_gate CLK_PWM0_EB>,
<&aon_clk CLK_PWM1>, <&aonapb_gate CLK_PWM1_EB>,
<&aon_clk CLK_PWM2>, <&aonapb_gate CLK_PWM2_EB>,
<&aon_clk CLK_PWM3>, <&aonapb_gate CLK_PWM3_EB>;
clock-names = "pwm0", "enable0",
"pwm1", "enable1",
"pwm2", "enable2",
"pwm3", "enable3";
#pwm-cells = <2>;
};
...

0 comments on commit a0b6742

Please sign in to comment.