Thermal sensors on Loongson-2 SoCs

Schema identifier ($id): "http://devicetree.org/schemas/thermal/loongson,ls2k-thermal.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "zhanghongchen <zhanghongchen@loongson.cn>", "Yinbo Zhu <zhuyinbo@loongson.cn>"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/thermal/thermal-sensor.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "loongson,ls2k1000-thermal", "loongson,ls2k2000-thermal"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "loongson,ls2k0500-thermal"

Item 2

Exact value (const): "loongson,ls2k1000-thermal"

reg — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

interrupts — required here #

Maximum number of items (maxItems): 1

#thermal-sensor-cells — not listed as required here #

Exact value (const): 1

Required in this object (required): "compatible", "reg", "interrupts"

Condition (if) #

Properties and child nodes (properties) #

compatible — not listed as required here #

Rule for matching array elements (contains)

Allowed values (enum): "loongson,ls2k2000-thermal"

When the condition matches (then) #

Properties and child nodes (properties) #

reg — not listed as required here #

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

When the condition does not match (else) #

Properties and child nodes (properties) #

reg — not listed as required here #

Maximum number of items (maxItems): 1

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
thermal: thermal-sensor@1fe01500 {
    compatible = "loongson,ls2k1000-thermal";
    reg = <0x1fe01500 0x30>;
    interrupt-parent = <&liointc0>;
    interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
    #thermal-sensor-cells = <1>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page