Path: blob/master/Documentation/devicetree/bindings/hwmon/baikal,bt1-pvt.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC2%YAML 1.23---4$id: http://devicetree.org/schemas/hwmon/baikal,bt1-pvt.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: Baikal-T1 PVT Sensor89maintainers:10- Serge Semin <fancer.lancer@gmail.com>1112description: |13Baikal-T1 SoC provides an embedded process, voltage and temperature14sensor to monitor an internal SoC environment (chip temperature, supply15voltage and process monitor) and on time detect critical situations,16which may cause the system instability and even damages. The IP-block17is based on the Analog Bits PVT sensor, but is equipped with a dedicated18control wrapper, which provides a MMIO registers-based access to the19sensor core functionality (APB3-bus based) and exposes an additional20functions like thresholds/data ready interrupts, its status and masks,21measurements timeout. Its internal structure is depicted on the next22diagram:2324Analog Bits core Bakal-T1 PVT control block25+--------------------+ +------------------------+26| Temperature sensor |-+ +------| Sensors control |27|--------------------| |<---En---| |------------------------|28| Voltage sensor |-|<--Mode--| +--->| Sampled data |29|--------------------| |<--Trim--+ | |------------------------|30| Low-Vt sensor |-| | +--| Thresholds comparator |31|--------------------| |---Data----| | |------------------------|32| High-Vt sensor |-| | +->| Interrupts status |33|--------------------| |--Valid--+-+ | |------------------------|34| Standard-Vt sensor |-+ +---+--| Interrupts mask |35+--------------------+ |------------------------|36^ | Interrupts timeout |37| +------------------------+38| ^ ^39Rclk-----+----------------------------------------+ |40APB3-------------------------------------------------+4142This bindings describes the external Baikal-T1 PVT control interfaces43like MMIO registers space, interrupt request number and clocks source.44These are then used by the corresponding hwmon device driver to45implement the sysfs files-based access to the sensors functionality.4647properties:48compatible:49const: baikal,bt1-pvt5051reg:52maxItems: 15354interrupts:55maxItems: 15657clocks:58items:59- description: PVT reference clock60- description: APB3 interface clock6162clock-names:63items:64- const: ref65- const: pclk6667"#thermal-sensor-cells":68description: Baikal-T1 can be referenced as the CPU thermal-sensor69const: 07071baikal,pvt-temp-offset-millicelsius:72description: |73Temperature sensor trimming factor. It can be used to manually adjust the74temperature measurements within 7.130 degrees Celsius.75default: 076minimum: 077maximum: 71307879additionalProperties: false8081required:82- compatible83- reg84- interrupts85- clocks86- clock-names8788examples:89- |90#include <dt-bindings/interrupt-controller/mips-gic.h>9192pvt@1f200000 {93compatible = "baikal,bt1-pvt";94reg = <0x1f200000 0x1000>;95#thermal-sensor-cells = <0>;9697interrupts = <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>;9899baikal,pvt-temp-offset-millicelsius = <1000>;100101clocks = <&ccu_sys>, <&ccu_sys>;102clock-names = "ref", "pclk";103};104...105106107