From nobody Fri Nov 13 14:24:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jQzzn3HqWz70gYt for ; Fri, 13 Nov 2026 14:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQzzn2nQ3z4n3f for ; Fri, 13 Nov 2026 14:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794579893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZYRMDbVMtTucQ3oUym9uzETSu06i2Qkqi0iSMz/PaU=; b=OKVG1BUxatW8JruurLaR91/MONRutlDeRQCKs9Wi3UyO6kvaJcIsn43uaXL2LTFkg1wBtv itC26NZx41tNNUozLZsnLAtfElhXxWS9/L5TsjhmKKdC+3QAd1trLvWqErjy4APmbX42v3 dGu4VnTKOTbzBLvhSjGuR3HGS/3aSbxiNx4nJC4ASn1J2tTvE/2sfZ1P6xDPtUfqQFyPtR i8Q2bXETl/N0VQdQLRrrWevYRtEPDgT+n5crKXAj+Z9pSvHcdRSVAZDdnN0hXOL1ciksOk 8cCMdTuR6sonS/7CRKGdkXrkNaB5mHa+Z2k+G/J+RKhml1kY0NEGQeUSqum4+w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794579893; b=Pvso6uAdXabH46noMdFh+mr6GTNjnRNFkp3niaIX5+Z3W2hO2hSuob7TS3Ea1wJzCYiooN 2jJzCNz+wHdI8I3roed6vkq5Jy5NDQ98l10K2/tbmciCkDZKN2Wpk6+lXQEQk8HyF+kJnY ajfMEDtu4z9MqgEErQTHYK3jleK/bDo1G4gIPtv2RmKpp4juEgZMz946AZlaNQ+XZQj56b HWXUdayCI80wNipAzjSbqPxJPHOpfnD84AeGH1Yc0iqfjdOAgx3aOpkoRcl6CIkcmj9jpT qTY+dCAvhCSxyMMv1oSBWShvtItmrginklQ/K6SKc6zFikgzNzq7aNELjcdpwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794579893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZYRMDbVMtTucQ3oUym9uzETSu06i2Qkqi0iSMz/PaU=; b=WAt3RGZ3SvEDRsQfwQs73z9ws80ukJvQyZpHRXlwRZzEWCF6KuEQ1ZHWWBZIqNPoMtbkm9 omWvPeceu/7GZp98S3E9oONKXo3ohTPZnTcFEJVAZR0RuJstsZst8sjsMcEpCm7bsZz78v v2ZpoK0cOuhWcjS/ACHVLRZMWxdKQxW9+sAYxYMzEF6wkjfLeqGUWDy7N/esNHWK9Cyq5Y 6lP9PK6Q5+LHRHuULF3JukM46g0HKOuXNPlZFH8zOMtDFs5kUHaF3lKdIM6K+V0jA9Nsmn umEdQ8aGWYj3ZHCLcFlmLOEg0XRxZhvkqXo6be8p0oR4rM1R5bZMAa7rV70ZeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQzzn1xDxzfnR for ; Fri, 13 Nov 2026 14:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 59cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 14:24:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 57e8eddc52b9 - main - lan867xphy: Add silicon rev D0 configuration List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57e8eddc52b9a5adfda6b5c907a2c84967dcc257 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 14:24:53 +0000 Message-Id: <6af71db5.59cb.7aba28f0@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=57e8eddc52b9a5adfda6b5c907a2c84967dcc257 commit 57e8eddc52b9a5adfda6b5c907a2c84967dcc257 Author: Ed Maste AuthorDate: 2026-11-06 18:02:07 +0000 Commit: Ed Maste CommitDate: 2026-11-13 14:23:26 +0000 lan867xphy: Add silicon rev D0 configuration Apply hardware revision D0 configuration from Microchip AN1699 (Revision G). The LSCTL (0x0012) write is deferred until link state reporting is implemented. Sponsored by: The FreeBSD Foundation Sponsored by: Microchip (Hardware) Differential Revision: https://reviews.freebsd.org/D61269 --- sys/dev/mii/lan867xphy.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/sys/dev/mii/lan867xphy.c b/sys/dev/mii/lan867xphy.c index 10b9f341d507..71bf24abbd05 100644 --- 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 @@ lan867xphy_config_revc(struct mii_softc *sc) 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 @@ lan867xphy_reset(struct mii_softc *sc) 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 @@ lan867x_attach(device_t dev) switch (sc->mii_mpd_rev) { case LAN867X_REV_C2: + case LAN867X_REV_D0: break; default: device_printf(dev,