Skip to contentSkip to conversation

Add support for Broadcom's iProc MDIO and Cygnus Ethernet PHY

PATCH Superseded Arun Parameswaran 4 participants 13 messages Sep 30, 2015 – Oct 1, 2015

Subsystems (6)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Add support for Broadcom's iProc MDIO and Cygnus Ethernet PHY

Hi
This patchset adds support for the iProc MDIO interface and the Broadcom Cygnus SoC's internal Ethernet PHY.

The internal Ethernet PHY(s) in the Cygnus SoC's are accessed via the MDIO interface found in most of the iProc based chips.

The patch also consolidates the common API's used by the Broadcom phys to a common library. Existing Broadcom phy drivers have been modified to use the common library API's.

The Ethernet driver for the iProc family will be submitted soon, as will the device tree configurations for the different iProc family SoCs.

Arun Parameswaran (4):
dt-bindings: net: Broadcom iProc MDIO bus driver device tree binding
net: phy: Broadcom iProc MDIO bus driver
net: phy: Add Broadcom phy library for common interfaces
net: phy: Broadcom Cygnus internal Etherent PHY driver

 .../devicetree/bindings/net/brcm,iproc-mdio.txt    |  23 +++
 drivers/net/phy/Kconfig                            |  28 +++
 drivers/net/phy/Makefile                           |   3 +
 drivers/net/phy/bcm-cygnus.c                       | 162 ++++++++++++++++
 drivers/net/phy/bcm-phy-lib.c                      | 209 ++++++++++++++++++++
 drivers/net/phy/bcm-phy-lib.h                      |  37 ++++
 drivers/net/phy/bcm63xx.c                          |  38 +---
 drivers/net/phy/bcm7xxx.c                          | 127 +++---------
 drivers/net/phy/broadcom.c                         | 149 +++++---------
 drivers/net/phy/mdio-bcm-iproc.c                   | 213 +++++++++++++++++++++
 include/linux/brcmphy.h                            |  24 +--
 11 files changed, 757 insertions(+), 256 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt
 create mode 100644 drivers/net/phy/bcm-cygnus.c
 create mode 100644 drivers/net/phy/bcm-phy-lib.c
 create mode 100644 drivers/net/phy/bcm-phy-lib.h
 create mode 100644 drivers/net/phy/mdio-bcm-iproc.c
Signature · 1 line
2.5.2
#1 lore raw

PATCH 1/4 dt-bindings: net: Broadcom iProc MDIO bus driver device tree binding

Add device tree binding documentation for the Broadcom iProc MDIO bus driver.

---
 .../devicetree/bindings/net/brcm,iproc-mdio.txt    | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt
Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt new file +23 -0
new file mode 100644
index 0000000..689f97c
@@ -0,0 +1,23 @@
+* Broadcom iProc MDIO bus controller
+
+Required properties:
+- compatible: should be "brcm,iproc-mdio"
+- reg: address and length of the register set for the MDIO interface
+- #size-cells: must be 1
+- #address-cells: must be 0
+
+Child nodes of this MDIO bus controller node are standard Ethernet PHY device
+nodes as described in Documentation/devicetree/bindings/net/phy.txt
+
+Example:
+
+mdio@0x18002000 {
+	compatible = "brcm,iproc-mdio";
+	reg = <0x18002000 0x8>;
+	#size-cells = <1>;
+	#address-cells = <0>;
+
+	enet-gphy@0 {
+		reg = <0>;
+	};
+};
Signature · 1 line
2.5.2
#9 lore raw

PATCH 4/4 net: phy: Broadcom Cygnus internal Etherent PHY driver

In reply to Arun Parameswaran

Add support for the Broadcom Cygnus SoCs internal PHY's. The PHYs are 1000M/100M/10M capable with support for 'EEE' and 'APD' (Auto Power Down).

This driver supports the following Broadcom Cygnus SoCs:
- BCM583XX (BCM58300, BCM58302, BCM58303, BCM58305)
- BCM113XX (BCM11300, BCM11320, BCM11350, BCM11360)

