xref: /linux/Documentation/devicetree/bindings/net/nixge.txt (revision 597473720f4dc69749542bfcfed4a927a43d935e)
175530a78SMoritz Fischer* NI XGE Ethernet controller
275530a78SMoritz Fischer
375530a78SMoritz FischerRequired properties:
40bb16830SAlex Williams- compatible: Should be "ni,xge-enet-3.00", but can be "ni,xge-enet-2.00" for
50bb16830SAlex Williams              older device trees with DMA engines co-located in the address map,
60bb16830SAlex Williams              with the one reg entry to describe the whole device.
70bb16830SAlex Williams- reg: Address and length of the register set for the device. It contains the
80bb16830SAlex Williams       information of registers in the same order as described by reg-names.
90bb16830SAlex Williams- reg-names: Should contain the reg names
100bb16830SAlex Williams	"dma":  DMA engine control and status region
110bb16830SAlex Williams        "ctrl": MDIO and PHY control and status region
1275530a78SMoritz Fischer- interrupts: Should contain tx and rx interrupt
1375530a78SMoritz Fischer- interrupt-names: Should be "rx" and "tx"
1475530a78SMoritz Fischer- phy-mode: See ethernet.txt file in the same directory.
1575530a78SMoritz Fischer- nvmem-cells: Phandle of nvmem cell containing the MAC address
1675530a78SMoritz Fischer- nvmem-cell-names: Should be "address"
1775530a78SMoritz Fischer
18dd648818SMoritz FischerOptional properties:
19dd648818SMoritz Fischer- mdio subnode to indicate presence of MDIO controller
20*baaac2fbSMoritz Fischer- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
21*baaac2fbSMoritz Fischer  Use instead of phy-handle.
22*baaac2fbSMoritz Fischer- phy-handle: See ethernet.txt file in the same directory.
23dd648818SMoritz Fischer
2475530a78SMoritz FischerExamples (10G generic PHY):
2575530a78SMoritz Fischer	nixge0: ethernet@40000000 {
260bb16830SAlex Williams		compatible = "ni,xge-enet-3.00";
270bb16830SAlex Williams		reg = <0x40000000 0x4000
280bb16830SAlex Williams		       0x41002000 0x2000>;
290bb16830SAlex Williams		reg-names = "dma", "ctrl";
3075530a78SMoritz Fischer
3175530a78SMoritz Fischer		nvmem-cells = <&eth1_addr>;
3275530a78SMoritz Fischer		nvmem-cell-names = "address";
3375530a78SMoritz Fischer
3475530a78SMoritz Fischer		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
3575530a78SMoritz Fischer		interrupt-names = "rx", "tx";
3675530a78SMoritz Fischer		interrupt-parent = <&intc>;
3775530a78SMoritz Fischer
3875530a78SMoritz Fischer		phy-mode = "xgmii";
3975530a78SMoritz Fischer		phy-handle = <&ethernet_phy1>;
4075530a78SMoritz Fischer
41dd648818SMoritz Fischer		mdio {
4275530a78SMoritz Fischer			ethernet_phy1: ethernet-phy@4 {
4375530a78SMoritz Fischer				compatible = "ethernet-phy-ieee802.3-c45";
4475530a78SMoritz Fischer				reg = <4>;
4575530a78SMoritz Fischer			};
4675530a78SMoritz Fischer		};
47dd648818SMoritz Fischer	};
48dd648818SMoritz Fischer
49dd648818SMoritz FischerExamples (10G generic PHY, no MDIO):
50dd648818SMoritz Fischer	nixge0: ethernet@40000000 {
51dd648818SMoritz Fischer		compatible = "ni,xge-enet-2.00";
52dd648818SMoritz Fischer		reg = <0x40000000 0x6000>;
53dd648818SMoritz Fischer
54dd648818SMoritz Fischer		nvmem-cells = <&eth1_addr>;
55dd648818SMoritz Fischer		nvmem-cell-names = "address";
56dd648818SMoritz Fischer
57dd648818SMoritz Fischer		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
58dd648818SMoritz Fischer		interrupt-names = "rx", "tx";
59dd648818SMoritz Fischer		interrupt-parent = <&intc>;
60dd648818SMoritz Fischer
61dd648818SMoritz Fischer		phy-mode = "xgmii";
62dd648818SMoritz Fischer		phy-handle = <&ethernet_phy1>;
63dd648818SMoritz Fischer	};
64*baaac2fbSMoritz Fischer
65*baaac2fbSMoritz FischerExamples (1G generic fixed-link + MDIO):
66*baaac2fbSMoritz Fischer	nixge0: ethernet@40000000 {
67*baaac2fbSMoritz Fischer		compatible = "ni,xge-enet-2.00";
68*baaac2fbSMoritz Fischer		reg = <0x40000000 0x6000>;
69*baaac2fbSMoritz Fischer
70*baaac2fbSMoritz Fischer		nvmem-cells = <&eth1_addr>;
71*baaac2fbSMoritz Fischer		nvmem-cell-names = "address";
72*baaac2fbSMoritz Fischer
73*baaac2fbSMoritz Fischer		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
74*baaac2fbSMoritz Fischer		interrupt-names = "rx", "tx";
75*baaac2fbSMoritz Fischer		interrupt-parent = <&intc>;
76*baaac2fbSMoritz Fischer
77*baaac2fbSMoritz Fischer		phy-mode = "xgmii";
78*baaac2fbSMoritz Fischer
79*baaac2fbSMoritz Fischer		fixed-link {
80*baaac2fbSMoritz Fischer			speed = <1000>;
81*baaac2fbSMoritz Fischer			pause;
82*baaac2fbSMoritz Fischer			link-gpios = <&gpio0 63 GPIO_ACTIVE_HIGH>;
83*baaac2fbSMoritz Fischer		};
84*baaac2fbSMoritz Fischer
85*baaac2fbSMoritz Fischer		mdio {
86*baaac2fbSMoritz Fischer			ethernet_phy1: ethernet-phy@4 {
87*baaac2fbSMoritz Fischer				compatible = "ethernet-phy-ieee802.3-c22";
88*baaac2fbSMoritz Fischer				reg = <4>;
89*baaac2fbSMoritz Fischer			};
90*baaac2fbSMoritz Fischer		};
91*baaac2fbSMoritz Fischer
92*baaac2fbSMoritz Fischer	};
93