Commit cd6720ba authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Thierry Reding

dt-bindings: microchip: atmel,at91rm9200-tcb: Add atmel,tcb-pwm

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: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 44db5363
Atmel TCB PWM controller
Required properties:
- compatible: should be "atmel,tcb-pwm"
- #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
the cells format. The only third cell flag supported by this binding is
PWM_POLARITY_INVERTED.
- tc-block: The Timer Counter block to use as a PWM chip.
Example:
pwm {
compatible = "atmel,tcb-pwm";
#pwm-cells = <3>;
tc-block = <1>;
};
...@@ -59,6 +59,7 @@ patternProperties: ...@@ -59,6 +59,7 @@ patternProperties:
items: items:
- enum: - enum:
- atmel,tcb-timer - atmel,tcb-timer
- atmel,tcb-pwm
- microchip,tcb-capture - microchip,tcb-capture
reg: reg:
description: description:
...@@ -68,10 +69,35 @@ patternProperties: ...@@ -68,10 +69,35 @@ patternProperties:
minItems: 1 minItems: 1
maxItems: 3 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: required:
- compatible - compatible
- reg - reg
- "#pwm-cells"
additionalProperties: false
allOf: allOf:
- if: - if:
...@@ -158,7 +184,13 @@ examples: ...@@ -158,7 +184,13 @@ examples:
compatible = "atmel,tcb-timer"; compatible = "atmel,tcb-timer";
reg = <1>; reg = <1>;
}; };
};
pwm@2 {
compatible = "atmel,tcb-pwm";
reg = <2>;
#pwm-cells = <3>;
};
};
/* TCB0 Capture with QDEC: */ /* TCB0 Capture with QDEC: */
timer@f800c000 { timer@f800c000 {
compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment