Documentation / devicetree / bindings / clock / renesas,emev2-smu.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/renesas,emev2-smu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas EMMA Mobile EV2 System Management Unit

maintainers:
  - Geert Uytterhoeven <geert+renesas@glider.be>
  - Magnus Damm <magnus.damm@gmail.com>

description: |
  The System Management Unit is described in user's manual R19UH0037EJ1000_SMU.
  This is not a clock provider, but clocks under SMU depend on it.

properties:
  compatible:
    const: renesas,emev2-smu

  reg:
    maxItems: 1
 
  '#address-cells':
    const: 2
 
  '#size-cells':
    const: 0

required:
  - compatible
  - reg
  - '#address-cells'
  - '#size-cells'

patternProperties:
  ".*sclkdiv@.*":
    type: object

    description: |
      Function block with an input mux and a divider, which corresponds to
      "Serial clock generator" in fig. "Clock System Overview" of the manual,
      and "xxx frequency division setting register" (XXXCLKDIV) registers.
      This makes internal (neither input nor output) clock that is provided
      to input of xxxGCLK block.

    properties:
      compatible:
        const: renesas,emev2-smu-clkdiv

      reg:
        maxItems: 1
        description:
          Byte offset from SMU base and Bit position in the register.

      clocks:
        minItems: 1
        maxItems: 4
 
      '#clock-cells':
        const: 0

    required:
      - compatible
      - reg
      - clocks
      - '#clock-cells'

    additionalProperties: false

  ".*sclk@.*":
    type: object

    description: |
      Clock gating node shown as "Clock stop processing block" in the
      fig. "Clock System Overview" of the manual.
      Registers are "xxx clock gate control register" (XXXGCLKCTRL).

    properties:
      compatible:
        const: renesas,emev2-smu-gclk

      reg:
        maxItems: 1
        description:
          Byte offset from SMU base and Bit position in the register.

      clocks:
        maxItems: 1
 
      '#clock-cells':
        const: 0

    required:
      - compatible
      - reg
      - clocks
      - '#clock-cells'

    additionalProperties: false

additionalProperties: true

examples:
  - |
    // Example of clock-tree description:
    //
    //  This describes a clock path in the clock tree
    //   c32ki -> pll3_fo -> usia_u0_sclkdiv -> usia_u0_sclk
    clocks@e0110000 {
            compatible = "renesas,emev2-smu";
            reg = <0xe0110000 0x10000>;
            #address-cells = <2>;
            #size-cells = <0>;

            c32ki: c32ki {
                    compatible = "fixed-clock";
                    clock-frequency = <32768>;
                    #clock-cells = <0>;
            };
            pll3_fo: pll3_fo {
                    compatible = "fixed-factor-clock";
                    clocks = <&c32ki>;
                    clock-div = <1>;
                    clock-mult = <7000>;
                    #clock-cells = <0>;
            };
            usia_u0_sclkdiv: usia_u0_sclkdiv@610,0 {
                    compatible = "renesas,emev2-smu-clkdiv";
                    reg = <0x610 0>;
                    clocks = <&pll3_fo>;
                    #clock-cells = <0>;
            };
            usia_u0_sclk: usia_u0_sclk@4a0,1 {
                    compatible = "renesas,emev2-smu-gclk";
                    reg = <0x4a0 1>;
                    clocks = <&usia_u0_sclkdiv>;
                    #clock-cells = <0>;
            };
    };