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

dt-bindings: clock: renesas: mstp: Convert to json-schema

Convert the Renesas Clock Pulse Generator (CPG) Module Stop (MSTP)
Clocks Device Tree binding documentation to json-schema.

Drop R-Car Gen2 compatible values, which were obsoleted by the unified
"Renesas Clock Pulse Generator / Module Standby and Software Reset" DT
bindings.
Replace the obsolete example for R-Car H2 by an example that is still
valid.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200508100321.6720-1-geert+renesas@glider.be

+82 -60
-60
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
··· 1 - * Renesas CPG Module Stop (MSTP) Clocks 2 - 3 - The CPG can gate SoC device clocks. The gates are organized in groups of up to 4 - 32 gates. 5 - 6 - This device tree binding describes a single 32 gate clocks group per node. 7 - Clocks are referenced by user nodes by the MSTP node phandle and the clock 8 - index in the group, from 0 to 31. 9 - 10 - Required Properties: 11 - 12 - - compatible: Must be one of the following 13 - - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks 14 - - "renesas,r8a73a4-mstp-clocks" for R8A73A4 (R-Mobile APE6) MSTP gate clocks 15 - - "renesas,r8a7740-mstp-clocks" for R8A7740 (R-Mobile A1) MSTP gate clocks 16 - - "renesas,r8a7778-mstp-clocks" for R8A7778 (R-Car M1) MSTP gate clocks 17 - - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks 18 - - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks 19 - - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2-W) MSTP gate clocks 20 - - "renesas,r8a7792-mstp-clocks" for R8A7792 (R-Car V2H) MSTP gate clocks 21 - - "renesas,r8a7793-mstp-clocks" for R8A7793 (R-Car M2-N) MSTP gate clocks 22 - - "renesas,r8a7794-mstp-clocks" for R8A7794 (R-Car E2) MSTP gate clocks 23 - - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks 24 - and "renesas,cpg-mstp-clocks" as a fallback. 25 - - reg: Base address and length of the I/O mapped registers used by the MSTP 26 - clocks. The first register is the clock control register and is mandatory. 27 - The second register is the clock status register and is optional when not 28 - implemented in hardware. 29 - - clocks: Reference to the parent clocks, one per output clock. The parents 30 - must appear in the same order as the output clocks. 31 - - #clock-cells: Must be 1 32 - - clock-output-names: The name of the clocks as free-form strings 33 - - clock-indices: Indices of the gate clocks into the group (0 to 31) 34 - 35 - The clocks, clock-output-names and clock-indices properties contain one entry 36 - per gate clock. The MSTP groups are sparsely populated. Unimplemented gate 37 - clocks must not be declared. 38 - 39 - 40 - Example 41 - ------- 42 - 43 - #include <dt-bindings/clock/r8a7790-clock.h> 44 - 45 - mstp3_clks: mstp3_clks@e615013c { 46 - compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; 47 - reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>; 48 - clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>, 49 - <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, 50 - <&mmc0_clk>; 51 - #clock-cells = <1>; 52 - clock-output-names = 53 - "tpu0", "mmcif1", "sdhi3", "sdhi2", 54 - "sdhi1", "sdhi0", "mmcif0"; 55 - clock-indices = < 56 - R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 57 - R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 58 - R8A7790_CLK_MMCIF0 59 - >; 60 - };
+82
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/renesas,cpg-mstp-clocks.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas Clock Pulse Generator (CPG) Module Stop (MSTP) Clocks 8 + 9 + maintainers: 10 + - Geert Uytterhoeven <geert+renesas@glider.be> 11 + 12 + description: 13 + The Clock Pulse Generator (CPG) can gate SoC device clocks. The gates are 14 + organized in groups of up to 32 gates. 15 + 16 + This device tree binding describes a single 32 gate clocks group per node. 17 + Clocks are referenced by user nodes by the Module Stop (MSTP) node phandle 18 + and the clock index in the group, from 0 to 31. 19 + 20 + properties: 21 + compatible: 22 + items: 23 + - enum: 24 + - renesas,r7s72100-mstp-clocks # RZ/A1 25 + - renesas,r8a73a4-mstp-clocks # R-Mobile APE6 26 + - renesas,r8a7740-mstp-clocks # R-Mobile A1 27 + - renesas,r8a7778-mstp-clocks # R-Car M1 28 + - renesas,r8a7779-mstp-clocks # R-Car H1 29 + - renesas,sh73a0-mstp-clocks # SH-Mobile AG5 30 + - const: renesas,cpg-mstp-clocks 31 + 32 + reg: 33 + minItems: 1 34 + items: 35 + - description: Module Stop Control Register (MSTPCR) 36 + - description: Module Stop Status Register (MSTPSR) 37 + 38 + clocks: 39 + minItems: 1 40 + maxItems: 32 41 + 42 + '#clock-cells': 43 + const: 1 44 + 45 + clock-indices: 46 + minItems: 1 47 + maxItems: 32 48 + 49 + clock-output-names: 50 + minItems: 1 51 + maxItems: 32 52 + 53 + required: 54 + - compatible 55 + - reg 56 + - clocks 57 + - '#clock-cells' 58 + - clock-indices 59 + - clock-output-names 60 + 61 + additionalProperties: false 62 + 63 + examples: 64 + - | 65 + #include <dt-bindings/clock/r8a73a4-clock.h> 66 + mstp2_clks: mstp2_clks@e6150138 { 67 + compatible = "renesas,r8a73a4-mstp-clocks", 68 + "renesas,cpg-mstp-clocks"; 69 + reg = <0xe6150138 4>, <0xe6150040 4>; 70 + clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, 71 + <&mp_clk>, <&cpg_clocks R8A73A4_CLK_HP>; 72 + #clock-cells = <1>; 73 + clock-indices = < 74 + R8A73A4_CLK_SCIFA0 R8A73A4_CLK_SCIFA1 75 + R8A73A4_CLK_SCIFB0 R8A73A4_CLK_SCIFB1 76 + R8A73A4_CLK_SCIFB2 R8A73A4_CLK_SCIFB3 77 + R8A73A4_CLK_DMAC 78 + >; 79 + clock-output-names = 80 + "scifa0", "scifa1", "scifb0", "scifb1", "scifb2", "scifb3", 81 + "dmac"; 82 + };