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

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: mfd: Convert stm32 timers bindings to json-schema

Convert the STM32 timers binding to DT schema format using json-schema

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Benjamin Gaignard and committed by
Rob Herring
56fb34d8 93512dad

+162 -167
-31
Documentation/devicetree/bindings/counter/stm32-timer-cnt.txt
··· 1 - STMicroelectronics STM32 Timer quadrature encoder 2 - 3 - STM32 Timer provides quadrature encoder to detect 4 - angular position and direction of rotary elements, 5 - from IN1 and IN2 input signals. 6 - 7 - Must be a sub-node of an STM32 Timer device tree node. 8 - See ../mfd/stm32-timers.txt for details about the parent node. 9 - 10 - Required properties: 11 - - compatible: Must be "st,stm32-timer-counter". 12 - - pinctrl-names: Set to "default". 13 - - pinctrl-0: List of phandles pointing to pin configuration nodes, 14 - to set CH1/CH2 pins in mode of operation for STM32 15 - Timer input on external pin. 16 - 17 - Example: 18 - timers@40010000 { 19 - #address-cells = <1>; 20 - #size-cells = <0>; 21 - compatible = "st,stm32-timers"; 22 - reg = <0x40010000 0x400>; 23 - clocks = <&rcc 0 160>; 24 - clock-names = "int"; 25 - 26 - counter { 27 - compatible = "st,stm32-timer-counter"; 28 - pinctrl-names = "default"; 29 - pinctrl-0 = <&tim1_in_pins>; 30 - }; 31 - };
-25
Documentation/devicetree/bindings/iio/timer/stm32-timer-trigger.txt
··· 1 - STMicroelectronics STM32 Timers IIO timer bindings 2 - 3 - Must be a sub-node of an STM32 Timers device tree node. 4 - See ../mfd/stm32-timers.txt for details about the parent node. 5 - 6 - Required parameters: 7 - - compatible: Must be one of: 8 - "st,stm32-timer-trigger" 9 - "st,stm32h7-timer-trigger" 10 - - reg: Identify trigger hardware block. 11 - 12 - Example: 13 - timers@40010000 { 14 - #address-cells = <1>; 15 - #size-cells = <0>; 16 - compatible = "st,stm32-timers"; 17 - reg = <0x40010000 0x400>; 18 - clocks = <&rcc 0 160>; 19 - clock-names = "int"; 20 - 21 - timer@0 { 22 - compatible = "st,stm32-timer-trigger"; 23 - reg = <0>; 24 - }; 25 - };
+162
Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/st,stm32-timers.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STMicroelectronics STM32 Timers bindings 8 + 9 + description: | 10 + This hardware block provides 3 types of timer along with PWM functionality: 11 + - advanced-control timers consist of a 16-bit auto-reload counter driven 12 + by a programmable prescaler, break input feature, PWM outputs and 13 + complementary PWM outputs channels. 14 + - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter 15 + driven by a programmable prescaler and PWM outputs. 16 + - basic timers consist of a 16-bit auto-reload counter driven by a 17 + programmable prescaler. 18 + 19 + maintainers: 20 + - Benjamin Gaignard <benjamin.gaignard@st.com> 21 + - Fabrice Gasnier <fabrice.gasnier@st.com> 22 + 23 + properties: 24 + compatible: 25 + const: st,stm32-timers 26 + 27 + reg: 28 + maxItems: 1 29 + 30 + clocks: 31 + maxItems: 1 32 + 33 + clock-names: 34 + items: 35 + - const: int 36 + 37 + reset: 38 + maxItems: 1 39 + 40 + dmas: 41 + minItems: 1 42 + maxItems: 7 43 + 44 + dma-names: 45 + items: 46 + enum: [ ch1, ch2, ch3, ch4, up, trig, com ] 47 + minItems: 1 48 + maxItems: 7 49 + 50 + "#address-cells": 51 + const: 1 52 + 53 + "#size-cells": 54 + const: 0 55 + 56 + pwm: 57 + type: object 58 + 59 + properties: 60 + compatible: 61 + const: st,stm32-pwm 62 + 63 + "#pwm-cells": 64 + const: 3 65 + 66 + st,breakinput: 67 + description: 68 + One or two <index level filter> to describe break input 69 + configurations. 70 + allOf: 71 + - $ref: /schemas/types.yaml#/definitions/uint32-matrix 72 + - items: 73 + items: 74 + - description: | 75 + "index" indicates on which break input (0 or 1) the 76 + configuration should be applied. 77 + enum: [ 0 , 1] 78 + - description: | 79 + "level" gives the active level (0=low or 1=high) of the 80 + input signal for this configuration 81 + enum: [ 0, 1 ] 82 + - description: | 83 + "filter" gives the filtering value (up to 15) to be applied. 84 + maximum: 15 85 + minItems: 1 86 + maxItems: 2 87 + 88 + required: 89 + - "#pwm-cells" 90 + - compatible 91 + 92 + patternProperties: 93 + "^timer@[0-9]+$": 94 + type: object 95 + 96 + properties: 97 + compatible: 98 + enum: 99 + - st,stm32-timer-trigger 100 + - st,stm32h7-timer-trigger 101 + 102 + reg: 103 + description: Identify trigger hardware block. 104 + items: 105 + minimum: 0 106 + maximum: 16 107 + 108 + required: 109 + - compatible 110 + - reg 111 + 112 + counter: 113 + type: object 114 + 115 + properties: 116 + compatible: 117 + const: st,stm32-timer-counter 118 + 119 + required: 120 + - compatible 121 + 122 + required: 123 + - "#address-cells" 124 + - "#size-cells" 125 + - compatible 126 + - reg 127 + - clocks 128 + - clock-names 129 + 130 + additionalProperties: false 131 + 132 + examples: 133 + - | 134 + #include <dt-bindings/clock/stm32mp1-clks.h> 135 + timers2: timers@40000000 { 136 + #address-cells = <1>; 137 + #size-cells = <0>; 138 + compatible = "st,stm32-timers"; 139 + reg = <0x40000000 0x400>; 140 + clocks = <&rcc TIM2_K>; 141 + clock-names = "int"; 142 + dmas = <&dmamux1 18 0x400 0x1>, 143 + <&dmamux1 19 0x400 0x1>, 144 + <&dmamux1 20 0x400 0x1>, 145 + <&dmamux1 21 0x400 0x1>, 146 + <&dmamux1 22 0x400 0x1>; 147 + dma-names = "ch1", "ch2", "ch3", "ch4", "up"; 148 + pwm { 149 + compatible = "st,stm32-pwm"; 150 + #pwm-cells = <3>; 151 + st,breakinput = <0 1 5>; 152 + }; 153 + timer@0 { 154 + compatible = "st,stm32-timer-trigger"; 155 + reg = <0>; 156 + }; 157 + counter { 158 + compatible = "st,stm32-timer-counter"; 159 + }; 160 + }; 161 + 162 + ...
-73
Documentation/devicetree/bindings/mfd/stm32-timers.txt
··· 1 - STM32 Timers driver bindings 2 - 3 - This IP provides 3 types of timer along with PWM functionality: 4 - - advanced-control timers consist of a 16-bit auto-reload counter driven by a programmable 5 - prescaler, break input feature, PWM outputs and complementary PWM ouputs channels. 6 - - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a 7 - programmable prescaler and PWM outputs. 8 - - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler. 9 - 10 - Required parameters: 11 - - compatible: must be "st,stm32-timers" 12 - 13 - - reg: Physical base address and length of the controller's 14 - registers. 15 - - clock-names: Set to "int". 16 - - clocks: Phandle to the clock used by the timer module. 17 - For Clk properties, please refer to ../clock/clock-bindings.txt 18 - 19 - Optional parameters: 20 - - resets: Phandle to the parent reset controller. 21 - See ../reset/st,stm32-rcc.txt 22 - - dmas: List of phandle to dma channels that can be used for 23 - this timer instance. There may be up to 7 dma channels. 24 - - dma-names: List of dma names. Must match 'dmas' property. Valid 25 - names are: "ch1", "ch2", "ch3", "ch4", "up", "trig", 26 - "com". 27 - 28 - Optional subnodes: 29 - - pwm: See ../pwm/pwm-stm32.txt 30 - - timer: See ../iio/timer/stm32-timer-trigger.txt 31 - - counter: See ../counter/stm32-timer-cnt.txt 32 - 33 - Example: 34 - timers@40010000 { 35 - #address-cells = <1>; 36 - #size-cells = <0>; 37 - compatible = "st,stm32-timers"; 38 - reg = <0x40010000 0x400>; 39 - clocks = <&rcc 0 160>; 40 - clock-names = "int"; 41 - 42 - pwm { 43 - compatible = "st,stm32-pwm"; 44 - pinctrl-0 = <&pwm1_pins>; 45 - pinctrl-names = "default"; 46 - }; 47 - 48 - timer@0 { 49 - compatible = "st,stm32-timer-trigger"; 50 - reg = <0>; 51 - }; 52 - 53 - counter { 54 - compatible = "st,stm32-timer-counter"; 55 - pinctrl-names = "default"; 56 - pinctrl-0 = <&tim1_in_pins>; 57 - }; 58 - }; 59 - 60 - Example with all dmas: 61 - timer@40010000 { 62 - ... 63 - dmas = <&dmamux1 11 0x400 0x0>, 64 - <&dmamux1 12 0x400 0x0>, 65 - <&dmamux1 13 0x400 0x0>, 66 - <&dmamux1 14 0x400 0x0>, 67 - <&dmamux1 15 0x400 0x0>, 68 - <&dmamux1 16 0x400 0x0>, 69 - <&dmamux1 17 0x400 0x0>; 70 - dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig", "com"; 71 - ... 72 - child nodes... 73 - };
-38
Documentation/devicetree/bindings/pwm/pwm-stm32.txt
··· 1 - STMicroelectronics STM32 Timers PWM bindings 2 - 3 - Must be a sub-node of an STM32 Timers device tree node. 4 - See ../mfd/stm32-timers.txt for details about the parent node. 5 - 6 - Required parameters: 7 - - compatible: Must be "st,stm32-pwm". 8 - - pinctrl-names: Set to "default". 9 - - pinctrl-0: List of phandles pointing to pin configuration nodes for PWM module. 10 - For Pinctrl properties see ../pinctrl/pinctrl-bindings.txt 11 - - #pwm-cells: Should be set to 3. This PWM chip uses the default 3 cells 12 - bindings defined in pwm.txt. 13 - 14 - Optional parameters: 15 - - st,breakinput: One or two <index level filter> to describe break input configurations. 16 - "index" indicates on which break input (0 or 1) the configuration 17 - should be applied. 18 - "level" gives the active level (0=low or 1=high) of the input signal 19 - for this configuration. 20 - "filter" gives the filtering value to be applied. 21 - 22 - Example: 23 - timers@40010000 { 24 - #address-cells = <1>; 25 - #size-cells = <0>; 26 - compatible = "st,stm32-timers"; 27 - reg = <0x40010000 0x400>; 28 - clocks = <&rcc 0 160>; 29 - clock-names = "int"; 30 - 31 - pwm { 32 - compatible = "st,stm32-pwm"; 33 - #pwm-cells = <3>; 34 - pinctrl-0 = <&pwm1_pins>; 35 - pinctrl-names = "default"; 36 - st,breakinput = <0 1 5>; 37 - }; 38 - };