Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2807928rwd; Mon, 22 May 2023 04:49:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6zDVOZYoCJ8oPJh2RWAn9OhdZ/ETZ+oyCSsGJFO/wTtzmThab79X8jsJ+HdY3mYQsWEODN X-Received: by 2002:a05:6a20:3d93:b0:10b:855b:a39f with SMTP id s19-20020a056a203d9300b0010b855ba39fmr3912397pzi.44.1684756188453; Mon, 22 May 2023 04:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756188; cv=none; d=google.com; s=arc-20160816; b=VEredITfy5oUz7yQdI63FUoe5dEuZWGD7fvcByXRp0CBr1eKhyFyeSUokZ3jBA7+Og AXRe5AIuvauSNLNEYxIZSg8UurGbI0r4mhXP7r4TMHfN89sog2nlX9xrlDs04kV1MOf+ i8SBDWmhRVzj7JbXRqALUmlVRLbFpviJPs7KTEnmsYaepsZsJudU8KDgXUbJmG8RA+Pu rm7XsPMxI92dmrq1vam51BqKby2e/eMWRwDUj1TQbU7Dix5IoxmXYudWMCfXLMes8yuR d/Y4lukRb2DZXeuartpm6BU/ypPyVYPX8Co3Lvoz8ENjwM21Kr32MZtfe6bUEqbEIN1s vEqQ== 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=N1mTjCuTShOmPZDUYrJjcF2+dXdai4P0X/tPVSyoWkY=; b=IkXm8zpJaPGZsrdheSW2as1WnxGbVD5vVIwVK/bRa/NpKkByrW43UEAAvQXzlT3VxK DOX8YYmj6sgKB7BTKZJfK6zXIGPWN1AaXf95YxKRheL5/rBQqIcNOaXVAoEifKNKiDj/ unNEJxHox77AO8AvtbG2DMU8jsQo0y0GBRyvb7yRubxd6RKOEKlMJjwbzWLQgE+cUxyc 8U0k+IUfSEMNpaOB2SW0tyCyPIMneORdRxnFm0QZaHpATjhEBvfA+LOz3zWeI43fepHY wdK94zXMXm3PcP/SULQ51Ke92rLY+6SAJSl9ehLwYwP4oHMdgL0zZxFW4+IMJwB1G4an qX9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=j1NfbDU5; 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 g9-20020a63fa49000000b0052c5d8db0ddsi4788069pgk.790.2023.05.22.04.49.33; Mon, 22 May 2023 04:49:48 -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=j1NfbDU5; 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 S232972AbjEVLdE (ORCPT + 99 others); Mon, 22 May 2023 07:33:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232180AbjEVLcx (ORCPT ); Mon, 22 May 2023 07:32:53 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 127D8CA; Mon, 22 May 2023 04:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684755166; x=1716291166; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6NNAVQ4+W8BeCdTSSUfo15M1NiBo0baT+cFOGV8/Fto=; b=j1NfbDU5WaGSPs8tOW271N34DSm8+Zoty1/vM73sY/Uy2/fY1gvlf/jB /Xgkv7Gr/V7DRrhZs4TFnfG3lP5zEqOmraPVDq0Lihkdm6OTZ3AXn6DRQ 26922PSwb1XYXECFmY6IzyIyDFj2G+ewyHzVEmn4U9Gb05j+iHcFdUSGw bQLwb5WgJWcFwNS/SKa6KKKoT5NqjZdz89UB6Sg/QOWBlXxkHR3XwbRbt 29OjynOi4N28GBEcK1TYDgXAVIRFK6q3DpfEnMdUweUhKBZ4r4nxM4mff JN1/3T69O1XknbusN7JdozX/NIHp/rv53GOhNlGiBY7P74sSAo3wEKQoN w==; X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="214893158" 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; 22 May 2023 04:32:45 -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; Mon, 22 May 2023 04:32:43 -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; Mon, 22 May 2023 04:32:38 -0700 From: Parthiban Veerasooran To: , , , , , , , , , CC: , , , , "Parthiban Veerasooran" Subject: [PATCH net-next v2 3/6] net: phy: microchip_t1s: update LAN867x PHY supported revision number Date: Mon, 22 May 2023 17:03:28 +0530 Message-ID: <20230522113331.36872-4-Parthiban.Veerasooran@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230522113331.36872-1-Parthiban.Veerasooran@microchip.com> References: <20230522113331.36872-1-Parthiban.Veerasooran@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 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. Signed-off-by: Parthiban Veerasooran --- 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_t1s.c index 534d9faf8475..869c7f403ea1 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) { /* 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 @@ -71,11 +71,11 @@ static int lan867x_config_init(struct phy_device *phydev) * new_val = new_val OR value // Set bits * write_register(mmd, addr, new_val) // Write back updated register value */ - 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; } @@ -110,10 +110,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, @@ -124,7 +124,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