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

Linux 6.18.37 · LEDs

MediaTek MT6370 RGB LED

MT6370의 RGB·indicator current와 6-stage hardware breath timing입니다.

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

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

1. 요약·해설

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

요약·해설

leds-mt6370-rgb.rst:1-64

MT6370은 실제 brightness와 breath timing을 서로 다른 sysfs attribute로 분리합니다.

Dummy brightness code 0을 포함한 여섯 timing pair의 순서와 범위를 파형 기준으로 정리했습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =========================================
4 The device for Mediatek MT6370 RGB LED
5 =========================================
6
7 Description
8 -----------
9
10 The MT6370 integrates a four-channel RGB LED driver, designed to provide a
11 variety of lighting effect for mobile device applications. The RGB LED devices
12 includes a smart LED string controller and it can drive 3 channels of LEDs with
13 a sink current up to 24mA and a CHG_VIN power good indicator LED with sink
14 current up to 6mA. It provides three operation modes for RGB LEDs:
15 PWM Dimming mode, breath pattern mode, and constant current mode. The device
16 can increase or decrease the brightness of the RGB LED via an I2C interface.
17
18 The breath pattern for a channel can be programmed using the "pattern" trigger,
19 using the hw_pattern attribute.
20
21 /sys/class/leds/<led>/hw_pattern
22 --------------------------------
23
24 Specify a hardware breath pattern for a MT6370 RGB LED.
25
26 The breath pattern is a series of timing pairs, with the hold-time expressed in
27 milliseconds. And the brightness is controlled by
28 '/sys/class/leds/<led>/brightness'. The pattern doesn't include the brightness
29 setting. Hardware pattern only controls the timing for each pattern stage
30 depending on the current brightness setting.
31
32 Pattern diagram::
33
34 "0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code
35
36 ^
37 | ============
38 | / \ /
39 Icurr | / \ /
40 | / \ /
41 | / \ / .....repeat
42 | / \ /
43 | --- --- ---
44 |--- --- ---
45 +----------------------------------============------------> Time
46 < Tr1><Tr2>< Ton ><Tf1><Tf2 >< Toff >< Tr1><Tr2>
47
48 Timing description:
49
50 * Tr1: First rising time for 0% - 30% load.
51 * Tr2: Second rising time for 31% - 100% load.
52 * Ton: On time for 100% load.
53 * Tf1: First falling time for 100% - 31% load.
54 * Tf2: Second falling time for 30% to 0% load.
55 * Toff: Off time for 0% load.
56
57 * Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step.
58 * Toff: 250ms to 6250ms, 400ms per step.
59
60 Pattern example::
61
62 "0 125 0 125 0 125 0 125 0 625 0 1050"
63
64 This Will configure Tr1/Tr2/Tf1/Tf2 to 125m, Ton to 625ms, and Toff to 1050ms.
65

3. 한국어 전문 번역

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

MT6370 RGB LED 개요

1-18

MediaTek MT6370은 mobile device의 다양한 조명 효과를 위한 4-channel RGB LED driver를 통합합니다. Smart LED string controller는 최대 24mA sink current로 LED 세 채널을 구동하고, CHG_VIN power-good indicator LED는 최대 6mA를 sink합니다.

RGB LED는 PWM dimming, breath pattern, constant current의 세 동작 mode를 지원합니다. I2C interface를 통해 RGB LED brightness를 높이거나 낮출 수 있습니다.

각 채널의 breath pattern은 `pattern` trigger와 `hw_pattern` attribute로 program합니다.

MT6370 output과 mode
대상채널 수최대 sink current동작
RGB LED324mAPWM dimming·breath·constant current
CHG_VIN indicator16mAPower-good 표시

RGB 세 채널과 indicator 채널의 current 한계입니다.

.. SPDX-License-Identifier: GPL-2.0

=========================================
The device for Mediatek MT6370 RGB LED
=========================================

Description
-----------