The PHY's on these SoC's require some workarounds for stable operation, both during configuration time and during suspend/resume. This driver handles the application of the workarounds.

---
 drivers/net/phy/Kconfig      |  13 ++++
 drivers/net/phy/Makefile     |   1 +
 drivers/net/phy/bcm-cygnus.c | 162 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/brcmphy.h      |   2 +
 4 files changed, 178 insertions(+)
 create mode 100644 drivers/net/phy/bcm-cygnus.c
drivers/net/phy/Kconfig +13 -0
index 0c85a01..da979ec 100644
@@ -79,6 +79,19 @@ config BROADCOM_PHY
 	  Currently supports the BCM5411, BCM5421, BCM5461, BCM54616S, BCM5464,
 	  BCM5481 and BCM5482 PHYs.
 
+config BCM_CYGNUS_PHY
+	tristate "Drivers for Broadcom Cygnus SoC internal PHY"
+	depends on ARCH_BCM_CYGNUS || COMPILE_TEST
+	select BCM_NET_PHYLIB
+	select MDIO_BCM_IPROC
+	---help---
+	  This PHY driver is for the 1G internal PHYs of the Broadcom
+	  Cygnus Family SoC.
+
+	  Currently supports internal PHY's used in the BCM11300,
+	  BCM11320, BCM11350, BCM11360, BCM58300, BCM58302,
+	  BCM58303 & BCM58305 Broadcom Cygnus SoCs.
+
 config BCM63XX_PHY
 	tristate "Drivers for Broadcom 63xx SOCs internal PHY"
 	depends on BCM63XX
drivers/net/phy/Makefile +1 -0
index 6932475..7655d47 100644
@@ -17,6 +17,7 @@ obj-$(CONFIG_BROADCOM_PHY)	+= broadcom.o
 obj-$(CONFIG_BCM63XX_PHY)	+= bcm63xx.o
 obj-$(CONFIG_BCM7XXX_PHY)	+= bcm7xxx.o
 obj-$(CONFIG_BCM87XX_PHY)	+= bcm87xx.o
+obj-$(CONFIG_BCM_CYGNUS_PHY)	+= bcm-cygnus.o
 obj-$(CONFIG_ICPLUS_PHY)	+= icplus.o
 obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
 obj-$(CONFIG_LSI_ET1011C_PHY)	+= et1011c.o
drivers/net/phy/bcm-cygnus.c new file +162 -0

162 lines not on this page · raw message

include/linux/brcmphy.h +2 -0
index 6a53ab9..34a8996 100644
@@ -30,6 +30,8 @@
 #define PHY_ID_BCM7439_2		0xae025080
 #define PHY_ID_BCM7445			0x600d8510
 
+#define PHY_ID_BCM_CYGNUS		0xae025200
+
 #define PHY_BCM_OUI_MASK		0xfffffc00
 #define PHY_BCM_OUI_1			0x00206000
 #define PHY_BCM_OUI_2			0x0143bc00
Signature · 1 line
2.5.2
#6 lore raw

PATCH 3/4 net: phy: Add Broadcom phy library for common interfaces

In reply to Arun Parameswaran

This patch adds the Broadcom phy library to consolidate common interfaces shared by Broadcom phy's.

Moved the common interfaces to the 'bcm-phy-lib.c' and updated the Broadcom PHY drivers to use the new APIs.

---
 drivers/net/phy/Kconfig       |   6 ++
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/bcm-phy-lib.c | 209 ++++++++++++++++++++++++++++++++++++++++++
 drivers/net/phy/bcm-phy-lib.h |  37 ++++++++
 drivers/net/phy/bcm63xx.c     |  38 +-------
 drivers/net/phy/bcm7xxx.c     | 127 ++++++-------------------
 drivers/net/phy/broadcom.c    | 149 +++++++++---------------------
 include/linux/brcmphy.h       |  22 +----
 8 files changed, 333 insertions(+), 256 deletions(-)
 create mode 100644 drivers/net/phy/bcm-phy-lib.c
 create mode 100644 drivers/net/phy/bcm-phy-lib.h
