summaryrefslogtreecommitdiff
path: root/include/micrel.h
diff options
context:
space:
mode:
authorOleksii Bidnichenko <oleksii.bidnichenko@toradex.com>2021-10-27 11:34:47 +0300
committerOleksii Bidnichenko <oleksii.bidnichenko@toradex.com>2021-10-27 12:20:21 +0300
commit0ed64e49e556096972e0a85e8f4db287b4ed9bdc (patch)
treea12d58d346500a1c48b9b702fba52dbe894daaf0 /include/micrel.h
parentca723c60d38197d83854fb95495e24d73103b3fd (diff)
apalis-imx6: add usage of KSZ9XX12016.11-toradex-next2016.11-toradex
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 <oleksii.bidnichenko@toradex.com>
Diffstat (limited to 'include/micrel.h')
-rw-r--r--include/micrel.h13
1 files changed, 13 insertions, 0 deletions
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