xref: /freebsd/sys/contrib/device-tree/Bindings/net/arc_emac.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Synopsys ARC EMAC 10/100 Ethernet driver (EMAC)
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: Should be "snps,arc-emac"
5*c66ec88fSEmmanuel Vadot- reg: Address and length of the register set for the device
6*c66ec88fSEmmanuel Vadot- interrupts: Should contain the EMAC interrupts
7*c66ec88fSEmmanuel Vadot- max-speed: see ethernet.txt file in the same directory.
8*c66ec88fSEmmanuel Vadot- phy: see ethernet.txt file in the same directory.
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel VadotOptional properties:
11*c66ec88fSEmmanuel Vadot- phy-reset-gpios : Should specify the gpio for phy reset
12*c66ec88fSEmmanuel Vadot- phy-reset-duration : Reset duration in milliseconds.  Should present
13*c66ec88fSEmmanuel Vadot  only if property "phy-reset-gpios" is available.  Missing the property
14*c66ec88fSEmmanuel Vadot  will have the duration be 1 millisecond.  Numbers greater than 1000 are
15*c66ec88fSEmmanuel Vadot  invalid and 1 millisecond will be used instead.
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel VadotClock handling:
18*c66ec88fSEmmanuel VadotThe clock frequency is needed to calculate and set polling period of EMAC.
19*c66ec88fSEmmanuel VadotIt must be provided by one of:
20*c66ec88fSEmmanuel Vadot- clock-frequency: CPU frequency.
21*c66ec88fSEmmanuel Vadot- clocks: reference to the clock supplying the EMAC.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotChild nodes of the driver are the individual PHY devices connected to the
24*c66ec88fSEmmanuel VadotMDIO bus. They must have a "reg" property given the PHY address on the MDIO bus.
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotExamples:
27*c66ec88fSEmmanuel Vadot
28*c66ec88fSEmmanuel Vadot	ethernet@c0fc2000 {
29*c66ec88fSEmmanuel Vadot		compatible = "snps,arc-emac";
30*c66ec88fSEmmanuel Vadot		reg = <0xc0fc2000 0x3c>;
31*c66ec88fSEmmanuel Vadot		interrupts = <6>;
32*c66ec88fSEmmanuel Vadot		mac-address = [ 00 11 22 33 44 55 ];
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot		clock-frequency = <80000000>;
35*c66ec88fSEmmanuel Vadot		/* or */
36*c66ec88fSEmmanuel Vadot		clocks = <&emac_clock>;
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel Vadot		max-speed = <100>;
39*c66ec88fSEmmanuel Vadot		phy = <&phy0>;
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
42*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
43*c66ec88fSEmmanuel Vadot		phy0: ethernet-phy@0 {
44*c66ec88fSEmmanuel Vadot			reg = <1>;
45*c66ec88fSEmmanuel Vadot		};
46*c66ec88fSEmmanuel Vadot	};
47