dt-bindings: mfd: Convert stm32 timers bindings to json-schema
Subsystems (6)
PATCH v3 1/1 dt-bindings: mfd: Convert stm32 timers bindings to json-schema
Convert the STM32 timers binding to DT schema format using json-schema
---
version 3:
- correctly use enum for dma-names and remove additionalItems: true
- provide a range of values for reg property
version 2:
- merge all (mfd, iio, pwm, counter) bindings in one file
- fix typo and trailing spaces
- rework dmas and dma-names properties to allow schemas like:
ch1 , ch2, ch4
ch2, up, com
- use patternProperties to describe timer subnode
- improve st,breakinput property definition to be able to check the values inside de tuple
.../bindings/counter/stm32-timer-cnt.txt | 31 ---- .../bindings/iio/timer/stm32-timer-trigger.txt | 25 ---- .../devicetree/bindings/mfd/st,stm32-timers.yaml | 159 +++++++++++++++++++++ .../devicetree/bindings/mfd/stm32-timers.txt | 73 ---------- .../devicetree/bindings/pwm/pwm-stm32.txt | 38 ----- 5 files changed, 159 insertions(+), 167 deletions(-) delete mode 100644 Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt delete mode 100644 Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt create mode 100644 Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/stm32-timers.txt delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-stm32.txt
Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt deleted +0 -31
@@ -1,31 +0,0 @@ -STMicroelectronics STM32 Timer quadrature encoder - -STM32 Timer provides quadrature encoder to detect -angular position and direction of rotary elements, -from IN1 and IN2 input signals. - -Must be a sub-node of an STM32 Timer device tree node. -See ../mfd/stm32-timers.txt for details about the parent node. - -Required properties: -- compatible: Must be "st,stm32-timer-counter". -- pinctrl-names: Set to "default". -- pinctrl-0: List of phandles pointing to pin configuration nodes, - to set CH1/CH2 pins in mode of operation for STM32 - Timer input on external pin. - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - counter { - compatible = "st,stm32-timer-counter"; - pinctrl-names = "default"; - pinctrl-0 = <&tim1_in_pins>; - }; - };
Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt deleted +0 -25
@@ -1,25 +0,0 @@ -STMicroelectronics STM32 Timers IIO timer bindings - -Must be a sub-node of an STM32 Timers device tree node. -See ../mfd/stm32-timers.txt for details about the parent node. - -Required parameters: -- compatible: Must be one of: - "st,stm32-timer-trigger" - "st,stm32h7-timer-trigger" -- reg: Identify trigger hardware block. - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - timer@0 { - compatible = "st,stm32-timer-trigger"; - reg = <0>; - }; - };
Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml new file +159 -0
159 lines not on this page · raw message
Documentation/devicetree/bindings/mfd/stm32-timers.txt deleted +0 -73
73 lines not on this page · raw message
Documentation/devicetree/bindings/pwm/pwm-stm32.txt deleted +0 -38
@@ -1,38 +0,0 @@ -STMicroelectronics STM32 Timers PWM bindings - -Must be a sub-node of an STM32 Timers device tree node. -See ../mfd/stm32-timers.txt for details about the parent node. - -Required parameters: -- compatible: Must be "st,stm32-pwm". -- pinctrl-names: Set to "default". -- pinctrl-0: List of phandles pointing to pin configuration nodes for PWM module. - For Pinctrl properties see ../pinctrl/pinctrl-bindings.txt -- #pwm-cells: Should be set to 3. This PWM chip uses the default 3 cells - bindings defined in pwm.txt. - -Optional parameters: -- st,breakinput: One or two <index level filter> to describe break input configurations. - "index" indicates on which break input (0 or 1) the configuration - should be applied. - "level" gives the active level (0=low or 1=high) of the input signal - for this configuration. - "filter" gives the filtering value to be applied. - -Example: - timers@40010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "st,stm32-timers"; - reg = <0x40010000 0x400>; - clocks = <&rcc 0 160>; - clock-names = "int"; - - pwm { - compatible = "st,stm32-pwm"; - #pwm-cells = <3>; - pinctrl-0 = <&pwm1_pins>; - pinctrl-names = "default"; - st,breakinput = <0 1 5>; - }; - };
Signature · 1 line
2.15.0
Quoted 18 lines · Benjamin Gaignard
Convert the STM32 timers binding to DT schema format using json-schema
Signed-off-by Benjamin Gaignard <[email protected]>---
version 3:
- correctly use enum for dma-names and remove additionalItems: true
- provide a range of values for reg propertyversion 2:
- merge all (mfd, iio, pwm, counter) bindings in one file
- fix typo and trailing spaces
- rework dmas and dma-names properties to allow schemas like:
ch1 , ch2, ch4
ch2, up, com
- use patternProperties to describe timer subnode
- improve st,breakinput property definition to be able to check the values inside de tuple
Quoted 12 lines
.../bindings/counter/stm32-timer-cnt.txt | 31 ---- .../bindings/iio/timer/stm32-timer-trigger.txt | 25 ---- .../devicetree/bindings/mfd/st,stm32-timers.yaml | 159 +++++++++++++++++++++ .../devicetree/bindings/mfd/stm32-timers.txt | 73 ---------- .../devicetree/bindings/pwm/pwm-stm32.txt | 38 ----- 5 files changed, 159 insertions(+), 167 deletions(-) delete mode 100644 Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt delete mode 100644 Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt create mode 100644 Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/stm32-timers.txt delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-stm32.txt
Applied, thanks.
Rob