Skip to contentSkip to conversation

This series implements the Ethernet PHY for the Broadcom Cygnus boards.

PATCH New Steve Rae 4 participants 9 messages Jul 15, 2015 – Aug 13, 2015

Subsystems (5)
lore
Share & tools
lore

Steve Rae

author
#0 lore raw

cover This series implements the Ethernet PHY for the Broadcom Cygnus boards.

Jiandong Zheng (2):
net: phy: broadcom: Add BCM Cygnus PHY
arm: bcmcygnus: Enable Ethernet support

 arch/arm/include/asm/arch-bcmcygnus/configs.h | 11 ++++++++++
 board/broadcom/bcm_ep/board.c                 | 11 ++++++++++
 drivers/net/phy/broadcom.c                    | 29 +++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)
Signature · 1 line
1.8.5
author
#1 lore raw

PATCH 1/2 net: phy: broadcom: Add BCM Cygnus PHY

From: Jiandong Zheng <[email protected]>

Add Ethernet PHY for BCM Cygnus SoC

---

 drivers/net/phy/broadcom.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
drivers/net/phy/broadcom.c +29 -0
index 4512763..4b2808e 100644
@@ -137,6 +137,24 @@ static int bcm5482_config(struct phy_device *phydev)
 	return 0;
 }
 
+static int bcm_cygnus_startup(struct phy_device *phydev)
+{
+	/* Read the Status (2x to make sure link is right) */
+	genphy_update_link(phydev);
+	genphy_parse_link(phydev);
+
+	return 0;
+}
+
+static int bcm_cygnus_config(struct phy_device *phydev)
+{
+	genphy_config_aneg(phydev);
+
+	phy_reset(phydev);
+
+	return 0;
+}
+
 /*
  * Find out if PHY is in copper or serdes mode by looking at Expansion Reg
  * 0x42 - "Operating Mode Status Register"
@@ -264,11 +282,22 @@ static struct phy_driver BCM5482S_driver = {
 	.shutdown = &genphy_shutdown,
 };
 
+static struct phy_driver BCM_CYGNUS_driver = {
+	.name = "Broadcom CYGNUS GPHY",
+	.uid = 0xae025200,
+	.mask = 0xfffff0,
+	.features = PHY_GBIT_FEATURES,
+	.config = &bcm_cygnus_config,
+	.startup = &bcm_cygnus_startup,
+	.shutdown = &genphy_shutdown,
+};
+
 int phy_broadcom_init(void)
 {
 	phy_register(&BCM5482S_driver);
 	phy_register(&BCM5464S_driver);
 	phy_register(&BCM5461S_driver);
+	phy_register(&BCM_CYGNUS_driver);
 
 	return 0;
 }
Signature · 1 line
1.8.5
#2 lore raw

PATCH 1/2 net: phy: broadcom: Add BCM Cygnus PHY

Hello Steve,

Quoted 10 lines · Steve Rae

From: Jiandong Zheng <[email protected]>

Add Ethernet PHY for BCM Cygnus SoC

---

 drivers/net/phy/broadcom.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

This patch does not add the PHY in drivers/net/phy/Makefile. How does the object file ever get built?

Amicalement,

Signature · 1 line
Albert.
#3 lore raw

PATCH 1/2 net: phy: broadcom: Add BCM Cygnus PHY

Quoted 11 lines · Albert ARIBAUD

Hello Steve,

Quoted 8 lines · Steve Rae

From: Jiandong Zheng <[email protected]>

Add Ethernet PHY for BCM Cygnus SoC

---

Quoted 5 lines
Quoted 2 lines
 drivers/net/phy/broadcom.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

This patch does not add the PHY in drivers/net/phy/Makefile. How does the object file ever get built?

Scratch that, I misread this as an addition. Time for a coffee break.

Amicalement,

Signature · 1 line
Albert.
author
#6 lore raw

PATCH 2/2 arm: bcmcygnus: Enable Ethernet support

In reply to Steve Rae

From: Jiandong Zheng <[email protected]>

Enable BCM SF2 ethernet and PHY for BCM Cygnus SoC

---

 arch/arm/include/asm/arch-bcmcygnus/configs.h | 11 +++++++++++
 board/broadcom/bcm_ep/board.c                 | 11 +++++++++++
 2 files changed, 22 insertions(+)
arch/arm/include/asm/arch-bcmcygnus/configs.h +11 -0
index 5354637..3c07160 100644
@@ -22,4 +22,15 @@
 #define CONFIG_CONS_INDEX		3
 #define CONFIG_SYS_NS16550_COM3		0x18023000
 
+/* Ethernet */
+#define CONFIG_BCM_SF2_ETH
+#define CONFIG_BCM_SF2_ETH_GMAC
+
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_BROADCOM
+#define CONFIG_PHY_RESET_DELAY 10000 /* PHY reset delay in us*/
+
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_MII
+
 #endif /* __ARCH_CONFIGS_H */
board/broadcom/bcm_ep/board.c +11 -0
index eaad0b3..c28b203 100644
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <config.h>
+#include <netdev.h>
 #include <asm/system.h>
 #include <asm/iproc-common/armpll.h>
 
@@ -67,3 +68,13 @@ void smp_waitloop(unsigned previous_address)
 {
 }
 #endif
+
+#ifdef CONFIG_BCM_SF2_ETH
+int board_eth_init(bd_t *bis)
+{
+	int rc = -1;
+	printf("Registering BCM sf2 eth\n");
+	rc = bcm_sf2_eth_register(bis, 0);
+	return rc;
+}
+#endif
Signature · 1 line
1.8.5
#8 lore raw

PATCH 2/2 arm: bcmcygnus: Enable Ethernet support

In reply to Steve Rae
Quoted 7 lines · Steve Rae

From: Jiandong Zheng <[email protected]>

Enable BCM SF2 ethernet and PHY for BCM Cygnus SoC

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150813/2cf9cbe5/attachment.sig>