요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
CSR SiRFprimaII pinmux controller
Required properties:
- compatible : "sirf,prima2-pinctrl"
- reg : Address range of the pinctrl registers
- interrupts : Interrupts used by every GPIO group
- gpio-controller : Indicates this device is a GPIO controller
- interrupt-controller : Marks the device node as an interrupt controller
Optional properties:
- sirf,pullups : if n-th bit of m-th bank is set, set a pullup on GPIO-n of bank m
- sirf,pulldowns : if n-th bit of m-th bank is set, set a pulldown on GPIO-n of bank m
Please refer to pinctrl-bindings.txt in this directory for details of the common
pinctrl bindings used by client devices.
SiRFprimaII's pinmux nodes act as a container for an arbitrary number of subnodes.
Each of these subnodes represents some desired configuration for a group of pins.
Required subnode-properties:
- sirf,pins : An array of strings. Each string contains the name of a group.
- sirf,function: A string containing the name of the function to mux to the
group.
Valid values for group and function names can be found from looking at the
group and function arrays in driver files:
drivers/pinctrl/pinctrl-sirf.c
For example, pinctrl might have subnodes like the following:
uart2_pins_a: uart2@0 {
uart {
sirf,pins = "uart2grp";
sirf,function = "uart2";
};
};
uart2_noflow_pins_a: uart2@1 {
uart {
sirf,pins = "uart2_nostreamctrlgrp";
sirf,function = "uart2_nostreamctrl";
};
};
For a specific board, if it wants to use uart2 without hardware flow control,
it can add the following to its board-specific .dts file.
uart2: uart@b0070000 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_noflow_pins_a>;
}
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SiRFprimaII controller 속성
1-15필수 속성은 `compatible = "sirf,prima2-pinctrl"`, pinctrl register 범위인 `reg`, 각 GPIO group이 사용하는 `interrupts`, `gpio-controller`, `interrupt-controller`입니다.
선택적 `sirf,pullups`와 `sirf,pulldowns`는 m번째 bank의 n번째 bit가 설정되면 각각 그 bank의 GPIO-n에 pull-up 또는 pull-down을 설정합니다. Client 공통 binding은 같은 directory의 `pinctrl-bindings.txt`를 따릅니다.
Pinmux subnode 계약
16-27SiRFprimaII pinmux node는 임의 개수의 subnode를 담고 각 subnode는 pin group 하나의 구성을 표현합니다. 필수 `sirf,pins`는 group 이름 문자열 배열, `sirf,function`은 group에 mux할 function 이름입니다.
유효한 group과 function 이름은 `drivers/pinctrl/pinctrl-sirf.c`의 group·function 배열에서 확인합니다.
UART2 pinmux 예제
28-41UART2 hardware flow control을 사용하는 `uart2grp`와 flow control이 없는 `uart2_nostreamctrlgrp` state를 각각 정의합니다.
uart2_pins_a: uart2@0 {
uart {
sirf,pins = "uart2grp";
sirf,function = "uart2";
};
};
uart2_noflow_pins_a: uart2@1 {
uart {
sirf,pins = "uart2_nostreamctrlgrp";
sirf,function = "uart2_nostreamctrl";
};
};
Board UART2 state 적용
42-47특정 board에서 UART2를 hardware flow control 없이 사용하려면 board-specific `.dts`의 UART2 node가 `uart2_noflow_pins_a`를 default state로 참조합니다.
uart2: uart@b0070000 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_noflow_pins_a>;
}
요약과 해설
pinctrl-sirf.txt:1-47Bank bitmask pull 설정과 UART2 flow-control 유무에 따른 state를 설명합니다.