Skip to content

Commit

Permalink
dt-bindings: microchip: atmel,at91rm9200-tcb: Add atmel,tcb-pwm
Browse files Browse the repository at this point in the history
Move the TCB pwm nodes under their parent. This removes the need for the
tc-block property as there is now a child-parent relationship between the
TC channel and the TC block.

Move the documentation to the main file.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Alexandre Belloni authored and Thierry Reding committed Dec 17, 2020
1 parent 44db536 commit cd6720b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
16 changes: 0 additions & 16 deletions Documentation/devicetree/bindings/pwm/atmel-tcb-pwm.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ patternProperties:
items:
- enum:
- atmel,tcb-timer
- atmel,tcb-pwm
- microchip,tcb-capture
reg:
description:
Expand All @@ -68,10 +69,35 @@ patternProperties:

minItems: 1
maxItems: 3
required:
- compatible
- reg

"^pwm@[0-2]$":
description: The timer block channels that are used as PWMs.
$ref: ../../pwm/pwm.yaml#
type: object
properties:
compatible:
const: atmel,tcb-pwm
reg:
description:
TCB channel to use for this PWM.
enum: [ 0, 1, 2 ]

"#pwm-cells":
description:
The only third cell flag supported by this binding is
PWM_POLARITY_INVERTED.
const: 3

required:
- compatible
- reg
- "#pwm-cells"

additionalProperties: false


allOf:
- if:
Expand Down Expand Up @@ -158,7 +184,13 @@ examples:
compatible = "atmel,tcb-timer";
reg = <1>;
};
};
pwm@2 {
compatible = "atmel,tcb-pwm";
reg = <2>;
#pwm-cells = <3>;
};
};
/* TCB0 Capture with QDEC: */
timer@f800c000 {
compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
Expand Down

0 comments on commit cd6720b

Please sign in to comment.