요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
Microchip PIC32 SPI Master controller
Required properties:
- compatible: Should be "microchip,pic32mzda-spi".
- reg: Address and length of register space for the device.
- interrupts: Should contain all three spi interrupts in sequence
of <fault-irq>, <receive-irq>, <transmit-irq>.
- interrupt-names: Should be "fault", "rx", "tx" in order.
- clocks: Phandle of the clock generating SPI clock on the bus.
- clock-names: Should be "mck0".
- cs-gpios: Specifies the gpio pins to be used for chipselects.
See: Documentation/devicetree/bindings/spi/spi-bus.txt
Optional properties:
- dmas: Two or more DMA channel specifiers following the convention outlined
in Documentation/devicetree/bindings/dma/dma.txt
- dma-names: Names for the dma channels. There must be at least one channel
named "spi-tx" for transmit and named "spi-rx" for receive.
Example:
spi1: spi@1f821000 {
compatible = "microchip,pic32mzda-spi";
reg = <0x1f821000 0x200>;
interrupts = <109 IRQ_TYPE_LEVEL_HIGH>,
<110 IRQ_TYPE_LEVEL_HIGH>,
<111 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "fault", "rx", "tx";
clocks = <&PBCLK2>;
clock-names = "mck0";
cs-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
dmas = <&dma 134>, <&dma 135>;
dma-names = "spi-rx", "spi-tx";
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
PIC32 SPI master 필수 속성
1-13Microchip PIC32 SPI master의 `compatible`은 `microchip,pic32mzda-spi`입니다. `reg`는 register 공간의 address와 length를 지정합니다.
`interrupts`는 fault, receive, transmit interrupt 세 개를 이 순서로 담고 `interrupt-names`는 같은 순서로 `fault`, `rx`, `tx`여야 합니다.
`clocks`는 SPI bus clock을 생성하는 clock phandle이고 `clock-names`는 `mck0`입니다. `cs-gpios`는 chip-select에 사용할 GPIO pin을 지정하며 자세한 내용은 `Documentation/devicetree/bindings/spi/spi-bus.txt`를 참조합니다.
선택적 DMA channel
14-19`dmas`는 `Documentation/devicetree/bindings/dma/dma.txt` 규칙을 따르는 두 개 이상의 DMA channel specifier입니다. `dma-names`에는 transmit용 `spi-tx`와 receive용 `spi-rx`가 각각 최소 하나 있어야 합니다.
PIC32 SPI1 예제
20-34예제는 address `0x1f821000`, fault/RX/TX interrupt 109~111, PBCLK2, active-low chip-select GPIO와 RX/TX DMA channel 134·135를 연결합니다.
spi1: spi@1f821000 {
compatible = "microchip,pic32mzda-spi";
reg = <0x1f821000 0x200>;
interrupts = <109 IRQ_TYPE_LEVEL_HIGH>,
<110 IRQ_TYPE_LEVEL_HIGH>,
<111 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "fault", "rx", "tx";
clocks = <&PBCLK2>;
clock-names = "mck0";
cs-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
dmas = <&dma 134>, <&dma 135>;
dma-names = "spi-rx", "spi-tx";
};
요약과 해설
microchip,spi-pic32.txt:1-34PIC32 SPI master의 interrupt 순서, clock, chip-select와 DMA를 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·interrupt/DMA 순서·수치·예제 코드를 원형대로 유지합니다.