18c2ecf20Sopenharmony_ci* Broadcom BCM7xxx Ethernet Controller (GENET)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciRequired properties:
48c2ecf20Sopenharmony_ci- compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2",
58c2ecf20Sopenharmony_ci  "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5", "brcm,bcm2711-genet-v5".
68c2ecf20Sopenharmony_ci- reg: address and length of the register set for the device
78c2ecf20Sopenharmony_ci- interrupts and/or interrupts-extended: must be two cells, the first cell
88c2ecf20Sopenharmony_ci  is the general purpose interrupt line, while the second cell is the
98c2ecf20Sopenharmony_ci  interrupt for the ring RX and TX queues operating in ring mode.  An
108c2ecf20Sopenharmony_ci  optional third interrupt cell for Wake-on-LAN can be specified.
118c2ecf20Sopenharmony_ci  See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
128c2ecf20Sopenharmony_ci  for information on the property specifics.
138c2ecf20Sopenharmony_ci- phy-mode: see ethernet.txt file in the same directory
148c2ecf20Sopenharmony_ci- #address-cells: should be 1
158c2ecf20Sopenharmony_ci- #size-cells: should be 1
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciOptional properties:
188c2ecf20Sopenharmony_ci- clocks: When provided, must be two phandles to the functional clocks nodes
198c2ecf20Sopenharmony_ci  of the GENET block. The first phandle is the main GENET clock used during
208c2ecf20Sopenharmony_ci  normal operation, while the second phandle is the Wake-on-LAN clock.
218c2ecf20Sopenharmony_ci- clock-names: When provided, names of the functional clock phandles, first
228c2ecf20Sopenharmony_ci  name should be "enet" and second should be "enet-wol".
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci- phy-handle: See ethernet.txt file in the same directory; used to describe
258c2ecf20Sopenharmony_ci  configurations where a PHY (internal or external) is used.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci- fixed-link: When the GENET interface is connected to a MoCA hardware block or
288c2ecf20Sopenharmony_ci  when operating in a RGMII to RGMII type of connection, or when the MDIO bus is
298c2ecf20Sopenharmony_ci  voluntarily disabled, this property should be used to describe the "fixed link".
308c2ecf20Sopenharmony_ci  See Documentation/devicetree/bindings/net/fixed-link.txt for information on
318c2ecf20Sopenharmony_ci  the property specifics
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciRequired child nodes:
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci- mdio bus node: this node should always be present regardless of the PHY
368c2ecf20Sopenharmony_ci  configuration of the GENET instance
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciMDIO bus node required properties:
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci- compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2"
418c2ecf20Sopenharmony_ci  "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5", the version
428c2ecf20Sopenharmony_ci  has to match the parent node compatible property (e.g: brcm,genet-v4 pairs
438c2ecf20Sopenharmony_ci  with brcm,genet-mdio-v4)
448c2ecf20Sopenharmony_ci- reg: address and length relative to the parent node base register address
458c2ecf20Sopenharmony_ci- #address-cells: address cell for MDIO bus addressing, should be 1
468c2ecf20Sopenharmony_ci- #size-cells: size of the cells for MDIO bus addressing, should be 0
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciEthernet PHY node properties:
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciSee Documentation/devicetree/bindings/net/phy.txt for the list of required and
518c2ecf20Sopenharmony_cioptional properties.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciInternal Gigabit PHY example:
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciethernet@f0b60000 {
568c2ecf20Sopenharmony_ci	phy-mode = "internal";
578c2ecf20Sopenharmony_ci	phy-handle = <&phy1>;
588c2ecf20Sopenharmony_ci	mac-address = [ 00 10 18 36 23 1a ];
598c2ecf20Sopenharmony_ci	compatible = "brcm,genet-v4";
608c2ecf20Sopenharmony_ci	#address-cells = <0x1>;
618c2ecf20Sopenharmony_ci	#size-cells = <0x1>;
628c2ecf20Sopenharmony_ci	reg = <0xf0b60000 0xfc4c>;
638c2ecf20Sopenharmony_ci	interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>;
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci	mdio@e14 {
668c2ecf20Sopenharmony_ci		compatible = "brcm,genet-mdio-v4";
678c2ecf20Sopenharmony_ci		#address-cells = <0x1>;
688c2ecf20Sopenharmony_ci		#size-cells = <0x0>;
698c2ecf20Sopenharmony_ci		reg = <0xe14 0x8>;
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci		phy1: ethernet-phy@1 {
728c2ecf20Sopenharmony_ci			max-speed = <1000>;
738c2ecf20Sopenharmony_ci			reg = <0x1>;
748c2ecf20Sopenharmony_ci			compatible = "ethernet-phy-ieee802.3-c22";
758c2ecf20Sopenharmony_ci		};
768c2ecf20Sopenharmony_ci	};
778c2ecf20Sopenharmony_ci};
788c2ecf20Sopenharmony_ci
798c2ecf20Sopenharmony_ciMoCA interface / MAC to MAC example:
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ciethernet@f0b80000 {
828c2ecf20Sopenharmony_ci	phy-mode = "moca";
838c2ecf20Sopenharmony_ci	fixed-link = <1 0 1000 0 0>;
848c2ecf20Sopenharmony_ci	mac-address = [ 00 10 18 36 24 1a ];
858c2ecf20Sopenharmony_ci	compatible = "brcm,genet-v4";
868c2ecf20Sopenharmony_ci	#address-cells = <0x1>;
878c2ecf20Sopenharmony_ci	#size-cells = <0x1>;
888c2ecf20Sopenharmony_ci	reg = <0xf0b80000 0xfc4c>;
898c2ecf20Sopenharmony_ci	interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>;
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci	mdio@e14 {
928c2ecf20Sopenharmony_ci		compatible = "brcm,genet-mdio-v4";
938c2ecf20Sopenharmony_ci		#address-cells = <0x1>;
948c2ecf20Sopenharmony_ci		#size-cells = <0x0>;
958c2ecf20Sopenharmony_ci		reg = <0xe14 0x8>;
968c2ecf20Sopenharmony_ci	};
978c2ecf20Sopenharmony_ci};
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciExternal MDIO-connected Gigabit PHY/switch:
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_ciethernet@f0ba0000 {
1038c2ecf20Sopenharmony_ci	phy-mode = "rgmii";
1048c2ecf20Sopenharmony_ci	phy-handle = <&phy0>;
1058c2ecf20Sopenharmony_ci	mac-address = [ 00 10 18 36 26 1a ];
1068c2ecf20Sopenharmony_ci	compatible = "brcm,genet-v4";
1078c2ecf20Sopenharmony_ci	#address-cells = <0x1>;
1088c2ecf20Sopenharmony_ci	#size-cells = <0x1>;
1098c2ecf20Sopenharmony_ci	reg = <0xf0ba0000 0xfc4c>;
1108c2ecf20Sopenharmony_ci	interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>;
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci	mdio@e14 {
1138c2ecf20Sopenharmony_ci		compatible = "brcm,genet-mdio-v4";
1148c2ecf20Sopenharmony_ci		#address-cells = <0x1>;
1158c2ecf20Sopenharmony_ci		#size-cells = <0x0>;
1168c2ecf20Sopenharmony_ci		reg = <0xe14 0x8>;
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci		phy0: ethernet-phy@0 {
1198c2ecf20Sopenharmony_ci			max-speed = <1000>;
1208c2ecf20Sopenharmony_ci			reg = <0x0>;
1218c2ecf20Sopenharmony_ci			compatible = "ethernet-phy-ieee802.3-c22";
1228c2ecf20Sopenharmony_ci		};
1238c2ecf20Sopenharmony_ci	};
1248c2ecf20Sopenharmony_ci};
125