drivers/net/phy/Kconfig +6 -0
index b57f6c2..0c85a01 100644
@@ -69,8 +69,12 @@ config SMSC_PHY
 	---help---
 	  Currently supports the LAN83C185, LAN8187 and LAN8700 PHYs
 
+config BCM_NET_PHYLIB
+	bool
+
 config BROADCOM_PHY
 	tristate "Drivers for Broadcom PHYs"
+	select BCM_NET_PHYLIB
 	---help---
 	  Currently supports the BCM5411, BCM5421, BCM5461, BCM54616S, BCM5464,
 	  BCM5481 and BCM5482 PHYs.
@@ -78,11 +82,13 @@ config BROADCOM_PHY
 config BCM63XX_PHY
 	tristate "Drivers for Broadcom 63xx SOCs internal PHY"
 	depends on BCM63XX
+	select BCM_NET_PHYLIB
 	---help---
 	  Currently supports the 6348 and 6358 PHYs.
 
 config BCM7XXX_PHY
 	tristate "Drivers for Broadcom 7xxx SOCs internal PHYs"
+	select BCM_NET_PHYLIB
 	---help---
 	  Currently supports the BCM7366, BCM7439, BCM7445, and
 	  40nm and 65nm generation of BCM7xxx Set Top Box SoCs.
drivers/net/phy/Makefile +1 -0
index f4e6eb9..6932475 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_QSEMI_PHY)		+= qsemi.o
 obj-$(CONFIG_SMSC_PHY)		+= smsc.o
 obj-$(CONFIG_TERANETICS_PHY)	+= teranetics.o
 obj-$(CONFIG_VITESSE_PHY)	+= vitesse.o
+obj-$(CONFIG_BCM_NET_PHYLIB)	+= bcm-phy-lib.o
 obj-$(CONFIG_BROADCOM_PHY)	+= broadcom.o
 obj-$(CONFIG_BCM63XX_PHY)	+= bcm63xx.o
 obj-$(CONFIG_BCM7XXX_PHY)	+= bcm7xxx.o
drivers/net/phy/bcm-phy-lib.c new file +209 -0

209 lines not on this page · raw message

drivers/net/phy/bcm-phy-lib.h new file +37 -0
new file mode 100644
index 0000000..b2091c8
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2015 Broadcom Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _LINUX_BCM_PHY_LIB_H
+#define _LINUX_BCM_PHY_LIB_H
+
+#include <linux/phy.h>
+
+int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val);
+int bcm_phy_read_exp(struct phy_device *phydev, u16 reg);
+
+int bcm_phy_write_misc(struct phy_device *phydev,
+		       u16 reg, u16 chl, u16 value);
+int bcm_phy_read_misc(struct phy_device *phydev,
+		      u16 reg, u16 chl);
+
+int bcm_phy_write_shadow(struct phy_device *phydev, u16 shadow,
+			 u16 val);
+int bcm_phy_read_shadow(struct phy_device *phydev, u16 shadow);
+
+int bcm_phy_ack_intr(struct phy_device *phydev);
+int bcm_phy_config_intr(struct phy_device *phydev);
+
+int bcm_phy_enable_apd(struct phy_device *phydev, bool dll_pwr_down);
+
+int bcm_phy_enable_eee(struct phy_device *phydev);
+#endif /* _LINUX_BCM_PHY_LIB_H */
drivers/net/phy/bcm63xx.c +5 -33
index 830ec31..86b2805 100644
@@ -6,6 +6,7 @@
  *	as published by the Free Software Foundation; either version
  *	2 of the License, or (at your option) any later version.
  */
+#include "bcm-phy-lib.h"
 #include <linux/module.h>
 #include <linux/phy.h>
 
@@ -42,35 +43,6 @@ static int bcm63xx_config_init(struct phy_device *phydev)
 	return phy_write(phydev, MII_BCM63XX_IR, reg);
 }
 
