Commit 7c3a3b29 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Guenter Roeck
Browse files

hwmon: (bt1-pvt) Remove not-going-to-be-supported code for Baikal SoC

As noticed in the discussion [1] the Baikal SoC and platforms
are not going to be finalized, hence remove stale code.

Link: https://lore.kernel.org/lkml/22b92ddf-6321-41b5-8073-f9c7064d3432@infradead.org/

 [1]
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20260220143500.2401057-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 7aaa8047
Loading
Loading
Loading
Loading
+0 −105
Original line number Diff line number Diff line
# 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";
    };
...

Documentation/hwmon/bt1-pvt.rst

deleted100644 → 0
+0 −117
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0-only

Kernel driver bt1-pvt
=====================

Supported chips:

  * Baikal-T1 PVT sensor (in SoC)

    Prefix: 'bt1-pvt'

    Addresses scanned: -

    Datasheet: Provided by BAIKAL ELECTRONICS upon request and under NDA

Authors:
    Maxim Kaurkin <maxim.kaurkin@baikalelectronics.ru>
    Serge Semin <Sergey.Semin@baikalelectronics.ru>

Description
-----------

This driver implements support for the hardware monitoring capabilities of the
embedded into Baikal-T1 process, voltage and temperature sensors. PVT IP-core
consists of one temperature and four voltage sensors, which can be used to
monitor the chip internal environment like heating, supply voltage and
transistors performance. The driver can optionally provide the hwmon alarms
for each sensor the PVT controller supports. The alarms functionality is made
compile-time configurable due to the hardware interface implementation
peculiarity, which is connected with an ability to convert data from only one
sensor at a time. Additional limitation is that the controller performs the
thresholds checking synchronously with the data conversion procedure. Due to
these in order to have the hwmon alarms automatically detected the driver code
must switch from one sensor to another, read converted data and manually check
the threshold status bits. Depending on the measurements timeout settings
(update_interval sysfs node value) this design may cause additional burden on
the system performance. So in case if alarms are unnecessary in your system
design it's recommended to have them disabled to prevent the PVT IRQs being
periodically raised to get the data cache/alarms status up to date. By default
in alarm-less configuration the data conversion is performed by the driver
on demand when read operation is requested via corresponding _input-file.

Temperature Monitoring
----------------------

Temperature is measured with 10-bit resolution and reported in millidegree
Celsius. The driver performs all the scaling by itself therefore reports true
temperatures that don't need any user-space adjustments. While the data
translation formulae isn't linear, which gives us non-linear discreteness,
it's close to one, but giving a bit better accuracy for higher temperatures.
The temperature input is mapped as follows (the last column indicates the input
ranges)::

	temp1: CPU embedded diode	-48.38C - +147.438C

In case if the alarms kernel config is enabled in the driver the temperature input
has associated min and max limits which trigger an alarm when crossed.

Voltage Monitoring
------------------

The voltage inputs are also sampled with 10-bit resolution and reported in
millivolts. But in this case the data translation formulae is linear, which
provides a constant measurements discreteness. The data scaling is also
performed by the driver, so returning true millivolts. The voltage inputs are
mapped as follows (the last column indicates the input ranges)::

	in0: VDD		(processor core)		0.62V - 1.168V
	in1: Low-Vt		(low voltage threshold)		0.62V - 1.168V
	in2: High-Vt		(high voltage threshold)	0.62V - 1.168V
	in3: Standard-Vt	(standard voltage threshold)	0.62V - 1.168V

In case if the alarms config is enabled in the driver the voltage inputs
have associated min and max limits which trigger an alarm when crossed.

Sysfs Attributes
----------------

Following is a list of all sysfs attributes that the driver provides, their
permissions and a short description:

=============================== ======= =======================================
Name				Perm	Description
=============================== ======= =======================================
update_interval			RW	Measurements update interval per
					sensor.
temp1_type			RO	Sensor type (always 1 as CPU embedded
					diode).
temp1_label			RO	CPU Core Temperature sensor.
temp1_input			RO	Measured temperature in millidegree
					Celsius.
temp1_min			RW	Low limit for temp input.
temp1_max			RW	High limit for temp input.
temp1_min_alarm			RO	Temperature input alarm. Returns 1 if
					temperature input went below min limit,
					0 otherwise.
temp1_max_alarm			RO	Temperature input alarm. Returns 1 if
					temperature input went above max limit,
					0 otherwise.
temp1_offset			RW	Temperature offset in millidegree
					Celsius which is added to the
					temperature reading by the chip. It can
					be used to manually adjust the
					temperature measurements within 7.130
					degrees Celsius.
in[0-3]_label			RO	CPU Voltage sensor (either core or
					low/high/standard thresholds).
in[0-3]_input			RO	Measured voltage in millivolts.
in[0-3]_min			RW	Low limit for voltage input.
in[0-3]_max			RW	High limit for voltage input.
in[0-3]_min_alarm		RO	Voltage input alarm. Returns 1 if
					voltage input went below min limit,
					0 otherwise.
in[0-3]_max_alarm		RO	Voltage input alarm. Returns 1 if
					voltage input went above max limit,
					0 otherwise.
=============================== ======= =======================================
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ Hardware Monitoring Kernel Drivers
   bcm54140
   bel-pfe
   bpa-rs600
   bt1-pvt
   cgbc-hwmon
   chipcap2
   coretemp
+0 −26
Original line number Diff line number Diff line
@@ -457,32 +457,6 @@ config SENSORS_ATXP1
	  This driver can also be built as a module. If so, the module
	  will be called atxp1.

config SENSORS_BT1_PVT
	tristate "Baikal-T1 Process, Voltage, Temperature sensor driver"
	depends on MIPS_BAIKAL_T1 || COMPILE_TEST
	select POLYNOMIAL
	help
	  If you say yes here you get support for Baikal-T1 PVT sensor
	  embedded into the SoC.

	  This driver can also be built as a module. If so, the module will be
	  called bt1-pvt.

config SENSORS_BT1_PVT_ALARMS
	bool "Enable Baikal-T1 PVT sensor alarms"
	depends on SENSORS_BT1_PVT
	help
	  Baikal-T1 PVT IP-block provides threshold registers for each
	  supported sensor. But the corresponding interrupts might be
	  generated by the thresholds comparator only in synchronization with
	  a data conversion. Additionally there is only one sensor data can
	  be converted at a time. All of these makes the interface impossible
	  to be used for the hwmon alarms implementation without periodic
	  switch between the PVT sensors. By default the data conversion is
	  performed on demand from the user-space. If this config is enabled
	  the data conversion will be periodically performed and the data will be
	  saved in the internal driver cache.

config SENSORS_CGBC
	tristate "Congatec Board Controller Sensors"
	depends on MFD_CGBC
+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ obj-$(CONFIG_SENSORS_ASPEED_G6) += aspeed-g6-pwm-tach.o
obj-$(CONFIG_SENSORS_ASUS_ROG_RYUJIN)	+= asus_rog_ryujin.o
obj-$(CONFIG_SENSORS_ATXP1)	+= atxp1.o
obj-$(CONFIG_SENSORS_AXI_FAN_CONTROL) += axi-fan-control.o
obj-$(CONFIG_SENSORS_BT1_PVT)	+= bt1-pvt.o
obj-$(CONFIG_SENSORS_CGBC)	+= cgbc-hwmon.o
obj-$(CONFIG_SENSORS_CHIPCAP2) += chipcap2.o
obj-$(CONFIG_SENSORS_CORETEMP)	+= coretemp.o
Loading