Skip to content

Commit 90cd430

Browse files
AaronDotUwe Kleine-König
authored andcommitted
dt-bindings: pwm: Add Loongson PWM controller
Add Loongson PWM controller binding with DT schema format using json-schema. Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Huacai Chen <[email protected]> Signed-off-by: Binbin Zhou <[email protected]> Link: https://lore.kernel.org/r/57e0cbd4b7ce37da94094205e28a2ec2256c7175.1743403075.git.zhoubinbin@loongson.cn Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 08d8c9f commit 90cd430

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pwm/loongson,ls7a-pwm.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Loongson PWM Controller
8+
9+
maintainers:
10+
- Binbin Zhou <[email protected]>
11+
12+
description:
13+
The Loongson PWM has one pulse width output signal and one pulse input
14+
signal to be measured.
15+
It can be found on Loongson-2K series cpus and Loongson LS7A bridge chips.
16+
17+
allOf:
18+
- $ref: pwm.yaml#
19+
20+
properties:
21+
compatible:
22+
oneOf:
23+
- const: loongson,ls7a-pwm
24+
- items:
25+
- enum:
26+
- loongson,ls2k0500-pwm
27+
- loongson,ls2k1000-pwm
28+
- loongson,ls2k2000-pwm
29+
- const: loongson,ls7a-pwm
30+
31+
reg:
32+
maxItems: 1
33+
34+
interrupts:
35+
maxItems: 1
36+
37+
clocks:
38+
maxItems: 1
39+
40+
'#pwm-cells':
41+
description:
42+
The first cell must have a value of 0, which specifies the PWM output signal;
43+
The second cell is the period in nanoseconds;
44+
The third cell flag supported by this binding is PWM_POLARITY_INVERTED.
45+
const: 3
46+
47+
required:
48+
- compatible
49+
- reg
50+
- interrupts
51+
- clocks
52+
53+
additionalProperties: false
54+
55+
examples:
56+
- |
57+
#include <dt-bindings/interrupt-controller/irq.h>
58+
#include <dt-bindings/clock/loongson,ls2k-clk.h>
59+
60+
pwm@1fe22000 {
61+
compatible = "loongson,ls2k1000-pwm", "loongson,ls7a-pwm";
62+
reg = <0x1fe22000 0x10>;
63+
interrupt-parent = <&liointc0>;
64+
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
65+
clocks = <&clk LOONGSON2_APB_CLK>;
66+
#pwm-cells = <3>;
67+
};

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13912,6 +13912,12 @@ S: Maintained
1391213912
F: Documentation/devicetree/bindings/i2c/loongson,ls2x-i2c.yaml
1391313913
F: drivers/i2c/busses/i2c-ls2x.c
1391413914

13915+
LOONGSON PWM DRIVER
13916+
M: Binbin Zhou <[email protected]>
13917+
13918+
S: Maintained
13919+
F: Documentation/devicetree/bindings/pwm/loongson,ls7a-pwm.yaml
13920+
1391513921
LOONGSON-2 SOC SERIES CLOCK DRIVER
1391613922
M: Yinbo Zhu <[email protected]>
1391713923

0 commit comments

Comments
 (0)