← Documents Documentation/devicetree/bindings/watchdog/atmel,at91sam9-wdt.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Watchdog

Atmel AT91SAM9 Watchdog Timers

AT91SAM9 워치독의 heartbeat 계산, hardware·software 방식과 idle 주의사항을 설명합니다.

Source pathDocumentation/devicetree/bindings/watchdog/atmel,at91sam9-wdt.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

atmel,at91sam9-wdt.yaml:1-127

AT91SAM9 워치독의 heartbeat 계산, hardware·software 방식과 idle 주의사항을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, reset, 예제와 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/watchdog/atmel,at91sam9-wdt.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: Atmel Watchdog Timers
9
10 maintainers:
11 - Eugen Hristev <eugen.hristev@microchip.com>
12
13 properties:
14 compatible:
15 const: atmel,at91sam9260-wdt
16
17 reg:
18 maxItems: 1
19
20 clocks:
21 maxItems: 1
22
23 interrupts:
24 maxItems: 1
25
26 atmel,max-heartbeat-sec:
27 description:
28 Should contain the maximum heartbeat value in seconds. This value
29 should be less or equal to 16. It is used to compute the WDV field.
30 maximum: 16
31
32 atmel,min-heartbeat-sec:
33 description:
34 Should contain the minimum heartbeat value in seconds. This value
35 must be smaller than the max-heartbeat-sec value. It is used to
36 compute the WDD field.
37 maximum: 16
38
39 atmel,watchdog-type:
40 $ref: /schemas/types.yaml#/definitions/string
41 description: |
42 Should be hardware or software.
43 oneOf:
44 - description:
45 Hardware watchdog uses the at91 watchdog reset.
46 const: hardware
47 - description: |
48 Software watchdog uses the watchdog interrupt
49 to trigger a software reset.
50 const: software
51 default: hardware
52
53 atmel,reset-type:
54 $ref: /schemas/types.yaml#/definitions/string
55 description: |
56 Should be proc or all. This is valid only when using hardware watchdog.
57 oneOf:
58 - description:
59 Assert peripherals and processor reset signals.
60 const: all
61 - description:
62 Assert the processor reset signal.
63 const: proc
64 default: all
65
66 atmel,disable:
67 $ref: /schemas/types.yaml#/definitions/flag
68 description:
69 Should be present if you want to stop the watchdog.
70
71 atmel,idle-halt:
72 $ref: /schemas/types.yaml#/definitions/flag
73 description: |
74 Should be present if you want to stop the watchdog when
75 entering idle state.
76 CAUTION: This property should be used with care, it actually makes the
77 watchdog not counting when the CPU is in idle state, therefore the
78 watchdog reset time depends on mean CPU usage and will not reset at all
79 if the CPU stops working while it is in idle state, which is probably
80 not what you want.
81
82 atmel,dbg-halt:
83 $ref: /schemas/types.yaml#/definitions/flag
84 description: |
85 Should be present if you want to stop the watchdog when
86 entering debug state.
87
88 required:
89 - compatible
90 - reg
91 - clocks
92
93 allOf:
94 - $ref: watchdog.yaml#
95 - if:
96 properties:
97 atmel,reset-type:
98 enum:
99 - all
100 - proc
101 then:
102 properties:
103 atmel,watchdog-type:
104 const: hardware
105
106 dependencies:
107 atmel,reset-type: ['atmel,watchdog-type']
108
109 unevaluatedProperties: false
110
111 examples:
112 - |
113 #include <dt-bindings/interrupt-controller/irq.h>
114
115 watchdog@fffffd40 {
116 compatible = "atmel,at91sam9260-wdt";
117 reg = <0xfffffd40 0x10>;
118 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
119 clocks = <&clk32k>;
120 timeout-sec = <15>;
121 atmel,watchdog-type = "hardware";
122 atmel,reset-type = "all";
123 atmel,dbg-halt;
124 atmel,idle-halt;
125 atmel,max-heartbeat-sec = <16>;
126 atmel,min-heartbeat-sec = <0>;
127 };
128

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Atmel AT91SAM9 워치독

1-12

GPL-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>;
    };