From 0ed64e49e556096972e0a85e8f4db287b4ed9bdc Mon Sep 17 00:00:00 2001 From: Oleksii Bidnichenko Date: Wed, 27 Oct 2021 11:34:47 +0300 Subject: apalis-imx6: add usage of KSZ9XX1 Backport usage of a new KSZ9XX1 PHY by Apalis iMX6, the old driver located in micrel.c still used by other boards. If a board wants to use a new PHY the old one must be disabled. Backported from: commit f72e48ba4d98 ("board: apalis_imx6: Add KSZ9131 phy skew settings") Related-to: ELB-4181 Signed-off-by: Oleksii Bidnichenko --- include/micrel.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/micrel.h') diff --git a/include/micrel.h b/include/micrel.h index 783dc634e2..a03b8dd7b9 100644 --- a/include/micrel.h +++ b/include/micrel.h @@ -23,6 +23,16 @@ #define MII_KSZ9031_FLP_BURST_TX_LO 0x3 #define MII_KSZ9031_FLP_BURST_TX_HI 0x4 +#define MII_KSZ9x31_SILICON_REV_MASK 0xfffff0 + +#define MII_KSZ9131_RXTXDLL_BYPASS BIT(12) +#define MII_KSZ9131_EXT_RGMII_2NS_SKEW_RXDLL 0x4c +#define MII_KSZ9131_EXT_RGMII_2NS_SKEW_TXDLL 0x4d + +#define PHY_ID_KSZ9031 0x00221620 +#define PHY_ID_KSZ9131 0x00221640 + + /* Registers */ #define MMD_ACCESS_CONTROL 0xd #define MMD_ACCESS_REG_DATA 0xe @@ -35,6 +45,9 @@ int ksz9031_phy_extended_write(struct phy_device *phydev, int devaddr, int regnum, u16 mode, u16 val); int ksz9031_phy_extended_read(struct phy_device *phydev, int devaddr, int regnum, u16 mode); +int ksz9xx1_phy_get_id(struct phy_device *phydev); +#ifndef CONFIG_PHY_MICREL_KSZ90X1 int ksz9031_center_flp_timing(struct phy_device *phydev); +#endif #endif -- cgit v1.2.3