Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp458743rdf; Fri, 3 Nov 2023 06:02:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEY8jeghJA3MnBc6JPG7x2sLBOd2c/tRfV9Zx4dBf45q2dCNPzdyvPoYTaQ8wJwKIkEi9+u X-Received: by 2002:a4a:c993:0:b0:586:9048:1879 with SMTP id u19-20020a4ac993000000b0058690481879mr20694073ooq.4.1699016555491; Fri, 03 Nov 2023 06:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699016555; cv=none; d=google.com; s=arc-20160816; b=SH8U1/vnp9X6+9Mj9g+hvgQqgCOD5ycanafH87gOnknujEdvWbj6NcP01Wn6QPDUMC BTJfRCB6NX+4zIwMn9oQ3Gpm+mVWxJ02Y0orlKSgMcdVnVioHuVLKpQav7qzjhW+fDhw 6DMspRIU9kHtFDnOEcmTpOJQx2b0TjJYCscn5XstVF5rIhCCSPvfughPEPoeSsKKYA8j 7yIZIskQGmVSox5jWPTZwEEx6gEXnJuhA3akBuFgSipgaD4mNEEo/2jyEqLu1E8XwWym YZTFIhQIW0g+pg0NkkO09SFqPM5nQiVyMmq7aPfO1wNxNvwA/nvJoSVeAcZbbHZowboa +F5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dGbTfODFaQzTymCMKEV4+gY6lqOjwrcNQtCi7t1dngQ=; fh=1BgAsFL7cD6H1QPGKPmBKdFOKcAq2qq/CGtdYzNn9xc=; b=OvZNwSooJkqyjCxeW/NUo5MivaKz33wfpxgVSBz/kVycT3XVVcuDSlv5KWCAKC92tF KAkiGf7GOvgMky9uS1EnczEBbnf0pwhE/NSuru9bT1IS+gCmkSviM4Nwu3EtfteypyEw jb8Tq0pF5FXNbE4KX6TLVyMamM+sW9iSD7xbpMVc9MJ21mZu29k5SRpnrJGcDKihwfpH ybCcKR5Xd7fqGdc8sizTgufaT+lwN73V8VD5/1BRX4Ix4WgypzZ50sH4WAwhsOnno13j 28p2/Dj98XUYwlZ8xu1an8wQ5eCWLfGZ98emmM1QoEo41w2Vzp0SpGSw3LntsyJeDfti kK9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=114y9TKm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id l25-20020a05683004b900b006ce14f20705si637858otd.64.2023.11.03.06.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 06:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=114y9TKm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id DB31980AE20C; Fri, 3 Nov 2023 06:02:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376466AbjKCNBe (ORCPT + 99 others); Fri, 3 Nov 2023 09:01:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376306AbjKCNBc (ORCPT ); Fri, 3 Nov 2023 09:01:32 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CE9F19D; Fri, 3 Nov 2023 06:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=dGbTfODFaQzTymCMKEV4+gY6lqOjwrcNQtCi7t1dngQ=; b=114y9TKmgmpqZxfr5SUUGUwg3L CUYpXioth0kSgDDzNVy8SBlQ+UQzs/+w1iS6vooSrIrgednlC/U+5VEEOyngQOzvmURjwX6LPuD4r YO7NfhLU+F4rb++V3vo40Bz3688mScCQAaF6m/V2+Ual1GqI0b1/V4aVWhyG6+odvQLQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qytnV-000oat-W6; Fri, 03 Nov 2023 14:01:13 +0100 Date: Fri, 3 Nov 2023 14:01:13 +0100 From: Andrew Lunn To: Luo Jie Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: at803x: add QCA8084 ethernet phy support Message-ID: <806fb6b6-d9b6-457b-b079-48f8b958cc5a@lunn.ch> References: <20231103123538.15735-1-quic_luoj@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231103123538.15735-1-quic_luoj@quicinc.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE,T_SPF_HELO_TEMPERROR,T_SPF_TEMPERROR autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 06:02:23 -0700 (PDT) > #define QCA8081_PHY_ID 0x004dd101 > +#define QCA8081_PHY_MASK 0xffffff00 That is an unusual mask. Please check it is correct. All you should need its PHY_ID_MATCH_EXACT, PHY_ID_MATCH_MODEL, PHY_ID_MATCH_VENDOR. > @@ -1767,6 +1781,20 @@ static int qca808x_config_init(struct phy_device *phydev) > { > int ret; > > + if (phydev->phy_id == QCA8084_PHY_ID) { > + /* Invert ADC clock edge */ > + ret = at803x_debug_reg_mask(phydev, QCA8084_ADC_CLK_SEL, > + QCA8084_ADC_CLK_SEL_ACLK, > + FIELD_PREP(QCA8084_ADC_CLK_SEL_ACLK, > + QCA8084_ADC_CLK_SEL_ACLK_FALL)); > + if (ret < 0) > + return ret; > + > + /* Adjust MSE threshold value to avoid link issue with some link partner */ > + return phy_write_mmd(phydev, MDIO_MMD_PMAPMD, > + QCA8084_MSE_THRESHOLD, QCA8084_MSE_THRESHOLD_2P5G_VAL); > + } > + Please add a qca8084_config_init() and use that from the phy_driver structure. > /* Active adc&vga on 802.3az for the link 1000M and 100M */ > ret = phy_modify_mmd(phydev, MDIO_MMD_PCS, QCA808X_PHY_MMD3_ADDR_CLD_CTRL7, > QCA808X_8023AZ_AFE_CTRL_MASK, QCA808X_8023AZ_AFE_EN); > @@ -1958,6 +1986,11 @@ static int qca808x_cable_test_start(struct phy_device *phydev) > phy_write_mmd(phydev, MDIO_MMD_PCS, 0x807a, 0xc060); > phy_write_mmd(phydev, MDIO_MMD_PCS, 0x807e, 0xb060); > > + if (phydev->phy_id == QCA8084_PHY_ID) { > + phy_write_mmd(phydev, MDIO_MMD_PCS, 0x8075, 0xa060); > + phy_write_mmd(phydev, MDIO_MMD_PCS, 0x807f, 0x1eb0); > + } > + Please add a comment what this is doing. > }, { > /* Qualcomm QCA8081 */ > - PHY_ID_MATCH_EXACT(QCA8081_PHY_ID), > - .name = "Qualcomm QCA8081", > + .phy_id = QCA8081_PHY_ID, > + .phy_id_mask = QCA8081_PHY_MASK, > + .name = "Qualcomm QCA808X", Please add a new entry for the 8084. Andrew