요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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 <[email protected]>
Serge Semin <[email protected]>
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.
=============================== ======= =======================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Baikal-T1 PVT와 alarm 비용
1-42이 GPL-2.0-only driver는 SoC에 내장된 `Baikal-T1 PVT sensor`를 prefix `bt1-pvt`로 지원합니다. 주소 검색은 없고 datasheet는 BAIKAL ELECTRONICS가 NDA 아래 요청 시 제공합니다. 저자는 Maxim Kaurkin과 Serge Semin입니다.
PVT IP core는 temperature sensor 1개와 voltage sensor 4개로 구성되며 chip 내부 heating, supply voltage, transistor performance를 monitoring합니다. 각 sensor의 hwmon alarm을 선택적으로 제공할 수 있습니다.
Alarm 기능은 compile-time configurable입니다. Hardware는 한 번에 sensor 하나의 data만 변환할 수 있고 threshold check도 conversion과 동기적으로 수행합니다. 자동 alarm 탐지를 하려면 driver가 sensor를 차례로 전환하고 converted data를 읽은 뒤 threshold status bit를 수동 검사해야 합니다.
이 방식은 `update_interval`에 따라 system performance에 추가 부담을 줄 수 있습니다. Alarm이 필요하지 않다면 disable하여 data cache와 alarm status 갱신을 위한 PVT IRQ가 주기적으로 발생하지 않게 하는 것이 좋습니다. 기본 alarm-less configuration에서는 대응 `_input` file을 읽을 때 on-demand conversion을 수행합니다.
단일 conversion engine 때문에 alarm mode에 polling 비용이 생깁니다.
모든 sensor의 threshold를 software가 순차 검사합니다.
.. 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 <[email protected]>
Serge Semin <[email protected]>
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와 voltage 측정
43-75Temperature는 10-bit resolution으로 측정하고 millidegree Celsius로 보고합니다. Driver가 scaling을 모두 수행하므로 userspace 보정이 필요 없는 실제 temperature를 반환합니다.
Data translation formula는 비선형이어서 discreteness도 비선형이지만 거의 일정하며 높은 temperature에서 조금 더 나은 accuracy를 제공합니다. `temp1`은 CPU embedded diode이고 측정 범위는 `-48.38C`부터 `+147.438C`입니다. Alarm kernel config가 enabled이면 min/max limit와 crossing alarm이 생깁니다.
Voltage input도 10-bit resolution으로 sampling하고 millivolts로 보고합니다. 이 변환식은 선형이라 measurement discreteness가 일정하며 driver가 실제 millivolt로 scaling합니다.
`in0`은 processor core `VDD`, `in1`은 `Low-Vt`, `in2`는 `High-Vt`, `in3`은 `Standard-Vt`입니다. 네 채널 모두 범위는 `0.62V`부터 `1.168V`입니다. Alarm config가 enabled이면 min/max limit와 crossing alarm을 제공합니다.
센서 identity, 범위, 변환 특성입니다.
Raw 10-bit sample을 실제 온도 또는 전압으로 변환합니다.
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.
Baikal-T1 PVT sysfs
76-117Read/write `update_interval`은 sensor당 measurement update interval입니다. Read-only `temp1_type`은 CPU embedded diode를 뜻하는 1로 고정되고 `temp1_label`은 CPU Core Temperature sensor입니다.
`temp1_input`은 millidegree Celsius measured temperature입니다. Read/write `temp1_min`, `temp1_max`는 low/high limit입니다. Read-only `temp1_min_alarm`은 input이 min 아래로 내려가면 1, `temp1_max_alarm`은 max 위로 올라가면 1을 반환합니다.
Read/write `temp1_offset`은 chip이 reading에 더하는 millidegree Celsius offset이며 최대 7.130 degree Celsius 범위 안에서 manual adjustment에 사용할 수 있습니다.
Read-only `in[0-3]_label`은 core 또는 low/high/standard threshold CPU Voltage sensor 이름이고 `in[0-3]_input`은 millivolt 측정값입니다. Read/write min/max limit와 read-only min/max alarm을 제공하며 범위를 넘으면 alarm이 1입니다.
권한과 alarm-enabled 조건을 정리합니다.
Configuration에 따라 on-demand 또는 periodic conversion을 사용합니다.
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.
=============================== ======= =======================================
요약·해설
bt1-pvt.rst:1-117단일 conversion engine에서 PVT sensor를 순환하며 alarm을 선택적으로 제공하거나 on-demand 측정합니다.
원문 분량과 핵심 지원 범위입니다.
장치를 측정하는 기본 순서입니다.