요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Toshiba TC3589x multi-purpose expander
The Toshiba TC3589x series are I2C-based MFD devices which may expose the
following built-in devices: gpio, keypad, rotator (vibrator), PWM (for
e.g. LEDs or vibrators) The included models are:
- TC35890
- TC35892
- TC35893
- TC35894
- TC35895
- TC35896
Required properties:
- compatible : must be "toshiba,tc35890", "toshiba,tc35892", "toshiba,tc35893",
"toshiba,tc35894", "toshiba,tc35895" or "toshiba,tc35896"
- reg : I2C address of the device
- interrupts : the interrupt on the parent the controller is connected to
- interrupt-controller : marks the device node as an interrupt controller
- #interrupt-cells : should be <1>, the first cell is the IRQ offset on this
TC3589x interrupt controller.
Optional nodes:
- GPIO
This GPIO module inside the TC3589x has 24 (TC35890, TC35892) or 20
(other models) GPIO lines.
- compatible : must be "toshiba,tc3589x-gpio"
- interrupts : interrupt on the parent, which must be the tc3589x MFD device
- interrupt-controller : marks the device node as an interrupt controller
- #interrupt-cells : should be <2>, the first cell is the IRQ offset on this
TC3589x GPIO interrupt controller, the second cell is the interrupt flags
in accordance with <dt-bindings/interrupt-controller/irq.h>. The following
flags are valid:
- IRQ_TYPE_LEVEL_LOW
- IRQ_TYPE_LEVEL_HIGH
- IRQ_TYPE_EDGE_RISING
- IRQ_TYPE_EDGE_FALLING
- IRQ_TYPE_EDGE_BOTH
- gpio-controller : marks the device node as a GPIO controller
- #gpio-cells : should be <2>, the first cell is the GPIO offset on this
GPIO controller, the second cell is the flags.
- Keypad
This keypad is the same on all variants, supporting up to 96 different
keys. The linux-specific properties are modeled on those already existing
in other input drivers.
- compatible : must be "toshiba,tc3589x-keypad"
- debounce-delay-ms : debounce interval in milliseconds
- keypad,num-rows : number of rows in the matrix, see
bindings/input/matrix-keymap.txt
- keypad,num-columns : number of columns in the matrix, see
bindings/input/matrix-keymap.txt
- linux,keymap: the definition can be found in
bindings/input/matrix-keymap.txt
- linux,no-autorepeat: do no enable autorepeat feature.
- wakeup-source: use any event on keypad as wakeup event.
(Legacy property supported: "linux,wakeup")
Example:
tc35893@44 {
compatible = "toshiba,tc35893";
reg = <0x44>;
interrupt-parent = <&gpio6>;
interrupts = <26 IRQ_TYPE_EDGE_RISING>;
interrupt-controller;
#interrupt-cells = <1>;
tc3589x_gpio {
compatible = "toshiba,tc3589x-gpio";
interrupts = <0>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
};
tc3589x_keypad {
compatible = "toshiba,tc3589x-keypad";
interrupts = <6>;
debounce-delay-ms = <4>;
keypad,num-columns = <8>;
keypad,num-rows = <8>;
linux,no-autorepeat;
linux,keymap = <0x0301006b
0x04010066
0x06040072
0x040200d7
0x0303006a
0x0205000e
0x0607008b
0x0500001c
0x0403000b
0x03040034
0x05020067
0x0305006c
0x040500e7
0x0005009e
0x06020073
0x01030039
0x07060069
0x050500d9>;
wakeup-source;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Toshiba TC3589x 다목적 expander
1-13Toshiba TC3589x 계열은 I2C 기반 MFD이며 GPIO, keypad, rotator(vibrator), LED나 vibrator용 PWM을 내장할 수 있습니다. 포함되는 모델은 TC35890, TC35892, TC35893, TC35894, TC35895, TC35896입니다.
계열 장치가 노출할 수 있는 기능과 용도를 정리했습니다.
상위 MFD 필수 속성
14-22`compatible`은 모델에 따라 `toshiba,tc35890`, `toshiba,tc35892`, `toshiba,tc35893`, `toshiba,tc35894`, `toshiba,tc35895`, `toshiba,tc35896` 중 하나입니다. `reg`는 I2C address, `interrupts`는 컨트롤러가 연결된 상위 interrupt입니다.
`interrupt-controller`는 이 노드를 interrupt controller로 표시합니다. `#interrupt-cells`는 `<1>`이며 첫 cell은 TC3589x interrupt controller 내부 IRQ offset입니다.
GPIO 자식과 interrupt flags
23-43TC35890과 TC35892의 GPIO module은 24개, 나머지 모델은 20개의 GPIO line을 갖습니다. GPIO 자식의 `compatible`은 `toshiba,tc3589x-gpio`, `interrupts`는 상위 TC3589x MFD에 연결된 interrupt입니다.
GPIO 자식의 `interrupt-controller`와 `#interrupt-cells = <2>`는 첫 cell을 GPIO IRQ offset, 둘째 cell을 `<dt-bindings/interrupt-controller/irq.h>`에 따른 interrupt flags로 정의합니다. 유효한 flags는 `IRQ_TYPE_LEVEL_LOW`, `IRQ_TYPE_LEVEL_HIGH`, `IRQ_TYPE_EDGE_RISING`, `IRQ_TYPE_EDGE_FALLING`, `IRQ_TYPE_EDGE_BOTH`입니다.
`gpio-controller`는 자식을 GPIO controller로 표시합니다. `#gpio-cells = <2>`에서 첫 cell은 GPIO offset, 둘째 cell은 flags입니다.
GPIO interrupt specifier에서 사용할 수 있는 trigger 유형입니다.
Keypad 자식 속성
44-59모든 variant의 keypad는 같으며 최대 96개 key를 지원합니다. Linux 전용 속성은 기존 input driver의 모델을 따릅니다. `compatible`은 `toshiba,tc3589x-keypad`, `debounce-delay-ms`는 millisecond 단위 debounce interval입니다.
`keypad,num-rows`와 `keypad,num-columns`는 matrix 행·열 수이며 `bindings/input/matrix-keymap.txt`를 따릅니다. `linux,keymap` 정의도 같은 문서에 있습니다. `linux,no-autorepeat`는 autorepeat 기능을 끄고, `wakeup-source`는 모든 keypad event를 wakeup event로 사용합니다. legacy 속성 `linux,wakeup`도 지원합니다.
TC35893 GPIO·keypad 예제
60-107예제의 TC35893은 I2C 주소 `0x44`, GPIO6 pin 26 rising-edge interrupt, 한 cell 상위 IRQ domain을 사용합니다. GPIO 자식은 local interrupt 0과 두 cell IRQ·GPIO specifier를 제공합니다.
Keypad 자식은 local interrupt 6, 4ms debounce, 8열·8행 matrix, autorepeat 비활성화, 18개 keymap 값과 `wakeup-source`를 지정합니다.
tc35893@44 {
compatible = "toshiba,tc35893";
reg = <0x44>;
interrupt-parent = <&gpio6>;
interrupts = <26 IRQ_TYPE_EDGE_RISING>;
interrupt-controller;
#interrupt-cells = <1>;
tc3589x_gpio {
compatible = "toshiba,tc3589x-gpio";
interrupts = <0>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
};
tc3589x_keypad {
compatible = "toshiba,tc3589x-keypad";
interrupts = <6>;
debounce-delay-ms = <4>;
keypad,num-columns = <8>;
keypad,num-rows = <8>;
linux,no-autorepeat;
linux,keymap = <0x0301006b
0x04010066
0x06040072
0x040200d7
0x0303006a
0x0205000e
0x0607008b
0x0500001c
0x0403000b
0x03040034
0x05020067
0x0305006c
0x040500e7
0x0005009e
0x06020073
0x01030039
0x07060069
0x050500d9>;
wakeup-source;
};
};
요약과 해설
tc3589x.txt:1-107모델별 GPIO 수, 두 cell GPIO IRQ, 96-key matrix와 TC35893 예제를 설명합니다.