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*fac71e4eSEmmanuel Vadot - mediatek,mt7986-pwm 26cb7aa33aSEmmanuel Vadot - mediatek,mt8183-pwm 27cb7aa33aSEmmanuel Vadot - mediatek,mt8365-pwm 28cb7aa33aSEmmanuel Vadot - mediatek,mt8516-pwm 29cb7aa33aSEmmanuel Vadot - items: 30cb7aa33aSEmmanuel Vadot - enum: 31cb7aa33aSEmmanuel Vadot - mediatek,mt8195-pwm 32cb7aa33aSEmmanuel Vadot - const: mediatek,mt8183-pwm 33cb7aa33aSEmmanuel Vadot 34cb7aa33aSEmmanuel Vadot reg: 35cb7aa33aSEmmanuel Vadot maxItems: 1 36cb7aa33aSEmmanuel Vadot 37cb7aa33aSEmmanuel Vadot "#pwm-cells": 38cb7aa33aSEmmanuel Vadot const: 2 39cb7aa33aSEmmanuel Vadot 40cb7aa33aSEmmanuel Vadot interrupts: 41cb7aa33aSEmmanuel Vadot maxItems: 1 42cb7aa33aSEmmanuel Vadot 43cb7aa33aSEmmanuel Vadot clocks: 44cb7aa33aSEmmanuel Vadot minItems: 2 45cb7aa33aSEmmanuel Vadot maxItems: 10 46cb7aa33aSEmmanuel Vadot 47cb7aa33aSEmmanuel Vadot clock-names: 48cb7aa33aSEmmanuel Vadot description: 49cb7aa33aSEmmanuel Vadot This controller needs two input clocks for its core and one 50cb7aa33aSEmmanuel Vadot clock for each PWM output. 51cb7aa33aSEmmanuel Vadot minItems: 2 52cb7aa33aSEmmanuel Vadot items: 53cb7aa33aSEmmanuel Vadot - const: top 54cb7aa33aSEmmanuel Vadot - const: main 55cb7aa33aSEmmanuel Vadot - const: pwm1 56cb7aa33aSEmmanuel Vadot - const: pwm2 57cb7aa33aSEmmanuel Vadot - const: pwm3 58cb7aa33aSEmmanuel Vadot - const: pwm4 59cb7aa33aSEmmanuel Vadot - const: pwm5 60cb7aa33aSEmmanuel Vadot - const: pwm6 61cb7aa33aSEmmanuel Vadot - const: pwm7 62cb7aa33aSEmmanuel Vadot - const: pwm8 63cb7aa33aSEmmanuel Vadot 64cb7aa33aSEmmanuel Vadotrequired: 65cb7aa33aSEmmanuel Vadot - compatible 66cb7aa33aSEmmanuel Vadot - reg 67cb7aa33aSEmmanuel Vadot - "#pwm-cells" 68cb7aa33aSEmmanuel Vadot - clocks 69cb7aa33aSEmmanuel Vadot - clock-names 70cb7aa33aSEmmanuel Vadot 71cb7aa33aSEmmanuel VadotadditionalProperties: false 72cb7aa33aSEmmanuel Vadot 73cb7aa33aSEmmanuel Vadotexamples: 74cb7aa33aSEmmanuel Vadot - | 75cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 76cb7aa33aSEmmanuel Vadot #include <dt-bindings/clock/mt2712-clk.h> 77cb7aa33aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 78cb7aa33aSEmmanuel Vadot 79cb7aa33aSEmmanuel Vadot pwm0: pwm@11006000 { 80cb7aa33aSEmmanuel Vadot compatible = "mediatek,mt2712-pwm"; 81cb7aa33aSEmmanuel Vadot reg = <0x11006000 0x1000>; 82cb7aa33aSEmmanuel Vadot #pwm-cells = <2>; 83cb7aa33aSEmmanuel Vadot interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>; 84cb7aa33aSEmmanuel Vadot clocks = <&topckgen CLK_TOP_PWM_SEL>, <&pericfg CLK_PERI_PWM>, 85cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM0>, <&pericfg CLK_PERI_PWM1>, 86cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM2>, <&pericfg CLK_PERI_PWM3>, 87cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM4>, <&pericfg CLK_PERI_PWM5>, 88cb7aa33aSEmmanuel Vadot <&pericfg CLK_PERI_PWM6>, <&pericfg CLK_PERI_PWM7>; 89cb7aa33aSEmmanuel Vadot clock-names = "top", "main", 90cb7aa33aSEmmanuel Vadot "pwm1", "pwm2", 91cb7aa33aSEmmanuel Vadot "pwm3", "pwm4", 92cb7aa33aSEmmanuel Vadot "pwm5", "pwm6", 93cb7aa33aSEmmanuel Vadot "pwm7", "pwm8"; 94cb7aa33aSEmmanuel Vadot }; 95