요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
Kernel driver sg2042-mcu
========================
Supported chips:
* Onboard MCU for sg2042
Addresses scanned: -
Prefix: 'sg2042-mcu'
Authors:
- Inochi Amaoto <inochiama@outlook.com>
Description
-----------
This driver supprts hardware monitoring for onboard MCU with
i2c interface.
Usage Notes
-----------
This driver does not auto-detect devices. You will have to instantiate
the devices explicitly.
Please see Documentation/i2c/instantiating-devices.rst for details.
Sysfs Attributes
----------------
The following table shows the standard entries support by the driver:
================= =====================================================
Name Description
================= =====================================================
temp1_input Measured temperature of SoC
temp1_crit Critical high temperature
temp1_crit_hyst hysteresis temperature restore from Critical
temp2_input Measured temperature of the base board
================= =====================================================
The following table shows the extra entries support by the driver
(the MCU device is in i2c subsystem):
================= ======= =============================================
Name Perm Description
================= ======= =============================================
reset_count RO Reset count of the SoC
uptime RO Seconds after the MCU is powered
reset_reason RO Reset reason for the last reset
repower_policy RW Execution policy when triggering repower
================= ======= =============================================
``repower_policy``
The repower is triggered when the temperature of the SoC falls below
the hysteresis temperature after triggering a shutdown due to
reaching the critical temperature.
The valid values for this entry are "repower" and "keep". "keep" will
leave the SoC down when the triggering repower, and "repower" will
boot the SoC.
Debugfs Interfaces
------------------
If debugfs is available, this driver exposes some hardware specific
data in ``/sys/kernel/debug/sg2042-mcu/*/``.
================= ======= =============================================
Name Format Description
================= ======= =============================================
firmware_version 0x%02x firmware version of the MCU
pcb_version 0x%02x version number of the base board
board_type 0x%02x identifiers for the base board
mcu_type %d type of the MCU: 0 is STM32, 1 is GD32
================= ======= =============================================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SG2042 온보드 MCU와 수동 등록
1-30GPL-2.0 라이선스의 `sg2042-mcu` 드라이버는 SG2042 보드의 온보드 MCU가 I2C 인터페이스로 제공하는 하드웨어 모니터링 기능을 지원합니다. 주소 자동 검색은 하지 않으며 접두사는 `sg2042-mcu`입니다. 문서 작성자는 Inochi Amaoto입니다.
장치는 자동 감지되지 않으므로 사용자가 명시적으로 인스턴스를 만들어야 합니다. 구체적인 방법은 `Documentation/i2c/instantiating-devices.rst`를 참고합니다.
보드 관리 MCU의 연결과 등록 조건입니다.
플랫폼이 알려 주는 버스와 주소로 MCU를 생성합니다.
.. SPDX-License-Identifier: GPL-2.0
Kernel driver sg2042-mcu
========================
Supported chips:
* Onboard MCU for sg2042
Addresses scanned: -
Prefix: 'sg2042-mcu'
Authors:
- Inochi Amaoto <inochiama@outlook.com>
Description
-----------
This driver supprts hardware monitoring for onboard MCU with
i2c interface.
Usage Notes
-----------
This driver does not auto-detect devices. You will have to instantiate
the devices explicitly.
Please see Documentation/i2c/instantiating-devices.rst for details.
온도·재부팅 상태와 재전원 정책
31-63표준 hwmon 항목으로 `temp1_input`은 SoC 온도, `temp1_crit`은 임계 고온, `temp1_crit_hyst`는 임계 상태에서 복귀하는 히스테리시스 온도를 제공합니다. `temp2_input`은 베이스보드의 측정 온도입니다.
MCU는 I2C 서브시스템 장치 아래에 추가 속성도 제공합니다. `reset_count`는 SoC 재설정 횟수, `uptime`은 MCU에 전원이 공급된 뒤의 초 단위 시간, `reset_reason`은 마지막 재설정 이유이며 모두 읽기 전용입니다. `repower_policy`는 읽기·쓰기가 가능합니다.
SoC가 임계 온도에 도달해 종료된 뒤 온도가 히스테리시스 온도 아래로 내려가면 재전원 동작이 트리거됩니다. `repower_policy`의 유효 값은 `keep`과 `repower`입니다. `keep`은 SoC를 꺼진 상태로 유지하고 `repower`는 SoC를 다시 부팅합니다.
표준 온도 채널과 MCU 고유 관리 속성을 구분합니다.
임계 종료와 히스테리시스 복귀 뒤의 동작을 정책 값으로 결정합니다.
Sysfs Attributes
----------------
The following table shows the standard entries support by the driver:
================= =====================================================
Name Description
================= =====================================================
temp1_input Measured temperature of SoC
temp1_crit Critical high temperature
temp1_crit_hyst hysteresis temperature restore from Critical
temp2_input Measured temperature of the base board
================= =====================================================
The following table shows the extra entries support by the driver
(the MCU device is in i2c subsystem):
================= ======= =============================================
Name Perm Description
================= ======= =============================================
reset_count RO Reset count of the SoC
uptime RO Seconds after the MCU is powered
reset_reason RO Reset reason for the last reset
repower_policy RW Execution policy when triggering repower
================= ======= =============================================
``repower_policy``
The repower is triggered when the temperature of the SoC falls below
the hysteresis temperature after triggering a shutdown due to
reaching the critical temperature.
The valid values for this entry are "repower" and "keep". "keep" will
leave the SoC down when the triggering repower, and "repower" will
boot the SoC.
MCU·베이스보드 식별용 debugfs
64-78debugfs를 사용할 수 있으면 드라이버는 `/sys/kernel/debug/sg2042-mcu/*/` 아래에 하드웨어 고유 정보를 노출합니다.
`firmware_version`, `pcb_version`, `board_type`은 각각 MCU 펌웨어 버전, 베이스보드 PCB 버전, 베이스보드 식별자를 `0x%02x` 형식으로 표시합니다. `mcu_type`은 십진수이며 0은 STM32, 1은 GD32 MCU를 뜻합니다.
진단용 버전과 하드웨어 식별 값의 형식입니다.
debugfs 값으로 MCU 펌웨어와 보드 변형을 식별합니다.
Debugfs Interfaces
------------------
If debugfs is available, this driver exposes some hardware specific
data in ``/sys/kernel/debug/sg2042-mcu/*/``.
================= ======= =============================================
Name Format Description
================= ======= =============================================
firmware_version 0x%02x firmware version of the MCU
pcb_version 0x%02x version number of the base board
board_type 0x%02x identifiers for the base board
mcu_type %d type of the MCU: 0 is STM32, 1 is GD32
================= ======= =============================================
요약·해설
sg2042-mcu.rst:1-78SoC와 베이스보드 온도를 감시하고 과열 종료 뒤 keep·repower 정책을 적용하며 MCU·PCB 버전을 진단합니다.
원문 분량과 핵심 장치 구성을 정리합니다.
장치 식별부터 측정값 확인까지의 핵심 순서입니다.