요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=======================================
Kernel driver for Mellanox systems LEDs
=======================================
Provide system LED support for the nex Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
"msn2410", "msb7800", "msn2740", "msn2100".
Description
-----------
Driver provides the following LEDs for the systems "msx6710", "msx6720",
"msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740":
- mlxcpld:fan1:green
- mlxcpld:fan1:red
- mlxcpld:fan2:green
- mlxcpld:fan2:red
- mlxcpld:fan3:green
- mlxcpld:fan3:red
- mlxcpld:fan4:green
- mlxcpld:fan4:red
- mlxcpld:psu:green
- mlxcpld:psu:red
- mlxcpld:status:green
- mlxcpld:status:red
"status"
- CPLD reg offset: 0x20
- Bits [3:0]
"psu"
- CPLD reg offset: 0x20
- Bits [7:4]
"fan1"
- CPLD reg offset: 0x21
- Bits [3:0]
"fan2"
- CPLD reg offset: 0x21
- Bits [7:4]
"fan3"
- CPLD reg offset: 0x22
- Bits [3:0]
"fan4"
- CPLD reg offset: 0x22
- Bits [7:4]
Color mask for all the above LEDs:
[bit3,bit2,bit1,bit0] or
[bit7,bit6,bit5,bit4]:
- [0,0,0,0] = LED OFF
- [0,1,0,1] = Red static ON
- [1,1,0,1] = Green static ON
- [0,1,1,0] = Red blink 3Hz
- [1,1,1,0] = Green blink 3Hz
- [0,1,1,1] = Red blink 6Hz
- [1,1,1,1] = Green blink 6Hz
Driver provides the following LEDs for the system "msn2100":
- mlxcpld:fan:green
- mlxcpld:fan:red
- mlxcpld:psu1:green
- mlxcpld:psu1:red
- mlxcpld:psu2:green
- mlxcpld:psu2:red
- mlxcpld:status:green
- mlxcpld:status:red
- mlxcpld:uid:blue
"status"
- CPLD reg offset: 0x20
- Bits [3:0]
"fan"
- CPLD reg offset: 0x21
- Bits [3:0]
"psu1"
- CPLD reg offset: 0x23
- Bits [3:0]
"psu2"
- CPLD reg offset: 0x23
- Bits [7:4]
"uid"
- CPLD reg offset: 0x24
- Bits [3:0]
Color mask for all the above LEDs, excepted uid:
[bit3,bit2,bit1,bit0] or
[bit7,bit6,bit5,bit4]:
- [0,0,0,0] = LED OFF
- [0,1,0,1] = Red static ON
- [1,1,0,1] = Green static ON
- [0,1,1,0] = Red blink 3Hz
- [1,1,1,0] = Green blink 3Hz
- [0,1,1,1] = Red blink 6Hz
- [1,1,1,1] = Green blink 6Hz
Color mask for uid LED:
[bit3,bit2,bit1,bit0]:
- [0,0,0,0] = LED OFF
- [1,1,0,1] = Blue static ON
- [1,1,1,0] = Blue blink 3Hz
- [1,1,1,1] = Blue blink 6Hz
Driver supports HW blinking at 3Hz and 6Hz frequency (50% duty cycle).
For 3Hz duty cycle is about 167 msec, for 6Hz is about 83 msec.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Mellanox 기본 시스템의 LED register map
1-63이 driver는 Mellanox 시스템 `msx6710`, `msx6720`, `msb7700`, `msn2700`, `msx1410`, `msn2410`, `msb7800`, `msn2740`, `msn2100`의 system LED를 지원합니다.
`msn2100`을 제외한 앞선 시스템에는 fan1~fan4, PSU, status별 green·red LED가 있습니다. Status와 PSU는 CPLD offset `0x20`의 low·high nibble, fan1·fan2는 `0x21`, fan3·fan4는 `0x22`의 low·high nibble을 각각 사용합니다.
각 nibble의 color mask는 `0000` off, `0101` red static, `1101` green static, `0110` red 3Hz blink, `1110` green 3Hz blink, `0111` red 6Hz blink, `1111` green 6Hz blink입니다. High nibble에도 같은 4-bit pattern을 bit 7~4 위치에 적용합니다.
한 register의 low nibble과 high nibble이 서로 다른 LED group을 제어합니다.
Low 또는 high nibble에 같은 4-bit 의미를 적용합니다.
=======================================
Kernel driver for Mellanox systems LEDs
=======================================
Provide system LED support for the nex Mellanox systems:
"msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
"msn2410", "msb7800", "msn2740", "msn2100".
Description
-----------
Driver provides the following LEDs for the systems "msx6710", "msx6720",
"msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740":
- mlxcpld:fan1:green
- mlxcpld:fan1:red
- mlxcpld:fan2:green
- mlxcpld:fan2:red
- mlxcpld:fan3:green
- mlxcpld:fan3:red
- mlxcpld:fan4:green
- mlxcpld:fan4:red
- mlxcpld:psu:green
- mlxcpld:psu:red
- mlxcpld:status:green
- mlxcpld:status:red
"status"
- CPLD reg offset: 0x20
- Bits [3:0]
"psu"
- CPLD reg offset: 0x20
- Bits [7:4]
"fan1"
- CPLD reg offset: 0x21
- Bits [3:0]
"fan2"
- CPLD reg offset: 0x21
- Bits [7:4]
"fan3"
- CPLD reg offset: 0x22
- Bits [3:0]
"fan4"
- CPLD reg offset: 0x22
- Bits [7:4]
Color mask for all the above LEDs:
[bit3,bit2,bit1,bit0] or
[bit7,bit6,bit5,bit4]:
- [0,0,0,0] = LED OFF
- [0,1,0,1] = Red static ON
- [1,1,0,1] = Green static ON
- [0,1,1,0] = Red blink 3Hz
- [1,1,1,0] = Green blink 3Hz
- [0,1,1,1] = Red blink 6Hz
- [1,1,1,1] = Green blink 6Hz
msn2100 register map, UID, hardware blink
64-118`msn2100`은 fan 하나, PSU 두 개, status의 green·red LED와 UID blue LED를 제공합니다. Status는 `0x20[3:0]`, fan은 `0x21[3:0]`, PSU1은 `0x23[3:0]`, PSU2는 `0x23[7:4]`, UID는 `0x24[3:0]`을 사용합니다.
UID를 제외한 LED는 앞 절과 같은 red·green mask를 사용합니다. UID blue LED는 `0000` off, `1101` static on, `1110` 3Hz blink, `1111` 6Hz blink만 정의합니다.
Driver는 duty cycle 50%의 3Hz와 6Hz hardware blinking을 지원합니다. 각 주기의 on 또는 off 구간은 3Hz에서 약 167ms, 6Hz에서 약 83ms입니다.
PSU 두 개는 offset `0x23`의 두 nibble을 나눠 사용합니다.
UID LED는 blue 단색에 off, static, 두 blink 속도만 사용합니다.
두 주파수 모두 50% duty cycle입니다.
Driver provides the following LEDs for the system "msn2100":
- mlxcpld:fan:green
- mlxcpld:fan:red
- mlxcpld:psu1:green
- mlxcpld:psu1:red
- mlxcpld:psu2:green
- mlxcpld:psu2:red
- mlxcpld:status:green
- mlxcpld:status:red
- mlxcpld:uid:blue
"status"
- CPLD reg offset: 0x20
- Bits [3:0]
"fan"
- CPLD reg offset: 0x21
- Bits [3:0]
"psu1"
- CPLD reg offset: 0x23
- Bits [3:0]
"psu2"
- CPLD reg offset: 0x23
- Bits [7:4]
"uid"
- CPLD reg offset: 0x24
- Bits [3:0]
Color mask for all the above LEDs, excepted uid:
[bit3,bit2,bit1,bit0] or
[bit7,bit6,bit5,bit4]:
- [0,0,0,0] = LED OFF
- [0,1,0,1] = Red static ON
- [1,1,0,1] = Green static ON
- [0,1,1,0] = Red blink 3Hz
- [1,1,1,0] = Green blink 3Hz
- [0,1,1,1] = Red blink 6Hz
- [1,1,1,1] = Green blink 6Hz
Color mask for uid LED:
[bit3,bit2,bit1,bit0]:
- [0,0,0,0] = LED OFF
- [1,1,0,1] = Blue static ON
- [1,1,1,0] = Blue blink 3Hz
- [1,1,1,1] = Blue blink 6Hz
Driver supports HW blinking at 3Hz and 6Hz frequency (50% duty cycle).
For 3Hz duty cycle is about 167 msec, for 6Hz is about 83 msec.
요약·해설
leds-mlxcpld.rst:1-118MLXCPLD driver는 한 CPLD register의 low·high nibble을 여러 status·fan·PSU LED가 나눠 쓰며, 4-bit mask가 색상과 blink 속도를 함께 표현합니다.
`msn2100`은 PSU 두 개와 blue UID LED가 추가되므로 별도 register map과 UID 전용 mask를 적용합니다.