1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2cb7aa33aSEmmanuel Vadot%YAML 1.2 3cb7aa33aSEmmanuel Vadot--- 4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/pwm/mediatek,mt2712-pwm.yaml# 5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6cb7aa33aSEmmanuel Vadot 7cb7aa33aSEmmanuel Vadottitle: MediaTek PWM Controller 8cb7aa33aSEmmanuel Vadot 9cb7aa33aSEmmanuel Vadotmaintainers: 10cb7aa33aSEmmanuel Vadot - John Crispin <john@phrozen.org> 11cb7aa33aSEmmanuel Vadot 12cb7aa33aSEmmanuel VadotallOf: 13cb7aa33aSEmmanuel Vadot - $ref: pwm.yaml# 14cb7aa33aSEmmanuel Vadot 15cb7aa33aSEmmanuel Vadotproperties: 16cb7aa33aSEmmanuel Vadot compatible: 17cb7aa33aSEmmanuel Vadot oneOf: 18cb7aa33aSEmmanuel Vadot - enum: 19cb7aa33aSEmmanuel Vadot - mediatek,mt2712-pwm 20cb7aa33aSEmmanuel Vadot - mediatek,mt6795-pwm 21cb7aa33aSEmmanuel Vadot - mediatek,mt7622-pwm 22cb7aa33aSEmmanuel Vadot - mediatek,mt7623-pwm 23cb7aa33aSEmmanuel Vadot - mediatek,mt7628-pwm 24cb7aa33aSEmmanuel Vadot - mediatek,mt7629-pwm 25*f126890aSEmmanuel Vadot - mediatek,mt7981-pwm 26fac71e4eSEmmanuel Vadot - mediatek,mt7986-pwm 27cb7aa33aSEmmanuel Vadot - mediatek,mt8183-pwm 28cb7aa33aSEmmanuel Vadot - mediatek,mt8365-pwm 29cb7aa33aSEmmanuel Vadot - mediatek,mt8516-pwm 30cb7aa33aSEmmanuel Vadot - items: 31cb7aa33aSEmmanuel Vadot - enum: 32cb7aa33aSEmmanuel Vadot - mediatek,mt8195-pwm 33cb7aa33aSEmmanuel Vadot - const: mediatek,mt8183-pwm 34cb7aa33aSEmmanuel Vadot 35cb7aa33aSEmmanuel Vadot reg: 36cb7aa33aSEmmanuel Vadot maxItems: 1 37cb7aa33aSEmmanuel Vadot 38cb7aa33aSEmmanuel Vadot "#pwm-cells": 39cb7aa33aSEmmanuel Vadot const: 2 40cb7aa33aSEmmanuel Vadot 41cb7aa33aSEmmanuel Vadot interrupts: 42cb7aa33aSEmmanuel Vadot maxItems: 1 43cb7aa33aSEmmanuel Vadot 44cb7aa33aSEmmanuel Vadot clocks: 45cb7aa33aSEmmanuel Vadot minItems: 2 46cb7aa33aSEmmanuel Vadot maxItems: 10 47cb7aa33aSEmmanuel Vadot 48cb7aa33aSEmmanuel Vadot clock-names: 49cb7aa33aSEmmanuel Vadot description: 50cb7aa33aSEmmanuel Vadot This controller needs two input clocks for its core and one 51cb7aa33aSEmmanuel Vadot clock for each PWM output. 52cb7aa33aSEmmanuel Vadot minItems: 2 53cb7aa33aSEmmanuel Vadot items: 54cb7aa33aSEmmanuel Vadot - const: top 55cb7aa33aSEmmanuel Vadot - const: main 56cb7aa33aSEmmanuel Vadot - const: pwm1 57cb7aa33aSEmmanuel Vadot - const: pwm2 58cb7aa33aSEmmanuel Vadot - const: pwm3 59cb7aa33aSEmmanuel Vadot - const: pwm4 60cb7aa33aSEmmanuel Vadot - const: pwm5 61cb7aa33aSEmmanuel Vadot - const: pwm6 62cb7aa33aSEmmanuel Vadot - const: pwm7 63cb7aa33aSEmmanuel Vadot - const: pwm8 64cb7aa33aSEmmanuel Vadot 65cb7aa33aSEmmanuel Vadotrequired: 66cb7aa33aSEmmanuel Vadot - compatible 67cb7aa33aSEmmanuel Vadot - reg 68cb7aa33aSEmmanuel Vadot - "#pwm-cells" 69cb7aa33aSEmmanuel Vadot - clocks 70cb7aa33aSEmmanuel Vadot - clock-names 71cb7aa33aSEmmanuel Vadot 72cb7aa33aSEmmanuel VadotadditionalProperties: false 73cb7aa33aSEmmanuel Vadot 74cb7aa33aSEmmanuel Vadotexamples: 75cb7aa33aSEmmanuel Vadot - | 76cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 77cb7aa33aSEmmanuel Vadot #include <dt-bindings/clock/mt2712-clk.h> 78cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 79cb7aa33aSEmmanuel Vadot 80cb7aa33aSEmmanuel Vadot pwm0: pwm@11006000 { 81cb7aa33aSEmmanuel Vadot compatible = "mediatek,mt2712-pwm"; 82cb7aa33aSEmmanuel Vadot reg = <0x11006000 0x1000>; 83cb7aa33aSEmmanuel Vadot #pwm-cells = <2>; 84cb7aa33aSEmmanuel Vadot interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>; 85cb7aa33aSEmmanuel Vadot clocks = <&topckgen CLK_TOP_PWM_SEL>, <&pericfg CLK_PERI_PWM>, 86cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM0>, <&pericfg CLK_PERI_PWM1>, 87cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM2>, <&pericfg CLK_PERI_PWM3>, 88cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM4>, <&pericfg CLK_PERI_PWM5>, 89cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM6>, <&pericfg CLK_PERI_PWM7>; 90cb7aa33aSEmmanuel Vadot clock-names = "top", "main", 91cb7aa33aSEmmanuel Vadot "pwm1", "pwm2", 92cb7aa33aSEmmanuel Vadot "pwm3", "pwm4", 93cb7aa33aSEmmanuel Vadot "pwm5", "pwm6", 94cb7aa33aSEmmanuel Vadot "pwm7", "pwm8"; 95cb7aa33aSEmmanuel Vadot }; 96