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

Linux 6.18.37 · Devicetree Bindings / Watchdog

TI K3 RTI Watchdog

K3 RTI windowed watchdog와 reserved memory 기반 reset 원인 전달을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

ti,rti-wdt.yaml:1-87

K3 RTI windowed watchdog와 reserved memory 기반 reset 원인 전달을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, node 이름, compatible, register, clock, interrupt, reset, reserved memory, timeout과 예제는 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/watchdog/ti,rti-wdt.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Texas Instruments K3 SoC Watchdog Timer
8
9 maintainers:
10 - Tero Kristo <t-kristo@ti.com>
11
12 description:
13 The TI K3 SoC watchdog timer is implemented via the RTI (Real Time
14 Interrupt) IP module. This timer adds a support for windowed watchdog
15 mode, which will signal an error if it is pinged outside the watchdog
16 time window, meaning either too early or too late. The error signal
17 generated can be routed to either interrupt a safety controller or
18 to directly reset the SoC.
19
20 allOf:
21 - $ref: watchdog.yaml#
22
23 properties:
24 compatible:
25 enum:
26 - ti,j7-rti-wdt
27
28 reg:
29 maxItems: 1
30
31 clocks:
32 maxItems: 1
33
34 power-domains:
35 maxItems: 1
36
37 memory-region:
38 maxItems: 1
39 description:
40 Contains the watchdog reserved memory. It is optional.
41 In the reserved memory, the specified values, which are
42 PON_REASON_SOF_NUM(0xBBBBCCCC), PON_REASON_MAGIC_NUM(0xDDDDDDDD),
43 and PON_REASON_EOF_NUM(0xCCCCBBBB), are pre-stored at the first
44 3 * 4 bytes to tell that last boot was caused by watchdog reset.
45 Once the PON reason is captured by driver(rti_wdt.c), the driver
46 is supposed to wipe the whole memory region. Surely, if this
47 property is set, at least 12 bytes reserved memory starting from
48 specific memory address(0xa220000) should be set. More please
49 refer to example.
50
51 required:
52 - compatible
53 - reg
54 - clocks
55 - power-domains
56
57 unevaluatedProperties: false
58
59 examples:
60 - |
61 /*
62 * RTI WDT in main domain on J721e SoC. Assigned clocks are used to
63 * select the source clock for the watchdog, forcing it to tick with
64 * a 32kHz clock in this case. Add a reserved memory(optional) to keep
65 * the watchdog reset cause persistent, which was be written in 12 bytes
66 * starting from 0xa2200000 by RTI Watchdog Firmware, then make it
67 * possible to get watchdog reset cause in driver.
68 *
69 * Reserved memory should be defined as follows:
70 * reserved-memory {
71 * wdt_reset_memory_region: wdt-memory@a2200000 {
72 * reg = <0x00 0xa2200000 0x00 0x1000>;
73 * no-map;
74 * };
75 * }
76 */
77 #include <dt-bindings/soc/ti,sci_pm_domain.h>
78
79 watchdog@2200000 {
80 compatible = "ti,j7-rti-wdt";
81 reg = <0x2200000 0x100>;
82 clocks = <&k3_clks 252 1>;
83 power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
84 assigned-clocks = <&k3_clks 252 1>;
85 assigned-clock-parents = <&k3_clks 252 5>;
86 memory-region = <&wdt_reset_memory_region>;
87 };
88

3. 한국어 전문 번역

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

TI K3 RTI windowed watchdog

1-22

GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 스키마는 Texas Instruments K3 SoC Watchdog Timer를 정의합니다. 관리자는 Tero Kristo이며 공통 `watchdog.yaml`을 상속합니다.

TI K3 SoC watchdog timer는 RTI(Real Time Interrupt) IP 모듈로 구현됩니다. 이 timer는 windowed watchdog mode를 지원하므로 정해진 watchdog 시간 창보다 너무 이르거나 너무 늦게 ping하면 오류를 알립니다. 생성된 오류 신호는 safety controller에 interrupt를 보내거나 SoC를 직접 reset하도록 전달할 수 있습니다.

