Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml

Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml

File Facts

System
Linux kernel
Corpus path
Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml
Extension
.yaml
Size
1700 bytes
Lines
78
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: configuration, schema, or hardware description
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/loongson,ls2k-clk.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Loongson-2 SoC Clock Control Module

maintainers:
  - Yinbo Zhu <zhuyinbo@loongson.cn>

description: |
  Loongson-2 SoC clock control module is an integrated clock controller, which
  generates and supplies to all modules.

properties:
  compatible:
    enum:
      - loongson,ls2k0300-clk
      - loongson,ls2k0500-clk
      - loongson,ls2k-clk  # This is for Loongson-2K1000
      - loongson,ls2k2000-clk

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: ref_100m

  '#clock-cells':
    const: 1
    description:
      The clock consumer should specify the desired clock by having the clock
      ID in its "clocks" phandle cell. See include/dt-bindings/clock/loongson,ls2k-clk.h
      for the full list of Loongson-2 SoC clock IDs.

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: loongson,ls2k0300-clk
    then:
      properties:
        clock-names: false
    else:
      required:
        - clock-names

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

additionalProperties: false

examples:
  - |
    ref_100m: clock-ref-100m {
        compatible = "fixed-clock";
        #clock-cells = <0>;
        clock-frequency = <100000000>;
        clock-output-names = "ref_100m";
    };

Annotation

Implementation Notes