Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Rockchip PWM controller
0008 
0009 maintainers:
0010   - Heiko Stuebner <heiko@sntech.de>
0011 
0012 properties:
0013   compatible:
0014     oneOf:
0015       - const: rockchip,rk2928-pwm
0016       - const: rockchip,rk3288-pwm
0017       - const: rockchip,rk3328-pwm
0018       - const: rockchip,vop-pwm
0019       - items:
0020           - const: rockchip,rk3036-pwm
0021           - const: rockchip,rk2928-pwm
0022       - items:
0023           - enum:
0024               - rockchip,rk3368-pwm
0025               - rockchip,rk3399-pwm
0026               - rockchip,rv1108-pwm
0027           - const: rockchip,rk3288-pwm
0028       - items:
0029           - enum:
0030               - rockchip,px30-pwm
0031               - rockchip,rk3308-pwm
0032               - rockchip,rk3568-pwm
0033           - const: rockchip,rk3328-pwm
0034 
0035   reg:
0036     maxItems: 1
0037 
0038   clocks:
0039     minItems: 1
0040     maxItems: 2
0041 
0042   clock-names:
0043     maxItems: 2
0044 
0045   "#pwm-cells":
0046     enum: [2, 3]
0047     description:
0048       Must be 2 (rk2928) or 3 (rk3288 and later).
0049       See pwm.yaml for a description of the cell format.
0050 
0051 required:
0052   - compatible
0053   - reg
0054 
0055 allOf:
0056   - $ref: pwm.yaml#
0057 
0058   - if:
0059       properties:
0060         compatible:
0061           contains:
0062             enum:
0063               - rockchip,rk3328-pwm
0064               - rockchip,rv1108-pwm
0065 
0066     then:
0067       properties:
0068         clocks:
0069           items:
0070             - description: Used to derive the functional clock for the device.
0071             - description: Used as the APB bus clock.
0072 
0073         clock-names:
0074           items:
0075             - const: pwm
0076             - const: pclk
0077 
0078       required:
0079         - clocks
0080         - clock-names
0081 
0082     else:
0083       properties:
0084         clocks:
0085           maxItems: 1
0086           description:
0087             Used both to derive the functional clock
0088             for the device and as the bus clock.
0089 
0090       required:
0091         - clocks
0092 
0093 additionalProperties: false
0094 
0095 examples:
0096   - |
0097     #include <dt-bindings/clock/rk3188-cru-common.h>
0098     pwm0: pwm@20030000 {
0099       compatible = "rockchip,rk2928-pwm";
0100       reg = <0x20030000 0x10>;
0101       clocks = <&cru PCLK_PWM01>;
0102       #pwm-cells = <2>;
0103     };