xref: /freebsd/sys/contrib/device-tree/Bindings/net/nixge.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* NI XGE Ethernet controller
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: Should be "ni,xge-enet-3.00", but can be "ni,xge-enet-2.00" for
5*c66ec88fSEmmanuel Vadot              older device trees with DMA engines co-located in the address map,
6*c66ec88fSEmmanuel Vadot              with the one reg entry to describe the whole device.
7*c66ec88fSEmmanuel Vadot- reg: Address and length of the register set for the device. It contains the
8*c66ec88fSEmmanuel Vadot       information of registers in the same order as described by reg-names.
9*c66ec88fSEmmanuel Vadot- reg-names: Should contain the reg names
10*c66ec88fSEmmanuel Vadot	"dma":  DMA engine control and status region
11*c66ec88fSEmmanuel Vadot        "ctrl": MDIO and PHY control and status region
12*c66ec88fSEmmanuel Vadot- interrupts: Should contain tx and rx interrupt
13*c66ec88fSEmmanuel Vadot- interrupt-names: Should be "rx" and "tx"
14*c66ec88fSEmmanuel Vadot- phy-mode: See ethernet.txt file in the same directory.
15*c66ec88fSEmmanuel Vadot- nvmem-cells: Phandle of nvmem cell containing the MAC address
16*c66ec88fSEmmanuel Vadot- nvmem-cell-names: Should be "address"
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotOptional properties:
19*c66ec88fSEmmanuel Vadot- mdio subnode to indicate presence of MDIO controller
20*c66ec88fSEmmanuel Vadot- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
21*c66ec88fSEmmanuel Vadot  Use instead of phy-handle.
22*c66ec88fSEmmanuel Vadot- phy-handle: See ethernet.txt file in the same directory.
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotExamples (10G generic PHY):
25*c66ec88fSEmmanuel Vadot	nixge0: ethernet@40000000 {
26*c66ec88fSEmmanuel Vadot		compatible = "ni,xge-enet-3.00";
27*c66ec88fSEmmanuel Vadot		reg = <0x40000000 0x4000
28*c66ec88fSEmmanuel Vadot		       0x41002000 0x2000>;
29*c66ec88fSEmmanuel Vadot		reg-names = "dma", "ctrl";
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel Vadot		nvmem-cells = <&eth1_addr>;
32*c66ec88fSEmmanuel Vadot		nvmem-cell-names = "address";
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
35*c66ec88fSEmmanuel Vadot		interrupt-names = "rx", "tx";
36*c66ec88fSEmmanuel Vadot		interrupt-parent = <&intc>;
37*c66ec88fSEmmanuel Vadot
38*c66ec88fSEmmanuel Vadot		phy-mode = "xgmii";
39*c66ec88fSEmmanuel Vadot		phy-handle = <&ethernet_phy1>;
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel Vadot		mdio {
42*c66ec88fSEmmanuel Vadot			ethernet_phy1: ethernet-phy@4 {
43*c66ec88fSEmmanuel Vadot				compatible = "ethernet-phy-ieee802.3-c45";
44*c66ec88fSEmmanuel Vadot				reg = <4>;
45*c66ec88fSEmmanuel Vadot			};
46*c66ec88fSEmmanuel Vadot		};
47*c66ec88fSEmmanuel Vadot	};
48*c66ec88fSEmmanuel Vadot
49*c66ec88fSEmmanuel VadotExamples (10G generic PHY, no MDIO):
50*c66ec88fSEmmanuel Vadot	nixge0: ethernet@40000000 {
51*c66ec88fSEmmanuel Vadot		compatible = "ni,xge-enet-2.00";
52*c66ec88fSEmmanuel Vadot		reg = <0x40000000 0x6000>;
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadot		nvmem-cells = <&eth1_addr>;
55*c66ec88fSEmmanuel Vadot		nvmem-cell-names = "address";
56*c66ec88fSEmmanuel Vadot
57*c66ec88fSEmmanuel Vadot		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
58*c66ec88fSEmmanuel Vadot		interrupt-names = "rx", "tx";
59*c66ec88fSEmmanuel Vadot		interrupt-parent = <&intc>;
60*c66ec88fSEmmanuel Vadot
61*c66ec88fSEmmanuel Vadot		phy-mode = "xgmii";
62*c66ec88fSEmmanuel Vadot		phy-handle = <&ethernet_phy1>;
63*c66ec88fSEmmanuel Vadot	};
64*c66ec88fSEmmanuel Vadot
65*c66ec88fSEmmanuel VadotExamples (1G generic fixed-link + MDIO):
66*c66ec88fSEmmanuel Vadot	nixge0: ethernet@40000000 {
67*c66ec88fSEmmanuel Vadot		compatible = "ni,xge-enet-2.00";
68*c66ec88fSEmmanuel Vadot		reg = <0x40000000 0x6000>;
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot		nvmem-cells = <&eth1_addr>;
71*c66ec88fSEmmanuel Vadot		nvmem-cell-names = "address";
72*c66ec88fSEmmanuel Vadot
73*c66ec88fSEmmanuel Vadot		interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>, <0 30 IRQ_TYPE_LEVEL_HIGH>;
74*c66ec88fSEmmanuel Vadot		interrupt-names = "rx", "tx";
75*c66ec88fSEmmanuel Vadot		interrupt-parent = <&intc>;
76*c66ec88fSEmmanuel Vadot
77*c66ec88fSEmmanuel Vadot		phy-mode = "xgmii";
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadot		fixed-link {
80*c66ec88fSEmmanuel Vadot			speed = <1000>;
81*c66ec88fSEmmanuel Vadot			pause;
82*c66ec88fSEmmanuel Vadot			link-gpios = <&gpio0 63 GPIO_ACTIVE_HIGH>;
83*c66ec88fSEmmanuel Vadot		};
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel Vadot		mdio {
86*c66ec88fSEmmanuel Vadot			ethernet_phy1: ethernet-phy@4 {
87*c66ec88fSEmmanuel Vadot				compatible = "ethernet-phy-ieee802.3-c22";
88*c66ec88fSEmmanuel Vadot				reg = <4>;
89*c66ec88fSEmmanuel Vadot			};
90*c66ec88fSEmmanuel Vadot		};
91*c66ec88fSEmmanuel Vadot
92*c66ec88fSEmmanuel Vadot	};
93