← Documents Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

ASPEED PWM and Fan Tacho

AST2400/AST2500 PWM, tach input과 thermal cooling 바인딩입니다.

Source pathDocumentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

aspeed-pwm-tacho.txt:1-73

Fan child의 PWM/tach channel과 cooling level을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ASPEED AST2400/AST2500 PWM and Fan Tacho controller device driver
2
3 The ASPEED PWM controller can support upto 8 PWM outputs. The ASPEED Fan Tacho
4 controller can support upto 16 Fan tachometer inputs.
5
6 There can be upto 8 fans supported. Each fan can have one PWM output and
7 one/two Fan tach inputs.
8
9 Required properties for pwm-tacho node:
10 - #address-cells : should be 1.
11
12 - #size-cells : should be 1.
13
14 - #cooling-cells: should be 2.
15
16 - reg : address and length of the register set for the device.
17
18 - pinctrl-names : a pinctrl state named "default" must be defined.
19
20 - pinctrl-0 : phandle referencing pin configuration of the PWM ports.
21
22 - compatible : should be "aspeed,ast2400-pwm-tacho" for AST2400 and
23 "aspeed,ast2500-pwm-tacho" for AST2500.
24
25 - clocks : phandle to clock provider with the clock number in the second cell
26
27 - resets : phandle to reset controller with the reset number in the second cell
28
29 fan subnode format:
30 ===================
31 Under fan subnode there can upto 8 child nodes, with each child node
32 representing a fan. If there are 8 fans each fan can have one PWM port and
33 one/two Fan tach inputs.
34 For PWM port can be configured cooling-levels to create cooling device.
35 Cooling device could be bound to a thermal zone for the thermal control.
36
37 Required properties for each child node:
38 - reg : should specify PWM source port.
39 integer value in the range 0 to 7 with 0 indicating PWM port A and
40 7 indicating PWM port H.
41
42 - cooling-levels: PWM duty cycle values in a range from 0 to 255
43 which correspond to thermal cooling states.
44
45 - aspeed,fan-tach-ch : should specify the Fan tach input channel.
46 integer value in the range 0 through 15, with 0 indicating
47 Fan tach channel 0 and 15 indicating Fan tach channel 15.
48 At least one Fan tach input channel is required.
49
50 Examples:
51
52 pwm_tacho: pwmtachocontroller@1e786000 {
53 #address-cells = <1>;
54 #size-cells = <1>;
55 #cooling-cells = <2>;
56 reg = <0x1E786000 0x1000>;
57 compatible = "aspeed,ast2500-pwm-tacho";
58 clocks = <&syscon ASPEED_CLK_APB>;
59 resets = <&syscon ASPEED_RESET_PWM>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
62
63 fan@0 {
64 reg = <0x00>;
65 cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
66 aspeed,fan-tach-ch = /bits/ 8 <0x00>;
67 };
68
69 fan@1 {
70 reg = <0x01>;
71 aspeed,fan-tach-ch = /bits/ 8 <0x01 0x02>;
72 };
73 };
74

3. 한국어 전문 번역

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

ASPEED PWM/Tacho controller

1-28

ASPEED AST2400/AST2500 PWM controller는 최대 8개 PWM output을, Fan Tacho controller는 최대 16개 fan tachometer input을 지원합니다. 최대 8개 fan을 지원하며 fan마다 PWM output 하나와 fan tach input 하나 또는 둘을 사용할 수 있습니다.

Controller node의 `#address-cells`, `#size-cells`는 1이고 `#cooling-cells`는 2입니다. `reg`는 register set의 address와 length입니다. `pinctrl-names`에는 `default` state가 필요하고 `pinctrl-0`은 PWM port pin configuration을 참조합니다.

`compatible`은 AST2400에서 `aspeed,ast2400-pwm-tacho`, AST2500에서 `aspeed,ast2500-pwm-tacho`입니다. `clocks`는 두 번째 cell에 clock number를 둔 clock provider phandle이고 `resets`는 두 번째 cell에 reset number를 둔 reset controller phandle입니다.

ASPEED fan cooling 경로
Thermal zoneCooling state
cooling-levelsPWM duty cycle 0..255
PWM port A..HFan drive
Tach channel 0..15Fan speed feedback

Thermal cooling state가 PWM duty cycle을 선택하고 tach input이 fan speed를 측정합니다.

ASPEED fan child node

29-49

Fan subnode 아래에는 fan을 나타내는 child node를 최대 8개 둘 수 있습니다. Fan마다 PWM port 하나와 fan tach input 하나 또는 둘을 사용합니다. PWM port의 `cooling-levels`로 cooling device를 만들고 thermal control을 위해 thermal zone에 bind할 수 있습니다.

각 child의 필수 `reg`는 0~7의 PWM source port로 0은 port A, 7은 port H입니다. `cooling-levels`는 thermal cooling state에 대응하는 0~255 PWM duty cycle 값입니다. `aspeed,fan-tach-ch`는 0~15 fan tach input channel이며 적어도 하나가 필요합니다.

AST2500 PWM/Tacho 예제

50-73

예제 AST2500 controller는 APB clock과 PWM reset, 두 PWM pin configuration을 사용합니다. `fan@0`은 PWM0, tach0과 6단계 cooling level을, `fan@1`은 PWM1과 tach1/tach2 두 input을 사용합니다.

pwm_tacho: pwmtachocontroller@1e786000 {
        #address-cells = <1>;
        #size-cells = <1>;
        #cooling-cells = <2>;
        reg = <0x1E786000 0x1000>;
        compatible = "aspeed,ast2500-pwm-tacho";
        clocks = <&syscon ASPEED_CLK_APB>;
        resets = <&syscon ASPEED_RESET_PWM>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;

        fan@0 {
                reg = <0x00>;
                cooling-levels = /bits/ 8 <125 151 177 203 229 255>;
                aspeed,fan-tach-ch = /bits/ 8 <0x00>;
        };

        fan@1 {
                reg = <0x01>;
                aspeed,fan-tach-ch = /bits/ 8 <0x01 0x02>;
        };
};