mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
net: pcs: add driver for MediaTek SGMII PCS
The SGMII core found in several MediaTek SoCs is identical to what can also be found in MediaTek's MT7531 Ethernet switch IC. As this has not always been clear, both drivers developed different implementations to deal with the PCS. Recently Alexander Couzens pointed out this fact which lead to the development of this shared driver. Add a dedicated driver, mostly by copying the code now found in the Ethernet driver. The now redundant code will be removed by a follow-up commit. Suggested-by: Alexander Couzens <lynxis@fe80.eu> Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
3fbe4d8c0e
commit
4765a9722e
13
include/linux/pcs/pcs-mtk-lynxi.h
Normal file
13
include/linux/pcs/pcs-mtk-lynxi.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __LINUX_PCS_MTK_LYNXI_H
|
||||
#define __LINUX_PCS_MTK_LYNXI_H
|
||||
|
||||
#include <linux/phylink.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#define MTK_SGMII_FLAG_PN_SWAP BIT(0)
|
||||
struct phylink_pcs *mtk_pcs_lynxi_create(struct device *dev,
|
||||
struct regmap *regmap,
|
||||
u32 ana_rgc3, u32 flags);
|
||||
void mtk_pcs_lynxi_destroy(struct phylink_pcs *pcs);
|
||||
#endif
|
||||
Reference in New Issue
Block a user