12eb4d8dcSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 22eb4d8dcSEmmanuel Vadot%YAML 1.2 32eb4d8dcSEmmanuel Vadot--- 42eb4d8dcSEmmanuel Vadot$id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# 52eb4d8dcSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 62eb4d8dcSEmmanuel Vadot 72eb4d8dcSEmmanuel Vadottitle: Rockchip PWM controller 82eb4d8dcSEmmanuel Vadot 92eb4d8dcSEmmanuel Vadotmaintainers: 102eb4d8dcSEmmanuel Vadot - Heiko Stuebner <heiko@sntech.de> 112eb4d8dcSEmmanuel Vadot 122eb4d8dcSEmmanuel Vadotproperties: 132eb4d8dcSEmmanuel Vadot compatible: 142eb4d8dcSEmmanuel Vadot oneOf: 152eb4d8dcSEmmanuel Vadot - const: rockchip,rk2928-pwm 162eb4d8dcSEmmanuel Vadot - const: rockchip,rk3288-pwm 172eb4d8dcSEmmanuel Vadot - const: rockchip,rk3328-pwm 182eb4d8dcSEmmanuel Vadot - const: rockchip,vop-pwm 192eb4d8dcSEmmanuel Vadot - items: 202eb4d8dcSEmmanuel Vadot - const: rockchip,rk3036-pwm 212eb4d8dcSEmmanuel Vadot - const: rockchip,rk2928-pwm 222eb4d8dcSEmmanuel Vadot - items: 232eb4d8dcSEmmanuel Vadot - enum: 247ef62cebSEmmanuel Vadot - rockchip,rk3128-pwm 252eb4d8dcSEmmanuel Vadot - rockchip,rk3368-pwm 262eb4d8dcSEmmanuel Vadot - rockchip,rk3399-pwm 272eb4d8dcSEmmanuel Vadot - rockchip,rv1108-pwm 282eb4d8dcSEmmanuel Vadot - const: rockchip,rk3288-pwm 292eb4d8dcSEmmanuel Vadot - items: 302eb4d8dcSEmmanuel Vadot - enum: 312eb4d8dcSEmmanuel Vadot - rockchip,px30-pwm 322eb4d8dcSEmmanuel Vadot - rockchip,rk3308-pwm 33354d7675SEmmanuel Vadot - rockchip,rk3568-pwm 347ef62cebSEmmanuel Vadot - rockchip,rk3588-pwm 35*84943d6fSEmmanuel Vadot - rockchip,rv1126-pwm 362eb4d8dcSEmmanuel Vadot - const: rockchip,rk3328-pwm 372eb4d8dcSEmmanuel Vadot 382eb4d8dcSEmmanuel Vadot reg: 392eb4d8dcSEmmanuel Vadot maxItems: 1 402eb4d8dcSEmmanuel Vadot 412eb4d8dcSEmmanuel Vadot clocks: 422eb4d8dcSEmmanuel Vadot minItems: 1 432eb4d8dcSEmmanuel Vadot maxItems: 2 442eb4d8dcSEmmanuel Vadot 452eb4d8dcSEmmanuel Vadot clock-names: 462eb4d8dcSEmmanuel Vadot maxItems: 2 472eb4d8dcSEmmanuel Vadot 482eb4d8dcSEmmanuel Vadot "#pwm-cells": 492eb4d8dcSEmmanuel Vadot enum: [2, 3] 502eb4d8dcSEmmanuel Vadot description: 512eb4d8dcSEmmanuel Vadot Must be 2 (rk2928) or 3 (rk3288 and later). 522eb4d8dcSEmmanuel Vadot See pwm.yaml for a description of the cell format. 532eb4d8dcSEmmanuel Vadot 542eb4d8dcSEmmanuel Vadotrequired: 552eb4d8dcSEmmanuel Vadot - compatible 562eb4d8dcSEmmanuel Vadot - reg 572eb4d8dcSEmmanuel Vadot 58c9ccf3a3SEmmanuel VadotallOf: 59c9ccf3a3SEmmanuel Vadot - $ref: pwm.yaml# 60c9ccf3a3SEmmanuel Vadot 61c9ccf3a3SEmmanuel Vadot - if: 622eb4d8dcSEmmanuel Vadot properties: 632eb4d8dcSEmmanuel Vadot compatible: 642eb4d8dcSEmmanuel Vadot contains: 652eb4d8dcSEmmanuel Vadot enum: 662eb4d8dcSEmmanuel Vadot - rockchip,rk3328-pwm 672eb4d8dcSEmmanuel Vadot - rockchip,rv1108-pwm 682eb4d8dcSEmmanuel Vadot 692eb4d8dcSEmmanuel Vadot then: 702eb4d8dcSEmmanuel Vadot properties: 712eb4d8dcSEmmanuel Vadot clocks: 722eb4d8dcSEmmanuel Vadot items: 732eb4d8dcSEmmanuel Vadot - description: Used to derive the functional clock for the device. 742eb4d8dcSEmmanuel Vadot - description: Used as the APB bus clock. 752eb4d8dcSEmmanuel Vadot 762eb4d8dcSEmmanuel Vadot clock-names: 772eb4d8dcSEmmanuel Vadot items: 782eb4d8dcSEmmanuel Vadot - const: pwm 792eb4d8dcSEmmanuel Vadot - const: pclk 802eb4d8dcSEmmanuel Vadot 812eb4d8dcSEmmanuel Vadot required: 822eb4d8dcSEmmanuel Vadot - clocks 832eb4d8dcSEmmanuel Vadot - clock-names 842eb4d8dcSEmmanuel Vadot 852eb4d8dcSEmmanuel Vadot else: 862eb4d8dcSEmmanuel Vadot properties: 872eb4d8dcSEmmanuel Vadot clocks: 882eb4d8dcSEmmanuel Vadot maxItems: 1 892eb4d8dcSEmmanuel Vadot description: 902eb4d8dcSEmmanuel Vadot Used both to derive the functional clock 912eb4d8dcSEmmanuel Vadot for the device and as the bus clock. 922eb4d8dcSEmmanuel Vadot 932eb4d8dcSEmmanuel Vadot required: 942eb4d8dcSEmmanuel Vadot - clocks 952eb4d8dcSEmmanuel Vadot 962eb4d8dcSEmmanuel VadotadditionalProperties: false 972eb4d8dcSEmmanuel Vadot 982eb4d8dcSEmmanuel Vadotexamples: 992eb4d8dcSEmmanuel Vadot - | 1002eb4d8dcSEmmanuel Vadot #include <dt-bindings/clock/rk3188-cru-common.h> 1012eb4d8dcSEmmanuel Vadot pwm0: pwm@20030000 { 1022eb4d8dcSEmmanuel Vadot compatible = "rockchip,rk2928-pwm"; 1032eb4d8dcSEmmanuel Vadot reg = <0x20030000 0x10>; 1042eb4d8dcSEmmanuel Vadot clocks = <&cru PCLK_PWM01>; 1052eb4d8dcSEmmanuel Vadot #pwm-cells = <2>; 1062eb4d8dcSEmmanuel Vadot }; 107