MediaTek PWM Controller
Schema identifier ($id): "http://devicetree.org/schemas/pwm/mediatek,mt2712-pwm.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "John Crispin <john@phrozen.org>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):pwm.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"mediatek,mt2712-pwm","mediatek,mt6795-pwm","mediatek,mt6991-pwm","mediatek,mt7622-pwm","mediatek,mt7623-pwm","mediatek,mt7628-pwm","mediatek,mt7629-pwm","mediatek,mt7981-pwm","mediatek,mt7986-pwm","mediatek,mt7988-pwm","mediatek,mt8183-pwm","mediatek,mt8365-pwm","mediatek,mt8516-pwm"
Rule 2
Array item rules (
items)Item 1
Item 2
Exact value (
const):"mediatek,mt8183-pwm"
Rule 3
Array item rules (
items)Item 1
Item 2
Exact value (
const):"mediatek,mt6991-pwm"
reg — required here #
Maximum number of items (maxItems): 1
#pwm-cells — not listed as required here #
Exact value (const): 2
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
clocks — required here #
Minimum number of items (minItems): 2
Maximum number of items (maxItems): 10
clock-names — required here #
This controller needs two input clocks for its core and one clock for each PWM output.
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
Exact value (
const):"top"
Item 2
Exact value (
const):"main"
Item 3
Exact value (
const):"pwm1"
Item 4
Exact value (
const):"pwm2"
Item 5
Exact value (
const):"pwm3"
Item 6
Exact value (
const):"pwm4"
Item 7
Exact value (
const):"pwm5"
Item 8
Exact value (
const):"pwm6"
Item 9
Exact value (
const):"pwm7"
Item 10
Exact value (
const):"pwm8"
Required in this object (required): "compatible", "reg", "clocks", "clock-names"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/mt2712-clk.h>
#include <dt-bindings/interrupt-controller/irq.h>
pwm0: pwm@11006000 {
compatible = "mediatek,mt2712-pwm";
reg = <0x11006000 0x1000>;
#pwm-cells = <2>;
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
clocks = <&topckgen CLK_TOP_PWM_SEL>, <&pericfg CLK_PERI_PWM>,
<&pericfg CLK_PERI_PWM0>, <&pericfg CLK_PERI_PWM1>,
<&pericfg CLK_PERI_PWM2>, <&pericfg CLK_PERI_PWM3>,
<&pericfg CLK_PERI_PWM4>, <&pericfg CLK_PERI_PWM5>,
<&pericfg CLK_PERI_PWM6>, <&pericfg CLK_PERI_PWM7>;
clock-names = "top", "main",
"pwm1", "pwm2",
"pwm3", "pwm4",
"pwm5", "pwm6",
"pwm7", "pwm8";
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)