The MT6370 integrates a four-channel RGB LED driver, designed to provide a
variety of lighting effect for mobile device applications. The RGB LED devices
includes a smart LED string controller and it can drive 3 channels of LEDs with
a sink current up to 24mA and a CHG_VIN power good indicator LED with sink
current up to 6mA. It provides three operation modes for RGB LEDs:
PWM Dimming mode, breath pattern mode, and constant current mode. The device
can increase or decrease the brightness of the RGB LED via an I2C interface.

The breath pattern for a channel can be programmed using the "pattern" trigger,

Hardware breath pattern 파형

19-48

`/sys/class/leds/<led>/hw_pattern`은 MT6370 RGB LED의 hardware breath timing을 지정합니다. Pattern은 brightness와 hold-time의 쌍이지만 여기서는 brightness code `0`을 dummy로 사용하며, 실제 brightness는 별도 `/sys/class/leds/<led>/brightness`가 결정합니다.

Hardware pattern은 현재 brightness 설정을 기준으로 각 stage의 시간만 제어합니다. 순서는 0~30% 상승 `Tr1`, 31~100% 상승 `Tr2`, 100% 유지 `Ton`, 100~31% 하강 `Tf1`, 30~0% 하강 `Tf2`, 0% 유지 `Toff`이며 이후 반복됩니다.

MT6370 breath cycle
`Tr1`: 0%에서 30%까지 상승`Tr2`: 31%에서 100%까지 상승`Ton`: 100% load 유지`Tf1`: 100%에서 31%까지 하강`Tf2`: 30%에서 0%까지 하강`Toff`: 0% load 유지 후 `Tr1`부터 반복

원문 ASCII 파형의 상승·유지·하강·꺼짐 cycle입니다.

using the hw_pattern attribute.

/sys/class/leds/<led>/hw_pattern
--------------------------------

Specify a hardware breath pattern for a MT6370 RGB LED.

The breath pattern is a series of timing pairs, with the hold-time expressed in
milliseconds. And the brightness is controlled by
'/sys/class/leds/<led>/brightness'. The pattern doesn't include the brightness
setting. Hardware pattern only controls the timing for each pattern stage
depending on the current brightness setting.

Pattern diagram::

         "0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code

          ^
          |           ============
          |          /            \                                /
    Icurr |         /              \                              /
          |        /                \                            /
          |       /                  \                          /   .....repeat
          |      /                    \                        /
          |   ---                      ---                  ---
          |---                            ---            ---
          +----------------------------------============------------> Time
          < Tr1><Tr2><   Ton    ><Tf1><Tf2 ><  Toff    >< Tr1><Tr2>

Timing description:

Timing 범위와 예제

49-64

`Tr1`, `Tr2`, `Tf1`, `Tf2`, `Ton`은 125~3125ms 범위이며 200ms step을 사용합니다. `Toff`는 250~6250ms 범위이며 400ms step을 사용합니다.

예제 `0 125 0 125 0 125 0 125 0 625 0 1050`은 `Tr1`, `Tr2`, `Tf1`, `Tf2`를 125ms, `Ton`을 625ms, `Toff`를 1050ms로 구성합니다.

MT6370 timing parameter
Stage의미범위·step
`Tr1`0~30% 상승125~3125ms, 200ms step
`Tr2`31~100% 상승125~3125ms, 200ms step
`Ton`100% 유지125~3125ms, 200ms step
`Tf1`100~31% 하강125~3125ms, 200ms step
`Tf2`30~0% 하강125~3125ms, 200ms step
`Toff`0% 유지250~6250ms, 400ms step

Brightness는 별도 attribute이며 pattern 값은 stage duration입니다.


  * Tr1:    First rising time for 0% - 30% load.
  * Tr2:    Second rising time for 31% - 100% load.
  * Ton:    On time for 100% load.
  * Tf1:    First falling time for 100% - 31% load.
  * Tf2:    Second falling time for 30% to 0% load.
  * Toff:   Off time for 0% load.

  * Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step.
  * Toff: 250ms to 6250ms, 400ms per step.

Pattern example::

       "0 125 0 125 0 125 0 125 0 625 0 1050"

This Will configure Tr1/Tr2/Tf1/Tf2 to 125m, Ton to 625ms, and Toff to 1050ms.