Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177541979
D61269.1794671930.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61269.1794671930.diff
View Options
diff --git a/sys/dev/mii/lan867xphy.c b/sys/dev/mii/lan867xphy.c
--- a/sys/dev/mii/lan867xphy.c
+++ b/sys/dev/mii/lan867xphy.c
@@ -10,7 +10,6 @@
* This driver is sufficient for basic connectivity with CSMA/CD.
*
* TODO:
- * - Revision-specific configuration for D0 silicon
* - PHY-Level Collision Avoidance (PLCA) configuration
* - Sleep mode (C2, D0 and later)
* - Topology discovery (D0 and later)
@@ -48,6 +47,7 @@
/* Silicon revisions. */
#define LAN867X_REV_C2 5
+#define LAN867X_REV_D0 6
struct lan867x_cfg_fixup {
uint16_t address;
@@ -161,6 +161,32 @@
nitems(lan867x_cfgdata_revc_part2));
}
+/*
+ * Hardware revision D0 configuration parameters.
+ *
+ * From Microchip AN1699 LAN8670/1/2 Configuration Application Note
+ * (Revision G, October 2025).
+ */
+static const struct lan867x_cfg_fixup lan867x_cfgdata_revd[] = {
+ { 0x0037, 0x0800 },
+ { 0x008a, 0xbfc0 },
+ { 0x0118, 0x029c },
+ { 0x00d6, 0x1001 },
+ { 0x0082, 0x001c },
+ /* Per AN1699, write 0x00fd twice with different values. */
+ { 0x00fd, 0x0c0b },
+ { 0x00fd, 0x8c07 },
+ { 0x0091, 0x9660 },
+ /* 0x0012 (LSCTL) to be added along with link state reporting. */
+};
+
+static void
+lan867xphy_config_revd(struct mii_softc *sc)
+{
+ lan867xphy_config(sc, lan867x_cfgdata_revd,
+ nitems(lan867x_cfgdata_revd));
+}
+
static int lan867x_probe(device_t);
static int lan867x_attach(device_t);
@@ -202,6 +228,9 @@
case LAN867X_REV_C2:
lan867xphy_config_revc(sc);
break;
+ case LAN867X_REV_D0:
+ lan867xphy_config_revd(sc);
+ break;
}
/* XXX apply PLCA settings */
@@ -247,6 +276,7 @@
switch (sc->mii_mpd_rev) {
case LAN867X_REV_C2:
+ case LAN867X_REV_D0:
break;
default:
device_printf(dev,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 14, 3:58 PM (11 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41725277
Default Alt Text
D61269.1794671930.diff (1 KB)
Attached To
Mode
D61269: lan867xphy: Add silicon rev D0 configuration
Attached
Detach File
Event Timeline