Part 1
요약·해설
공식 원문 418줄과 property 34행을 전수 대조해 output-only alternate-function scope·peripheral-owned input mux·required pinmux/drive-strength/hwctrl·edge-strength choices 제약을 보존했습니다.
infineon,xmc4xxx-pinctrl
Infineon Technologies
34 rows
XMC4xxx output alternate function + mandatory drive/hardware-control policy
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
0A02E648739F43BF44C57B5E08417ADAF41819B1F4C2B28C5612964DF2FC1F6D
:orphan:
.. raw:: html
<!--
FIXME: do not limit page width until content uses another representation
format other than tables
-->
<style>.wy-nav-content { max-width: none; !important }</style>
.. dtcompatible:: infineon,xmc4xxx-pinctrl
.. _dtbinding_infineon_xmc4xxx_pinctrl:
infineon,xmc4xxx-pinctrl
########################
Vendor: :ref:`Infineon Technologies <dt_vendor_infineon>`
Description
***********
.. code-block:: none
The Infineon XMC4XXX pin controller is responsible for connecting peripheral outputs
to specific port/pins (also known as alternate functions) and configures pin properties.
The pinctrl settings are referenced in a device tree peripheral node. For example in a UART
node:
&usic1ch1 {
compatible = "infineon,xmc4xxx-uart";
pinctrl-0 = <&uart_tx_p0_1_u1c1 &uart_rx_p0_0_u1c1>;
pinctrl-names = "default";
input-src = "DX0D";
...
};
pinctrl-0 is the phandle that stores the pin settings for two pins: &uart_tx_p0_1_u1c1
and &uart_rx_p0_0_u1c1. These nodes are pre-defined and their naming convention is designed
to help the user select the correct pin settings. Note the use of peripheral type,
pin direction, port/pin number and USIC in the name.
The pre-defined nodes only set the alternate function of the output pin. The
configuration for the pin (i.e. drive strength) should be set in the board setup.
The set of possible configurations are defined in the properties section below (in addition
to the inherited property-allowlist list from pincfg-node.yaml).
To create a new pin configuration, the user may append to the &pinctrl node, for example
#include <zephyr/dt-bindings/pinctrl/xmc4xxx-pinctrl.h>
&pinctrl {
my_node_config: my_node_config {
pinmux = <XMC4XXX_PINMUX_SET(0, 1, 2)>;
drive-push-pull;
... other supported pin configurations ..
};
where XMC4XXX_PINMUX_SET(PORT, PIN, ALTERNATE_FUNCTION) is a helper macro for setting the
alternate function for a given port/pin. Setting ALTERNATE_FUNCTION = 0 means that no
alternate function is selected.
The pinctrl driver only sets the alternate function for output pins. The input mux is
handled by the peripheral drivers. For example the &usic1ch1 node has input-src property for
this purpose. There are no pre-defined nodes for the input mux and this must be properly set
by the user. Refer to the peripheral .yaml file (i.e. infineon,xmc4xxx-uart.yaml) and
XMC4XXX documentation.
Properties
**********
Top level properties
====================
These property descriptions apply to "infineon,xmc4xxx-pinctrl"
nodes themselves. This page also describes child node
properties in the following sections.
.. tabs::
.. group-tab:: Node specific properties
Properties not inherited from the base binding file.
(None)
.. group-tab:: Deprecated node specific properties
Deprecated properties not inherited from the base binding file.
(None)
.. group-tab:: Base properties
Properties inherited from the base binding file, which defines
common properties that may be set on many nodes. Not all of these
may apply to the "infineon,xmc4xxx-pinctrl" compatible.
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``wakeup-source``
- ``boolean``
- .. code-block:: none
Property to identify that a device can be used as wake up source.
When this property is provided a specific flag is set into the
device that tells the system that the device is capable of
wake up the system.
Wake up capable devices are disabled (interruptions will not wake up
the system) by default but they can be enabled at runtime if necessary.
* - ``power-domain``
- ``phandle``
- .. code-block:: none
Power domain the device belongs to.
The device will be notified when the power domain it belongs to is either
suspended or resumed.
* - ``zephyr,pm-device-runtime-auto``
- ``boolean``
- .. code-block:: none
Automatically configure the device for runtime power management after the
init function runs.
* - ``zephyr,disabling-power-states``
- ``phandles``
- .. code-block:: none
List of power states that will disable this device power.
* - ``status``
- ``string``
- .. code-block:: none
indicates the operational status of a device
Legal values: ``'ok'``, ``'okay'``, ``'disabled'``, ``'reserved'``, ``'fail'``, ``'fail-sss'``
See :ref:`dt-important-props` for more information.
* - ``compatible``
- ``string-array``
- .. code-block:: none
compatible strings
This property is **required**.
See :ref:`dt-important-props` for more information.
* - ``reg``
- ``array``
- .. code-block:: none
register space
See :ref:`dt-important-props` for more information.
* - ``reg-names``
- ``string-array``
- .. code-block:: none
name of each register space
* - ``interrupts``
- ``array``
- .. code-block:: none
interrupts for device
See :ref:`dt-important-props` for more information.
* - ``interrupts-extended``
- ``compound``
- .. code-block:: none
extended interrupt specifier for device
* - ``interrupt-names``
- ``string-array``
- .. code-block:: none
name of each interrupt
* - ``interrupt-parent``
- ``phandle``
- .. code-block:: none
phandle to interrupt controller node
* - ``label``
- ``string``
- .. code-block:: none
Human readable string describing the device (used as device_get_binding() argument)
See :ref:`dt-important-props` for more information.
This property is **deprecated**.
* - ``clocks``
- ``phandle-array``
- .. code-block:: none
Clock gate information
* - ``clock-names``
- ``string-array``
- .. code-block:: none
name of each clock
* - ``#address-cells``
- ``int``
- .. code-block:: none
number of address cells in reg property
This property is **required**.
Constant value: ``1``
* - ``#size-cells``
- ``int``
- .. code-block:: none
number of size cells in reg property
This property is **required**.
Constant value: ``1``
* - ``dmas``
- ``phandle-array``
- .. code-block:: none
DMA channels specifiers
* - ``dma-names``
- ``string-array``
- .. code-block:: none
Provided names of DMA channel specifiers
* - ``io-channels``
- ``phandle-array``
- .. code-block:: none
IO channels specifiers
* - ``io-channel-names``
- ``string-array``
- .. code-block:: none
Provided names of IO channel specifiers
* - ``mboxes``
- ``phandle-array``
- .. code-block:: none
mailbox / IPM channels specifiers
* - ``mbox-names``
- ``string-array``
- .. code-block:: none
Provided names of mailbox / IPM channel specifiers
* - ``zephyr,deferred-init``
- ``boolean``
- .. code-block:: none
Do not initialize device automatically on boot. Device should be manually
initialized using device_init().
Child node properties
=====================
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``bias-pull-up``
- ``boolean``
- .. code-block:: none
enable pull-up resistor
* - ``bias-pull-down``
- ``boolean``
- .. code-block:: none
enable pull-down resistor
* - ``drive-push-pull``
- ``boolean``
- .. code-block:: none
drive actively high and low
* - ``drive-open-drain``
- ``boolean``
- .. code-block:: none
drive with open drain (hardware AND)
* - ``output-low``
- ``boolean``
- .. code-block:: none
set the pin to output mode with low level
* - ``output-high``
- ``boolean``
- .. code-block:: none
set the pin to output mode with high level
* - ``pinmux``
- ``int``
- .. code-block:: none
Encodes port/pin and alternate function. See helper macro XMC4XX_PINMUX_SET().
Alternate function is only set for output pins; It selects ALT1-ALT4
output line in the GPIO element. The alternate function for input pins is
handled separately by the peripheral. It is upto the peripheral to configure which
input pin to use (For example see parameter input-src in infineon,xmc4xxx-uart.yaml).
This property is **required**.
* - ``drive-strength``
- ``string``
- .. code-block:: none
Drive strength of the output pin. Following options as in XMC_GPIO_OUTPUT_STRENGTH
See xmc4_gpio.h. This only has an effect if the pin is in drive-push-pull mode.
This property is **required**.
Legal values: ``'strong-sharp-edge'``, ``'strong-medium-edge'``, ``'strong-soft-edge'``, ``'strong-slow-edge'``, ``'medium'``, ``'medium-unknown1-edge'``, ``'medium-unknown2-edge'``, ``'weak'``
* - ``invert-input``
- ``boolean``
- .. code-block:: none
Inverts the input.
* - ``hwctrl``
- ``string``
- .. code-block:: none
Pre-assigns hardware control of the pin to a certain peripheral.
This property is **required**.
Legal values: ``'disabled'``, ``'periph1'``, ``'periph2'``
Part 3
한국어 전문 번역
infineon,xmc4xxx-pinctrl
Vendor: Infineon Technologies
공식 설명
Infineon XMC4XXX pin controller는 peripheral output을 특정 port/pin(alternate function)에 연결하고 pin property를 설정합니다.
Pinctrl 설정은 device tree peripheral node에서 참조합니다. UART node 예는 다음과 같습니다.
&usic1ch1 {
compatible = "infineon,xmc4xxx-uart";
pinctrl-0 = <&uart_tx_p0_1_u1c1 &uart_rx_p0_0_u1c1>;
pinctrl-names = "default";
input-src = "DX0D";
...
};
pinctrl-0은 두 pin의 설정을 저장한 &uart_tx_p0_1_u1c1과 &uart_rx_p0_0_u1c1 phandle입니다. 이 node는 미리 정의되며 이름에 peripheral type, pin direction, port/pin 번호, USIC 정보를 넣어 올바른 설정을 고를 수 있게 합니다.
미리 정의된 node는 output pin의 alternate function만 설정합니다. Drive strength 같은 pin configuration은 board setup에서 설정해야 합니다. 가능한 설정은 아래 property section과 pincfg-node.yaml에서 상속한 allowlist에 정의됩니다.
새 pin configuration은 다음처럼 &pinctrl node에 추가할 수 있습니다.
#include <zephyr/dt-bindings/pinctrl/xmc4xxx-pinctrl.h>
&pinctrl {
my_node_config: my_node_config {
pinmux = <XMC4XXX_PINMUX_SET(0, 1, 2)>;
drive-push-pull;
... 지원하는 다른 pin configuration ...
};
XMC4XXX_PINMUX_SET(PORT, PIN, ALTERNATE_FUNCTION)는 port/pin의 alternate function을 설정하는 helper macro입니다. ALTERNATE_FUNCTION = 0이면 alternate function을 선택하지 않습니다.
Pinctrl driver는 output pin의 alternate function만 설정합니다. Input mux는 peripheral driver가 처리합니다. 예를 들어 &usic1ch1 node의 input-src property가 이 목적으로 사용됩니다. Input mux용 pre-defined node는 없으므로 사용자가 직접 올바르게 설정해야 합니다. Peripheral .yaml file(예: infineon,xmc4xxx-uart.yaml)과 XMC4XXX documentation을 참조합니다.Output mux와 input mux가 서로 다른 경로
Pinctrl driver는 output pin의 ALT1~ALT4를 설정합니다. Input path는 peripheral driver의 input-src 같은 property가 선택하므로 input용 pre-defined pinctrl node만 찾으면 설정이 끝나는 구조가 아닙니다.
pinctrl pinmux ALT1~ALT4
drive strength + hwctrl
peripheral input-src
separate input mux
pinmux, drive-strength, hwctrl가 모두 필수입니다. Drive strength는 push-pull에서만 효과가 있으며 edge profile까지 포함한 8개 문자열 중 하나를 선택합니다.
속성 전체 번역
공식 base 24개와 child 10개 property를 모두 번역했습니다.
Base binding property · 24개
공통 기본 바인딩에서 상속한 속성입니다. 이 compatible에서 사용하지 않는 속성도 공식 참조 문서에 실려 있으면 함께 표시합니다.
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
wakeup-source | boolean | 이 장치를 시스템 깨우기에 사용할 수 있음을 나타냅니다. 이 속성이 있으면 깨우기 지원 플래그가 설정됩니다. 기본 상태에서는 장치의 인터럽트로 시스템을 깨우지 않으며, 실행 중에 깨우기 기능을 활성화할 수 있습니다. |
power-domain | phandle | 장치가 속한 전원 도메인의 phandle입니다. 해당 전원 도메인이 일시 중단되거나 다시 동작하면 장치에 알림이 전달됩니다. |
zephyr,pm-device-runtime-auto | boolean | 초기화 함수 실행 후 장치의 런타임 전원 관리를 자동으로 설정합니다. |
zephyr,disabling-power-states | phandles | 이 장치의 전원이 꺼지는 전원 상태 목록입니다. |
status | string | 장치의 동작 상태를 나타냅니다. 허용값: 'ok', 'okay', 'disabled', 'reserved', 'fail', 'fail-sss' |
compatible | string-array | 이 노드에 적용할 바인딩과 드라이버를 식별하는 compatible 문자열 목록입니다. 필수 |
reg | array | 장치 레지스터의 주소 범위를 지정합니다. |
reg-names | string-array | 각 register space의 이름입니다. |
interrupts | array | 장치에서 사용하는 인터럽트를 지정하는 목록입니다. |
interrupts-extended | compound | 인터럽트 컨트롤러의 phandle을 함께 지정하는 확장 형식의 인터럽트 명세입니다. |
interrupt-names | string-array | 각 interrupt의 이름입니다. |
interrupt-parent | phandle | 인터럽트 컨트롤러 노드를 가리키는 phandle입니다. |
label | string | 사람이 장치를 알아볼 수 있도록 붙이는 이름입니다. 과거에는 device_get_binding()의 인자로 사용했습니다. 사용 중단됨 |
clocks | phandle-array | 클록 게이트 또는 클록 공급원을 지정하는 phandle 배열입니다. |
clock-names | string-array | 각 clock의 이름입니다. |
#address-cells | int | 하위 노드의 reg 속성에서 주소를 나타내는 데 쓰는 셀 수입니다. 필수 · 고정값: 1 |
#size-cells | int | 하위 노드의 reg 속성에서 크기를 나타내는 데 쓰는 셀 수입니다. 필수 · 고정값: 1 |
dmas | phandle-array | DMA 채널을 지정하는 phandle 배열입니다. |
dma-names | string-array | 지정한 DMA 채널의 이름입니다. |
io-channels | phandle-array | I/O 채널을 지정하는 phandle 배열입니다. |
io-channel-names | string-array | 지정한 I/O 채널의 이름입니다. |
mboxes | phandle-array | 메일박스/IPM 채널을 지정하는 phandle 배열입니다. |
mbox-names | string-array | 지정한 메일박스/IPM 채널의 이름입니다. |
zephyr,deferred-init | boolean | 부팅할 때 장치를 자동으로 초기화하지 않습니다. 이후 device_init()를 호출해 직접 초기화해야 합니다. |
하위 노드 속성 · 10개
각 하위 노드에 적용되는 속성입니다.
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
bias-pull-up | boolean | Pin의 pull-up resistor를 활성화합니다. |
bias-pull-down | boolean | Pin의 pull-down resistor를 활성화합니다. |
drive-push-pull | boolean | Pin을 high와 low 모두 능동 구동하는 push-pull mode로 설정합니다. |
drive-open-drain | boolean | Pin을 hardware AND 방식의 open-drain mode로 구동합니다. |
output-low | boolean | Pin을 output mode로 전환하고 low level을 출력합니다. |
output-high | boolean | Pin을 output mode로 전환하고 high level을 출력합니다. |
pinmux | int | Port/pin과 alternate function을 인코딩합니다. XMC4XX_PINMUX_SET() helper macro를 참조합니다. Alternate function은 output pin에서 GPIO element의 ALT1~ALT4 output line을 선택할 때만 설정됩니다. Input pin mux는 peripheral이 별도로 처리하며, 예를 들어 infineon,xmc4xxx-uart.yaml의 input-src가 input pin을 선택합니다. 필수 |
drive-strength | string | Output pin의 drive strength입니다. xmc4_gpio.h의 XMC_GPIO_OUTPUT_STRENGTH option을 사용하며 drive-push-pull mode에서만 효과가 있습니다. 필수 · 허용값: 'strong-sharp-edge', 'strong-medium-edge', 'strong-soft-edge', 'strong-slow-edge', 'medium', 'medium-unknown1-edge', 'medium-unknown2-edge', 'weak' |
invert-input | boolean | Input signal을 반전합니다. |
hwctrl | string | Pin의 hardware control을 특정 peripheral에 미리 할당합니다. 필수 · 허용값: 'disabled', 'periph1', 'periph2' |
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.