← Documents Documentation/devicetree/bindings/net/wiznet,w5x00.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Wiznet W5x00

W5100/W5200/W5500 SPI Ethernet controller binding입니다.

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

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

1. 요약·해설

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

요약과 해설

wiznet,w5x00.txt:1-50

Interrupt polarity, pinctrl과 SPI frequency 제한을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Wiznet w5x00
2
3 This is a standalone 10/100 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 one of the following strings:
10 "wiznet,w5100"
11 "wiznet,w5200"
12 "wiznet,w5500"
13 - reg: Specify the SPI chip select the chip is wired to.
14 - interrupts: Specify the interrupt index within the interrupt controller (referred
15 to above in interrupt-parent) and interrupt type. w5x00 natively
16 generates falling edge interrupts, however, additional board logic
17 might invert the signal.
18 - pinctrl-names: List of assigned state names, see pinctrl binding documentation.
19 - pinctrl-0: List of phandles to configure the GPIO pin used as interrupt line,
20 see also generic and your platform specific pinctrl binding
21 documentation.
22
23 Optional properties:
24 - spi-max-frequency: Maximum frequency of the SPI bus when accessing the w5500.
25 According to the w5500 datasheet, the chip allows a maximum of 80 MHz, however,
26 board designs may need to limit this value.
27 - local-mac-address: See ethernet.txt in the same directory.
28
29
30 Example (for Raspberry Pi with pin control stuff for GPIO irq):
31
32 &spi {
33 ethernet@0: w5500@0 {
34 compatible = "wiznet,w5500";
35 reg = <0>;
36 pinctrl-names = "default";
37 pinctrl-0 = <&eth1_pins>;
38 interrupt-parent = <&gpio>;
39 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
40 spi-max-frequency = <30000000>;
41 };
42 };
43
44 &gpio {
45 eth1_pins: eth1_pins {
46 brcm,pins = <25>;
47 brcm,function = <0>; /* in */
48 brcm,pull = <0>; /* none */
49 };
50 };
51

3. 한국어 전문 번역

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

Wiznet W5x00

1-7

Wiznet W5x00은 SPI interface를 사용하는 독립형 10/100Mbit Ethernet controller입니다. SPI bus에 연결된 각 장치는 SPI master node 아래 child node로 정의합니다.

W5x00 속성

8-28

필수 `compatible`은 `wiznet,w5100`, `wiznet,w5200`, `wiznet,w5500` 중 하나입니다. `reg`는 chip이 연결된 SPI chip select입니다.

`interrupts`는 `interrupt-parent`가 가리키는 controller 안의 interrupt index와 type입니다. W5x00은 원래 falling-edge interrupt를 생성하지만 board logic이 signal을 반전할 수 있습니다.

`pinctrl-names`는 할당 state 이름 목록, `pinctrl-0`은 interrupt line GPIO를 구성하는 phandle 목록입니다.

선택 `spi-max-frequency`는 W5500 접근 시 최대 SPI 주파수입니다. Datasheet상 최대 80MHz지만 board 설계에 따라 제한할 수 있습니다. `local-mac-address`는 같은 directory의 `ethernet.txt`를 따릅니다.

Raspberry Pi W5500 예제

29-50

예제는 SPI chip select 0의 W5500을 30MHz로 구동하고 GPIO 25의 falling-edge interrupt와 input/no-pull pinctrl을 사용합니다.

&spi {
        ethernet@0: w5500@0 {
                compatible = "wiznet,w5500";
                reg = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&eth1_pins>;
                interrupt-parent = <&gpio>;
                interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
                spi-max-frequency = <30000000>;
        };
};

&gpio {
        eth1_pins: eth1_pins {
                brcm,pins = <25>;
                brcm,function = <0>; /* in */
                brcm,pull = <0>; /* none */
        };
};