]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dt-bindings: clock: samsung: convert S5Pv210 to dtschema
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Sun, 2 Jan 2022 11:53:56 +0000 (12:53 +0100)
committerRob Herring <robh@kernel.org>
Tue, 11 Jan 2022 17:54:36 +0000 (11:54 -0600)
Convert Samsung S5Pv210 SoC clock controller bindings to DT schema
format.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220102115356.75796-8-krzysztof.kozlowski@canonical.com
Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt [deleted file]
Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml [new file with mode: 0644]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.txt
deleted file mode 100644 (file)
index a86c83b..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-* Samsung S5P6442/S5PC110/S5PV210 Clock Controller
-
-Samsung S5P6442, S5PC110 and S5PV210 SoCs contain integrated clock
-controller, which generates and supplies clock to various controllers
-within the SoC.
-
-Required Properties:
-
-- compatible: should be one of following:
-       - "samsung,s5pv210-clock" : for clock controller of Samsung
-         S5PC110/S5PV210 SoCs,
-       - "samsung,s5p6442-clock" : for clock controller of Samsung
-         S5P6442 SoC.
-
-- reg: physical base address of the controller and length of memory mapped
-  region.
-
-- #clock-cells: should be 1.
-
-All available clocks are defined as preprocessor macros in
-dt-bindings/clock/s5pv210.h header and can be used in device tree sources.
-
-External clocks:
-
-There are several clocks that are generated outside the SoC. It is expected
-that they are defined using standard clock bindings with following
-clock-output-names:
- - "xxti": external crystal oscillator connected to XXTI and XXTO pins of
-the SoC,
- - "xusbxti": external crystal oscillator connected to XUSBXTI and XUSBXTO
-pins of the SoC,
-
-A subset of above clocks available on given board shall be specified in
-board device tree, including the system base clock, as selected by XOM[0]
-pin of the SoC. Refer to generic fixed rate clock bindings
-documentation[1] for more information how to specify these clocks.
-
-[1] Documentation/devicetree/bindings/clock/fixed-clock.yaml
-
-Example: Clock controller node:
-
-       clock: clock-controller@7e00f000 {
-               compatible = "samsung,s5pv210-clock";
-               reg = <0x7e00f000 0x1000>;
-               #clock-cells = <1>;
-       };
-
-Example: Required external clocks:
-
-       xxti: clock-xxti {
-               compatible = "fixed-clock";
-               clock-output-names = "xxti";
-               clock-frequency = <24000000>;
-               #clock-cells = <0>;
-       };
-
-       xusbxti: clock-xusbxti {
-               compatible = "fixed-clock";
-               clock-output-names = "xusbxti";
-               clock-frequency = <24000000>;
-               #clock-cells = <0>;
-       };
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller (refer to the standard clock bindings for information about
-  "clocks" and "clock-names" properties):
-
-       uart0: serial@e2900000 {
-               compatible = "samsung,s5pv210-uart";
-               reg = <0xe2900000 0x400>;
-               interrupt-parent = <&vic1>;
-               interrupts = <10>;
-               clock-names = "uart", "clk_uart_baud0",
-                               "clk_uart_baud1";
-               clocks = <&clocks UART0>, <&clocks UART0>,
-                               <&clocks SCLK_UART0>;
-       };
diff --git a/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,s5pv210-clock.yaml
new file mode 100644 (file)
index 0000000..dcb29a2
--- /dev/null
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/samsung,s5pv210-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S5P6442/S5PC110/S5PV210 SoC clock controller
+
+maintainers:
+  - Chanwoo Choi <cw00.choi@samsung.com>
+  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
+  - Sylwester Nawrocki <s.nawrocki@samsung.com>
+  - Tomasz Figa <tomasz.figa@gmail.com>
+
+description: |
+  Expected external clocks, defined in DTS as fixed-rate clocks with a matching
+  name::
+    - "xxti" - external crystal oscillator connected to XXTI and XXTO pins of
+      the SoC,
+    - "xusbxti" - external crystal oscillator connected to XUSBXTI and XUSBXTO
+      pins of the SoC,
+
+  All available clocks are defined as preprocessor macros in
+  include/dt-bindings/clock/s5pv210.h header.
+
+properties:
+  compatible:
+    enum:
+      - samsung,s5pv210-clock
+      - samsung,s5p6442-clock
+
+  clocks:
+    items:
+      - description: xxti clock
+      - description: xusbxti clock
+
+  clock-names:
+    items:
+      - const: xxti
+      - const: xusbxti
+
+  "#clock-cells":
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - "#clock-cells"
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/s5pv210.h>
+
+    xxti: clock-0 {
+        compatible = "fixed-clock";
+        clock-frequency = <0>;
+        clock-output-names = "xxti";
+        #clock-cells = <0>;
+    };
+
+    xusbxti: clock-1 {
+        compatible = "fixed-clock";
+        clock-frequency = <0>;
+        clock-output-names = "xusbxti";
+        #clock-cells = <0>;
+    };
+
+    clock-controller@e0100000 {
+        compatible = "samsung,s5pv210-clock";
+        reg = <0xe0100000 0x10000>;
+        clock-names = "xxti", "xusbxti";
+        clocks = <&xxti>, <&xusbxti>;
+        #clock-cells = <1>;
+    };
index 1089bf0a2a72169a94d03d12ef85ed802d096f67..3f64e43bfd001f3fc6d5d2168462c05895db709e 100644 (file)
@@ -16848,7 +16848,6 @@ S:      Supported
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk.git
 F:     Documentation/devicetree/bindings/clock/samsung,*.yaml
 F:     Documentation/devicetree/bindings/clock/samsung,s3c*
-F:     Documentation/devicetree/bindings/clock/samsung,s5p*
 F:     drivers/clk/samsung/
 F:     include/dt-bindings/clock/exynos*.h
 F:     include/dt-bindings/clock/s3c*.h