요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
ASPEED AST2400/AST2500 PWM and Fan Tacho controller device driver
The ASPEED PWM controller can support upto 8 PWM outputs. The ASPEED Fan Tacho
controller can support upto 16 Fan tachometer inputs.
There can be upto 8 fans supported. Each fan can have one PWM output and
one/two Fan tach inputs.
Required properties for pwm-tacho node:
- #address-cells : should be 1.
- #size-cells : should be 1.
- #cooling-cells: should be 2.
- reg : address and length of the register set for the device.
- pinctrl-names : a pinctrl state named "default" must be defined.
- pinctrl-0 : phandle referencing pin configuration of the PWM ports.
- compatible : should be "aspeed,ast2400-pwm-tacho" for AST2400 and
"aspeed,ast2500-pwm-tacho" for AST2500.
- clocks : phandle to clock provider with the clock number in the second cell
- resets : phandle to reset controller with the reset number in the second cell
fan subnode format:
===================
Under fan subnode there can upto 8 child nodes, with each child node
representing a fan. If there are 8 fans each fan can have one PWM port and
one/two Fan tach inputs.
For PWM port can be configured cooling-levels to create cooling device.
Cooling device could be bound to a thermal zone for the thermal control.
Required properties for each child node:
- reg : should specify PWM source port.
integer value in the range 0 to 7 with 0 indicating PWM port A and
7 indicating PWM port H.
- cooling-levels: PWM duty cycle values in a range from 0 to 255
which correspond to thermal cooling states.
- aspeed,fan-tach-ch : should specify the Fan tach input channel.
integer value in the range 0 through 15, with 0 indicating
Fan tach channel 0 and 15 indicating Fan tach channel 15.
At least one Fan tach input channel is required.
Examples:
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>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ASPEED PWM/Tacho controller
1-28ASPEED 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입니다.
Thermal cooling state가 PWM duty cycle을 선택하고 tach input이 fan speed를 측정합니다.
ASPEED fan child node
29-49Fan 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>;
};
};
요약과 해설
aspeed-pwm-tacho.txt:1-73Fan child의 PWM/tach channel과 cooling level을 설명합니다.