Commit 84296d4c authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'broadcom-ptp-phy-support'

Jonathan Lemon says:

====================
Broadcom PTP PHY support

This adds PTP support for the Broadcom PHY BCM54210E (and the
specific variant BCM54213PE that the rpi-5.15 branch uses).

This has only been tested on the RPI CM4, which has one port.

There are other Broadcom chips which may benefit from using the
same framework here, although with different register sets.
====================

Link: https://lore.kernel.org/r/20220622050454.878052-1-jonathan.lemon@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 0aeaaa8d 7bfe91ef
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -104,6 +104,8 @@ config AX88796B_PHY
config BROADCOM_PHY
	tristate "Broadcom 54XX PHYs"
	select BCM_NET_PHYLIB
	select BCM_NET_PHYPTP if NETWORK_PHY_TIMESTAMPING
	depends on PTP_1588_CLOCK_OPTIONAL
	help
	  Currently supports the BCM5411, BCM5421, BCM5461, BCM54616S, BCM5464,
	  BCM5481, BCM54810 and BCM5482 PHYs.
@@ -160,6 +162,9 @@ config BCM_CYGNUS_PHY
config BCM_NET_PHYLIB
	tristate

config BCM_NET_PHYPTP
	tristate

config CICADA_PHY
	tristate "Cicada PHYs"
	help
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ obj-$(CONFIG_BCM84881_PHY) += bcm84881.o
obj-$(CONFIG_BCM87XX_PHY)	+= bcm87xx.o
obj-$(CONFIG_BCM_CYGNUS_PHY)	+= bcm-cygnus.o
obj-$(CONFIG_BCM_NET_PHYLIB)	+= bcm-phy-lib.o
obj-$(CONFIG_BCM_NET_PHYPTP)	+= bcm-phy-ptp.o
obj-$(CONFIG_BROADCOM_PHY)	+= broadcom.o
obj-$(CONFIG_CICADA_PHY)	+= cicada.o
obj-$(CONFIG_CORTINA_PHY)	+= cortina.o
+19 −0
Original line number Diff line number Diff line
@@ -87,4 +87,23 @@ int bcm_phy_cable_test_start_rdb(struct phy_device *phydev);
int bcm_phy_cable_test_start(struct phy_device *phydev);
int bcm_phy_cable_test_get_status(struct phy_device *phydev, bool *finished);

#if IS_ENABLED(CONFIG_BCM_NET_PHYPTP)
struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev);
void bcm_ptp_config_init(struct phy_device *phydev);
void bcm_ptp_stop(struct bcm_ptp_private *priv);
#else
static inline struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev)
{
	return NULL;
}

static inline void bcm_ptp_config_init(struct phy_device *phydev)
{
}

static inline void bcm_ptp_stop(struct bcm_ptp_private *priv)
{
}
#endif

#endif /* _LINUX_BCM_PHY_LIB_H */
+944 −0

File added.

Preview size limit exceeded, changes collapsed.

+29 −4

File changed.

Preview size limit exceeded, changes collapsed.