← Documents Documentation/devicetree/bindings/leds/leds-lm3532.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

TI LM3532 Ambient-light LED Driver

LM3532의 세 current sink, 이중 ALS와 두 control bank 바인딩입니다.

Source pathDocumentation/devicetree/bindings/leds/leds-lm3532.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

leds-lm3532.txt:1-105

Ramp, ALS mode, full-scale current와 예제를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Texas Instruments - lm3532 White LED driver with ambient light sensing
2 capability.
3
4 The LM3532 provides the 3 high-voltage, low-side current sinks. The device is
5 programmable over an I2C-compatible interface and has independent
6 current control for all three channels. The adaptive current regulation
7 method allows for different LED currents in each current sink thus allowing
8 for a wide variety of backlight and keypad applications.
9
10 The main features of the LM3532 include dual ambient light sensor inputs
11 each with 32 internal voltage setting resistors, 8-bit logarithmic and linear
12 brightness control, dual external PWM brightness control inputs, and up to
13 1000:1 dimming ratio with programmable fade in and fade out settings.
14
15 Required properties:
16 - compatible : "ti,lm3532"
17 - reg : I2C slave address
18 - #address-cells : 1
19 - #size-cells : 0
20
21 Optional properties:
22 - enable-gpios : gpio pin to enable (active high)/disable the device.
23 - ramp-up-us - The Run time ramp rates/step are from one current
24 set-point to another after the device has reached its
25 initial target set point from turn-on
26 - ramp-down-us - The Run time ramp rates/step are from one current
27 set-point to another after the device has reached its
28 initial target set point from turn-on
29 Range for ramp settings: 8us - 65536us
30
31 Optional properties if ALS mode is used:
32 - ti,als-vmin - Minimum ALS voltage defined in Volts
33 - ti,als-vmax - Maximum ALS voltage defined in Volts
34 Per the data sheet the max ALS voltage is 2V and the min is 0V
35
36 - ti,als1-imp-sel - ALS1 impedance resistor selection in Ohms
37 - ti,als2-imp-sel - ALS2 impedance resistor selection in Ohms
38 Range for impedance select: 37000 Ohms - 1190 Ohms
39 Values above 37kohms will be set to the "High Impedance" setting
40
41 - ti,als-avrg-time-us - Determines the length of time the device needs to
42 average the two ALS inputs. This is only used if
43 the input mode is LM3532_ALS_INPUT_AVRG.
44 Range: 17920us - 2293760us
45 - ti,als-input-mode - Determines how the device uses the attached ALS
46 devices.
47 0x00 - ALS1 and ALS2 input average
48 0x01 - ALS1 Input
49 0x02 - ALS2 Input
50 0x03 - Max of ALS1 and ALS2
51
52 Required child properties:
53 - reg : Indicates control bank the LED string is controlled by
54 - led-sources : see Documentation/devicetree/bindings/leds/common.txt
55 - ti,led-mode : Defines if the LED strings are manually controlled or
56 if the LED strings are controlled by the ALS.
57 0x00 - LED strings are I2C controlled via full scale
58 brightness control register
59 0x01 - LED strings are ALS controlled
60
61 Optional LED child properties:
62 - label : see Documentation/devicetree/bindings/leds/common.txt
63 - linux,default-trigger :
64 see Documentation/devicetree/bindings/leds/common.txt
65 - led-max-microamp : Defines the full scale current value for each control
66 bank. The range is from 5000uA-29800uA in increments
67 of 800uA.
68
69 Example:
70 led-controller@38 {
71 compatible = "ti,lm3532";
72 #address-cells = <1>;
73 #size-cells = <0>;
74 reg = <0x38>;
75
76 enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
77 ramp-up-us = <1024>;
78 ramp-down-us = <65536>;
79
80 ti,als-vmin = <0>;
81 ti,als-vmax = <2000>;
82 ti,als1-imp-sel = <4110>;
83 ti,als2-imp-sel = <2180>;
84 ti,als-avrg-time-us = <17920>;
85 ti,als-input-mode = <0x00>;
86
87 led@0 {
88 reg = <0>;
89 led-sources = <2>;
90 ti,led-mode = <1>;
91 led-max-microamp = <21800>;
92 label = ":backlight";
93 linux,default-trigger = "backlight";
94 };
95
96 led@1 {
97 reg = <1>;
98 led-sources = <1>;
99 ti,led-mode = <0>;
100 label = ":kbd_backlight";
101 };
102 };
103
104 For more product information please see the links below:
105 https://www.ti.com/product/LM3532
106

