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