← Documents Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Atmel PIO4 Controller

SAMA5D2·SAMA7 계열 PIO4 pinmux와 generic pinconf 바인딩입니다.

Source pathDocumentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

atmel,at91-pio4-pinctrl.txt:1-99

Pin function macro, bias, slew rate와 drive strength 사용법을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Atmel PIO4 Controller
2
3 The Atmel PIO4 controller is used to select the function of a pin and to
4 configure it.
5
6 Required properties:
7 - compatible:
8 "atmel,sama5d2-pinctrl"
9 "microchip,sama7d65-pinctrl", "microchip,sama7g5-pinctrl"
10 "microchip,sama7g5-pinctrl"
11 - reg: base address and length of the PIO controller.
12 - interrupts: interrupt outputs from the controller, one for each bank.
13 - interrupt-controller: mark the device node as an interrupt controller.
14 - #interrupt-cells: should be two.
15 - gpio-controller: mark the device node as a gpio controller.
16 - #gpio-cells: should be two.
17
18 Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
19 a general description of GPIO and interrupt bindings.
20
21 Please refer to pinctrl-bindings.txt in this directory for details of the
22 common pinctrl bindings used by client devices.
23
24 Subnode format
25 Each node (or subnode) will list the pins it needs and how to configured these
26 pins.
27
28 node {
29 pinmux = <PIN_NUMBER_PINMUX>;
30 GENERIC_PINCONFIG;
31 };
32
33 Required properties:
34 - pinmux: integer array. Each integer represents a pin number plus mux and
35 ioset settings. Use the macros from boot/dts/<soc>-pinfunc.h file to get the
36 right representation of the pin.
37
38 Optional properties:
39 - GENERIC_PINCONFIG: generic pinconfig options to use:
40 - bias-disable, bias-pull-down, bias-pull-up, drive-open-drain,
41 drive-push-pull input-schmitt-enable, input-debounce, output-low,
42 output-high.
43 - for microchip,sama7g5-pinctrl only:
44 - slew-rate: 0 - disabled, 1 - enabled (default)
45 - atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for
46 high drive. The default value is low drive.
47
48 Example:
49
50 #include <sama5d2-pinfunc.h>
51
52 ...
53 {
54 pioA: pinctrl@fc038000 {
55 compatible = "atmel,sama5d2-pinctrl";
56 reg = <0xfc038000 0x600>;
57 interrupts = <18 IRQ_TYPE_LEVEL_HIGH 7>,
58 <68 IRQ_TYPE_LEVEL_HIGH 7>,
59 <69 IRQ_TYPE_LEVEL_HIGH 7>,
60 <70 IRQ_TYPE_LEVEL_HIGH 7>;
61 interrupt-controller;
62 #interrupt-cells = <2>;
63 gpio-controller;
64 #gpio-cells = <2>;
65 clocks = <&pioA_clk>;
66
67 pinctrl_i2c0_default: i2c0_default {
68 pinmux = <PIN_PD21__TWD0>,
69 <PIN_PD22__TWCK0>;
70 bias-disable;
71 };
72
73 pinctrl_led_gpio_default: led_gpio_default {
74 pinmux = <PIN_PB0>,
75 <PIN_PB5>;
76 bias-pull-up;
77 atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
78 };
79
80 pinctrl_sdmmc1_default: sdmmc1_default {
81 cmd_data {
82 pinmux = <PIN_PA28__SDMMC1_CMD>,
83 <PIN_PA18__SDMMC1_DAT0>,
84 <PIN_PA19__SDMMC1_DAT1>,
85 <PIN_PA20__SDMMC1_DAT2>,
86 <PIN_PA21__SDMMC1_DAT3>;
87 bias-pull-up;
88 };
89
90 ck_cd {
91 pinmux = <PIN_PA22__SDMMC1_CK>,
92 <PIN_PA30__SDMMC1_CD>;
93 bias-disable;
94 };
95 };
96 ...
97 };
98 };
99 ...
100

3. 한국어 전문 번역

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

Atmel PIO4 controller

1-23

