1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
5 $id: http://devicetree.org/schemas/hwmon/baikal,bt1-pvt.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: Baikal-T1 PVT Sensor
11 - Serge Semin <fancer.lancer@gmail.com>
14 Baikal-T1 SoC provides an embedded process, voltage and temperature
15 sensor to monitor an internal SoC environment (chip temperature, supply
16 voltage and process monitor) and on time detect critical situations,
17 which may cause the system instability and even damages. The IP-block
18 is based on the Analog Bits PVT sensor, but is equipped with a dedicated
19 control wrapper, which provides a MMIO registers-based access to the
20 sensor core functionality (APB3-bus based) and exposes an additional
21 functions like thresholds/data ready interrupts, its status and masks,
22 measurements timeout. Its internal structure is depicted on the next
25 Analog Bits core Bakal-T1 PVT control block
26 +--------------------+ +------------------------+
27 | Temperature sensor |-+ +------| Sensors control |
28 |--------------------| |<---En---| |------------------------|
29 | Voltage sensor |-|<--Mode--| +--->| Sampled data |
30 |--------------------| |<--Trim--+ | |------------------------|
31 | Low-Vt sensor |-| | +--| Thresholds comparator |
32 |--------------------| |---Data----| | |------------------------|
33 | High-Vt sensor |-| | +->| Interrupts status |
34 |--------------------| |--Valid--+-+ | |------------------------|
35 | Standard-Vt sensor |-+ +---+--| Interrupts mask |
36 +--------------------+ |------------------------|
37 ^ | Interrupts timeout |
38 | +------------------------+
40 Rclk-----+----------------------------------------+ |
41 APB3-------------------------------------------------+
43 This bindings describes the external Baikal-T1 PVT control interfaces
44 like MMIO registers space, interrupt request number and clocks source.
45 These are then used by the corresponding hwmon device driver to
46 implement the sysfs files-based access to the sensors functionality.
60 - description: PVT reference clock
61 - description: APB3 interface clock
68 "#thermal-sensor-cells":
69 description: Baikal-T1 can be referenced as the CPU thermal-sensor
72 baikal,pvt-temp-offset-millicelsius:
74 Temperature sensor trimming factor. It can be used to manually adjust the
75 temperature measurements within 7.130 degrees Celsius.
82 additionalProperties: false
93 #include <dt-bindings/interrupt-controller/mips-gic.h>
96 compatible = "baikal,bt1-pvt";
97 reg = <0x1f200000 0x1000>;
98 #thermal-sensor-cells = <0>;
100 interrupts = <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>;
102 baikal,pvt-temp-offset-millicelsius = <1000>;
104 clocks = <&ccu_sys>, <&ccu_sys>;
105 clock-names = "ref", "pclk";