From patchwork Thu Apr 15 13:07:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 12205439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2B50C433ED for ; Thu, 15 Apr 2021 13:09:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8030861249 for ; Thu, 15 Apr 2021 13:09:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8030861249 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kvqRIHK3cFQv8ataXVEy2w7v1CDT+IYgHQnERUElNEQ=; b=ciMp+1MVH/BFc+TlbRiJTx2oc snEl1lfivZBW9EAdD2YG/vU6PHgQJctv7YqIOrnKEN7Kf10N9g60fZ/Z28psZWmc3mAGl0Dg8hvxp vRuP6lFTglhoHratiE48nWrZHc/ssjPA7Esx9U72Jaxm9DNUH5O0GvCcESNRLetrx5pfulZFiCXwz k2mnjww+BP6lb5+smVfdZXnI846b/zytnXvsXK+eSeXLlDjwIs/nwb/FIMgGbTNXa8ZJMPteWh9hu woi7uAlH1YfTARZtj4UHviNhd4lYGiToBXeHkocNhPiFLORD7YX1dNS0EuezmXeF52vq364LO1XmK YSCtIIwpw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX1iq-00GCfj-S1; Thu, 15 Apr 2021 13:07:52 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX1io-00GCfE-59 for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 13:07:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=jfGBpeCoC+zf1Vduj2yxQ9YEGgrqtN63MleGMDMb2SQ=; b=n/Pb8FCgZYKMdgB/CT788/0JbM iQZXhllK+6Z49yXOXQtcL98kDWvfKo0cymU/JKD6tUr3GjHWzdnuVhn5zrvlX26+/xaMbcCWWVa13 Nwt5i0rBLqZDZKDUU+RRPfRQT6GKWOTmPQfQQHMXmqxALz9ZHnET8DgD3SkptH0BVNPPi4zi2myNf yiinrMZCSWj4R5kaCVF6NAHaB2XRoccHQiFkctQo73CzHb/DXTBomRuIV/Xp7NdpBMERTz18sIJeT 6SSNnS86p1ZCmtEIwcX8woPJjtIEsQQfgLs3wBSKQTUgW7P6f759KkDMW7ExHr7/QeckPuAVul4on EU56OzjA==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX1il-008aeO-Rk for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 13:07:48 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lX1ig-0006KS-Ub; Thu, 15 Apr 2021 15:07:42 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lX1if-0005Kz-MO; Thu, 15 Apr 2021 15:07:41 +0200 From: Oleksij Rempel To: Shawn Guo , Sascha Hauer , Andrew Lunn , Florian Fainelli , Heiner Kallweit , Fugang Duan Cc: Oleksij Rempel , kernel@pengutronix.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Fabio Estevam , David Jander , Russell King , Philippe Schenker Subject: [PATCH v2 3/7] net: phy: at803x: AR8085 & AR9331: add loopback support Date: Thu, 15 Apr 2021 15:07:34 +0200 Message-Id: <20210415130738.19603-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210415130738.19603-1-o.rempel@pengutronix.de> References: <20210415130738.19603-1-o.rempel@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_060747_916081_F45210DC X-CRM114-Status: GOOD ( 12.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org PHY loopback is needed for the ethernet controller self test support. This PHY was tested with the generic net sefltest in combination with FEC ethernet controller and AR9331 switch. Signed-off-by: Oleksij Rempel --- drivers/net/phy/at803x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index d7799beb811c..f74f427a8da5 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -1128,6 +1128,7 @@ static struct phy_driver at803x_driver[] = { .get_wol = at803x_get_wol, .suspend = at803x_suspend, .resume = at803x_resume, + .set_loopback = genphy_loopback, /* PHY_GBIT_FEATURES */ .read_status = at803x_read_status, .config_intr = at803x_config_intr, @@ -1207,6 +1208,7 @@ static struct phy_driver at803x_driver[] = { .read_status = at803x_read_status, .soft_reset = genphy_soft_reset, .config_aneg = at803x_config_aneg, + .set_loopback = genphy_loopback, } }; module_phy_driver(at803x_driver);