← Documents Documentation/devicetree/bindings/timer/loongson,ls1x-pwmtimer.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Timer

Loongson-1 PWM Timer

Loongson-1 PWM timer의 clocksource·clockevent 구성을 설명합니다.

Source pathDocumentation/devicetree/bindings/timer/loongson,ls1x-pwmtimer.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

loongson,ls1x-pwmtimer.yaml:1-48

Loongson-1 PWM timer의 clocksource·clockevent 구성을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.

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/timer/loongson,ls1x-pwmtimer.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Loongson-1 PWM timer
8
9 maintainers:
10 - Keguang Zhang <[email protected]>
11
12 description:
13 Loongson-1 PWM timer can be used for system clock source
14 and clock event timers.
15
16 properties:
17 compatible:
18 const: loongson,ls1b-pwmtimer
19
20 reg:
21 maxItems: 1
22
23 clocks:
24 maxItems: 1
25
26 interrupts:
27 maxItems: 1
28
29 required:
30 - compatible
31 - reg
32 - clocks
33 - interrupts
34
35 additionalProperties: false
36
37 examples:
38 - |
39 #include <dt-bindings/clock/loongson,ls1x-clk.h>
40 #include <dt-bindings/interrupt-controller/irq.h>
41 clocksource: timer@1fe5c030 {
42 compatible = "loongson,ls1b-pwmtimer";
43 reg = <0x1fe5c030 0x10>;
44
45 clocks = <&clkc LS1X_CLKID_APB>;
46 interrupt-parent = <&intc0>;
47 interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
48 };
49

3. 한국어 전문 번역

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

Loongson-1 PWM timer

1-15

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 system clocksource와 clockevent timer로 사용할 수 있는 Loongson-1 PWM timer를 정의합니다. Maintainer는 Keguang Zhang입니다.

LS1B 필수 자원

16-36

`compatible`은 `loongson,ls1b-pwmtimer`입니다. `reg`, `clocks`, `interrupts`는 각각 최대 한 항목이며 `compatible`과 함께 모두 필수입니다. 추가 속성은 허용되지 않습니다.

properties:
  compatible:
    const: loongson,ls1b-pwmtimer

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  interrupts:
    maxItems: 1

required:
  - compatible
  - reg
  - clocks
  - interrupts

additionalProperties: false

LS1B clocksource 예제

37-48

예제는 label `clocksource`가 붙은 `timer@1fe5c030`에 0x10-byte register 영역을 지정합니다. `clkc`의 `LS1X_CLKID_APB` clock을 연결하고 `intc0`의 interrupt 20을 level-high 방식으로 사용합니다.

examples:
  - |
    #include <dt-bindings/clock/loongson,ls1x-clk.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    clocksource: timer@1fe5c030 {
        compatible = "loongson,ls1b-pwmtimer";
        reg = <0x1fe5c030 0x10>;

        clocks = <&clkc LS1X_CLKID_APB>;
        interrupt-parent = <&intc0>;
        interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
    };