Temperature Sensor ADC (TSADC) on Rockchip SoCs

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

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

Maintainers (maintainers): "Heiko Stuebner <heiko@sntech.de>"

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

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "rockchip,px30-tsadc", "rockchip,rk3228-tsadc", "rockchip,rk3288-tsadc", "rockchip,rk3328-tsadc", "rockchip,rk3368-tsadc", "rockchip,rk3399-tsadc", "rockchip,rk3568-tsadc", "rockchip,rk3576-tsadc", "rockchip,rk3588-tsadc", "rockchip,rv1108-tsadc"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 2

Maximum number of items (maxItems): 2

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "tsadc"

Item 2

Exact value (const): "apb_pclk"

nvmem-cells — not listed as required here #

Array item rules (items) #

Item 1

cell handle to where the trim's base temperature is stored

Item 2

cell handle to where the trim's tenths of Celsius base value is stored

nvmem-cell-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "trim_base"

Item 2

Exact value (const): "trim_base_frac"

resets — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 3

reset-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "tsadc-apb"

Item 2

Exact value (const): "tsadc"

Item 3

Exact value (const): "tsadc-phy"

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

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

Exact value (const): 1

rockchip,grf — not listed as required here #

The phandle of the syscon node for the general register file.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

rockchip,hw-tshut-temp — not listed as required here #

The hardware-controlled shutdown temperature value.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

rockchip,hw-tshut-mode — not listed as required here #

The hardware-controlled shutdown mode 0:CRU 1:GPIO.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1

rockchip,hw-tshut-polarity — not listed as required here #

The hardware-controlled active polarity 0:LOW 1:HIGH.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 0, 1

Properties matching a name pattern (patternProperties) #

@[0-9a-f]+$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

reg — required here

Maximum number of items (maxItems): 1

sensor ID, a.k.a. channel number

nvmem-cells — not listed as required here

Array item rules (items)

Item 1

handle of cell containing calibration data

nvmem-cell-names — not listed as required here

Array item rules (items)

Item 1

Exact value (const): "trim"

Required in this object (required): "reg"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "resets"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "rockchip,px30-tsadc", "rockchip,rk3366-tsadc", "rockchip,rk3399-tsadc", "rockchip,rk3568-tsadc"

When the condition matches (then) #

Required in this object (required): "rockchip,grf"

When the condition does not match (else) #

Properties and child nodes (properties)

rockchip,grf — not listed as required here

false — Not permitted by this property rule.

Rule 2 #

Condition (if) #

This rule must not match (not)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "rockchip,rk3568-tsadc"

When the condition matches (then) #

Properties and child nodes (properties)

nvmem-cells — not listed as required here

false — Not permitted by this property rule.

nvmem-cell-names — not listed as required here

false — Not permitted by this property rule.

Rule 3 #

Condition (if) #

This rule must not match (not)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "rockchip,rk3568-tsadc", "rockchip,rk3576-tsadc"

When the condition matches (then) #

Properties matching a name pattern (patternProperties)

@[0-9a-f]+$ — name matches this regular expression

false — Not permitted by this property rule.

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/rk3288-cru.h>

tsadc: tsadc@ff280000 {
    compatible = "rockchip,rk3288-tsadc";
    reg = <0xff280000 0x100>;
    interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
    clock-names = "tsadc", "apb_pclk";
    resets = <&cru SRST_TSADC>;
    reset-names = "tsadc-apb";
    #thermal-sensor-cells = <1>;
    rockchip,hw-tshut-temp = <95000>;
    rockchip,hw-tshut-mode = <0>;
    rockchip,hw-tshut-polarity = <0>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Edit this page