요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
* Microchip ENC28J60
This is a standalone 10 MBit ethernet controller with SPI interface.
For each device connected to a SPI bus, define a child node within
the SPI master node.
Required properties:
- compatible: Should be "microchip,enc28j60"
- reg: Specify the SPI chip select the ENC28J60 is wired to
- interrupts: Specify the interrupt index within the interrupt controller (referred
to above in interrupt-parent) and interrupt type. The ENC28J60 natively
generates falling edge interrupts, however, additional board logic
might invert the signal.
- pinctrl-names: List of assigned state names, see pinctrl binding documentation.
- pinctrl-0: List of phandles to configure the GPIO pin used as interrupt line,
see also generic and your platform specific pinctrl binding
documentation.
Optional properties:
- spi-max-frequency: Maximum frequency of the SPI bus when accessing the ENC28J60.
According to the ENC28J80 datasheet, the chip allows a maximum of 20 MHz, however,
board designs may need to limit this value.
The MAC address will be determined using the optional properties
defined in ethernet.txt.
Example (for NXP i.MX28 with pin control stuff for GPIO irq):
ssp2: ssp@80014000 {
compatible = "fsl,imx28-spi";
pinctrl-names = "default";
pinctrl-0 = <&spi2_pins_b &spi2_sck_cfg>;
enc28j60: ethernet@0 {
compatible = "microchip,enc28j60";
pinctrl-names = "default";
pinctrl-0 = <&enc28j60_pins>;
reg = <0>;
interrupt-parent = <&gpio3>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <12000000>;
};
};
pinctrl@80018000 {
enc28j60_pins: enc28j60_pins@0 {
reg = <0>;
fsl,pinmux-ids = <
MX28_PAD_AUART0_RTS__GPIO_3_3 /* Interrupt */
>;
fsl,drive-strength = <MXS_DRIVE_4mA>;
fsl,voltage = <MXS_VOLTAGE_HIGH>;
fsl,pull-up = <MXS_PULL_DISABLE>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
Microchip ENC28J60
1-7ENC28J60은 SPI interface를 사용하는 독립형 10Mbit Ethernet controller입니다. SPI bus에 연결된 각 장치는 SPI master node 아래 child node로 정의합니다.
ENC28J60 속성
8-27필수 `compatible`은 `microchip,enc28j60`, `reg`는 ENC28J60이 연결된 SPI chip select입니다.
`interrupts`는 `interrupt-parent`가 가리키는 controller 안의 interrupt index와 type을 지정합니다. ENC28J60은 원래 falling-edge interrupt를 생성하지만 board의 추가 logic이 signal을 반전할 수 있습니다.
`pinctrl-names`는 할당된 state 이름 목록이며 `pinctrl-0`은 interrupt line으로 쓰는 GPIO pin을 구성할 phandle 목록입니다. Generic binding과 platform별 pinctrl binding을 함께 참조합니다.
선택 `spi-max-frequency`는 ENC28J60 접근 시 최대 SPI bus 주파수입니다. ENC28J80 datasheet상 최대 20MHz지만 board 설계에 따라 더 낮게 제한할 수 있습니다. MAC address는 `ethernet.txt`의 선택 속성으로 결정합니다.
NXP i.MX28 예제
28-56예제는 i.MX28 SPI controller의 chip select 0에 ENC28J60을 연결하고 GPIO3 pin 3의 falling-edge interrupt, 12MHz SPI와 별도 pinctrl drive 설정을 사용합니다.
ssp2: ssp@80014000 {
compatible = "fsl,imx28-spi";
pinctrl-names = "default";
pinctrl-0 = <&spi2_pins_b &spi2_sck_cfg>;
enc28j60: ethernet@0 {
compatible = "microchip,enc28j60";
pinctrl-names = "default";
pinctrl-0 = <&enc28j60_pins>;
reg = <0>;
interrupt-parent = <&gpio3>;
interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <12000000>;
};
};
pinctrl@80018000 {
enc28j60_pins: enc28j60_pins@0 {
reg = <0>;
fsl,pinmux-ids = <
MX28_PAD_AUART0_RTS__GPIO_3_3 /* Interrupt */
>;
fsl,drive-strength = <MXS_DRIVE_4mA>;
fsl,voltage = <MXS_VOLTAGE_HIGH>;
fsl,pull-up = <MXS_PULL_DISABLE>;
};
};
요약과 해설
microchip,enc28j60.txt:1-56Interrupt polarity, pinctrl과 SPI 주파수 제한을 설명합니다.