← Documents Documentation/devicetree/bindings/net/microchip,enc28j60.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Microchip ENC28J60

SPI 기반 10Mbit ENC28J60 Ethernet controller binding입니다.

Source pathDocumentation/devicetree/bindings/net/microchip,enc28j60.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

microchip,enc28j60.txt:1-56

Interrupt polarity, pinctrl과 SPI 주파수 제한을 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 * Microchip ENC28J60
2
3 This is a standalone 10 MBit ethernet controller with SPI interface.
4
5 For each device connected to a SPI bus, define a child node within
6 the SPI master node.
7
8 Required properties:
9 - compatible: Should be "microchip,enc28j60"
10 - reg: Specify the SPI chip select the ENC28J60 is wired to
11 - interrupts: Specify the interrupt index within the interrupt controller (referred
12 to above in interrupt-parent) and interrupt type. The ENC28J60 natively
13 generates falling edge interrupts, however, additional board logic
14 might invert the signal.
15 - pinctrl-names: List of assigned state names, see pinctrl binding documentation.
16 - pinctrl-0: List of phandles to configure the GPIO pin used as interrupt line,
17 see also generic and your platform specific pinctrl binding
18 documentation.
19
20 Optional properties:
21 - spi-max-frequency: Maximum frequency of the SPI bus when accessing the ENC28J60.
22 According to the ENC28J80 datasheet, the chip allows a maximum of 20 MHz, however,
23 board designs may need to limit this value.
24
25 The MAC address will be determined using the optional properties
26 defined in ethernet.txt.
27
28 Example (for NXP i.MX28 with pin control stuff for GPIO irq):
29
30 ssp2: ssp@80014000 {
31 compatible = "fsl,imx28-spi";
32 pinctrl-names = "default";
33 pinctrl-0 = <&spi2_pins_b &spi2_sck_cfg>;
34
35 enc28j60: ethernet@0 {
36 compatible = "microchip,enc28j60";
37 pinctrl-names = "default";
38 pinctrl-0 = <&enc28j60_pins>;
39 reg = <0>;
40 interrupt-parent = <&gpio3>;
41 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
42 spi-max-frequency = <12000000>;
43 };
44 };
45
46 pinctrl@80018000 {
47 enc28j60_pins: enc28j60_pins@0 {
48 reg = <0>;
49 fsl,pinmux-ids = <
50 MX28_PAD_AUART0_RTS__GPIO_3_3 /* Interrupt */
51 >;
52 fsl,drive-strength = <MXS_DRIVE_4mA>;
53 fsl,voltage = <MXS_VOLTAGE_HIGH>;
54 fsl,pull-up = <MXS_PULL_DISABLE>;
55 };
56 };
57

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Microchip ENC28J60

1-7

ENC28J60은 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>;
        };
};