요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
%YAML 1.2
---
$id: http://devicetree.org/schemas/watchdog/atmel,at91sam9-wdt.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel Watchdog Timers
maintainers:
- Eugen Hristev <[email protected]>
properties:
compatible:
const: atmel,at91sam9260-wdt
reg:
maxItems: 1
clocks:
maxItems: 1
interrupts:
maxItems: 1
atmel,max-heartbeat-sec:
description:
Should contain the maximum heartbeat value in seconds. This value
should be less or equal to 16. It is used to compute the WDV field.
maximum: 16
atmel,min-heartbeat-sec:
description:
Should contain the minimum heartbeat value in seconds. This value
must be smaller than the max-heartbeat-sec value. It is used to
compute the WDD field.
maximum: 16
atmel,watchdog-type:
$ref: /schemas/types.yaml#/definitions/string
description: |
Should be hardware or software.
oneOf:
- description:
Hardware watchdog uses the at91 watchdog reset.
const: hardware
- description: |
Software watchdog uses the watchdog interrupt
to trigger a software reset.
const: software
default: hardware
atmel,reset-type:
$ref: /schemas/types.yaml#/definitions/string
description: |
Should be proc or all. This is valid only when using hardware watchdog.
oneOf:
- description:
Assert peripherals and processor reset signals.
const: all
- description:
Assert the processor reset signal.
const: proc
default: all
atmel,disable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Should be present if you want to stop the watchdog.
atmel,idle-halt:
$ref: /schemas/types.yaml#/definitions/flag
description: |
Should be present if you want to stop the watchdog when
entering idle state.
CAUTION: This property should be used with care, it actually makes the
watchdog not counting when the CPU is in idle state, therefore the
watchdog reset time depends on mean CPU usage and will not reset at all
if the CPU stops working while it is in idle state, which is probably
not what you want.
atmel,dbg-halt:
$ref: /schemas/types.yaml#/definitions/flag
description: |
Should be present if you want to stop the watchdog when
entering debug state.
required:
- compatible
- reg
- clocks
allOf:
- $ref: watchdog.yaml#
- if:
properties:
atmel,reset-type:
enum:
- all
- proc
then:
properties:
atmel,watchdog-type:
const: hardware
dependencies:
atmel,reset-type: ['atmel,watchdog-type']
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
watchdog@fffffd40 {
compatible = "atmel,at91sam9260-wdt";
reg = <0xfffffd40 0x10>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&clk32k>;
timeout-sec = <15>;
atmel,watchdog-type = "hardware";
atmel,reset-type = "all";
atmel,dbg-halt;
atmel,idle-halt;
atmel,max-heartbeat-sec = <16>;
atmel,min-heartbeat-sec = <0>;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Atmel AT91SAM9 워치독
1-12GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 스키마는 Atmel AT91SAM9 계열 워치독 타이머를 정의합니다. 2022 Microchip Technology 저작권 고지를 포함하며 관리자는 Eugen Hristev입니다.
클록·interrupt와 heartbeat 범위
13-38`compatible`은 `atmel,at91sam9260-wdt`로 고정합니다. `reg`, `clocks`, `interrupts`는 각각 최대 하나입니다.
`atmel,max-heartbeat-sec`는 초 단위 최대 heartbeat이며 16 이하여야 하고 WDV field 계산에 사용합니다. `atmel,min-heartbeat-sec`는 초 단위 최소 heartbeat로, 최대값보다 작아야 하며 WDD field 계산에 사용합니다. 최소값 자체도 16을 넘을 수 없습니다.
properties:
compatible:
const: atmel,at91sam9260-wdt
reg:
maxItems: 1
clocks:
maxItems: 1
interrupts:
maxItems: 1
atmel,max-heartbeat-sec:
description:
Should contain the maximum heartbeat value in seconds. This value
should be less or equal to 16. It is used to compute the WDV field.
maximum: 16
atmel,min-heartbeat-sec:
description:
Should contain the minimum heartbeat value in seconds. This value
must be smaller than the max-heartbeat-sec value. It is used to
compute the WDD field.
maximum: 16
hardware·software 워치독과 reset 범위
39-65`atmel,watchdog-type`은 `hardware` 또는 `software`이며 기본값은 `hardware`입니다. hardware 방식은 AT91 watchdog reset을 사용하고, software 방식은 watchdog interrupt로 software reset을 유발합니다.
`atmel,reset-type`은 hardware watchdog에서만 유효하며 `all` 또는 `proc`를 사용합니다. 기본값 `all`은 peripheral과 processor reset 신호를 모두 assert하고, `proc`는 processor reset 신호만 assert합니다.
atmel,watchdog-type:
$ref: /schemas/types.yaml#/definitions/string
description: |
Should be hardware or software.
oneOf:
- description:
Hardware watchdog uses the at91 watchdog reset.
const: hardware
- description: |
Software watchdog uses the watchdog interrupt
to trigger a software reset.
const: software
default: hardware
atmel,reset-type:
$ref: /schemas/types.yaml#/definitions/string
description: |
Should be proc or all. This is valid only when using hardware watchdog.
oneOf:
- description:
Assert peripherals and processor reset signals.
const: all
- description:
Assert the processor reset signal.
const: proc
default: all
disable·idle-halt·dbg-halt
66-87`atmel,disable` flag는 워치독을 중지하려는 경우 지정합니다. `atmel,idle-halt`는 CPU가 idle state에 들어갈 때 워치독 counting을 멈추며, `atmel,dbg-halt`는 debug state 진입 때 워치독을 멈춥니다.
`atmel,idle-halt`는 주의해서 사용해야 합니다. CPU가 idle인 동안 count하지 않으므로 reset 시간은 평균 CPU 사용률에 따라 달라지고, CPU가 idle state에서 멈추면 아예 reset하지 않을 수 있습니다. 이는 일반적으로 원하는 동작이 아닙니다.
atmel,disable:
$ref: /schemas/types.yaml#/definitions/flag
description:
Should be present if you want to stop the watchdog.
atmel,idle-halt:
$ref: /schemas/types.yaml#/definitions/flag
description: |
Should be present if you want to stop the watchdog when
entering idle state.
CAUTION: This property should be used with care, it actually makes the
watchdog not counting when the CPU is in idle state, therefore the
watchdog reset time depends on mean CPU usage and will not reset at all
if the CPU stops working while it is in idle state, which is probably
not what you want.
atmel,dbg-halt:
$ref: /schemas/types.yaml#/definitions/flag
description: |
Should be present if you want to stop the watchdog when
entering debug state.
필수 속성과 reset-type 의존성
88-110`compatible`, `reg`, `clocks`가 필수이고 공통 `watchdog.yaml`을 상속합니다. `atmel,reset-type`을 `all` 또는 `proc`로 지정하면 `atmel,watchdog-type`은 반드시 `hardware`여야 합니다.
`atmel,reset-type`은 `atmel,watchdog-type`에 의존하므로 reset type만 단독으로 쓸 수 없습니다. 공통 스키마와 이 문서에서 평가하지 않은 추가 속성은 허용하지 않습니다.
required:
- compatible
- reg
- clocks
allOf:
- $ref: watchdog.yaml#
- if:
properties:
atmel,reset-type:
enum:
- all
- proc
then:
properties:
atmel,watchdog-type:
const: hardware
dependencies:
atmel,reset-type: ['atmel,watchdog-type']
unevaluatedProperties: false
AT91SAM9260 hardware 워치독 예제
111-127예제는 주소 `0xfffffd40`의 AT91SAM9260 워치독에 level-high interrupt와 32KHz 클록을 연결합니다. timeout 15초, hardware 방식, 모든 장치 reset, debug·idle halt를 사용하며 heartbeat 범위를 0~16초로 지정합니다.
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
watchdog@fffffd40 {
compatible = "atmel,at91sam9260-wdt";
reg = <0xfffffd40 0x10>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
clocks = <&clk32k>;
timeout-sec = <15>;
atmel,watchdog-type = "hardware";
atmel,reset-type = "all";
atmel,dbg-halt;
atmel,idle-halt;
atmel,max-heartbeat-sec = <16>;
atmel,min-heartbeat-sec = <0>;
};
요약과 해설
atmel,at91sam9-wdt.yaml:1-127AT91SAM9 워치독의 heartbeat 계산, hardware·software 방식과 idle 주의사항을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, reset, 예제와 원문 줄 좌표를 원형대로 보존합니다.