32ada6b098
Properties with standard unit suffixes already have a type and don't need type definitions. They also default to a single entry, so 'maxItems: 1' can be dropped. adi,ad5758 is an oddball which defined an enum of arrays. While a valid schema, it is simpler as a whole to only define scalar constraints. Cc: Jean Delvare <jdelvare@suse.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Serge Semin <fancer.lancer@gmail.com> Cc: linux-hwmon@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-input@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-watchdog@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Sebastian Reichel <sre@kernel.org> # for power-supply Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio Acked-by: Alexandre TORGUE <alexandre.torgue@foss.st.com> Link: https://lore.kernel.org/r/20210128194515.743252-1-robh@kernel.org
106 lines
3.5 KiB
YAML
106 lines
3.5 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
# Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/hwmon/baikal,bt1-pvt.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Baikal-T1 PVT Sensor
|
|
|
|
maintainers:
|
|
- Serge Semin <fancer.lancer@gmail.com>
|
|
|
|
description: |
|
|
Baikal-T1 SoC provides an embedded process, voltage and temperature
|
|
sensor to monitor an internal SoC environment (chip temperature, supply
|
|
voltage and process monitor) and on time detect critical situations,
|
|
which may cause the system instability and even damages. The IP-block
|
|
is based on the Analog Bits PVT sensor, but is equipped with a dedicated
|
|
control wrapper, which provides a MMIO registers-based access to the
|
|
sensor core functionality (APB3-bus based) and exposes an additional
|
|
functions like thresholds/data ready interrupts, its status and masks,
|
|
measurements timeout. Its internal structure is depicted on the next
|
|
diagram:
|
|
|
|
Analog Bits core Bakal-T1 PVT control block
|
|
+--------------------+ +------------------------+
|
|
| Temperature sensor |-+ +------| Sensors control |
|
|
|--------------------| |<---En---| |------------------------|
|
|
| Voltage sensor |-|<--Mode--| +--->| Sampled data |
|
|
|--------------------| |<--Trim--+ | |------------------------|
|
|
| Low-Vt sensor |-| | +--| Thresholds comparator |
|
|
|--------------------| |---Data----| | |------------------------|
|
|
| High-Vt sensor |-| | +->| Interrupts status |
|
|
|--------------------| |--Valid--+-+ | |------------------------|
|
|
| Standard-Vt sensor |-+ +---+--| Interrupts mask |
|
|
+--------------------+ |------------------------|
|
|
^ | Interrupts timeout |
|
|
| +------------------------+
|
|
| ^ ^
|
|
Rclk-----+----------------------------------------+ |
|
|
APB3-------------------------------------------------+
|
|
|
|
This bindings describes the external Baikal-T1 PVT control interfaces
|
|
like MMIO registers space, interrupt request number and clocks source.
|
|
These are then used by the corresponding hwmon device driver to
|
|
implement the sysfs files-based access to the sensors functionality.
|
|
|
|
properties:
|
|
compatible:
|
|
const: baikal,bt1-pvt
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
interrupts:
|
|
maxItems: 1
|
|
|
|
clocks:
|
|
items:
|
|
- description: PVT reference clock
|
|
- description: APB3 interface clock
|
|
|
|
clock-names:
|
|
items:
|
|
- const: ref
|
|
- const: pclk
|
|
|
|
"#thermal-sensor-cells":
|
|
description: Baikal-T1 can be referenced as the CPU thermal-sensor
|
|
const: 0
|
|
|
|
baikal,pvt-temp-offset-millicelsius:
|
|
description: |
|
|
Temperature sensor trimming factor. It can be used to manually adjust the
|
|
temperature measurements within 7.130 degrees Celsius.
|
|
default: 0
|
|
minimum: 0
|
|
maximum: 7130
|
|
|
|
additionalProperties: false
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- interrupts
|
|
- clocks
|
|
- clock-names
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/interrupt-controller/mips-gic.h>
|
|
|
|
pvt@1f200000 {
|
|
compatible = "baikal,bt1-pvt";
|
|
reg = <0x1f200000 0x1000>;
|
|
#thermal-sensor-cells = <0>;
|
|
|
|
interrupts = <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>;
|
|
|
|
baikal,pvt-temp-offset-millicelsius = <1000>;
|
|
|
|
clocks = <&ccu_sys>, <&ccu_sys>;
|
|
clock-names = "ref", "pclk";
|
|
};
|
|
...
|