요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
MPC5121 PSC Device Tree Bindings
PSC in UART mode
----------------
For PSC in UART mode the needed PSC serial devices
are specified by fsl,mpc5121-psc-uart nodes in the
fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
Controller node fsl,mpc5121-psc-fifo is required there:
fsl,mpc512x-psc-uart nodes
--------------------------
Required properties :
- compatible : Should contain "fsl,<soc>-psc-uart" and "fsl,<soc>-psc"
Supported <soc>s: mpc5121, mpc5125
- reg : Offset and length of the register set for the PSC device
- interrupts : <a b> where a is the interrupt number of the
PSC FIFO Controller and b is a field that represents an
encoding of the sense and level information for the interrupt.
Recommended properties :
- fsl,rx-fifo-size : the size of the RX fifo slice (a multiple of 4)
- fsl,tx-fifo-size : the size of the TX fifo slice (a multiple of 4)
PSC in SPI mode
---------------
Similar to the UART mode a PSC can be operated in SPI mode. The compatible used
for that is fsl,mpc5121-psc-spi. It requires a fsl,mpc5121-psc-fifo as well.
The required and recommended properties are identical to the
fsl,mpc5121-psc-uart nodes, just use spi instead of uart in the compatible
string.
fsl,mpc512x-psc-fifo node
-------------------------
Required properties :
- compatible : Should be "fsl,<soc>-psc-fifo"
Supported <soc>s: mpc5121, mpc5125
- reg : Offset and length of the register set for the PSC
FIFO Controller
- interrupts : <a b> where a is the interrupt number of the
PSC FIFO Controller and b is a field that represents an
encoding of the sense and level information for the interrupt.
Recommended properties :
- clocks : specifies the clock needed to operate the fifo controller
- clock-names : name(s) for the clock(s) listed in clocks
Example for a board using PSC0 and PSC1 devices in serial mode:
serial@11000 {
compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
cell-index = <0>;
reg = <0x11000 0x100>;
interrupts = <40 0x8>;
interrupt-parent = < &ipic >;
fsl,rx-fifo-size = <16>;
fsl,tx-fifo-size = <16>;
};
serial@11100 {
compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
cell-index = <1>;
reg = <0x11100 0x100>;
interrupts = <40 0x8>;
interrupt-parent = < &ipic >;
fsl,rx-fifo-size = <16>;
fsl,tx-fifo-size = <16>;
};
pscfifo@11f00 {
compatible = "fsl,mpc5121-psc-fifo";
reg = <0x11f00 0x100>;
interrupts = <40 0x8>;
interrupt-parent = < &ipic >;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MPC5121 PSC와 UART mode
1-10MPC5121 PSC를 UART mode로 사용할 때 필요한 PSC serial device는 `fsl,mpc5121-immr` SoC node 안의 `fsl,mpc5121-psc-uart` node로 지정합니다. 같은 SoC node 안에 `fsl,mpc5121-psc-fifo` PSC FIFO Controller node도 필요합니다.
PSC UART node
11-25`fsl,mpc512x-psc-uart` node의 필수 `compatible`에는 `fsl,<soc>-psc-uart`와 `fsl,<soc>-psc`가 모두 들어가야 합니다. 지원하는 `<soc>`는 `mpc5121`과 `mpc5125`입니다. 필수 `reg`는 PSC device register set의 offset과 length를 지정합니다.
필수 `interrupts`는 `<a b>` 형식입니다. a는 PSC FIFO Controller의 interrupt 번호이고 b는 interrupt의 sense와 level 정보를 encode한 field입니다.
권장 `fsl,rx-fifo-size`는 RX FIFO slice 크기, `fsl,tx-fifo-size`는 TX FIFO slice 크기이며 둘 다 4의 배수여야 합니다.
PSC SPI mode
26-34PSC는 UART mode와 비슷하게 SPI mode로도 동작할 수 있습니다. 이때 `compatible`은 `fsl,mpc5121-psc-spi`이며 `fsl,mpc5121-psc-fifo`도 필요합니다.
필수 property와 권장 property는 `fsl,mpc5121-psc-uart` node와 동일하되 compatible string에서 `uart` 대신 `spi`를 사용합니다.
PSC FIFO Controller node
35-50`fsl,mpc512x-psc-fifo` node의 필수 `compatible`은 `fsl,<soc>-psc-fifo`이며 지원하는 `<soc>`는 `mpc5121`과 `mpc5125`입니다. 필수 `reg`는 PSC FIFO Controller register set의 offset과 length를 지정합니다.
필수 `interrupts`는 `<a b>` 형식입니다. a는 PSC FIFO Controller interrupt 번호, b는 sense와 level 정보를 encode한 field입니다.
권장 `clocks`는 FIFO controller 동작에 필요한 clock을 지정하고, `clock-names`는 `clocks`에 나열한 clock의 이름을 지정합니다.
PSC0·PSC1 serial mode 예제
51-78예제는 PSC0과 PSC1을 UART serial device로 선언합니다. 두 node는 cell index와 register offset만 다르고 interrupt 40, IPIC parent, 16-byte RX·TX FIFO slice를 공유합니다. 별도의 `pscfifo@11f00` node가 같은 interrupt와 IPIC parent를 사용해 FIFO Controller를 제공합니다.
serial@11000 {
compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
cell-index = <0>;
reg = <0x11000 0x100>;
interrupts = <40 0x8>;
interrupt-parent = < &ipic >;
fsl,rx-fifo-size = <16>;
fsl,tx-fifo-size = <16>;
};
serial@11100 {
compatible = "fsl,mpc5121-psc-uart", "fsl,mpc5121-psc";
cell-index = <1>;
reg = <0x11100 0x100>;
interrupts = <40 0x8>;
interrupt-parent = < &ipic >;
fsl,rx-fifo-size = <16>;
fsl,tx-fifo-size = <16>;
};
pscfifo@11f00 {
compatible = "fsl,mpc5121-psc-fifo";
reg = <0x11f00 0x100>;
interrupts = <40 0x8>;
interrupt-parent = < &ipic >;
};
요약과 해설
mpc5121-psc.txt:1-78PSC mode별 compatible, FIFO slice 크기, interrupt tuple과 clock property를 PSC0·PSC1 예제로 연결합니다.