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

dt-bindings: arm: sp810: convert to DT schema

The Arm SP810 IP is a "system controller", providing clocks, timer and a
watchdog.

Convert the DT binding to DT schema, to allow automatic validation.

The existing .txt binding described all properties as required, but the
assigned-clock* and clock-output-names are actually not (from a hardware
perspective). The only existing driver I could find (in Linux) doesn't
require them either, so drop those properties from the "required" list.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220506140533.3566431-4-andre.przywara@arm.com

authored by

Andre Przywara and committed by
Rob Herring
f7187a02 b25bccb6

+80 -46
-46
Documentation/devicetree/bindings/arm/sp810.txt
··· 1 - SP810 System Controller 2 - ----------------------- 3 - 4 - Required properties: 5 - 6 - - compatible: standard compatible string for a Primecell peripheral, 7 - see Documentation/devicetree/bindings/arm/primecell.yaml 8 - for more details 9 - should be: "arm,sp810", "arm,primecell" 10 - 11 - - reg: standard registers property, physical address and size 12 - of the control registers 13 - 14 - - clock-names: from the common clock bindings, for more details see 15 - Documentation/devicetree/bindings/clock/clock-bindings.txt; 16 - should be: "refclk", "timclk", "apb_pclk" 17 - 18 - - clocks: from the common clock bindings, phandle and clock 19 - specifier pairs for the entries of clock-names property 20 - 21 - - #clock-cells: from the common clock bindings; 22 - should be: <1> 23 - 24 - - clock-output-names: from the common clock bindings; 25 - should be: "timerclken0", "timerclken1", "timerclken2", "timerclken3" 26 - 27 - - assigned-clocks: from the common clock binding; 28 - should be: clock specifier for each output clock of this 29 - provider node 30 - 31 - - assigned-clock-parents: from the common clock binding; 32 - should be: phandle of input clock listed in clocks 33 - property with the highest frequency 34 - 35 - Example: 36 - v2m_sysctl: sysctl@20000 { 37 - compatible = "arm,sp810", "arm,primecell"; 38 - reg = <0x020000 0x1000>; 39 - clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>; 40 - clock-names = "refclk", "timclk", "apb_pclk"; 41 - #clock-cells = <1>; 42 - clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3"; 43 - assigned-clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&v2m_sysctl 3>, <&v2m_sysctl 3>; 44 - assigned-clock-parents = <&v2m_refclk1mhz>, <&v2m_refclk1mhz>, <&v2m_refclk1mhz>, <&v2m_refclk1mhz>; 45 - 46 - };
+80
Documentation/devicetree/bindings/arm/sp810.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/arm/sp810.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ARM Versatile Express SP810 System Controller bindings 8 + 9 + maintainers: 10 + - Andre Przywara <andre.przywara@arm.com> 11 + 12 + description: 13 + The Arm SP810 system controller provides clocks, timers and a watchdog. 14 + 15 + # We need a select here so we don't match all nodes with 'arm,primecell' 16 + select: 17 + properties: 18 + compatible: 19 + contains: 20 + const: arm,sp810 21 + required: 22 + - compatible 23 + 24 + properties: 25 + compatible: 26 + items: 27 + - const: arm,sp810 28 + - const: arm,primecell 29 + 30 + reg: 31 + maxItems: 1 32 + 33 + clock-names: 34 + items: 35 + - const: refclk 36 + - const: timclk 37 + - const: apb_pclk 38 + 39 + clocks: 40 + items: 41 + - description: reference clock 42 + - description: timer clock 43 + - description: APB register access clock 44 + 45 + "#clock-cells": 46 + const: 1 47 + 48 + clock-output-names: 49 + maxItems: 4 50 + 51 + assigned-clocks: 52 + maxItems: 4 53 + 54 + assigned-clock-parents: 55 + maxItems: 4 56 + 57 + additionalProperties: false 58 + 59 + required: 60 + - compatible 61 + - reg 62 + - clocks 63 + - clock-names 64 + - "#clock-cells" 65 + 66 + examples: 67 + - | 68 + sysctl@20000 { 69 + compatible = "arm,sp810", "arm,primecell"; 70 + reg = <0x020000 0x1000>; 71 + clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&smbclk>; 72 + clock-names = "refclk", "timclk", "apb_pclk"; 73 + #clock-cells = <1>; 74 + clock-output-names = "timerclken0", "timerclken1", 75 + "timerclken2", "timerclken3"; 76 + assigned-clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, 77 + <&v2m_sysctl 3>, <&v2m_sysctl 3>; 78 + assigned-clock-parents = <&v2m_refclk1mhz>, <&v2m_refclk1mhz>, 79 + <&v2m_refclk1mhz>, <&v2m_refclk1mhz>; 80 + };