xref: /freebsd/sys/contrib/device-tree/Bindings/net/brcm,bcmgenet.txt (revision 8cc087a1eee9ec1ca9f7ac1e63ad51bdb5a682eb)
1c66ec88fSEmmanuel Vadot* Broadcom BCM7xxx Ethernet Controller (GENET)
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotRequired properties:
4c66ec88fSEmmanuel Vadot- compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2",
5*8cc087a1SEmmanuel Vadot  "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5", "brcm,bcm2711-genet-v5" or
6*8cc087a1SEmmanuel Vadot  "brcm,bcm7712-genet-v5".
7c66ec88fSEmmanuel Vadot- reg: address and length of the register set for the device
8c66ec88fSEmmanuel Vadot- interrupts and/or interrupts-extended: must be two cells, the first cell
9c66ec88fSEmmanuel Vadot  is the general purpose interrupt line, while the second cell is the
10c66ec88fSEmmanuel Vadot  interrupt for the ring RX and TX queues operating in ring mode.  An
11c66ec88fSEmmanuel Vadot  optional third interrupt cell for Wake-on-LAN can be specified.
12c66ec88fSEmmanuel Vadot  See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
13c66ec88fSEmmanuel Vadot  for information on the property specifics.
14c66ec88fSEmmanuel Vadot- phy-mode: see ethernet.txt file in the same directory
15c66ec88fSEmmanuel Vadot- #address-cells: should be 1
16c66ec88fSEmmanuel Vadot- #size-cells: should be 1
17c66ec88fSEmmanuel Vadot
18c66ec88fSEmmanuel VadotOptional properties:
19c66ec88fSEmmanuel Vadot- clocks: When provided, must be two phandles to the functional clocks nodes
20c66ec88fSEmmanuel Vadot  of the GENET block. The first phandle is the main GENET clock used during
21c66ec88fSEmmanuel Vadot  normal operation, while the second phandle is the Wake-on-LAN clock.
22c66ec88fSEmmanuel Vadot- clock-names: When provided, names of the functional clock phandles, first
23c66ec88fSEmmanuel Vadot  name should be "enet" and second should be "enet-wol".
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot- phy-handle: See ethernet.txt file in the same directory; used to describe
26c66ec88fSEmmanuel Vadot  configurations where a PHY (internal or external) is used.
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot- fixed-link: When the GENET interface is connected to a MoCA hardware block or
29c66ec88fSEmmanuel Vadot  when operating in a RGMII to RGMII type of connection, or when the MDIO bus is
30c66ec88fSEmmanuel Vadot  voluntarily disabled, this property should be used to describe the "fixed link".
31c66ec88fSEmmanuel Vadot  See Documentation/devicetree/bindings/net/fixed-link.txt for information on
32c66ec88fSEmmanuel Vadot  the property specifics
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel VadotRequired child nodes:
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot- mdio bus node: this node should always be present regardless of the PHY
37c66ec88fSEmmanuel Vadot  configuration of the GENET instance
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel VadotMDIO bus node required properties:
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadot- compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2"
42c66ec88fSEmmanuel Vadot  "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5", the version
43c66ec88fSEmmanuel Vadot  has to match the parent node compatible property (e.g: brcm,genet-v4 pairs
44c66ec88fSEmmanuel Vadot  with brcm,genet-mdio-v4)
45c66ec88fSEmmanuel Vadot- reg: address and length relative to the parent node base register address
46c66ec88fSEmmanuel Vadot- #address-cells: address cell for MDIO bus addressing, should be 1
47c66ec88fSEmmanuel Vadot- #size-cells: size of the cells for MDIO bus addressing, should be 0
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel VadotEthernet PHY node properties:
50c66ec88fSEmmanuel Vadot
51c66ec88fSEmmanuel VadotSee Documentation/devicetree/bindings/net/phy.txt for the list of required and
52c66ec88fSEmmanuel Vadotoptional properties.
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel VadotInternal Gigabit PHY example:
55c66ec88fSEmmanuel Vadot
56c66ec88fSEmmanuel Vadotethernet@f0b60000 {
57c66ec88fSEmmanuel Vadot	phy-mode = "internal";
58c66ec88fSEmmanuel Vadot	phy-handle = <&phy1>;
59c66ec88fSEmmanuel Vadot	mac-address = [ 00 10 18 36 23 1a ];
60c66ec88fSEmmanuel Vadot	compatible = "brcm,genet-v4";
61c66ec88fSEmmanuel Vadot	#address-cells = <0x1>;
62c66ec88fSEmmanuel Vadot	#size-cells = <0x1>;
63c66ec88fSEmmanuel Vadot	reg = <0xf0b60000 0xfc4c>;
64c66ec88fSEmmanuel Vadot	interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>;
65c66ec88fSEmmanuel Vadot
66c66ec88fSEmmanuel Vadot	mdio@e14 {
67c66ec88fSEmmanuel Vadot		compatible = "brcm,genet-mdio-v4";
68c66ec88fSEmmanuel Vadot		#address-cells = <0x1>;
69c66ec88fSEmmanuel Vadot		#size-cells = <0x0>;
70c66ec88fSEmmanuel Vadot		reg = <0xe14 0x8>;
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot		phy1: ethernet-phy@1 {
73c66ec88fSEmmanuel Vadot			max-speed = <1000>;
74c66ec88fSEmmanuel Vadot			reg = <0x1>;
75c66ec88fSEmmanuel Vadot			compatible = "ethernet-phy-ieee802.3-c22";
76c66ec88fSEmmanuel Vadot		};
77c66ec88fSEmmanuel Vadot	};
78c66ec88fSEmmanuel Vadot};
79c66ec88fSEmmanuel Vadot
80c66ec88fSEmmanuel VadotMoCA interface / MAC to MAC example:
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadotethernet@f0b80000 {
83c66ec88fSEmmanuel Vadot	phy-mode = "moca";
84c66ec88fSEmmanuel Vadot	fixed-link = <1 0 1000 0 0>;
85c66ec88fSEmmanuel Vadot	mac-address = [ 00 10 18 36 24 1a ];
86c66ec88fSEmmanuel Vadot	compatible = "brcm,genet-v4";
87c66ec88fSEmmanuel Vadot	#address-cells = <0x1>;
88c66ec88fSEmmanuel Vadot	#size-cells = <0x1>;
89c66ec88fSEmmanuel Vadot	reg = <0xf0b80000 0xfc4c>;
90c66ec88fSEmmanuel Vadot	interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>;
91c66ec88fSEmmanuel Vadot
92c66ec88fSEmmanuel Vadot	mdio@e14 {
93c66ec88fSEmmanuel Vadot		compatible = "brcm,genet-mdio-v4";
94c66ec88fSEmmanuel Vadot		#address-cells = <0x1>;
95c66ec88fSEmmanuel Vadot		#size-cells = <0x0>;
96c66ec88fSEmmanuel Vadot		reg = <0xe14 0x8>;
97c66ec88fSEmmanuel Vadot	};
98c66ec88fSEmmanuel Vadot};
99c66ec88fSEmmanuel Vadot
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel VadotExternal MDIO-connected Gigabit PHY/switch:
102c66ec88fSEmmanuel Vadot
103c66ec88fSEmmanuel Vadotethernet@f0ba0000 {
104c66ec88fSEmmanuel Vadot	phy-mode = "rgmii";
105c66ec88fSEmmanuel Vadot	phy-handle = <&phy0>;
106c66ec88fSEmmanuel Vadot	mac-address = [ 00 10 18 36 26 1a ];
107c66ec88fSEmmanuel Vadot	compatible = "brcm,genet-v4";
108c66ec88fSEmmanuel Vadot	#address-cells = <0x1>;
109c66ec88fSEmmanuel Vadot	#size-cells = <0x1>;
110c66ec88fSEmmanuel Vadot	reg = <0xf0ba0000 0xfc4c>;
111c66ec88fSEmmanuel Vadot	interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>;
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot	mdio@e14 {
114c66ec88fSEmmanuel Vadot		compatible = "brcm,genet-mdio-v4";
115c66ec88fSEmmanuel Vadot		#address-cells = <0x1>;
116c66ec88fSEmmanuel Vadot		#size-cells = <0x0>;
117c66ec88fSEmmanuel Vadot		reg = <0xe14 0x8>;
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot		phy0: ethernet-phy@0 {
120c66ec88fSEmmanuel Vadot			max-speed = <1000>;
121c66ec88fSEmmanuel Vadot			reg = <0x0>;
122c66ec88fSEmmanuel Vadot			compatible = "ethernet-phy-ieee802.3-c22";
123c66ec88fSEmmanuel Vadot		};
124c66ec88fSEmmanuel Vadot	};
125c66ec88fSEmmanuel Vadot};
126