3. 한국어 전문 번역

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

LM3532 core와 ramp 속성

1-30

TI LM3532는 ambient light sensing 기능을 갖춘 white LED driver입니다. 세 개의 high-voltage low-side current sink를 제공하고 I2C 호환 interface로 프로그래밍하며 세 channel의 전류를 독립 제어합니다. Adaptive current regulation으로 sink마다 다른 LED 전류를 사용할 수 있어 백라이트와 키패드에 폭넓게 적용할 수 있습니다.

주요 기능은 각각 내부 voltage-setting resistor 32개를 가진 두 ALS 입력, 8-bit logarithmic 및 linear 밝기 제어, 외부 PWM 밝기 입력 두 개, programmable fade-in/fade-out을 포함한 최대 1000:1 dimming ratio입니다.

필수 `compatible`은 `ti,lm3532`, `reg`는 I2C slave 주소이며 `#address-cells`는 1, `#size-cells`는 0입니다. 선택 `enable-gpios`는 active-high enable 및 disable 핀입니다. `ramp-up-us`와 `ramp-down-us`는 turn-on 후 초기 목표 set point에 도달한 뒤 한 current set-point에서 다른 값으로 이동하는 run-time ramp rate/step이며 범위는 8~65536us입니다.

LM3532 주요 기능
기능범위
Current sinks3개, 독립 전류
Brightness8-bit logarithmic/linear
PWM inputs2개
Dimming ratio최대 1000:1
Ramp8~65536us

세 LED bank와 두 ALS 입력을 중심으로 기능을 정리합니다.

LM3532 ALS mode

31-51

ALS mode에서 선택 `ti,als-vmin`과 `ti,als-vmax`는 volt 단위 최소·최대 ALS 전압입니다. Datasheet 범위는 최소 0V, 최대 2V입니다. `ti,als1-imp-sel`과 `ti,als2-imp-sel`은 ohm 단위 ALS1·ALS2 impedance resistor 선택이며 범위는 1190~37000 Ohm입니다. 37kOhm보다 큰 값은 `High Impedance` 설정이 됩니다.

`ti,als-avrg-time-us`는 두 ALS 입력을 평균하는 시간이고 `LM3532_ALS_INPUT_AVRG` mode에서만 사용하며 범위는 17920~2293760us입니다. `ti,als-input-mode`의 `0x00`은 ALS1·ALS2 평균, `0x01`은 ALS1, `0x02`는 ALS2, `0x03`은 두 입력 중 최댓값을 사용합니다.

LM3532 LED control bank

52-68

필수 child `reg`는 LED string을 제어하는 control bank를 나타내고 `led-sources`는 공통 LED 바인딩을 따릅니다. `ti,led-mode`의 `0x00`은 full-scale brightness control register를 통한 I2C 수동 제어, `0x01`은 ALS 제어입니다.

선택 `label`과 `linux,default-trigger`는 공통 LED 바인딩을 따릅니다. `led-max-microamp`는 control bank별 full-scale current이며 5000~29800uA 범위를 800uA 단위로 설정합니다.

LM3532 ALS와 두 bank 예제

69-105

예제는 주소 `0x38`에서 active-high enable, ramp-up 1024us, ramp-down 65536us를 사용합니다. ALS 범위는 0~2000mV이고 impedance는 4110 및 2180 Ohm, 평균 시간은 17920us이며 두 ALS 입력 평균 mode를 선택합니다.

Bank 0은 source 2를 ALS mode로 제어하고 full-scale current 21800uA와 backlight trigger를 사용합니다. Bank 1은 source 1을 I2C 수동 mode로 제어하여 keyboard backlight로 표시합니다.

led-controller@38 {
        compatible = "ti,lm3532";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x38>;

        enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
        ramp-up-us = <1024>;
        ramp-down-us = <65536>;

        ti,als-vmin = <0>;
        ti,als-vmax = <2000>;
        ti,als1-imp-sel = <4110>;
        ti,als2-imp-sel = <2180>;
        ti,als-avrg-time-us = <17920>;
        ti,als-input-mode = <0x00>;

        led@0 {
                reg = <0>;
                led-sources = <2>;
                ti,led-mode = <1>;
                led-max-microamp = <21800>;
                label = ":backlight";
                linux,default-trigger = "backlight";
        };

        led@1 {
                reg = <1>;
                led-sources = <1>;
                ti,led-mode = <0>;
                label = ":kbd_backlight";
        };
};