-static int bcm63xx_ack_interrupt(struct phy_device *phydev)
-{
-	int reg;
-
-	/* Clear pending interrupts.  */
-	reg = phy_read(phydev, MII_BCM63XX_IR);
-	if (reg < 0)
-		return reg;
-
-	return 0;
-}
-
-static int bcm63xx_config_intr(struct phy_device *phydev)
-{
-	int reg, err;
-
-	reg = phy_read(phydev, MII_BCM63XX_IR);
-	if (reg < 0)
-		return reg;
-
-	if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
-		reg &= ~MII_BCM63XX_IR_GMASK;
-	else
-		reg |= MII_BCM63XX_IR_GMASK;
-
-	err = phy_write(phydev, MII_BCM63XX_IR, reg);
-	return err;
-}
-
 static struct phy_driver bcm63xx_driver[] = {
 {
 	.phy_id		= 0x00406000,
@@ -82,8 +54,8 @@ static struct phy_driver bcm63xx_driver[] = {
 	.config_init	= bcm63xx_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
-	.ack_interrupt	= bcm63xx_ack_interrupt,
-	.config_intr	= bcm63xx_config_intr,
+	.ack_interrupt	= bcm_phy_ack_intr,
+	.config_intr	= bcm_phy_config_intr,
 	.driver		= { .owner = THIS_MODULE },
 }, {
 	/* same phy as above, with just a different OUI */
@@ -95,8 +67,8 @@ static struct phy_driver bcm63xx_driver[] = {
 	.config_init	= bcm63xx_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
-	.ack_interrupt	= bcm63xx_ack_interrupt,
-	.config_intr	= bcm63xx_config_intr,
+	.ack_interrupt	= bcm_phy_ack_intr,
+	.config_intr	= bcm_phy_config_intr,
 	.driver		= { .owner = THIS_MODULE },
 } };
 
drivers/net/phy/bcm7xxx.c +28 -99

238 lines not on this page · raw message

drivers/net/phy/broadcom.c +44 -105

324 lines not on this page · raw message

include/linux/brcmphy.h +3 -19
index 697ca77..6a53ab9 100644
@@ -138,7 +138,10 @@
 
 /* 01010: Auto Power-Down */
 #define BCM54XX_SHD_APD			0x0a
+#define  BCM_APD_CLR_MASK		0xFE9F /* clear bits 5, 6 & 8 */
 #define  BCM54XX_SHD_APD_EN		0x0020
+#define  BCM_NO_ANEG_APD_EN		0x0060 /* bits 5 & 6 */
+#define  BCM_APD_SINGLELP_EN	0x0100 /* Bit 8 */
 
 #define BCM5482_SHD_LEDS1	0x0d	/* 01101: LED Selector 1 */
 					/* LED3 / ~LINKSPD[2] selector */
@@ -209,25 +212,6 @@
 #define MII_BRCM_FET_SHDW_AUXSTAT2	0x1b	/* Auxiliary status 2 */
 #define MII_BRCM_FET_SHDW_AS2_APDE	0x0020	/* Auto power down enable */
 
-/*
- * Indirect register access functions for the 1000BASE-T/100BASE-TX/10BASE-T
- * 0x1c shadow registers.
- */
-static inline int bcm54xx_shadow_read(struct phy_device *phydev, u16 shadow)
-{
-	phy_write(phydev, MII_BCM54XX_SHD, MII_BCM54XX_SHD_VAL(shadow));
-	return MII_BCM54XX_SHD_DATA(phy_read(phydev, MII_BCM54XX_SHD));
-}
-
-static inline int bcm54xx_shadow_write(struct phy_device *phydev, u16 shadow,
-				       u16 val)
-{
-	return phy_write(phydev, MII_BCM54XX_SHD,
-			 MII_BCM54XX_SHD_WRITE |
-			 MII_BCM54XX_SHD_VAL(shadow) |
-			 MII_BCM54XX_SHD_DATA(val));
-}
-
 #define BRCM_CL45VEN_EEE_CONTROL	0x803d
 #define LPI_FEATURE_EN			0x8000
 #define LPI_FEATURE_EN_DIG1000X		0x4000
Signature · 1 line
2.5.2
#4 lore raw

PATCH 2/4 net: phy: Broadcom iProc MDIO bus driver

In reply to Arun Parameswaran

This patch adds support for the Broadcom iProc MDIO bus interface. The MDIO interface can be found in the Broadcom iProc family Soc's.

The MDIO bus is accessed using a combination of command and data registers. This MDIO driver provides access to the Etherent GPHY's connected to the MDIO bus.

---
 drivers/net/phy/Kconfig          |   9 ++
 drivers/net/phy/Makefile         |   1 +
 drivers/net/phy/mdio-bcm-iproc.c | 213 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 223 insertions(+)
 create mode 100644 drivers/net/phy/mdio-bcm-iproc.c
drivers/net/phy/Kconfig +9 -0
index c5ad98a..b57f6c2 100644
@@ -225,6 +225,15 @@ config MDIO_BCM_UNIMAC
 	  This hardware can be found in the Broadcom GENET Ethernet MAC
 	  controllers as well as some Broadcom Ethernet switches such as the
 	  Starfighter 2 switches.
+
+config MDIO_BCM_IPROC
+	tristate "Broadcom iProc MDIO bus controller"
+	depends on ARCH_BCM_IPROC || COMPILE_TEST
+	depends on HAS_IOMEM && OF_MDIO
+	help
+	  This module provides a driver for the MDIO busses found in the
+	  Broadcom iProc SoC's.
+
 endif # PHYLIB
 
 config MICREL_KS8995MA
drivers/net/phy/Makefile +1 -0
index 87f079c..f4e6eb9 100644
@@ -38,3 +38,4 @@ obj-$(CONFIG_MDIO_SUN4I)	+= mdio-sun4i.o
 obj-$(CONFIG_MDIO_MOXART)	+= mdio-moxart.o
 obj-$(CONFIG_MDIO_BCM_UNIMAC)	+= mdio-bcm-unimac.o
 obj-$(CONFIG_MICROCHIP_PHY)	+= microchip.o
+obj-$(CONFIG_MDIO_BCM_IPROC)	+= mdio-bcm-iproc.o
drivers/net/phy/mdio-bcm-iproc.c new file +213 -0

213 lines not on this page · raw message

Signature · 1 line
2.5.2
#7 lore raw

Re: [PATCH 3/4] net: phy: Add Broadcom phy library for common interfaces

In reply to Arun Parameswaran
config: i386-randconfig-i1-201539 (attached as .config) reproduce: git checkout 25a633b2114806a7ce7d4f171c4714880e2c721b

Hi Arun,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: i386-randconfig-i1-201539 (attached as .config) reproduce:
git checkout 25a633b2114806a7ce7d4f171c4714880e2c721b

  # save the attached .config to linux build tree
  make ARCH=i386 

All error/warnings (new ones prefixed by >>):

>> ERROR: "bcm_phy_config_intr" [drivers/net/phy/broadcom.ko] undefined!
>> ERROR: "bcm_phy_ack_intr" [drivers/net/phy/broadcom.ko] undefined!
>> ERROR: "bcm_phy_read_exp" [drivers/net/phy/broadcom.ko] undefined!
>> ERROR: "bcm_phy_write_exp" [drivers/net/phy/broadcom.ko] undefined!
>> ERROR: "bcm_phy_read_shadow" [drivers/net/phy/broadcom.ko] undefined!
>> ERROR: "bcm_phy_write_shadow" [drivers/net/phy/broadcom.ko] undefined!
>> ERROR: "bcm_phy_enable_apd" [drivers/net/phy/bcm7xxx.ko] undefined!
>> ERROR: "bcm_phy_enable_eee" [drivers/net/phy/bcm7xxx.ko] undefined!
>> ERROR: "bcm_phy_write_misc" [drivers/net/phy/bcm7xxx.ko] undefined!
>> ERROR: "bcm_phy_write_exp" [drivers/net/phy/bcm7xxx.ko] undefined!

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Reviewed-by Tested-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] net: phy: Add Broadcom phy library for common interfaces

In reply to Arun Parameswaran
Quoted 7 lines · Arun Parameswaran

This patch adds the Broadcom phy library to consolidate common interfaces shared by Broadcom phy's.

Moved the common interfaces to the 'bcm-phy-lib.c' and updated the Broadcom PHY drivers to use the new APIs.

On BCM7xxx:

Signature · 1 line
Florian
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] dt-bindings: net: Broadcom iProc MDIO bus driver device tree binding

