xref: /freebsd/sys/contrib/device-tree/Bindings/net/wiznet,w5x00.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Wiznet w5x00
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThis is a standalone 10/100 MBit Ethernet controller with SPI interface.
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel VadotFor each device connected to a SPI bus, define a child node within
6*c66ec88fSEmmanuel Vadotthe SPI master node.
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel VadotRequired properties:
9*c66ec88fSEmmanuel Vadot- compatible: Should be one of the following strings:
10*c66ec88fSEmmanuel Vadot	      "wiznet,w5100"
11*c66ec88fSEmmanuel Vadot	      "wiznet,w5200"
12*c66ec88fSEmmanuel Vadot	      "wiznet,w5500"
13*c66ec88fSEmmanuel Vadot- reg: Specify the SPI chip select the chip is wired to.
14*c66ec88fSEmmanuel Vadot- interrupts: Specify the interrupt index within the interrupt controller (referred
15*c66ec88fSEmmanuel Vadot              to above in interrupt-parent) and interrupt type. w5x00 natively
16*c66ec88fSEmmanuel Vadot              generates falling edge interrupts, however, additional board logic
17*c66ec88fSEmmanuel Vadot              might invert the signal.
18*c66ec88fSEmmanuel Vadot- pinctrl-names: List of assigned state names, see pinctrl binding documentation.
19*c66ec88fSEmmanuel Vadot- pinctrl-0: List of phandles to configure the GPIO pin used as interrupt line,
20*c66ec88fSEmmanuel Vadot             see also generic and your platform specific pinctrl binding
21*c66ec88fSEmmanuel Vadot             documentation.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotOptional properties:
24*c66ec88fSEmmanuel Vadot- spi-max-frequency: Maximum frequency of the SPI bus when accessing the w5500.
25*c66ec88fSEmmanuel Vadot  According to the w5500 datasheet, the chip allows a maximum of 80 MHz, however,
26*c66ec88fSEmmanuel Vadot  board designs may need to limit this value.
27*c66ec88fSEmmanuel Vadot- local-mac-address: See ethernet.txt in the same directory.
28*c66ec88fSEmmanuel Vadot
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel VadotExample (for Raspberry Pi with pin control stuff for GPIO irq):
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadot&spi {
33*c66ec88fSEmmanuel Vadot	ethernet@0: w5500@0 {
34*c66ec88fSEmmanuel Vadot		compatible = "wiznet,w5500";
35*c66ec88fSEmmanuel Vadot		reg = <0>;
36*c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
37*c66ec88fSEmmanuel Vadot		pinctrl-0 = <&eth1_pins>;
38*c66ec88fSEmmanuel Vadot		interrupt-parent = <&gpio>;
39*c66ec88fSEmmanuel Vadot		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
40*c66ec88fSEmmanuel Vadot		spi-max-frequency = <30000000>;
41*c66ec88fSEmmanuel Vadot	};
42*c66ec88fSEmmanuel Vadot};
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel Vadot&gpio {
45*c66ec88fSEmmanuel Vadot	eth1_pins: eth1_pins {
46*c66ec88fSEmmanuel Vadot		brcm,pins = <25>;
47*c66ec88fSEmmanuel Vadot		brcm,function = <0>; /* in */
48*c66ec88fSEmmanuel Vadot		brcm,pull = <0>; /* none */
49*c66ec88fSEmmanuel Vadot	};
50*c66ec88fSEmmanuel Vadot};
51