호환성, register, clock과 전원 도메인

23-36

`compatible`은 `ti,j7-rti-wdt`입니다. `reg`, `clocks`, `power-domains`는 각각 최대 한 항목입니다.

properties:
  compatible:
    enum:
      - ti,j7-rti-wdt

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

watchdog reset 원인용 reserved memory

37-58

선택 속성 `memory-region`은 watchdog reserved memory를 가리키며 최대 한 항목입니다. 이 메모리의 첫 `3 * 4`바이트에는 `PON_REASON_SOF_NUM`(`0xBBBBCCCC`), `PON_REASON_MAGIC_NUM`(`0xDDDDDDDD`), `PON_REASON_EOF_NUM`(`0xCCCCBBBB`)을 미리 저장해 직전 부팅이 watchdog reset 때문에 발생했음을 표시합니다.

`rti_wdt.c` driver가 PON reason을 읽은 뒤에는 전체 memory region을 지워야 합니다. 이 속성을 사용한다면 특정 주소에서 시작하는 reserved memory를 최소 12바이트 마련해야 하며, 설명에 제시된 주소는 `0xa220000`입니다. 실제 예제는 `0xa2200000`에서 `0x1000`바이트를 예약합니다.

`compatible`, `reg`, `clocks`, `power-domains`는 필수이며 평가되지 않은 속성은 허용하지 않습니다.

  memory-region:
    maxItems: 1
    description:
      Contains the watchdog reserved memory. It is optional.
      In the reserved memory, the specified values, which are
      PON_REASON_SOF_NUM(0xBBBBCCCC), PON_REASON_MAGIC_NUM(0xDDDDDDDD),
      and PON_REASON_EOF_NUM(0xCCCCBBBB), are pre-stored at the first
      3 * 4 bytes to tell that last boot was caused by watchdog reset.
      Once the PON reason is captured by driver(rti_wdt.c), the driver
      is supposed to wipe the whole memory region. Surely, if this
      property is set, at least 12 bytes reserved memory starting from
      specific memory address(0xa220000) should be set. More please
      refer to example.

required:
  - compatible
  - reg
  - clocks
  - power-domains

unevaluatedProperties: false

J721E main domain RTI 예제

59-87

예제는 J721E SoC main domain의 RTI WDT를 구성합니다. assigned clock으로 watchdog source를 선택해 32kHz로 tick하게 하고, RTI Watchdog Firmware가 주소 `0xa2200000`부터 12바이트에 기록한 reset 원인을 유지하도록 선택적 reserved memory를 연결합니다.

`wdt_reset_memory_region`은 `no-map`인 `0x1000`바이트 영역입니다. watchdog node는 주소 `0x2200000`, 크기 `0x100`을 사용하며 K3 clock 252/1, exclusive power domain 252, clock parent 252/5와 memory region phandle을 지정합니다.

examples:
  - |
    /*
     * RTI WDT in main domain on J721e SoC. Assigned clocks are used to
     * select the source clock for the watchdog, forcing it to tick with
     * a 32kHz clock in this case. Add a reserved memory(optional) to keep
     * the watchdog reset cause persistent, which was be written in 12 bytes
     * starting from 0xa2200000 by RTI Watchdog Firmware, then make it
     * possible to get watchdog reset cause in driver.
     *
     * Reserved memory should be defined as follows:
     * reserved-memory {
     *     wdt_reset_memory_region: wdt-memory@a2200000 {
     *         reg = <0x00 0xa2200000 0x00 0x1000>;
     *         no-map;
     *     };
     * }
     */
    #include <dt-bindings/soc/ti,sci_pm_domain.h>

    watchdog@2200000 {
        compatible = "ti,j7-rti-wdt";
        reg = <0x2200000 0x100>;
        clocks = <&k3_clks 252 1>;
        power-domains = <&k3_pds 252 TI_SCI_PD_EXCLUSIVE>;
        assigned-clocks = <&k3_clks 252 1>;
        assigned-clock-parents = <&k3_clks 252 5>;
        memory-region = <&wdt_reset_memory_region>;
    };