1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Rockchip PWM controller 8 9maintainers: 10 - Heiko Stuebner <heiko@sntech.de> 11 12properties: 13 compatible: 14 oneOf: 15 - const: rockchip,rk2928-pwm 16 - const: rockchip,rk3288-pwm 17 - const: rockchip,rk3328-pwm 18 - const: rockchip,vop-pwm 19 - items: 20 - const: rockchip,rk3036-pwm 21 - const: rockchip,rk2928-pwm 22 - items: 23 - enum: 24 - rockchip,rk3368-pwm 25 - rockchip,rk3399-pwm 26 - rockchip,rv1108-pwm 27 - const: rockchip,rk3288-pwm 28 - items: 29 - enum: 30 - rockchip,px30-pwm 31 - rockchip,rk3308-pwm 32 - const: rockchip,rk3328-pwm 33 34 reg: 35 maxItems: 1 36 37 clocks: 38 minItems: 1 39 maxItems: 2 40 41 clock-names: 42 maxItems: 2 43 44 "#pwm-cells": 45 enum: [2, 3] 46 description: 47 Must be 2 (rk2928) or 3 (rk3288 and later). 48 See pwm.yaml for a description of the cell format. 49 50required: 51 - compatible 52 - reg 53 - "#pwm-cells" 54 55if: 56 properties: 57 compatible: 58 contains: 59 enum: 60 - rockchip,rk3328-pwm 61 - rockchip,rv1108-pwm 62 63then: 64 properties: 65 clocks: 66 items: 67 - description: Used to derive the functional clock for the device. 68 - description: Used as the APB bus clock. 69 70 clock-names: 71 items: 72 - const: pwm 73 - const: pclk 74 75 required: 76 - clocks 77 - clock-names 78 79else: 80 properties: 81 clocks: 82 maxItems: 1 83 description: 84 Used both to derive the functional clock 85 for the device and as the bus clock. 86 87 required: 88 - clocks 89 90additionalProperties: false 91 92examples: 93 - | 94 #include <dt-bindings/clock/rk3188-cru-common.h> 95 pwm0: pwm@20030000 { 96 compatible = "rockchip,rk2928-pwm"; 97 reg = <0x20030000 0x10>; 98 clocks = <&cru PCLK_PWM01>; 99 #pwm-cells = <2>; 100 }; 101