In reply to Arun Parameswaran
Quoted 19 lines · Arun Parameswaran

Add device tree binding documentation for the Broadcom iProc MDIO bus driver.

---
 .../devicetree/bindings/net/brcm,iproc-mdio.txt    | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt
Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt new file +4 -0
new file mode 100644
index 0000000..689f97c
@@ -0,0 +1,23 @@
+* Broadcom iProc MDIO bus controller
+
+Required properties:
+- compatible: should be "brcm,iproc-mdio"

Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt line 14

Quoted 10 lines
Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt new file +10 -0
+- reg: address and length of the register set for the MDIO interface
+- #size-cells: must be 1
+- #address-cells: must be 0
+
+Child nodes of this MDIO bus controller node are standard Ethernet PHY device
+nodes as described in Documentation/devicetree/bindings/net/phy.txt
+
+Example:
+
+mdio@0x18002000 {

Sorry for not catching this earlier, you might want to drop the leading 0x here from your example, other than that:

Signature · 1 line
Florian
Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] net: phy: Broadcom iProc MDIO bus driver

In reply to Arun Parameswaran
Quoted 8 lines · Arun Parameswaran

This patch adds support for the Broadcom iProc MDIO bus interface. The MDIO interface can be found in the Broadcom iProc family Soc's.

The MDIO bus is accessed using a combination of command and data registers. This MDIO driver provides access to the Etherent GPHY's connected to the MDIO bus.

