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

dt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema

Convert the STM32 hwspinlock 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
b1b7ce97 f3dde260

+50 -23
-23
Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.txt
··· 1 - STM32 Hardware Spinlock Device Binding 2 - ------------------------------------- 3 - 4 - Required properties : 5 - - compatible : should be "st,stm32-hwspinlock". 6 - - reg : the register address of hwspinlock. 7 - - #hwlock-cells : hwlock users only use the hwlock id to represent a specific 8 - hwlock, so the number of cells should be <1> here. 9 - - clock-names : Must contain "hsem". 10 - - clocks : Must contain a phandle entry for the clock in clock-names, see the 11 - common clock bindings. 12 - 13 - Please look at the generic hwlock binding for usage information for consumers, 14 - "Documentation/devicetree/bindings/hwlock/hwlock.txt" 15 - 16 - Example of hwlock provider: 17 - hwspinlock@4c000000 { 18 - compatible = "st,stm32-hwspinlock"; 19 - #hwlock-cells = <1>; 20 - reg = <0x4c000000 0x400>; 21 - clocks = <&rcc HSEM>; 22 - clock-names = "hsem"; 23 - };
+50
Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/hwlock/st,stm32-hwspinlock.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STMicroelectronics STM32 Hardware Spinlock bindings 8 + 9 + maintainers: 10 + - Benjamin Gaignard <benjamin.gaignard@st.com> 11 + - Fabien Dessenne <fabien.dessenne@st.com> 12 + 13 + properties: 14 + "#hwlock-cells": 15 + const: 1 16 + 17 + compatible: 18 + const: st,stm32-hwspinlock 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + clocks: 24 + maxItems: 1 25 + 26 + clock-names: 27 + items: 28 + - const: hsem 29 + 30 + required: 31 + - "#hwlock-cells" 32 + - compatible 33 + - reg 34 + - clocks 35 + - clock-names 36 + 37 + additionalProperties: false 38 + 39 + examples: 40 + - | 41 + #include <dt-bindings/clock/stm32mp1-clks.h> 42 + hwspinlock@4c000000 { 43 + compatible = "st,stm32-hwspinlock"; 44 + #hwlock-cells = <1>; 45 + reg = <0x4c000000 0x400>; 46 + clocks = <&rcc HSEM>; 47 + clock-names = "hsem"; 48 + }; 49 + 50 + ...