Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema

Convert the tiehrpwm binding to DT schema format using json-schema.
Along with this conversion the following changes are included:
- 'clock' and 'clock-names' properties are marked as required as
driver fails to probe without these properties
- Dropped ti,am33xx-ehrpwm as it is no longer applicable.
- 'power-domains' property is introduced and marked as optional.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Lokesh Vutla and committed by
Thierry Reding
2ba4597d 79dd354f

+64 -50
-50
Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
··· 1 - TI SOC EHRPWM based PWM controller 2 - 3 - Required properties: 4 - - compatible: Must be "ti,<soc>-ehrpwm". 5 - for am33xx - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm"; 6 - for am4372 - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm"; 7 - for am654 - compatible = "ti,am654-ehrpwm", "ti-am3352-ehrpwm"; 8 - for da850 - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm"; 9 - for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm"; 10 - - #pwm-cells: should be 3. See pwm.yaml in this directory for a description of 11 - the cells format. The only third cell flag supported by this binding is 12 - PWM_POLARITY_INVERTED. 13 - - reg: physical base address and size of the registers map. 14 - 15 - Optional properties: 16 - - clocks: Handle to the PWM's time-base and functional clock. 17 - - clock-names: Must be set to "tbclk" and "fck". 18 - 19 - Example: 20 - 21 - ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */ 22 - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm"; 23 - #pwm-cells = <3>; 24 - reg = <0x48300200 0x100>; 25 - clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>; 26 - clock-names = "tbclk", "fck"; 27 - }; 28 - 29 - ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */ 30 - compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm"; 31 - #pwm-cells = <3>; 32 - reg = <0x48300200 0x80>; 33 - clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>; 34 - clock-names = "tbclk", "fck"; 35 - ti,hwmods = "ehrpwm0"; 36 - }; 37 - 38 - ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */ 39 - compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm"; 40 - #pwm-cells = <3>; 41 - reg = <0x1f00000 0x2000>; 42 - }; 43 - 44 - ehrpwm0: pwm@4843e200 { /* EHRPWM on dra746 */ 45 - compatible = "ti,dra746-ehrpwm", "ti,am3352-ehrpwm"; 46 - #pwm-cells = <3>; 47 - reg = <0x4843e200 0x80>; 48 - clocks = <&ehrpwm0_tbclk>, <&l4_root_clk_div>; 49 - clock-names = "tbclk", "fck"; 50 - };
+64
Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pwm/pwm-tiehrpwm.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: TI SOC EHRPWM based PWM controller 8 + 9 + maintainers: 10 + - Vignesh R <vigneshr@ti.com> 11 + 12 + allOf: 13 + - $ref: pwm.yaml# 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - const: ti,am3352-ehrpwm 19 + - items: 20 + - enum: 21 + - ti,da850-ehrpwm 22 + - ti,am4372-ehrpwm 23 + - ti,dra746-ehrpwm 24 + - ti,am654-ehrpwm 25 + - const: ti,am3352-ehrpwm 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + "#pwm-cells": 31 + const: 3 32 + description: | 33 + See pwm.yaml in this directory for a description of the cells format. 34 + The only third cell flag supported by this binding is PWM_POLARITY_INVERTED. 35 + 36 + clock-names: 37 + items: 38 + - const: tbclk 39 + - const: fck 40 + 41 + clocks: 42 + maxItems: 2 43 + 44 + power-domains: 45 + maxItems: 1 46 + 47 + required: 48 + - compatible 49 + - reg 50 + - "#pwm-cells" 51 + - clocks 52 + - clock-names 53 + 54 + additionalProperties: false 55 + 56 + examples: 57 + - | 58 + ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */ 59 + compatible = "ti,am3352-ehrpwm"; 60 + #pwm-cells = <3>; 61 + reg = <0x48300200 0x100>; 62 + clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>; 63 + clock-names = "tbclk", "fck"; 64 + };