xref: /openbmc/linux/Documentation/devicetree/bindings/net/marvell-orion-net.txt (revision 858a0d7eb5300b5f620d98ab3c4b96c9d5f19131)
176723bcaSSebastian HesselbarthMarvell Orion/Discovery ethernet controller
276723bcaSSebastian Hesselbarth=============================================
376723bcaSSebastian Hesselbarth
476723bcaSSebastian HesselbarthThe Marvell Discovery ethernet controller can be found on Marvell Orion SoCs
576723bcaSSebastian Hesselbarth(Kirkwood, Dove, Orion5x, and Discovery Innovation) and as part of Marvell
676723bcaSSebastian HesselbarthDiscovery system controller chips (mv64[345]60).
776723bcaSSebastian Hesselbarth
876723bcaSSebastian HesselbarthThe Discovery ethernet controller is described with two levels of nodes. The
976723bcaSSebastian Hesselbarthfirst level describes the ethernet controller itself and the second level
1076723bcaSSebastian Hesselbarthdescribes up to 3 ethernet port nodes within that controller. The reason for
1176723bcaSSebastian Hesselbarththe multiple levels is that the port registers are interleaved within a single
1276723bcaSSebastian Hesselbarthset of controller registers. Each port node describes port-specific properties.
1376723bcaSSebastian Hesselbarth
1476723bcaSSebastian HesselbarthNote: The above separation is only true for Discovery system controllers.
1576723bcaSSebastian HesselbarthFor Orion SoCs we stick to the separation, although there each controller has
1676723bcaSSebastian Hesselbarthonly one port associated. Multiple ports are implemented as multiple single-port
1776723bcaSSebastian Hesselbarthcontrollers. As Kirkwood has some issues with proper initialization after reset,
1876723bcaSSebastian Hesselbarthan extra compatible string is added for it.
1976723bcaSSebastian Hesselbarth
2076723bcaSSebastian Hesselbarth* Ethernet controller node
2176723bcaSSebastian Hesselbarth
2276723bcaSSebastian HesselbarthRequired controller properties:
2376723bcaSSebastian Hesselbarth - #address-cells: shall be 1.
2476723bcaSSebastian Hesselbarth - #size-cells: shall be 0.
2576723bcaSSebastian Hesselbarth - compatible: shall be one of "marvell,orion-eth", "marvell,kirkwood-eth".
2676723bcaSSebastian Hesselbarth - reg: address and length of the controller registers.
2776723bcaSSebastian Hesselbarth
2876723bcaSSebastian HesselbarthOptional controller properties:
2976723bcaSSebastian Hesselbarth - clocks: phandle reference to the controller clock.
3076723bcaSSebastian Hesselbarth - marvell,tx-checksum-limit: max tx packet size for hardware checksum.
3176723bcaSSebastian Hesselbarth
3276723bcaSSebastian Hesselbarth* Ethernet port node
3376723bcaSSebastian Hesselbarth
3476723bcaSSebastian HesselbarthRequired port properties:
3576723bcaSSebastian Hesselbarth - compatible: shall be one of "marvell,orion-eth-port",
3676723bcaSSebastian Hesselbarth      "marvell,kirkwood-eth-port".
3776723bcaSSebastian Hesselbarth - reg: port number relative to ethernet controller, shall be 0, 1, or 2.
3876723bcaSSebastian Hesselbarth - interrupts: port interrupt.
39e8f08ee0SSergei Shtylyov - local-mac-address: See ethernet.txt file in the same directory.
4076723bcaSSebastian Hesselbarth
4176723bcaSSebastian HesselbarthOptional port properties:
4276723bcaSSebastian Hesselbarth - marvell,tx-queue-size: size of the transmit ring buffer.
4376723bcaSSebastian Hesselbarth - marvell,tx-sram-addr: address of transmit descriptor buffer located in SRAM.
4476723bcaSSebastian Hesselbarth - marvell,tx-sram-size: size of transmit descriptor buffer located in SRAM.
4576723bcaSSebastian Hesselbarth - marvell,rx-queue-size: size of the receive ring buffer.
4676723bcaSSebastian Hesselbarth - marvell,rx-sram-addr: address of receive descriptor buffer located in SRAM.
4776723bcaSSebastian Hesselbarth - marvell,rx-sram-size: size of receive descriptor buffer located in SRAM.
4876723bcaSSebastian Hesselbarth
4976723bcaSSebastian Hesselbarthand
5076723bcaSSebastian Hesselbarth
51e8f08ee0SSergei Shtylyov - phy-handle: See ethernet.txt file in the same directory.
52*fd33b244SJason Gunthorpe - phy-mode: See ethernet.txt file in the same directory.
5376723bcaSSebastian Hesselbarth
5476723bcaSSebastian Hesselbarthor
5576723bcaSSebastian Hesselbarth
5676723bcaSSebastian Hesselbarth - speed: port speed if no PHY connected.
5776723bcaSSebastian Hesselbarth - duplex: port mode if no PHY connected.
5876723bcaSSebastian Hesselbarth
5976723bcaSSebastian Hesselbarth* Node example:
6076723bcaSSebastian Hesselbarth
6176723bcaSSebastian Hesselbarthmdio-bus {
6276723bcaSSebastian Hesselbarth	...
6376723bcaSSebastian Hesselbarth	ethphy: ethernet-phy@8 {
6476723bcaSSebastian Hesselbarth		...
6576723bcaSSebastian Hesselbarth	};
6676723bcaSSebastian Hesselbarth};
6776723bcaSSebastian Hesselbarth
6876723bcaSSebastian Hesselbartheth: ethernet-controller@72000 {
6976723bcaSSebastian Hesselbarth	compatible = "marvell,orion-eth";
7076723bcaSSebastian Hesselbarth	#address-cells = <1>;
7176723bcaSSebastian Hesselbarth	#size-cells = <0>;
7276723bcaSSebastian Hesselbarth	reg = <0x72000 0x2000>;
7376723bcaSSebastian Hesselbarth	clocks = <&gate_clk 2>;
7476723bcaSSebastian Hesselbarth	marvell,tx-checksum-limit = <1600>;
7576723bcaSSebastian Hesselbarth
7676723bcaSSebastian Hesselbarth	ethernet@0 {
7776723bcaSSebastian Hesselbarth		compatible = "marvell,orion-eth-port";
7876723bcaSSebastian Hesselbarth		reg = <0>;
7976723bcaSSebastian Hesselbarth		interrupts = <29>;
8076723bcaSSebastian Hesselbarth		phy-handle = <&ethphy>;
8176723bcaSSebastian Hesselbarth		local-mac-address = [00 00 00 00 00 00];
8276723bcaSSebastian Hesselbarth	};
8376723bcaSSebastian Hesselbarth};
84