xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/marvell-orion-net.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunMarvell Orion/Discovery ethernet controller
2*4882a593Smuzhiyun=============================================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThe Marvell Discovery ethernet controller can be found on Marvell Orion SoCs
5*4882a593Smuzhiyun(Kirkwood, Dove, Orion5x, and Discovery Innovation) and as part of Marvell
6*4882a593SmuzhiyunDiscovery system controller chips (mv64[345]60).
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunThe Discovery ethernet controller is described with two levels of nodes. The
9*4882a593Smuzhiyunfirst level describes the ethernet controller itself and the second level
10*4882a593Smuzhiyundescribes up to 3 ethernet port nodes within that controller. The reason for
11*4882a593Smuzhiyunthe multiple levels is that the port registers are interleaved within a single
12*4882a593Smuzhiyunset of controller registers. Each port node describes port-specific properties.
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunNote: The above separation is only true for Discovery system controllers.
15*4882a593SmuzhiyunFor Orion SoCs we stick to the separation, although there each controller has
16*4882a593Smuzhiyunonly one port associated. Multiple ports are implemented as multiple single-port
17*4882a593Smuzhiyuncontrollers. As Kirkwood has some issues with proper initialization after reset,
18*4882a593Smuzhiyunan extra compatible string is added for it.
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun* Ethernet controller node
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunRequired controller properties:
23*4882a593Smuzhiyun - #address-cells: shall be 1.
24*4882a593Smuzhiyun - #size-cells: shall be 0.
25*4882a593Smuzhiyun - compatible: shall be one of "marvell,orion-eth", "marvell,kirkwood-eth".
26*4882a593Smuzhiyun - reg: address and length of the controller registers.
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunOptional controller properties:
29*4882a593Smuzhiyun - clocks: phandle reference to the controller clock.
30*4882a593Smuzhiyun - marvell,tx-checksum-limit: max tx packet size for hardware checksum.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun* Ethernet port node
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunRequired port properties:
35*4882a593Smuzhiyun - compatible: shall be one of "marvell,orion-eth-port",
36*4882a593Smuzhiyun      "marvell,kirkwood-eth-port".
37*4882a593Smuzhiyun - reg: port number relative to ethernet controller, shall be 0, 1, or 2.
38*4882a593Smuzhiyun - interrupts: port interrupt.
39*4882a593Smuzhiyun - local-mac-address: See ethernet.txt file in the same directory.
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunOptional port properties:
42*4882a593Smuzhiyun - marvell,tx-queue-size: size of the transmit ring buffer.
43*4882a593Smuzhiyun - marvell,tx-sram-addr: address of transmit descriptor buffer located in SRAM.
44*4882a593Smuzhiyun - marvell,tx-sram-size: size of transmit descriptor buffer located in SRAM.
45*4882a593Smuzhiyun - marvell,rx-queue-size: size of the receive ring buffer.
46*4882a593Smuzhiyun - marvell,rx-sram-addr: address of receive descriptor buffer located in SRAM.
47*4882a593Smuzhiyun - marvell,rx-sram-size: size of receive descriptor buffer located in SRAM.
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunand
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun - phy-handle: See ethernet.txt file in the same directory.
52*4882a593Smuzhiyun - phy-mode: See ethernet.txt file in the same directory.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyunor
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun - speed: port speed if no PHY connected.
57*4882a593Smuzhiyun - duplex: port mode if no PHY connected.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun* Node example:
60*4882a593Smuzhiyun
61*4882a593Smuzhiyunmdio-bus {
62*4882a593Smuzhiyun	...
63*4882a593Smuzhiyun	ethphy: ethernet-phy@8 {
64*4882a593Smuzhiyun		...
65*4882a593Smuzhiyun	};
66*4882a593Smuzhiyun};
67*4882a593Smuzhiyun
68*4882a593Smuzhiyuneth: ethernet-controller@72000 {
69*4882a593Smuzhiyun	compatible = "marvell,orion-eth";
70*4882a593Smuzhiyun	#address-cells = <1>;
71*4882a593Smuzhiyun	#size-cells = <0>;
72*4882a593Smuzhiyun	reg = <0x72000 0x2000>;
73*4882a593Smuzhiyun	clocks = <&gate_clk 2>;
74*4882a593Smuzhiyun	marvell,tx-checksum-limit = <1600>;
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun	ethernet@0 {
77*4882a593Smuzhiyun		compatible = "marvell,orion-eth-port";
78*4882a593Smuzhiyun		reg = <0>;
79*4882a593Smuzhiyun		interrupts = <29>;
80*4882a593Smuzhiyun		phy-handle = <&ethphy>;
81*4882a593Smuzhiyun		local-mac-address = [00 00 00 00 00 00];
82*4882a593Smuzhiyun	};
83*4882a593Smuzhiyun};
84