Signature · 1 line
Florian
Reviewed-by on v1 4/4
#10 lore raw

Re: [PATCH 4/4] net: phy: Broadcom Cygnus internal Etherent PHY driver

In reply to Arun Parameswaran
Quoted 8 lines · Arun Parameswaran

Add support for the Broadcom Cygnus SoCs internal PHY's. The PHYs are 1000M/100M/10M capable with support for 'EEE' and 'APD' (Auto Power Down).

This driver supports the following Broadcom Cygnus SoCs:
- BCM583XX (BCM58300, BCM58302, BCM58303, BCM58305)
- BCM113XX (BCM11300, BCM11320, BCM11350, BCM11360)

Quoted 6 lines

The PHY's on these SoC's require some workarounds for stable operation, both during configuration time and during suspend/resume. This driver handles the application of the workarounds.

Some suggestions if you need to respin this patch series below, sorry for not catching that during the internal review:

drivers/net/phy/bcm-cygnus.c line 24

Quoted 4 lines
drivers/net/phy/bcm-cygnus.c new file +4 -0
+/* Broadcom Cygnus Phy specific registers */
+#define MII_BCM_CORE_BASE1E       0x1E /* Core BASE1E register */
+#define MII_BCM_EXPB0             0xB0 /* EXPB0 register */
+#define MII_BCM_EXPB1             0xB1 /* EXPB1 register */

These defines could be moved to brcmphy.h for instance, since they are shared between all Broadcom PHY drivers AFAICT.

Signature · 5 lines
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#11 lore raw

Re: [PATCH 4/4] net: phy: Broadcom Cygnus internal Etherent PHY driver

Quoted 20 lines · Florian Fainelli
Quoted 8 lines · Arun Parameswaran

Add support for the Broadcom Cygnus SoCs internal PHY's. The PHYs are 1000M/100M/10M capable with support for 'EEE' and 'APD' (Auto Power Down).

This driver supports the following Broadcom Cygnus SoCs:
- BCM583XX (BCM58300, BCM58302, BCM58303, BCM58305)
- BCM113XX (BCM11300, BCM11320, BCM11350, BCM11360)

Quoted 6 lines

The PHY's on these SoC's require some workarounds for stable operation, both during configuration time and during suspend/resume. This driver handles the application of the workarounds.

Some suggestions if you need to respin this patch series below, sorry for not catching that during the internal review:

Quoted 6 lines

drivers/net/phy/bcm-cygnus.c line 24

