From nobody Mon Feb 9 20:59:24 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5936DC7EE23 for ; Wed, 24 May 2023 14:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235734AbjEXOpD (ORCPT ); Wed, 24 May 2023 10:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236049AbjEXOo6 (ORCPT ); Wed, 24 May 2023 10:44:58 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111F5119; Wed, 24 May 2023 07:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684939495; x=1716475495; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AEP1ljsFtDL44m+0vN5ufOdoL8fgcoRezPSE7fZgPI4=; b=ohbltQ4e7fPzWjMZ0xA82Xe43mGh3EULPbDSI2fP3di6QgzCRefwKc0n Ul/9bo0LlpKZgV9pPicBhSj74g2VKA6APV5TnCmMAU/LlVlE+ID9SGw3h 3frc6z8ZTAJVwYQI9Bz59afR7igqGxmGdQv4iJAym7TAUEVuhyk9YSF2P TVELwrNKbntFSM1p/Ezjl9EemHeSZPPXn+hFYl0pbhGlIrxbJjIbNzstp oFPAmPstWBA/Xb4FF+DpZhmZMXuLjLhJbH8TzxK4mGIQLWi5Pyk0Xv5TF FT6TVjLeY1cP43q6dFI5mfdDoz+LL9wn1dxoAzcWB/tg23Fy3xC2fyyRC g==; X-IronPort-AV: E=Sophos;i="6.00,189,1681196400"; d="scan'208";a="215297137" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 May 2023 07:44:52 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 24 May 2023 07:44:48 -0700 Received: from CHE-LT-I17164LX.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 24 May 2023 07:44:44 -0700 From: Parthiban Veerasooran To: , , , , , , , , , CC: , , , , "Parthiban Veerasooran" Subject: [PATCH net-next v3 3/6] net: phy: microchip_t1s: update LAN867x PHY supported revision number Date: Wed, 24 May 2023 20:15:36 +0530 Message-ID: <20230524144539.62618-4-Parthiban.Veerasooran@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230524144539.62618-1-Parthiban.Veerasooran@microchip.com> References: <20230524144539.62618-1-Parthiban.Veerasooran@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" As per AN1699, the initial configuration in the driver applies to LAN867x Rev.B1 hardware revision. 0x0007C160 (Rev.A0) and 0x0007C161 (Rev.B0) never released to production and hence they don't need to be supported. Signed-off-by: Parthiban Veerasooran Reviewed-by: Andrew Lunn Reviewed-by: Ram=C3=B3n Nordin Rodriguez --- drivers/net/phy/microchip_t1s.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/phy/microchip_t1s.c b/drivers/net/phy/microchip_t1= s.c index b5b5a95fa6e7..8f29d9802131 100644 --- a/drivers/net/phy/microchip_t1s.c +++ b/drivers/net/phy/microchip_t1s.c @@ -3,14 +3,14 @@ * Driver for Microchip 10BASE-T1S PHYs * * Support: Microchip Phys: - * lan8670, lan8671, lan8672 + * lan8670/1/2 Rev.B1 */ =20 #include #include #include =20 -#define PHY_ID_LAN867X 0x0007C160 +#define PHY_ID_LAN867X_REVB1 0x0007C162 =20 #define LAN867X_REG_IRQ_1_CTL 0x001C #define LAN867X_REG_IRQ_2_CTL 0x001D @@ -31,25 +31,25 @@ * W 0x1F 0x0099 0x7F80 ------ */ =20 -static const u32 lan867x_fixup_registers[12] =3D { +static const u32 lan867x_revb1_fixup_registers[12] =3D { 0x00D0, 0x00D1, 0x0084, 0x0085, 0x008A, 0x0087, 0x0088, 0x008B, 0x0080, 0x00F1, 0x0096, 0x0099, }; =20 -static const u16 lan867x_fixup_values[12] =3D { +static const u16 lan867x_revb1_fixup_values[12] =3D { 0x0002, 0x0000, 0x3380, 0x0006, 0xC000, 0x801C, 0x033F, 0x0404, 0x0600, 0x2400, 0x2000, 0x7F80, }; =20 -static const u16 lan867x_fixup_masks[12] =3D { +static const u16 lan867x_revb1_fixup_masks[12] =3D { 0x0E03, 0x0300, 0xFFC0, 0x000F, 0xF800, 0x801C, 0x1FFF, 0xFFFF, 0x0600, 0x7F00, 0x2000, 0xFFFF, }; =20 -static int lan867x_config_init(struct phy_device *phydev) +static int lan867x_revb1_config_init(struct phy_device *phydev) { /* HW quirk: Microchip states in the application note (AN1699) for the phy * that a set of read-modify-write (rmw) operations has to be performed @@ -73,11 +73,11 @@ static int lan867x_config_init(struct phy_device *phyde= v) * Although AN1699 says Read, Modify, Write, the write is not required if * the register already has the required value. */ - for (int i =3D 0; i < ARRAY_SIZE(lan867x_fixup_registers); i++) { + for (int i =3D 0; i < ARRAY_SIZE(lan867x_revb1_fixup_registers); i++) { err =3D phy_modify_mmd(phydev, MDIO_MMD_VEND2, - lan867x_fixup_registers[i], - lan867x_fixup_masks[i], - lan867x_fixup_values[i]); + lan867x_revb1_fixup_registers[i], + lan867x_revb1_fixup_masks[i], + lan867x_revb1_fixup_values[i]); if (err) return err; } @@ -112,10 +112,10 @@ static int lan867x_read_status(struct phy_device *phy= dev) =20 static struct phy_driver microchip_t1s_driver[] =3D { { - PHY_ID_MATCH_MODEL(PHY_ID_LAN867X), - .name =3D "LAN867X", + PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVB1), + .name =3D "LAN867X Rev.B1", .features =3D PHY_BASIC_T1S_P2MP_FEATURES, - .config_init =3D lan867x_config_init, + .config_init =3D lan867x_revb1_config_init, .read_status =3D lan867x_read_status, .get_plca_cfg =3D genphy_c45_plca_get_cfg, .set_plca_cfg =3D genphy_c45_plca_set_cfg, @@ -126,7 +126,7 @@ static struct phy_driver microchip_t1s_driver[] =3D { module_phy_driver(microchip_t1s_driver); =20 static struct mdio_device_id __maybe_unused tbl[] =3D { - { PHY_ID_MATCH_MODEL(PHY_ID_LAN867X) }, + { PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVB1) }, { } }; =20 --=20 2.34.1