Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 # Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
0003 %YAML 1.2
0004 ---
0005 $id: http://devicetree.org/schemas/hwmon/baikal,bt1-pvt.yaml#
0006 $schema: http://devicetree.org/meta-schemas/core.yaml#
0007 
0008 title: Baikal-T1 PVT Sensor
0009 
0010 maintainers:
0011   - Serge Semin <fancer.lancer@gmail.com>
0012 
0013 description: |
0014   Baikal-T1 SoC provides an embedded process, voltage and temperature
0015   sensor to monitor an internal SoC environment (chip temperature, supply
0016   voltage and process monitor) and on time detect critical situations,
0017   which may cause the system instability and even damages. The IP-block
0018   is based on the Analog Bits PVT sensor, but is equipped with a dedicated
0019   control wrapper, which provides a MMIO registers-based access to the
0020   sensor core functionality (APB3-bus based) and exposes an additional
0021   functions like thresholds/data ready interrupts, its status and masks,
0022   measurements timeout. Its internal structure is depicted on the next
0023   diagram:
0024 
0025      Analog Bits core                     Bakal-T1 PVT control block
0026   +--------------------+                  +------------------------+
0027   | Temperature sensor |-+         +------| Sensors control        |
0028   |--------------------| |<---En---|      |------------------------|
0029   | Voltage sensor     |-|<--Mode--| +--->| Sampled data           |
0030   |--------------------| |<--Trim--+ |    |------------------------|
0031   | Low-Vt sensor      |-|           | +--| Thresholds comparator  |
0032   |--------------------| |---Data----| |  |------------------------|
0033   | High-Vt sensor     |-|           | +->| Interrupts status      |
0034   |--------------------| |--Valid--+-+ |  |------------------------|
0035   | Standard-Vt sensor |-+         +---+--| Interrupts mask        |
0036   +--------------------+                  |------------------------|
0037            ^                              | Interrupts timeout     |
0038            |                              +------------------------+
0039            |                                        ^  ^
0040   Rclk-----+----------------------------------------+  |
0041   APB3-------------------------------------------------+
0042 
0043   This bindings describes the external Baikal-T1 PVT control interfaces
0044   like MMIO registers space, interrupt request number and clocks source.
0045   These are then used by the corresponding hwmon device driver to
0046   implement the sysfs files-based access to the sensors functionality.
0047 
0048 properties:
0049   compatible:
0050     const: baikal,bt1-pvt
0051 
0052   reg:
0053     maxItems: 1
0054 
0055   interrupts:
0056     maxItems: 1
0057 
0058   clocks:
0059     items:
0060       - description: PVT reference clock
0061       - description: APB3 interface clock
0062 
0063   clock-names:
0064     items:
0065       - const: ref
0066       - const: pclk
0067 
0068   "#thermal-sensor-cells":
0069     description: Baikal-T1 can be referenced as the CPU thermal-sensor
0070     const: 0
0071 
0072   baikal,pvt-temp-offset-millicelsius:
0073     description: |
0074       Temperature sensor trimming factor. It can be used to manually adjust the
0075       temperature measurements within 7.130 degrees Celsius.
0076     default: 0
0077     minimum: 0
0078     maximum: 7130
0079 
0080 additionalProperties: false
0081 
0082 required:
0083   - compatible
0084   - reg
0085   - interrupts
0086   - clocks
0087   - clock-names
0088 
0089 examples:
0090   - |
0091     #include <dt-bindings/interrupt-controller/mips-gic.h>
0092 
0093     pvt@1f200000 {
0094       compatible = "baikal,bt1-pvt";
0095       reg = <0x1f200000 0x1000>;
0096       #thermal-sensor-cells = <0>;
0097 
0098       interrupts = <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>;
0099 
0100       baikal,pvt-temp-offset-millicelsius = <1000>;
0101 
0102       clocks = <&ccu_sys>, <&ccu_sys>;
0103       clock-names = "ref", "pclk";
0104     };
0105 ...