← Documents Documentation/leds/leds-mlxcpld.rst GitHub 원문 ↗

Linux 6.18.37 · LEDs

Mellanox CPLD System LED Driver

Mellanox system LED의 CPLD register nibble, 색상 mask, 3Hz·6Hz hardware blink 규칙입니다.

Source pathDocumentation/leds/leds-mlxcpld.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

leds-mlxcpld.rst:1-118

MLXCPLD driver는 한 CPLD register의 low·high nibble을 여러 status·fan·PSU LED가 나눠 쓰며, 4-bit mask가 색상과 blink 속도를 함께 표현합니다.

`msn2100`은 PSU 두 개와 blue UID LED가 추가되므로 별도 register map과 UID 전용 mask를 적용합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 =======================================
2 Kernel driver for Mellanox systems LEDs
3 =======================================
4
5 Provide system LED support for the nex Mellanox systems:
6 "msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
7 "msn2410", "msb7800", "msn2740", "msn2100".
8
9 Description
10 -----------
11 Driver provides the following LEDs for the systems "msx6710", "msx6720",
12 "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740":
13
14 - mlxcpld:fan1:green
15 - mlxcpld:fan1:red
16 - mlxcpld:fan2:green
17 - mlxcpld:fan2:red
18 - mlxcpld:fan3:green
19 - mlxcpld:fan3:red
20 - mlxcpld:fan4:green
21 - mlxcpld:fan4:red
22 - mlxcpld:psu:green
23 - mlxcpld:psu:red
24 - mlxcpld:status:green
25 - mlxcpld:status:red
26
27 "status"
28 - CPLD reg offset: 0x20
29 - Bits [3:0]
30
31 "psu"
32 - CPLD reg offset: 0x20
33 - Bits [7:4]
34
35 "fan1"
36 - CPLD reg offset: 0x21
37 - Bits [3:0]
38
39 "fan2"
40 - CPLD reg offset: 0x21
41 - Bits [7:4]
42
43 "fan3"
44 - CPLD reg offset: 0x22
45 - Bits [3:0]
46
47 "fan4"
48 - CPLD reg offset: 0x22
49 - Bits [7:4]
50
51 Color mask for all the above LEDs:
52
53 [bit3,bit2,bit1,bit0] or
54 [bit7,bit6,bit5,bit4]:
55
56 - [0,0,0,0] = LED OFF
57 - [0,1,0,1] = Red static ON
58 - [1,1,0,1] = Green static ON
59 - [0,1,1,0] = Red blink 3Hz
60 - [1,1,1,0] = Green blink 3Hz
61 - [0,1,1,1] = Red blink 6Hz
62 - [1,1,1,1] = Green blink 6Hz
63
64 Driver provides the following LEDs for the system "msn2100":
65
66 - mlxcpld:fan:green
67 - mlxcpld:fan:red
68 - mlxcpld:psu1:green
69 - mlxcpld:psu1:red
70 - mlxcpld:psu2:green
71 - mlxcpld:psu2:red
72 - mlxcpld:status:green
73 - mlxcpld:status:red
74 - mlxcpld:uid:blue
75
76 "status"
77 - CPLD reg offset: 0x20
78 - Bits [3:0]
79
80 "fan"
81 - CPLD reg offset: 0x21
82 - Bits [3:0]
83
84 "psu1"
85 - CPLD reg offset: 0x23
86 - Bits [3:0]
87
88 "psu2"
89 - CPLD reg offset: 0x23
90 - Bits [7:4]
91
92 "uid"
93 - CPLD reg offset: 0x24
94 - Bits [3:0]
95
96 Color mask for all the above LEDs, excepted uid:
97
98 [bit3,bit2,bit1,bit0] or
99 [bit7,bit6,bit5,bit4]:
100
101 - [0,0,0,0] = LED OFF
102 - [0,1,0,1] = Red static ON
103 - [1,1,0,1] = Green static ON
104 - [0,1,1,0] = Red blink 3Hz
105 - [1,1,1,0] = Green blink 3Hz
106 - [0,1,1,1] = Red blink 6Hz
107 - [1,1,1,1] = Green blink 6Hz
108
109 Color mask for uid LED:
110 [bit3,bit2,bit1,bit0]:
111
112 - [0,0,0,0] = LED OFF
113 - [1,1,0,1] = Blue static ON
114 - [1,1,1,0] = Blue blink 3Hz
115 - [1,1,1,1] = Blue blink 6Hz
116
117 Driver supports HW blinking at 3Hz and 6Hz frequency (50% duty cycle).
118 For 3Hz duty cycle is about 167 msec, for 6Hz is about 83 msec.
119

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 위치에 적용합니다.

기본 Mellanox 시스템 CPLD mapping
LED groupCPLD offsetBits
status`0x20``[3:0]`
psu`0x20``[7:4]`
fan1`0x21``[3:0]`
fan2`0x21``[7:4]`
fan3`0x22``[3:0]`
fan4`0x22``[7:4]`

한 register의 low nibble과 high nibble이 서로 다른 LED group을 제어합니다.

Red·green 공통 color mask
Mask색상동작
`0000`-LED off
`0101`RedStatic on
`1101`GreenStatic on
`0110`Red3Hz blink
`1110`Green3Hz blink
`0111`Red6Hz blink
`1111`Green6Hz blink

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입니다.

msn2100 CPLD mapping
LED groupCPLD offsetBits색상
status`0x20``[3:0]`Green·red
fan`0x21``[3:0]`Green·red
psu1`0x23``[3:0]`Green·red
psu2`0x23``[7:4]`Green·red
uid`0x24``[3:0]`Blue

PSU 두 개는 offset `0x23`의 두 nibble을 나눠 사용합니다.

UID blue mask
Mask동작
`0000`LED off
`1101`Blue static on
`1110`Blue 3Hz blink
`1111`Blue 6Hz blink

UID LED는 blue 단색에 off, static, 두 blink 속도만 사용합니다.

Hardware blink timing
주파수Duty cycleOn 구간Off 구간
3Hz50%약 167ms약 167ms
6Hz50%약 83ms약 83ms

두 주파수 모두 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.