Quoted 4 lines
drivers/net/phy/bcm-cygnus.c new file +4 -0
+/* Broadcom Cygnus Phy specific registers */
+#define MII_BCM_CORE_BASE1E       0x1E /* Core BASE1E register */
+#define MII_BCM_EXPB0             0xB0 /* EXPB0 register */
+#define MII_BCM_EXPB1             0xB1 /* EXPB1 register */

These defines could be moved to brcmphy.h for instance, since they are shared between all Broadcom PHY drivers AFAICT.

Ok, Will move these and modify the corresponding PHY drivers.

Thanks,
Arun

#3 lore raw

Re: [PATCH 1/4] dt-bindings: net: Broadcom iProc MDIO bus driver device tree binding

In reply to Florian Fainelli
Quoted 33 lines · Florian Fainelli
Quoted 19 lines · Arun Parameswaran

Add device tree binding documentation for the Broadcom iProc MDIO bus driver.

---
 .../devicetree/bindings/net/brcm,iproc-mdio.txt    | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt
Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt new file +4 -0
new file mode 100644
index 0000000..689f97c
@@ -0,0 +1,23 @@
+* Broadcom iProc MDIO bus controller
+
+Required properties:
+- compatible: should be "brcm,iproc-mdio"

Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt line 14

Quoted 10 lines
Documentation/devicetree/bindings/net/brcm,iproc-mdio.txt new file +10 -0
+- reg: address and length of the register set for the MDIO interface
+- #size-cells: must be 1
+- #address-cells: must be 0
+
+Child nodes of this MDIO bus controller node are standard Ethernet PHY device
+nodes as described in Documentation/devicetree/bindings/net/phy.txt
+
+Example:
+
+mdio@0x18002000 {

Sorry for not catching this earlier, you might want to drop the leading 0x here from your example, other than that:

Quoted 1 line

Will fix this.

Thanks,

Arun

#12 lore raw

Re: [PATCH 4/4] net: phy: Broadcom Cygnus internal Etherent PHY driver

In reply to Arun Parameswaran
config: x86_64-allmodconfig (attached as .config) reproduce: git checkout b16a22848521e4f0d2e071d6832add80f0596068

Hi Arun,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: x86_64-allmodconfig (attached as .config) reproduce:
git checkout b16a22848521e4f0d2e071d6832add80f0596068

  # save the attached .config to linux build tree
  make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

ERROR: "bcm_phy_config_intr" [drivers/net/phy/broadcom.ko] undefined!
ERROR: "bcm_phy_ack_intr" [drivers/net/phy/broadcom.ko] undefined!
ERROR: "bcm_phy_read_exp" [drivers/net/phy/broadcom.ko] undefined!
ERROR: "bcm_phy_write_exp" [drivers/net/phy/broadcom.ko] undefined!
ERROR: "bcm_phy_read_shadow" [drivers/net/phy/broadcom.ko] undefined!
ERROR: "bcm_phy_write_shadow" [drivers/net/phy/broadcom.ko] undefined!
ERROR: "bcm_phy_enable_apd" [drivers/net/phy/bcm7xxx.ko] undefined!
ERROR: "bcm_phy_enable_eee" [drivers/net/phy/bcm7xxx.ko] undefined!
ERROR: "bcm_phy_write_misc" [drivers/net/phy/bcm7xxx.ko] undefined!
ERROR: "bcm_phy_write_exp" [drivers/net/phy/bcm7xxx.ko] undefined!

>> ERROR: "bcm_phy_config_intr" [drivers/net/phy/bcm-cygnus.ko] undefined!
>> ERROR: "bcm_phy_ack_intr" [drivers/net/phy/bcm-cygnus.ko] undefined!
>> ERROR: "bcm_phy_enable_apd" [drivers/net/phy/bcm-cygnus.ko] undefined!
>> ERROR: "bcm_phy_enable_eee" [drivers/net/phy/bcm-cygnus.ko] undefined!
>> ERROR: "bcm_phy_write_exp" [drivers/net/phy/bcm-cygnus.ko] undefined!
>> ERROR: "bcm_phy_write_misc" [drivers/net/phy/bcm-cygnus.ko] undefined!

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation