Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2599939rwd; Fri, 26 May 2023 08:36:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GgG5PU7Puc/ebto7qe/UZuz+txukWnX1TWewvpYOzQ+bKcY4ojFQG92yjEcwUx0cYubE9 X-Received: by 2002:a05:6a21:998b:b0:10c:7916:f9f8 with SMTP id ve11-20020a056a21998b00b0010c7916f9f8mr3284994pzb.6.1685115379529; Fri, 26 May 2023 08:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685115379; cv=none; d=google.com; s=arc-20160816; b=y39YE8j7jIMQ7h2TDPWelro65mktsJNUzezGGzZJTmA8dasRkHaPbc7AnflFJdsb42 +T7wPdhYYMN9WLWwmR7WTRKNMhlBJbmwkgavA0RhVkm5uNVmo69akcQldjbcC8Te+MgH 5ZZUx0o5C36F2v2iWVLErXfFc1FEqJDlUFjooaLw36svjDGibWt9X3OFr8YfSwB/jjNO +FOp4D3YE4fCp20lpWQv9iXbauDuaPWyf85aNxuZIrKRFUG4GelpAZmmK2A0jfheAXNU UbwFDnHBAtEfZzXm2HbLmz5C2CoVaovdyG7Ibw70d2A5ato3+7qoYaf7K51tpzrPdjj5 /ZxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GsfFhlKdZf+6jHGCauQzQvToV4rX/+8oWfOcsnSEh1o=; b=R5m5Mb0EXoorWt2q48OEHJv/fQYyolq0jfBEQnRD/4t6/6iyOSujgqq3i9bSXJ7UlI 8pdN2i51o8zzLvc4vKxcM6yZYi05aVr6fDamktmpxv0zULlJ27Hk23ux/fTSxJtnfSkP hn0Qt1i+9CPgtxDY5irDm30krPPYe4vKC4OZYOswEvklpZyhVGgXSE0AzddV1kbZoMmG RuG06kBvKQ35MFlDHjcrt/8GY/TtmJSuTZMSMGxD7635PoKERU+TVCJ0NWfk+hPvcbfa /FbAkeYIahmv9pzrpoC9++WDAZvvp3WeC6uGXl00RWz/huidxiLCgjagyRv27vwUhWrB aGcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=d3O7jOyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a17090aeb0900b0024de4be9639si4390465pjz.34.2023.05.26.08.36.05; Fri, 26 May 2023 08:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=d3O7jOyf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244028AbjEZPXQ (ORCPT + 99 others); Fri, 26 May 2023 11:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244066AbjEZPXJ (ORCPT ); Fri, 26 May 2023 11:23:09 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5984D1A8; Fri, 26 May 2023 08:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685114586; x=1716650586; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/Ugy8OVBN/ZCydELAwyoI7h6o66NHCvsC41AaXEB37w=; b=d3O7jOyfUdO4OMGZVRS2yCS3pnnvq+4s8j+czZK5lZDWBOzhKxCVlwzs f+zvEGMBBq4Mi80/8e0Jal2q1MxpF4clStRXdhMNPSBRev1mgx5hEbN2Y wjZdjSaCJPR5tDdOF/SQKmvuUnG/HfPOxdRvyKCdezGuFeRn3VwHPbMZ0 bh6dH32bNDPL24KpSQVzRVOX1X5B0sEvJwtu0KcTILpqkjECspFpHUrUg dlnXRouIjSwbit/n1NFiMHsfHKNtnbEvQqx98SG4NkoRnouCgZBA7Rt48 D1NucMLzUKJQL98znMBxF8nTDDU3HgF+x+kkDttOYKXFnrOaCqKkMH/vI Q==; X-IronPort-AV: E=Sophos;i="6.00,194,1681196400"; d="scan'208";a="154119457" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 May 2023 08:23:05 -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; Fri, 26 May 2023 08:22:57 -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; Fri, 26 May 2023 08:22:52 -0700 From: Parthiban Veerasooran To: , , , , , , , , , CC: , , , , "Parthiban Veerasooran" Subject: [PATCH net-next v4 3/6] net: phy: microchip_t1s: update LAN867x PHY supported revision number Date: Fri, 26 May 2023 20:53:45 +0530 Message-ID: <20230526152348.70781-4-Parthiban.Veerasooran@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230526152348.70781-1-Parthiban.Veerasooran@microchip.com> References: <20230526152348.70781-1-Parthiban.Veerasooran@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Reviewed-by: Ramón Nordin Rodriguez Reviewed-by: Andrew Lunn Signed-off-by: Parthiban Veerasooran --- drivers/net/phy/Kconfig | 2 +- drivers/net/phy/microchip_t1s.c | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index f6829d1bcf42..47596ada3183 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -245,7 +245,7 @@ config MICREL_PHY config MICROCHIP_T1S_PHY tristate "Microchip 10BASE-T1S Ethernet PHYs" help - Currently supports the LAN8670, LAN8671, LAN8672 + Currently supports the LAN8670/1/2 Rev.B1 config MICROCHIP_PHY tristate "Microchip PHYs" diff --git a/drivers/net/phy/microchip_t1s.c b/drivers/net/phy/microchip_t1s.c index fd27e94c9ee5..7abecad28bf1 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 */ #include #include #include -#define PHY_ID_LAN867X 0x0007C160 +#define PHY_ID_LAN867X_REVB1 0x0007C162 #define LAN867X_REG_IRQ_1_CTL 0x001C #define LAN867X_REG_IRQ_2_CTL 0x001D @@ -31,25 +31,25 @@ * W 0x1F 0x0099 0x7F80 ------ */ -static const u32 lan867x_fixup_registers[12] = { +static const u32 lan867x_revb1_fixup_registers[12] = { 0x00D0, 0x00D1, 0x0084, 0x0085, 0x008A, 0x0087, 0x0088, 0x008B, 0x0080, 0x00F1, 0x0096, 0x0099, }; -static const u16 lan867x_fixup_values[12] = { +static const u16 lan867x_revb1_fixup_values[12] = { 0x0002, 0x0000, 0x3380, 0x0006, 0xC000, 0x801C, 0x033F, 0x0404, 0x0600, 0x2400, 0x2000, 0x7F80, }; -static const u16 lan867x_fixup_masks[12] = { +static const u16 lan867x_revb1_fixup_masks[12] = { 0x0E03, 0x0300, 0xFFC0, 0x000F, 0xF800, 0x801C, 0x1FFF, 0xFFFF, 0x0600, 0x7F00, 0x2000, 0xFFFF, }; -static int lan867x_config_init(struct phy_device *phydev) +static int lan867x_revb1_config_init(struct phy_device *phydev) { int err; @@ -59,11 +59,11 @@ static int lan867x_config_init(struct phy_device *phydev) * register already has the required value. So it is safe to use * phy_modify_mmd here. */ - for (int i = 0; i < ARRAY_SIZE(lan867x_fixup_registers); i++) { + for (int i = 0; i < ARRAY_SIZE(lan867x_revb1_fixup_registers); i++) { err = 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; } @@ -98,10 +98,10 @@ static int lan867x_read_status(struct phy_device *phydev) static struct phy_driver microchip_t1s_driver[] = { { - PHY_ID_MATCH_MODEL(PHY_ID_LAN867X), - .name = "LAN867X", + PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVB1), + .name = "LAN867X Rev.B1", .features = PHY_BASIC_T1S_P2MP_FEATURES, - .config_init = lan867x_config_init, + .config_init = lan867x_revb1_config_init, .read_status = lan867x_read_status, .get_plca_cfg = genphy_c45_plca_get_cfg, .set_plca_cfg = genphy_c45_plca_set_cfg, @@ -112,7 +112,7 @@ static struct phy_driver microchip_t1s_driver[] = { module_phy_driver(microchip_t1s_driver); static struct mdio_device_id __maybe_unused tbl[] = { - { PHY_ID_MATCH_MODEL(PHY_ID_LAN867X) }, + { PHY_ID_MATCH_EXACT(PHY_ID_LAN867X_REVB1) }, { } }; -- 2.34.1