Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a56cddd8 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'bcmgenet'



Florian Fainelli says:

====================
Support for the Broadcom GENET driver

This patchset adds support for the Broadcom GENET Gigabit Ethernet MAC
controller. This controller is found on the Broadcom BCM7xxx Set Top Box
System-on-a-chips.

Changes since v4:
- add dependency on CONFIG_OF

Changes since v3:
- fixed Kconfig dependency on FIXED_PHY

Changes since v2:
- dropped the patch that adds an "internal" phy-mode
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c045a734 32ec90d5
Loading
Loading
Loading
Loading
+121 −0
Original line number Diff line number Diff line
* Broadcom BCM7xxx Ethernet Controller (GENET)

Required properties:
- compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2",
  "brcm,genet-v3", "brcm,genet-v4".
- reg: address and length of the register set for the device
- interrupts: must be two cells, the first cell is the general purpose
  interrupt line, while the second cell is the interrupt for the ring
  RX and TX queues operating in ring mode
- phy-mode: String, operation mode of the PHY interface. Supported values are
  "mii", "rgmii", "rgmii-txid", "rev-mii", "moca". Analogous to ePAPR
  "phy-connection-type" values
- address-cells: should be 1
- size-cells: should be 1

Optional properties:
- clocks: When provided, must be two cells, first one is the main GENET clock
  and the second cell is the Genet Wake-on-LAN clock.

- phy-handle: A phandle to a phy node defining the PHY address (as the reg
  property, a single integer), used to describe configurations where a PHY
  (internal or external) is used.

- fixed-link: When the GENET interface is connected to a MoCA hardware block or
  when operating in a RGMII to RGMII type of connection, or when the MDIO bus is
  voluntarily disabled, this property should be used to describe the "fixed link".
  See Documentation/devicetree/bindings/net/fsl-tsec-phy.txt for information on
  the property specifics

Required child nodes:

- mdio bus node: this node should always be present regarless of the PHY
  configuration of the GENET instance

MDIO bus node required properties:

- compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2"
  "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", the version has to match the
  parent node compatible property (e.g: brcm,genet-v4 pairs with
  brcm,genet-mdio-v4)
- reg: address and length relative to the parent node base register address
- address-cells: address cell for MDIO bus addressing, should be 1
- size-cells: size of the cells for MDIO bus addressing, should be 0

Ethernet PHY node properties:

See Documentation/devicetree/bindings/net/phy.txt for the list of required and
optional properties.

Internal Gigabit PHY example:

ethernet@f0b60000 {
	phy-mode = "internal";
	phy-handle = <&phy1>;
	mac-address = [ 00 10 18 36 23 1a ];
	compatible = "brcm,genet-v4";
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	reg = <0xf0b60000 0xfc4c>;
	interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>;

	mdio@e14 {
		compatible = "brcm,genet-mdio-v4";
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		reg = <0xe14 0x8>;

		phy1: ethernet-phy@1 {
			max-speed = <1000>;
			reg = <0x1>;
			compatible = "brcm,28nm-gphy", "ethernet-phy-ieee802.3-c22";
		};
	};
};

MoCA interface / MAC to MAC example:

ethernet@f0b80000 {
	phy-mode = "moca";
	fixed-link = <1 0 1000 0 0>;
	mac-address = [ 00 10 18 36 24 1a ];
	compatible = "brcm,genet-v4";
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	reg = <0xf0b80000 0xfc4c>;
	interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>;

	mdio@e14 {
		compatible = "brcm,genet-mdio-v4";
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		reg = <0xe14 0x8>;
	};
};


External MDIO-connected Gigabit PHY/switch:

ethernet@f0ba0000 {
	phy-mode = "rgmii";
	phy-handle = <&phy0>;
	mac-address = [ 00 10 18 36 26 1a ];
	compatible = "brcm,genet-v4";
	#address-cells = <0x1>;
	#size-cells = <0x1>;
	reg = <0xf0ba0000 0xfc4c>;
	interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>;

	mdio@0e14 {
		compatible = "brcm,genet-mdio-v4";
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		reg = <0xe14 0x8>;

		phy0: ethernet-phy@0 {
			max-speed = <1000>;
			reg = <0x0>;
			compatible = "brcm,bcm53125", "ethernet-phy-ieee802.3-c22";
		};
	};
};
+6 −0
Original line number Diff line number Diff line
@@ -1845,6 +1845,12 @@ L: netdev@vger.kernel.org
S:	Supported
F:	drivers/net/ethernet/broadcom/b44.*

BROADCOM GENET ETHERNET DRIVER
M:	Florian Fainelli <f.fainelli@gmail.com>
L:	netdev@vger.kernel.org
S:	Supported
F:	drivers/net/ethernet/broadcom/genet/

BROADCOM BNX2 GIGABIT ETHERNET DRIVER
M:	Michael Chan <mchan@broadcom.com>
L:	netdev@vger.kernel.org
+11 −0
Original line number Diff line number Diff line
@@ -60,6 +60,17 @@ config BCM63XX_ENET
	  This driver supports the ethernet MACs in the Broadcom 63xx
	  MIPS chipset family (BCM63XX).

config BCMGENET
	tristate "Broadcom GENET internal MAC support"
	depends on OF
	select MII
	select PHYLIB
	select FIXED_PHY if BCMGENET=y
	select BCM7XXX_PHY
	help
	  This driver supports the built-in Ethernet MACs found in the
	  Broadcom BCM7xxx Set Top Box family chipset.

config BNX2
	tristate "Broadcom NetXtremeII support"
	depends on PCI
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

obj-$(CONFIG_B44) += b44.o
obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
obj-$(CONFIG_BCMGENET) += genet/
obj-$(CONFIG_BNX2) += bnx2.o
obj-$(CONFIG_CNIC) += cnic.o
obj-$(CONFIG_BNX2X) += bnx2x/
+2 −0
Original line number Diff line number Diff line
obj-$(CONFIG_BCMGENET) += genet.o
genet-objs := bcmgenet.o bcmmii.o
Loading