← Documents Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

NVIDIA Tegra20 Keyboard Controller

24-pin Tegra matrix keyboard, Fn layer와 wakeup 바인딩입니다.

Source pathDocumentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

nvidia,tegra20-kbc.txt:1-55

Row/column pin 제한과 ghost/debounce 설정을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Tegra keyboard controller
2 The key controller has maximum 24 pins to make matrix keypad. Any pin
3 can be configured as row or column. The maximum column pin can be 8
4 and maximum row pins can be 16 for Tegra20/Tegra30.
5
6 Required properties:
7 - compatible: "nvidia,tegra20-kbc"
8 - reg: Register base address of KBC.
9 - interrupts: Interrupt number for the KBC.
10 - nvidia,kbc-row-pins: The KBC pins which are configured as row. This is an
11 array of pin numbers which is used as rows.
12 - nvidia,kbc-col-pins: The KBC pins which are configured as column. This is an
13 array of pin numbers which is used as column.
14 - linux,keymap: The keymap for keys as described in the binding document
15 devicetree/bindings/input/matrix-keymap.txt.
16 - clocks: Must contain one entry, for the module clock.
17 See ../clocks/clock-bindings.txt for details.
18 - resets: Must contain an entry for each entry in reset-names.
19 See ../reset/reset.txt for details.
20 - reset-names: Must include the following entries:
21 - kbc
22
23 Optional properties, in addition to those specified by the shared
24 matrix-keyboard bindings:
25
26 - linux,fn-keymap: a second keymap, same specification as the
27 matrix-keyboard-controller spec but to be used when the KEY_FN modifier
28 key is pressed.
29 - nvidia,debounce-delay-ms: delay in milliseconds per row scan for debouncing
30 - nvidia,repeat-delay-ms: delay in milliseconds before repeat starts
31 - nvidia,ghost-filter: enable ghost filtering for this device
32 - wakeup-source: configure keyboard as a wakeup source for suspend/resume
33 (Legacy property supported: "nvidia,wakeup-source")
34
35 Example:
36
37 keyboard: keyboard {
38 compatible = "nvidia,tegra20-kbc";
39 reg = <0x7000e200 0x100>;
40 interrupts = <0 85 0x04>;
41 clocks = <&tegra_car 36>;
42 resets = <&tegra_car 36>;
43 reset-names = "kbc";
44 nvidia,ghost-filter;
45 nvidia,debounce-delay-ms = <640>;
46 nvidia,kbc-row-pins = <0 1 2>; /* pin 0, 1, 2 as rows */
47 nvidia,kbc-col-pins = <11 12 13>; /* pin 11, 12, 13 as columns */
48 linux,keymap = <0x00000074
49 0x00010067
50 0x00020066
51 0x01010068
52 0x02000069
53 0x02010070
54 0x02020071>;
55 };
56

3. 한국어 전문 번역

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

Tegra20/Tegra30 KBC 속성

1-34

Tegra keyboard controller는 최대 24개 pin으로 matrix keypad를 구성하며 어느 pin이든 row 또는 column으로 설정할 수 있습니다. Tegra20/Tegra30에서 column은 최대 8개, row는 최대 16개입니다.

필수 `compatible`은 `nvidia,tegra20-kbc`, `reg`는 KBC register base, `interrupts`는 KBC interrupt입니다. `nvidia,kbc-row-pins`와 `nvidia,kbc-col-pins`는 각각 row와 column으로 쓸 KBC pin number array입니다. `linux,keymap`은 `devicetree/bindings/input/matrix-keymap.txt` 형식을 따릅니다.

`clocks`는 module clock entry 하나를 포함하고 `../clocks/clock-bindings.txt`를 참조합니다. `resets`는 `reset-names`의 각 entry에 대응하는 reset을 포함하며 `../reset/reset.txt`를 따릅니다. `reset-names`에는 `kbc`가 반드시 있어야 합니다.

공유 matrix-keyboard binding 외의 선택 property로 `linux,fn-keymap`은 `KEY_FN` modifier를 누를 때 사용할 둘째 keymap입니다. `nvidia,debounce-delay-ms`는 row scan마다 적용할 millisecond debounce delay, `nvidia,repeat-delay-ms`는 repeat 시작 전 delay입니다. `nvidia,ghost-filter`는 ghost filtering을 켭니다. `wakeup-source`는 suspend/resume wakeup source로 keyboard를 설정하며 legacy `nvidia,wakeup-source`도 지원합니다.

Tegra KBC matrix limits
ResourceLimit or role
Total KBC pins24
Column pinsUp to 8
Row pinsUp to 16
Fn layerlinux,fn-keymap
Wakewakeup-source

24개 configurable pin의 row/column 제한과 선택 기능입니다.

3x3 Tegra key matrix 예제

35-55

예제는 register `0x7000e200`의 0x100-byte 영역, interrupt 85, TEGRA CAR clock/reset ID 36과 reset name `kbc`를 사용합니다. Ghost filter와 640 ms debounce를 켜고 pin 0,1,2를 row, 11,12,13을 column으로 지정하여 7개 keycode를 mapping합니다.

keyboard: keyboard {
        compatible = "nvidia,tegra20-kbc";
        reg = <0x7000e200 0x100>;
        interrupts = <0 85 0x04>;
        clocks = <&tegra_car 36>;
        resets = <&tegra_car 36>;
        reset-names = "kbc";
        nvidia,ghost-filter;
        nvidia,debounce-delay-ms = <640>;
        nvidia,kbc-row-pins = <0 1 2>;    /* pin 0, 1, 2 as rows */
        nvidia,kbc-col-pins = <11 12 13>; /* pin 11, 12, 13 as columns */
        linux,keymap = <0x00000074
                        0x00010067
                        0x00020066
                        0x01010068
                        0x02000069
                        0x02010070
                        0x02020071>;
};