Documentation / devicetree / bindings / clock / airoha,en7523-scu.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
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/airoha,en7523-scu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: EN7523 Clock

maintainers:
  - Felix Fietkau <nbd@nbd.name>
  - John Crispin <nbd@nbd.name>

description: |
  This node defines the System Control Unit of the EN7523 SoC,
  a collection of registers configuring many different aspects of the SoC.
 
  The clock driver uses it to read and configure settings of the
  PLL controller, which provides clocks for the CPU, the bus and
  other SoC internal peripherals.
 
  Each clock is assigned an identifier and client nodes use this identifier
  to specify which clock they consume.
 
  All these identifiers can be found in:
  [1]: <include/dt-bindings/clock/en7523-clk.h>.
 
  The clocks are provided inside a system controller node.

properties:
  compatible:
    items:
      - enum:
          - airoha,en7523-scu
          - airoha,en7581-scu

  reg:
    minItems: 2
    maxItems: 4
 
  "#clock-cells":
    description:
      The first cell indicates the clock number, see [1] for available
      clocks.
    const: 1
 
  '#reset-cells':
    description: ID of the controller reset line
    const: 1

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

allOf:
  - if:
      properties:
        compatible:
          const: airoha,en7523-scu
    then:
      properties:
        reg:
          items:
            - description: scu base address
            - description: misc scu base address
 
        '#reset-cells': false

  - if:
      properties:
        compatible:
          const: airoha,en7581-scu
    then:
      properties:
        reg:
          items:
            - description: scu base address
            - description: misc scu base address
            - description: reset base address
            - description: pb scu base address

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/en7523-clk.h>
    scu: system-controller@1fa20000 {
      compatible = "airoha,en7523-scu";
      reg = <0x1fa20000 0x400>,
            <0x1fb00000 0x1000>;
      #clock-cells = <1>;
    };

  - |
    soc {
      #address-cells = <2>;
      #size-cells = <2>;
 
      scuclk: clock-controller@1fa20000 {
        compatible = "airoha,en7581-scu";
        reg = <0x0 0x1fa20000 0x0 0x400>,
              <0x0 0x1fb00000 0x0 0x90>,
              <0x0 0x1fb00830 0x0 0x8>,
              <0x0 0x1fbe3400 0x0 0xfc>;
              #clock-cells = <1>;
              #reset-cells = <1>;
      };
    };