Atmel PIO4 controller는 pin function을 선택하고 pin을 구성합니다. `compatible`은 `atmel,sama5d2-pinctrl`, `microchip,sama7d65-pinctrl`, `microchip,sama7g5-pinctrl` 가운데 해당 문자열을 사용합니다.

`reg`는 PIO controller의 기본 주소와 길이입니다. `interrupts`에는 bank마다 interrupt 출력 하나가 있고 `interrupt-controller`로 interrupt controller임을 표시하며 `#interrupt-cells`는 2입니다.

`gpio-controller`로 GPIO controller임을 표시하고 `#gpio-cells`는 2로 설정합니다. 일반 GPIO·interrupt 바인딩은 `../gpio/gpio.txt`와 `../interrupt-controller/interrupts.txt`, 공통 pinctrl 바인딩은 이 디렉터리의 `pinctrl-bindings.txt`를 참조하십시오.

PIO4 하위 노드 형식

24-32

각 노드나 하위 노드는 필요한 pin과 그 pin의 구성 방법을 나열합니다. `pinmux` 뒤에는 generic pin configuration 속성을 배치합니다.

node {
        pinmux = <PIN_NUMBER_PINMUX>;
        GENERIC_PINCONFIG;
};

PIO4 pin 속성

33-47

필수 `pinmux`는 정수 배열이며 각 정수는 pin 번호와 mux·ioset 설정을 함께 나타냅니다. 올바른 표현은 `boot/dts/<soc>-pinfunc.h`의 macro를 사용해 얻습니다.

선택 가능한 generic pinconf는 `bias-disable`, `bias-pull-down`, `bias-pull-up`, `drive-open-drain`, `drive-push-pull`, `input-schmitt-enable`, `input-debounce`, `output-low`, `output-high`입니다.

`microchip,sama7g5-pinctrl`에서만 `slew-rate`를 사용할 수 있으며 0은 비활성, 1은 활성이고 기본값은 1입니다.

`atmel,drive-strength`는 0 또는 1이면 low drive, 2이면 medium drive, 3이면 high drive이며 기본값은 low입니다.

SAMA5D2 PIO4 예제

48-99

예제 PIOA controller는 네 bank interrupt와 GPIO·interrupt controller cell을 정의합니다. I2C0 pin은 bias를 끄고, LED GPIO pin은 pull-up과 medium drive strength를 사용합니다. SDMMC1은 command/data pin에 pull-up을, clock/card-detect pin에는 bias-disable을 적용합니다.

#include <sama5d2-pinfunc.h>

...
{
        pioA: pinctrl@fc038000 {
                compatible = "atmel,sama5d2-pinctrl";
                reg = <0xfc038000 0x600>;
                interrupts = <18 IRQ_TYPE_LEVEL_HIGH 7>,
                             <68 IRQ_TYPE_LEVEL_HIGH 7>,
                             <69 IRQ_TYPE_LEVEL_HIGH 7>,
                             <70 IRQ_TYPE_LEVEL_HIGH 7>;
                interrupt-controller;
                #interrupt-cells = <2>;
                gpio-controller;
                #gpio-cells = <2>;
                clocks = <&pioA_clk>;

                pinctrl_i2c0_default: i2c0_default {
                        pinmux = <PIN_PD21__TWD0>,
                                 <PIN_PD22__TWCK0>;
                        bias-disable;
                };

                pinctrl_led_gpio_default: led_gpio_default {
                        pinmux = <PIN_PB0>,
                                 <PIN_PB5>;
                        bias-pull-up;
                        atmel,drive-strength = <ATMEL_PIO_DRVSTR_ME>;
                };

                pinctrl_sdmmc1_default: sdmmc1_default {
                        cmd_data {
                                pinmux = <PIN_PA28__SDMMC1_CMD>,
                                         <PIN_PA18__SDMMC1_DAT0>,
                                         <PIN_PA19__SDMMC1_DAT1>,
                                         <PIN_PA20__SDMMC1_DAT2>,
                                         <PIN_PA21__SDMMC1_DAT3>;
                                bias-pull-up;
                        };

                        ck_cd {
                                pinmux = <PIN_PA22__SDMMC1_CK>,
                                         <PIN_PA30__SDMMC1_CD>;
                                bias-disable;
                        };
                };
                ...
        };
};
...