요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Turris Mox module status and configuration bus (over SPI)
Required properties:
- compatible : Should be "cznic,moxtet"
- #address-cells : Has to be 1
- #size-cells : Has to be 0
- spi-cpol : Required inverted clock polarity
- spi-cpha : Required shifted clock phase
- interrupts : Must contain reference to the shared interrupt line
- interrupt-controller : Required
- #interrupt-cells : Has to be 1
For other required and optional properties of SPI slave nodes please refer to
../spi/spi-bus.txt.
Required properties of subnodes:
- reg : Should be position on the Moxtet bus (how many Moxtet
modules are between this module and CPU module, so
either 0 or a positive integer)
The driver finds the devices connected to the bus by itself, but it may be
needed to reference some of them from other parts of the device tree. In that
case the devices can be defined as subnodes of the moxtet node.
Example:
moxtet@1 {
compatible = "cznic,moxtet";
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
spi-max-frequency = <10000000>;
spi-cpol;
spi-cpha;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&gpiosb>;
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
moxtet_sfp: gpio@0 {
compatible = "cznic,moxtet-gpio";
gpio-controller;
#gpio-cells = <2>;
reg = <0>;
}
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Moxtet SPI bus 속성
1-24SPI 위에서 동작하는 Turris Mox module 상태 및 configuration bus
필수 `compatible`은 `cznic,moxtet`입니다. `#address-cells`는 1, `#size-cells`는 0이어야 합니다.
`spi-cpol`은 반전된 clock polarity, `spi-cpha`는 이동된 clock phase를 요구합니다. `interrupts`는 공유 interrupt line을 참조해야 하며 `interrupt-controller`가 필요합니다. `#interrupt-cells`는 1이어야 합니다.
SPI slave 노드의 다른 필수 및 선택 속성은 `../spi/spi-bus.txt`를 참조합니다.
하위 노드의 필수 `reg`는 Moxtet bus에서 module의 위치를 나타냅니다. 즉 CPU module과 이 module 사이에 있는 Moxtet module 수이며 0 또는 양의 정수입니다.
드라이버가 bus에 연결된 장치를 직접 찾지만 Device Tree의 다른 부분에서 일부 장치를 참조해야 할 수 있습니다. 이 경우 해당 장치를 `moxtet` 노드의 subnode로 정의할 수 있습니다.
SPI slave에서 자동 발견되는 module과 Device Tree subnode의 관계입니다.
Moxtet GPIO module 예
25-46예제는 SPI chip select 1의 Moxtet bus를 10 MHz, CPOL/CPHA mode로 설정하고, shared falling-edge interrupt와 위치 0의 GPIO module을 기술합니다.
moxtet@1 {
compatible = "cznic,moxtet";
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
spi-max-frequency = <10000000>;
spi-cpol;
spi-cpha;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&gpiosb>;
interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
moxtet_sfp: gpio@0 {
compatible = "cznic,moxtet-gpio";
gpio-controller;
#gpio-cells = <2>;
reg = <0>;
}
};
요약과 해설
moxtet.txt:1-46드라이버의 module 자동 발견과 다른 Device Tree 노드에서 참조할 subnode 선언 방식을 설명합니다.