요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Marvell Armada 37xx SoC pin and gpio controller
Each Armada 37xx SoC come with two pin and gpio controller one for the
south bridge and the other for the north bridge.
Inside this set of register the gpio latch allows exposing some
configuration of the SoC and especially the clock frequency of the
xtal. Hence, this node is a represent as syscon allowing sharing the
register between multiple hardware block.
GPIO and pin controller:
------------------------
Main node:
Refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning
of the phrase "pin configuration node".
Required properties for pinctrl driver:
- compatible: "marvell,armada3710-sb-pinctrl", "syscon, "simple-mfd"
for the south bridge
"marvell,armada3710-nb-pinctrl", "syscon, "simple-mfd"
for the north bridge
- reg: The first set of register are for pinctrl/gpio and the second
set for the interrupt controller
- interrupts: list of the interrupt use by the gpio
Available groups and functions for the North bridge:
group: jtag
- pins 20-24
- functions jtag, gpio
group sdio0
- pins 8-10
- functions sdio, gpio
group emmc_nb
- pins 27-35
- functions emmc, gpio
group pwm0
- pin 11 (GPIO1-11)
- functions pwm, led, gpio
group pwm1
- pin 12
- functions pwm, led, gpio
group pwm2
- pin 13
- functions pwm, led, gpio
group pwm3
- pin 14
- functions pwm, led, gpio
group pmic1
- pin 7
- functions pmic, gpio
group pmic0
- pin 6
- functions pmic, gpio
group i2c2
- pins 2-3
- functions i2c, gpio
group i2c1
- pins 0-1
- functions i2c, gpio
group spi_cs1
- pin 17
- functions spi, gpio
group spi_cs2
- pin 18
- functions spi, gpio
group spi_cs3
- pin 19
- functions spi, gpio
group onewire
- pin 4
- functions onewire, gpio
group uart1
- pins 25-26
- functions uart, gpio
group spi_quad
- pins 15-16
- functions spi, gpio
group uart2
- pins 9-10 and 18-19
- functions uart, gpio
Available groups and functions for the South bridge:
group usb32_drvvbus0
- pin 36
- functions drvbus, gpio
group usb2_drvvbus1
- pin 37
- functions drvbus, gpio
group sdio_sb
- pins 60-65
- functions sdio, gpio
group rgmii
- pins 42-53
- functions mii, gpio
group pcie1
- pins 39
- functions pcie, gpio
group pcie1_clkreq
- pins 40
- functions pcie, gpio
group pcie1_wakeup
- pins 41
- functions pcie, gpio
group smi
- pins 54-55
- functions smi, gpio
group ptp
- pins 56
- functions ptp, gpio
group ptp_clk
- pin 57
- functions ptp, mii
group ptp_trig
- pin 58
- functions ptp, mii
group mii_col
- pin 59
- functions mii, mii_err
GPIO subnode:
Please refer to gpio.txt in this directory for details of gpio-ranges property
and the common GPIO bindings used by client devices.
Required properties for gpio driver under the gpio subnode:
- interrupts: List of interrupt specifier for the controllers interrupt.
- gpio-controller: Marks the device node as a gpio controller.
- #gpio-cells: Should be 2. The first cell is the GPIO number and the
second cell specifies GPIO flags, as defined in
<dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and
GPIO_ACTIVE_LOW flags are supported.
- gpio-ranges: Range of pins managed by the GPIO controller.
Xtal Clock bindings for Marvell Armada 37xx SoCs
------------------------------------------------
see Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt
Example:
pinctrl_sb: pinctrl-sb@18800 {
compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd";
reg = <0x18800 0x100>, <0x18C00 0x20>;
gpio {
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_sb 0 0 29>;
gpio-controller;
interrupts =
<GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
};
rgmii_pins: mii-pins {
groups = "rgmii";
function = "mii";
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Armada 37xx pin·GPIO controller
1-10각 Armada 37xx SoC에는 south bridge용과 north bridge용 pin/GPIO controller가 하나씩 있습니다.
이 register 집합 안의 GPIO latch는 crystal oscillator의 clock frequency를 비롯한 일부 SoC configuration을 외부에 제공합니다. 따라서 이 노드는 여러 hardware block이 register를 공유할 수 있도록 `syscon`으로도 표현합니다.
Armada 37xx main node 속성
11-29Client device의 공통 pinctrl binding과 `pin configuration node`의 의미는 `pinctrl-bindings.txt`를 참조합니다.
South bridge의 `compatible` 목록은 `marvell,armada3710-sb-pinctrl`, `syscon`, `simple-mfd`이고 north bridge는 `marvell,armada3710-nb-pinctrl`, `syscon`, `simple-mfd`입니다.
`reg`의 첫 register 집합은 pinctrl/GPIO용이고 둘째 집합은 interrupt controller용입니다. `interrupts`에는 GPIO가 사용하는 interrupt 목록을 지정합니다.
North bridge group과 function
30-103North bridge의 JTAG, SDIO, eMMC, PWM, PMIC, I2C, SPI chip-select, 1-Wire, UART group과 해당 pin/function 전체입니다.
| Bridge | Group | Pins | Functions |
|---|---|---|---|
| North bridge | jtag | 20-24 | jtag, gpio |
| North bridge | sdio0 | 8-10 | sdio, gpio |
| North bridge | emmc_nb | 27-35 | emmc, gpio |
| North bridge | pwm0 | 11 (GPIO1-11) | pwm, led, gpio |
| North bridge | pwm1 | 12 | pwm, led, gpio |
| North bridge | pwm2 | 13 | pwm, led, gpio |
| North bridge | pwm3 | 14 | pwm, led, gpio |
| North bridge | pmic1 | 7 | pmic, gpio |
| North bridge | pmic0 | 6 | pmic, gpio |
| North bridge | i2c2 | 2-3 | i2c, gpio |
| North bridge | i2c1 | 0-1 | i2c, gpio |
| North bridge | spi_cs1 | 17 | spi, gpio |
| North bridge | spi_cs2 | 18 | spi, gpio |
| North bridge | spi_cs3 | 19 | spi, gpio |
| North bridge | onewire | 4 | onewire, gpio |
| North bridge | uart1 | 25-26 | uart, gpio |
| North bridge | spi_quad | 15-16 | spi, gpio |
| North bridge | uart2 | 9-10 and 18-19 | uart, gpio |
South bridge group과 function
104-153South bridge의 USB VBUS drive, SDIO, RGMII, PCIe, SMI, PTP, MII collision group과 pin/function 전체입니다.
| Bridge | Group | Pins | Functions |
|---|---|---|---|
| South bridge | usb32_drvvbus0 | 36 | drvbus, gpio |
| South bridge | usb2_drvvbus1 | 37 | drvbus, gpio |
| South bridge | sdio_sb | 60-65 | sdio, gpio |
| South bridge | rgmii | 42-53 | mii, gpio |
| South bridge | pcie1 | 39 | pcie, gpio |
| South bridge | pcie1_clkreq | 40 | pcie, gpio |
| South bridge | pcie1_wakeup | 41 | pcie, gpio |
| South bridge | smi | 54-55 | smi, gpio |
| South bridge | ptp | 56 | ptp, gpio |
| South bridge | ptp_clk | 57 | ptp, mii |
| South bridge | ptp_trig | 58 | ptp, mii |
| South bridge | mii_col | 59 | mii, mii_err |
Armada 37xx GPIO 하위 노드
154-167`gpio-ranges`와 공통 GPIO binding은 같은 directory의 `gpio.txt`를 참조합니다.
GPIO 하위 노드의 필수 `interrupts`는 controller interrupt specifier 목록입니다. `gpio-controller`는 GPIO controller임을 표시하고 `#gpio-cells`는 2여야 합니다.
첫 GPIO cell은 GPIO 번호, 둘째 cell은 `dt-bindings/gpio/gpio.h`의 flag입니다. `GPIO_ACTIVE_HIGH`와 `GPIO_ACTIVE_LOW`만 지원합니다. `gpio-ranges`에는 controller가 관리하는 pin 범위를 지정합니다.
Armada 37xx crystal clock binding
168-173Armada 37xx SoC의 crystal clock binding은 `Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt`를 참조합니다.
Armada 37xx south bridge 예제
174-195예제는 south bridge pinctrl/syscon 노드에 GPIO 하위 노드와 interrupt 다섯 개를 정의하고, `rgmii` group을 `mii` function으로 선택합니다.
pinctrl_sb: pinctrl-sb@18800 {
compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd";
reg = <0x18800 0x100>, <0x18C00 0x20>;
gpio {
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_sb 0 0 29>;
gpio-controller;
interrupts =
<GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
};
rgmii_pins: mii-pins {
groups = "rgmii";
function = "mii";
};
};
요약과 해설
marvell,armada-37xx-pinctrl.txt:1-195Bridge별 30개 group, GPIO interrupt, crystal clock와 RGMII 예제를 설명합니다.