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

Linux 6.18.37 · Devicetree Bindings

Broadcom BCM6358 LED Controller

BCM6358/BCM6368 serial LED controller와 pin 하위 node 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

leds-bcm6358.txt:1-143

Clock polarity와 두 SoC의 LED 배치 예제를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 LEDs connected to Broadcom BCM6358 controller
2
3 This controller is present on BCM6358 and BCM6368.
4 In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
5 which can either be controlled by software (exporting the 74x164 as spi-gpio.
6 See Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or
7 by hardware using this driver.
8
9 Required properties:
10 - compatible : should be "brcm,bcm6358-leds".
11 - #address-cells : must be 1.
12 - #size-cells : must be 0.
13 - reg : BCM6358 LED controller address and size.
14
15 Optional properties:
16 - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
17 Default : 1
18 - brcm,clk-dat-low : Boolean, makes clock and data signals active low.
19 Default : false
20
21 Each LED is represented as a sub-node of the brcm,bcm6358-leds device.
22
23 LED sub-node required properties:
24 - reg : LED pin number (only LEDs 0 to 31 are valid).
25
26 LED sub-node optional properties:
27 - label : see Documentation/devicetree/bindings/leds/common.txt
28 - default-state : see
29 Documentation/devicetree/bindings/leds/common.txt
30 - linux,default-trigger : see
31 Documentation/devicetree/bindings/leds/common.txt
32
33 Examples:
34 Scenario 1 : BCM6358
35 leds0: led-controller@fffe00d0 {
36 compatible = "brcm,bcm6358-leds";
37 #address-cells = <1>;
38 #size-cells = <0>;
39 reg = <0xfffe00d0 0x8>;
40
41 alarm_white {
42 reg = <0>;
43 active-low;
44 label = "white:alarm";
45 };
46 tv_white {
47 reg = <2>;
48 active-low;
49 label = "white:tv";
50 };
51 tel_white {
52 reg = <3>;
53 active-low;
54 label = "white:tel";
55 };
56 adsl_white {
57 reg = <4>;
58 active-low;
59 label = "white:adsl";
60 };
61 };
62
63 Scenario 2 : BCM6368
64 leds0: led-controller@100000d0 {
65 compatible = "brcm,bcm6358-leds";
66 #address-cells = <1>;
67 #size-cells = <0>;
68 reg = <0x100000d0 0x8>;
69 brcm,pol-low;
70 brcm,clk-div = <4>;
71
72 power_red {
73 reg = <0>;
74 active-low;
75 label = "red:power";
76 };
77 power_green {
78 reg = <1>;
79 active-low;
80 label = "green:power";
81 default-state = "on";
82 };
83 power_blue {
84 reg = <2>;
85 label = "blue:power";
86 };
87 broadband_red {
88 reg = <3>;
89 active-low;
90 label = "red:broadband";
91 };
92 broadband_green {
93 reg = <4>;
94 label = "green:broadband";
95 };
96 broadband_blue {
97 reg = <5>;
98 active-low;
99 label = "blue:broadband";
100 };
101 wireless_red {
102 reg = <6>;
103 active-low;
104 label = "red:wireless";
105 };
106 wireless_green {
107 reg = <7>;
108 active-low;
109 label = "green:wireless";
110 };
111 wireless_blue {
112 reg = <8>;
113 label = "blue:wireless";
114 };
115 phone_red {
116 reg = <9>;
117 active-low;
118 label = "red:phone";
119 };
120 phone_green {
121 reg = <10>;
122 active-low;
123 label = "green:phone";
124 };
125 phone_blue {
126 reg = <11>;
127 label = "blue:phone";
128 };
129 upgrading_red {
130 reg = <12>;
131 active-low;
132 label = "red:upgrading";
133 };
134 upgrading_green {
135 reg = <13>;
136 active-low;
137 label = "green:upgrading";
138 };
139 upgrading_blue {
140 reg = <14>;
141 label = "blue:upgrading";
142 };
143 };
144

3. 한국어 전문 번역

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

BCM6358/BCM6368 LED 컨트롤러

1-32

이 컨트롤러는 BCM6358과 BCM6368에 있습니다. 이 SoC의 serial LED는 74x164 controller에 연결되며, 74x164를 `spi-gpio`로 노출해 software로 제어하거나 이 driver를 사용해 hardware로 제어할 수 있습니다. GPIO 방식은 `Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml`을 참조합니다.

필수 `compatible`은 `brcm,bcm6358-leds`, `#address-cells`는 1, `#size-cells`는 0입니다. `reg`는 BCM6358 LED controller 주소와 크기입니다.

선택 `brcm,clk-div`는 SCK signal divider이며 1, 2, 4, 8 중 하나이고 기본값은 1입니다. 불리언 `brcm,clk-dat-low`는 clock과 data signal을 active-low로 만들며 기본값은 false입니다.

각 LED는 controller의 하위 node로 표현합니다. 필수 `reg`는 LED pin 번호이며 0~31만 유효합니다. 선택 `label`, `default-state`, `linux,default-trigger`는 `Documentation/devicetree/bindings/leds/common.txt`를 따릅니다.

BCM6358 LED controller 범위
항목
SoCBCM6358, BCM6368
clk-div1/2/4/8, 기본 1
clk-dat-lowClock/data active-low
LED regPin 0~31

Controller clock과 LED 하위 node 제약을 정리합니다.

BCM6358 예제

33-62

첫 번째 시나리오는 `0xfffe00d0`의 0x8-byte controller에서 LED pin 0, 2, 3, 4를 각각 alarm, TV, telephone, ADSL 흰색 표시등으로 정의하고 모두 active-low로 설정합니다.

leds0: led-controller@fffe00d0 {
        compatible = "brcm,bcm6358-leds";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0xfffe00d0 0x8>;

        alarm_white {
                reg = <0>;
                active-low;
                label = "white:alarm";
        };
        tv_white {
                reg = <2>;
                active-low;
                label = "white:tv";
        };
        tel_white {
                reg = <3>;
                active-low;
                label = "white:tel";
        };
        adsl_white {
                reg = <4>;
                active-low;
                label = "white:adsl";
        };
};

BCM6368 예제

63-143

두 번째 시나리오는 `0x100000d0`의 controller에서 clock divider 4를 사용하고 pin 0~14를 power, broadband, wireless, phone, upgrading의 red/green/blue LED로 배치합니다. `power_green`은 기본 상태가 `on`입니다.

이 예제에는 원문 그대로 `brcm,pol-low`가 나오지만 앞의 선택 속성 목록에는 `brcm,clk-dat-low`가 정의되어 있습니다. 번역 페이지는 두 symbol을 수정하지 않고 각각의 원문 위치에 보존합니다.

leds0: led-controller@100000d0 {
        compatible = "brcm,bcm6358-leds";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x100000d0 0x8>;
        brcm,pol-low;
        brcm,clk-div = <4>;

        power_red {
                reg = <0>;
                active-low;
                label = "red:power";
        };
        power_green {
                reg = <1>;
                active-low;
                label = "green:power";
                default-state = "on";
        };
        power_blue {
                reg = <2>;
                label = "blue:power";
        };
        broadband_red {
                reg = <3>;
                active-low;
                label = "red:broadband";
        };
        broadband_green {
                reg = <4>;
                label = "green:broadband";
        };
        broadband_blue {
                reg = <5>;
                active-low;
                label = "blue:broadband";
        };
        wireless_red {
                reg = <6>;
                active-low;
                label = "red:wireless";
        };
        wireless_green {
                reg = <7>;
                active-low;
                label = "green:wireless";
        };
        wireless_blue {
                reg = <8>;
                label = "blue:wireless";
        };
        phone_red {
                reg = <9>;
                active-low;
                label = "red:phone";
        };
        phone_green {
                reg = <10>;
                active-low;
                label = "green:phone";
        };
        phone_blue {
                reg = <11>;
                label = "blue:phone";
        };
        upgrading_red {
                reg = <12>;
                active-low;
                label = "red:upgrading";
        };
        upgrading_green {
                reg = <13>;
                active-low;
                label = "green:upgrading";
        };
        upgrading_blue {
                reg = <14>;
                label = "blue:upgrading";
        };
};