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