요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Broadcom's IPROC Touchscreen Controller
Required properties:
- compatible: must be "brcm,iproc-touchscreen"
- ts_syscon: handler of syscon node defining physical base
address of the controller and length of memory mapped region.
If this property is selected please make sure MFD_SYSCON config
is enabled in the defconfig file.
- clocks: The clock provided by the SOC to driver the tsc
- clock-names: name for the clock
- interrupts: The touchscreen controller's interrupt
- address-cells: Specify the number of u32 entries needed in child nodes.
Should set to 1.
- size-cells: Specify number of u32 entries needed to specify child nodes size
in reg property. Should set to 1.
Optional properties:
- scanning_period: Time between scans. Each step is 1024 us. Valid 1-256.
- debounce_timeout: Each step is 512 us. Valid 0-255
- settling_timeout: The settling duration (in ms) is the amount of time
the tsc waits to allow the voltage to settle after
turning on the drivers in detection mode.
Valid values: 0-11
0 = 0.008 ms
1 = 0.01 ms
2 = 0.02 ms
3 = 0.04 ms
4 = 0.08 ms
5 = 0.16 ms
6 = 0.32 ms
7 = 0.64 ms
8 = 1.28 ms
9 = 2.56 ms
10 = 5.12 ms
11 = 10.24 ms
- touch_timeout: The continuous number of scan periods in which touch is
not detected before the controller returns to idle state.
Valid values 0-255.
- average_data: Number of data samples which are averaged before a final
data point is placed into the FIFO
Valid values 0-7
0 = 1 sample
1 = 2 samples
2 = 4 samples
3 = 8 samples
4 = 16 samples
5 = 32 samples
6 = 64 samples
7 = 128 samples
- fifo_threshold: Interrupt is generated whenever the number of fifo
entries exceeds this value
Valid values 0-31
- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
- touchscreen-fuzz-x: horizontal noise value of the absolute input
device (in pixels)
- touchscreen-fuzz-y: vertical noise value of the absolute input
device (in pixels)
- touchscreen-inverted-x: X axis is inverted (boolean)
- touchscreen-inverted-y: Y axis is inverted (boolean)
Example: An example of touchscreen node
ts_adc_syscon: ts_adc_syscon@180a6000 {
compatible = "brcm,iproc-ts-adc-syscon","syscon";
reg = <0x180a6000 0xc30>;
};
touchscreen: touchscreen@180a6000 {
compatible = "brcm,iproc-touchscreen";
#address-cells = <1>;
#size-cells = <1>;
ts_syscon = <&ts_adc_syscon>;
clocks = <&adc_clk>;
clock-names = "tsc_clk";
interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
scanning_period = <5>;
debounce_timeout = <40>;
settling_timeout = <7>;
touch_timeout = <10>;
average_data = <5>;
fifo_threshold = <1>;
/* Touchscreen is rotated 180 degrees. */
touchscreen-inverted-x;
touchscreen-inverted-y;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Broadcom IPROC 터치스크린 필수 속성
1-15Broadcom IPROC 터치스크린 컨트롤러의 `compatible`은 `brcm,iproc-touchscreen`이어야 합니다. `ts_syscon`은 컨트롤러의 물리 기준 주소와 메모리 매핑 영역 길이를 정의하는 syscon 노드의 핸들입니다. 이 속성을 선택했다면 defconfig에서 `MFD_SYSCON` 설정을 활성화해야 합니다.
`clocks`는 SoC가 TSC 구동을 위해 제공하는 클록이고 `clock-names`는 그 클록의 이름입니다. `interrupts`는 터치스크린 컨트롤러 인터럽트입니다. 자식 노드에 필요한 u32 항목 수를 나타내는 `address-cells`와 `reg` 속성에서 자식 노드 크기를 지정하는 데 필요한 u32 항목 수를 나타내는 `size-cells`는 모두 1로 설정해야 합니다.
syscon, 클록과 인터럽트가 컨트롤러의 샘플링 및 입력 보고를 구성합니다.
스캔, 안정화, 평균과 좌표 선택 속성
16-61`scanning_period`는 스캔 사이의 시간이며 한 단계는 1024 us이고 유효 범위는 1~256입니다. `debounce_timeout`은 한 단계가 512 us이며 유효 범위는 0~255입니다.
`settling_timeout`은 감지 모드에서 드라이버를 켠 뒤 전압이 안정화되도록 TSC가 기다리는 시간입니다. 값 0~11은 차례로 0.008, 0.01, 0.02, 0.04, 0.08, 0.16, 0.32, 0.64, 1.28, 2.56, 5.12, 10.24 ms를 뜻합니다.
`touch_timeout`은 터치를 감지하지 못한 스캔 주기가 몇 번 연속되면 컨트롤러가 유휴 상태로 돌아갈지를 정하며 유효 범위는 0~255입니다. `average_data`는 최종 데이터 지점을 FIFO에 넣기 전에 평균할 샘플 수를 정합니다. 값 0~7은 각각 1, 2, 4, 8, 16, 32, 64, 128개 샘플을 뜻합니다.
`fifo_threshold`는 FIFO 항목 수가 이 값을 초과할 때 인터럽트를 발생시키며 유효 범위는 0~31입니다. `touchscreen-size-x`와 `touchscreen-size-y`는 픽셀 단위 가로·세로 해상도이고, `touchscreen-fuzz-x`와 `touchscreen-fuzz-y`는 절대 입력 장치의 픽셀 단위 가로·세로 잡음 값입니다. 불리언 `touchscreen-inverted-x`와 `touchscreen-inverted-y`는 각 좌표축을 반전합니다.
각 정수 속성의 단위와 허용 범위를 정리합니다.
180도 회전된 IPROC 터치스크린 예제
62-87예제는 `0x180a6000`에 IPROC TS ADC syscon을 만들고 같은 주소의 터치스크린 노드가 이를 참조하게 합니다. `adc_clk`을 `tsc_clk` 이름으로 연결하고 GIC SPI 164의 level-high 인터럽트를 사용합니다. 스캔 주기는 5, 디바운스는 40, 안정화 값은 7, 터치 타임아웃은 10, 평균 값은 5, FIFO 임계값은 1입니다. X축과 Y축을 모두 반전하여 화면을 180도 회전합니다.
ts_adc_syscon: ts_adc_syscon@180a6000 {
compatible = "brcm,iproc-ts-adc-syscon","syscon";
reg = <0x180a6000 0xc30>;
};
touchscreen: touchscreen@180a6000 {
compatible = "brcm,iproc-touchscreen";
#address-cells = <1>;
#size-cells = <1>;
ts_syscon = <&ts_adc_syscon>;
clocks = <&adc_clk>;
clock-names = "tsc_clk";
interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
scanning_period = <5>;
debounce_timeout = <40>;
settling_timeout = <7>;
touch_timeout = <10>;
average_data = <5>;
fifo_threshold = <1>;
/* Touchscreen is rotated 180 degrees. */
touchscreen-inverted-x;
touchscreen-inverted-y;
};
요약과 해설
brcm,iproc-touchscreen.txt:1-87시간 단위별 정수 설정과 180도 회전 예제를 함께 설명합니다.