From patchwork Fri Jul 15 21:59:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12919834 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92D16C43334 for ; Fri, 15 Jul 2022 22:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=SjY7iuaTHTb9F+0oD1e/ibQAWSBTLDpgjYRQphvDjtk=; b=Y7OmTG/KZSGuzK UP34ojrKlrWpRoIIEIFPjLHiK3gs+ygySCLV/ZLswRrCKl5rEPbFtphEZB/hVF/rkTxMCHfoucF1K m00vPAPYzYIweu9E09XUFo6IvoLTfuoN2T7IaBdiujlgIydIzVM3ZtJmWPdlpLJFvRDub4S2HBCJr oL5P14MfpzEFSSSa9Z3X+XHl/X3yppiOPD/IQuk2r+5RM92cKafiqu+YJmV3XaPoo+Ww23BvpPpu8 GGoa3yOC8eYgIY0pIeKGI5WrcdsEWbOCzWSkzs9CyskP7z5rZpTa5DbkG+jsM+/uypzAqcKbgmyE1 Fo831xcF09H+awJP0bNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTUX-00Aeca-Ho; Fri, 15 Jul 2022 22:08:58 +0000 Received: from mail-eopbgr50063.outbound.protection.outlook.com ([40.107.5.63] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCTMe-00Ab8A-Ab for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 22:00:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j4Odz1u1mtSFDLuB5xAqFaR8ZlElzV8RWgZ43BB62NvKCKAHzxQ1klaQALG4CL3S1/h9NNISU4AuA1KUMtQD0xdcxbN1GWaHKTLAAIxhjEc/WwYUICrKLa8JV7kaBMjYH4g8Y1OgRrr0a6EVvovLM7wcItUaAX/W+9f2PK2gaJLT0BWIHqViJn9/roXsko95wbaHDdc895Ov7GETufn3rs0YxYzF99XVVzMBYFSNpBC61Aape8/GTQhOzKd4acqge0eXh9Ns9416u9esANlImUeJudR0oo45Yo55vnYwRwBAPQBvXkJXx3tNWqlEQQKu/yUnzcVpm9cKV/aJvY5JSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JC/rvL3KQAs0sjx38prnzjx+8Ar6/vqdJeLXGu9zEMo=; b=k7ux8tWNT6Upx6piIw3VqiHwZuxnHgDzswFyGZVhChpuY+gZWes1hPSCkmemf6+MQDCTmM/9ckuxXNWYSIEKHGG2wtTxakd4/nJhLMwPglsVb0ScZXKnP6HVqM5nHeDD7fTkQDV7N5oxbi1Sc95eIQr33/ZRLQm+/H08DKq/iS7TCKqof6ySQwYA/TeI4Lz8ht796ycMshZRd8voPvQtt2IrrllecZBkx9gX3tkyKzFDVKOWHAH9JsSTbVfhXkiXQLBwwmm5quVr0usQkx0TqE1DuMXgQaY37cxdD8dlpVxECwCll7waklGqvYAIZ0Ns/gOLpcebdWqgD7MJQ34Pxw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seco.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JC/rvL3KQAs0sjx38prnzjx+8Ar6/vqdJeLXGu9zEMo=; b=xf9fIbLIwz5urWgx/0jnZVqTDrjboDWdxrE9JkN1zCPdbaunlN9qfK7nDL2ZAzl8i/yevYiCYaameG/47kgM0ewRvnmcLDy1LsGzKwbcp/MXzMnuvPyURjah12KGau2nfneEnPsFC5ywxFlAZ7NxDPiMbvBgt1575Cg7apuMv3kC84B58pBjIgUFJHnu6MPdTePk4g+Mvr7GyGO0++Qal2b0ZmLjN6Q1lRRa0mpWCKHwnETzr3hQkL+v1OrFjBbIPI3gxJDejcbcmvopcQE9OwWJbYdzHUcp3mD4n9zN16Twr0ZtmFBHMje9DcaCZtgmHXGlAQkFYuOGds0uEP6dMg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=seco.com; Received: from VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) by DU0PR03MB8598.eurprd03.prod.outlook.com (2603:10a6:10:3e5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.15; Fri, 15 Jul 2022 22:00:44 +0000 Received: from VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::5c3e:4e46:703b:8558]) by VI1PR03MB4973.eurprd03.prod.outlook.com ([fe80::5c3e:4e46:703b:8558%7]) with mapi id 15.20.5438.015; Fri, 15 Jul 2022 22:00:43 +0000 From: Sean Anderson To: "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: Paolo Abeni , Eric Dumazet , linux-arm-kernel@lists.infradead.org, Russell King , linux-kernel@vger.kernel.org, Sean Anderson , Alexandru Marginean , Andrew Lunn , Heiner Kallweit , Vladimir Oltean Subject: [PATCH net-next v3 13/47] net: phy: aquantia: Add some additional phy interfaces Date: Fri, 15 Jul 2022 17:59:20 -0400 Message-Id: <20220715215954.1449214-14-sean.anderson@seco.com> X-Mailer: git-send-email 2.35.1.1320.gc452695387.dirty In-Reply-To: <20220715215954.1449214-1-sean.anderson@seco.com> References: <20220715215954.1449214-1-sean.anderson@seco.com> X-ClientProxiedBy: CH2PR10CA0009.namprd10.prod.outlook.com (2603:10b6:610:4c::19) To VI1PR03MB4973.eurprd03.prod.outlook.com (2603:10a6:803:c5::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 94ab4026-626c-40ce-9d7c-08da66ad76fa X-MS-TrafficTypeDiagnostic: DU0PR03MB8598:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jasf0o+v50RGla61eSrMHmRi+3VQ4pGGoV3dUz4/DTXzH6YO1pO4nRGTT38cOAQtZ4NHEb6HtDEf+qb/lKNx7ez1Gkrri4mGYZ7AXzOuFzGXcRPZhy3gTJikc8w5Pc0NnCyCF1S/FwWjCrNeL5WGWLx9pI4FXKglull6WcD37WPTPCncQ23FWmN6TPGNoS+JVsLI+xdwapsb57TK+Z2kI7ZED5RmQfBffyMDtcTHDGrgYbd+xyPVq5J/SGjKfTT2hIE5g3fwHw1LDxw/thDZzOGJNTadV+JyDW2DU9tK9iTulGhiU1ibRMOgNPKokzncmbarlo6PZrsNEBJBv5/yVainxarpdcaQAQAK+yu6Rph6rkSP/zAxy/T20bDwLe8AxzGauhc76LqnMHgDLrExbOmAqHttSJrLTjqaA1akfVsHKlQgymRntT2CgSSxSUL7c5gmbYoKhLUZPW+zZiGSsrzey6N2suP98wzIqR1C8vbLtG/R25/9QHisfuyRU6vXtlB+A4HkAwK7wvMOF28Fj1+ZhYNMAremB3gripATfcBJEtUzBqHuA2Qc/+J+z4lj7b02uOO4rGrZuEEMLmu+zY04FqTSUZ15jO8mB0Cadjq0kYH9FJliiOcI2L4hfsGjkyHVk8QcCtGcszPb2mZqGxZ1ObpA5otBkhQPiNQwJeJKgA6sA2XBBD3dEfowLknl7QOkNz1U5lGKN5cdbZCxHp9w1rFsEqwP21PCbS4zmxNzWd0p6NFXJyEFmXt6s0pqtwtrEouHxYdNnnYHD+sK/uPddB2hwewayh81w2mb+TmFCHVOr36LJsbWo6eKr1ii X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR03MB4973.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(136003)(366004)(39850400004)(376002)(346002)(396003)(5660300002)(8936002)(44832011)(7416002)(2906002)(54906003)(66556008)(4326008)(8676002)(66476007)(66946007)(110136005)(86362001)(316002)(186003)(2616005)(26005)(38350700002)(52116002)(36756003)(6666004)(41300700001)(478600001)(6486002)(1076003)(6506007)(83380400001)(6512007)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XBTtIbYbVAtpoegWlwYyWg1ciKAQDZRMIeMLMKHDZ7ozAzJT4gQp7hleRcnt53xjp3D8VITyCczmFE8mZGoikM0c68IV8kNxnvFs5uFp2OeUAXG4Ak883Mgj5knzv52PyU8dDTUYVnJYWxxhmZkbGD4OpgGvBkHroFlRY+lIpvaoV75WUh7wz0mIZ3qudcqEvcaefgzuneYm3XkRIKwZFlAszEQ2qzPics5Fb/JKJBJIAWV2xpymy57OVmvBzYd6OIMTftFjzam0yIuH5cZqhJGTfSBYYX8mCJTwmHXKpmbrWKGYkcLTq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6V5q5FkofHD7trlfTBGTOjpMxLgIhRJ5bZHlS5ouPTtpsjx5Rc81dkRmp9D3T5wfQ2DJUBHPsANWcjivbmTn65/A+m5FHEq4QGHWgEV6S+DntyxrujN0oV86W9/6WuXrgPCH7nMIfuDk1UIEmvRQviTe3z4qDjtry/bd9FUyB5Z0OUXEzMddeYa/sSEXbeDX99ytR93gV2CBtXz0H1d+u1DEVU0zrWYqDEteQ== X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94ab4026-626c-40ce-9d7c-08da66ad76fa X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB4973.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 22:00:43.8951 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uBN9O5nA7JlBwRcCkBIYFrPSgFJTDhfz4nq0ovGnRvxHMjVhjdeIaGaHB22S1BC+0XSQSiD9dsSboLmo6RjtRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR03MB8598 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_150048_403294_164843A5 X-CRM114-Status: GOOD ( 11.12 ) 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 These are documented in the AQR115 register reference. I haven't tested them, but perhaps they'll be useful to someone. Signed-off-by: Sean Anderson Reviewed-by: Andrew Lunn --- Changes in v3: - New drivers/net/phy/aquantia_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index f9e2d20d0ec5..0a2f8c4aa845 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -28,9 +28,12 @@ #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0 +#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KX 1 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI 2 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII 3 +#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_XAUI 4 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII 6 +#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_RXAUI 7 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII 10 #define MDIO_AN_VEND_PROV 0xc400 @@ -393,15 +396,24 @@ static int aqr107_read_status(struct phy_device *phydev) case MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR: phydev->interface = PHY_INTERFACE_MODE_10GKR; break; + case MDIO_PHYXS_VEND_IF_STATUS_TYPE_KX: + phydev->interface = PHY_INTERFACE_MODE_1000BASEKX; + break; case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XFI: phydev->interface = PHY_INTERFACE_MODE_10GBASER; break; case MDIO_PHYXS_VEND_IF_STATUS_TYPE_USXGMII: phydev->interface = PHY_INTERFACE_MODE_USXGMII; break; + case MDIO_PHYXS_VEND_IF_STATUS_TYPE_XAUI: + phydev->interface = PHY_INTERFACE_MODE_XAUI; + break; case MDIO_PHYXS_VEND_IF_STATUS_TYPE_SGMII: phydev->interface = PHY_INTERFACE_MODE_SGMII; break; + case MDIO_PHYXS_VEND_IF_STATUS_TYPE_RXAUI: + phydev->interface = PHY_INTERFACE_MODE_RXAUI; + break; case MDIO_PHYXS_VEND_IF_STATUS_TYPE_OCSGMII: phydev->interface = PHY_INTERFACE_MODE_2500BASEX; break; @@ -514,11 +526,14 @@ static int aqr107_config_init(struct phy_device *phydev) /* Check that the PHY interface type is compatible */ if (phydev->interface != PHY_INTERFACE_MODE_SGMII && + phydev->interface != PHY_INTERFACE_MODE_1000BASEKX && phydev->interface != PHY_INTERFACE_MODE_2500BASEX && phydev->interface != PHY_INTERFACE_MODE_XGMII && phydev->interface != PHY_INTERFACE_MODE_USXGMII && phydev->interface != PHY_INTERFACE_MODE_10GKR && - phydev->interface != PHY_INTERFACE_MODE_10GBASER) + phydev->interface != PHY_INTERFACE_MODE_10GBASER && + phydev->interface != PHY_INTERFACE_MODE_XAUI && + phydev->interface != PHY_INTERFACE_MODE_RXAUI) return -ENODEV; WARN(phydev->interface == PHY_INTERFACE_MODE_XGMII,