1a3310993SJohan Jonker# SPDX-License-Identifier: GPL-2.0 2a3310993SJohan Jonker%YAML 1.2 3a3310993SJohan Jonker--- 4a3310993SJohan Jonker$id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# 5a3310993SJohan Jonker$schema: http://devicetree.org/meta-schemas/core.yaml# 6a3310993SJohan Jonker 7a3310993SJohan Jonkertitle: Rockchip PWM controller 8a3310993SJohan Jonker 9a3310993SJohan Jonkermaintainers: 10a3310993SJohan Jonker - Heiko Stuebner <heiko@sntech.de> 11a3310993SJohan Jonker 12a3310993SJohan Jonkerproperties: 13a3310993SJohan Jonker compatible: 14a3310993SJohan Jonker oneOf: 15a3310993SJohan Jonker - const: rockchip,rk2928-pwm 16a3310993SJohan Jonker - const: rockchip,rk3288-pwm 1778e7da2cSJohan Jonker - const: rockchip,rk3328-pwm 18a3310993SJohan Jonker - const: rockchip,vop-pwm 19a3310993SJohan Jonker - items: 2078e7da2cSJohan Jonker - const: rockchip,rk3036-pwm 2178e7da2cSJohan Jonker - const: rockchip,rk2928-pwm 2278e7da2cSJohan Jonker - items: 23a3310993SJohan Jonker - enum: 24*9f87db82SJohan Jonker - rockchip,rk3128-pwm 2578e7da2cSJohan Jonker - rockchip,rk3368-pwm 2678e7da2cSJohan Jonker - rockchip,rk3399-pwm 27a3310993SJohan Jonker - rockchip,rv1108-pwm 28a3310993SJohan Jonker - const: rockchip,rk3288-pwm 2978e7da2cSJohan Jonker - items: 3078e7da2cSJohan Jonker - enum: 3178e7da2cSJohan Jonker - rockchip,px30-pwm 3278e7da2cSJohan Jonker - rockchip,rk3308-pwm 33dd8f6b29SLiang Chen - rockchip,rk3568-pwm 3459c71942SSebastian Reichel - rockchip,rk3588-pwm 3578e7da2cSJohan Jonker - const: rockchip,rk3328-pwm 36a3310993SJohan Jonker 37a3310993SJohan Jonker reg: 38a3310993SJohan Jonker maxItems: 1 39a3310993SJohan Jonker 40a3310993SJohan Jonker clocks: 41a3310993SJohan Jonker minItems: 1 42a3310993SJohan Jonker maxItems: 2 43a3310993SJohan Jonker 44a3310993SJohan Jonker clock-names: 45a3310993SJohan Jonker maxItems: 2 46a3310993SJohan Jonker 47a3310993SJohan Jonker "#pwm-cells": 48a3310993SJohan Jonker enum: [2, 3] 49a3310993SJohan Jonker description: 50a3310993SJohan Jonker Must be 2 (rk2928) or 3 (rk3288 and later). 51a3310993SJohan Jonker See pwm.yaml for a description of the cell format. 52a3310993SJohan Jonker 53a3310993SJohan Jonkerrequired: 54a3310993SJohan Jonker - compatible 55a3310993SJohan Jonker - reg 56a3310993SJohan Jonker 57ef75324dSKrzysztof KozlowskiallOf: 58ef75324dSKrzysztof Kozlowski - $ref: pwm.yaml# 59ef75324dSKrzysztof Kozlowski 60ef75324dSKrzysztof Kozlowski - if: 61a3310993SJohan Jonker properties: 62a3310993SJohan Jonker compatible: 63a3310993SJohan Jonker contains: 64a3310993SJohan Jonker enum: 6578e7da2cSJohan Jonker - rockchip,rk3328-pwm 66a3310993SJohan Jonker - rockchip,rv1108-pwm 67a3310993SJohan Jonker 68a3310993SJohan Jonker then: 69a3310993SJohan Jonker properties: 70a3310993SJohan Jonker clocks: 71a3310993SJohan Jonker items: 72a3310993SJohan Jonker - description: Used to derive the functional clock for the device. 73a3310993SJohan Jonker - description: Used as the APB bus clock. 74a3310993SJohan Jonker 75a3310993SJohan Jonker clock-names: 76a3310993SJohan Jonker items: 77a3310993SJohan Jonker - const: pwm 78a3310993SJohan Jonker - const: pclk 79a3310993SJohan Jonker 80a3310993SJohan Jonker required: 81a3310993SJohan Jonker - clocks 82a3310993SJohan Jonker - clock-names 83a3310993SJohan Jonker 84a3310993SJohan Jonker else: 85a3310993SJohan Jonker properties: 86a3310993SJohan Jonker clocks: 87a3310993SJohan Jonker maxItems: 1 88a3310993SJohan Jonker description: 89a3310993SJohan Jonker Used both to derive the functional clock 90a3310993SJohan Jonker for the device and as the bus clock. 91a3310993SJohan Jonker 92a3310993SJohan Jonker required: 93a3310993SJohan Jonker - clocks 94a3310993SJohan Jonker 95a3310993SJohan JonkeradditionalProperties: false 96a3310993SJohan Jonker 97a3310993SJohan Jonkerexamples: 98a3310993SJohan Jonker - | 99a3310993SJohan Jonker #include <dt-bindings/clock/rk3188-cru-common.h> 100a3310993SJohan Jonker pwm0: pwm@20030000 { 101a3310993SJohan Jonker compatible = "rockchip,rk2928-pwm"; 102a3310993SJohan Jonker reg = <0x20030000 0x10>; 103a3310993SJohan Jonker clocks = <&cru PCLK_PWM01>; 104a3310993SJohan Jonker #pwm-cells = <2>; 105a3310993SJohan Jonker }; 106