Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp767477pxu; Mon, 23 Nov 2020 03:45:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFJ9aaImzJOZ1Tf5tbCqNU9vYcGVKbgdNnEOlC3G5xXXndEwEWkmxe/XzyJ73j8pRdztjb X-Received: by 2002:a17:906:e254:: with SMTP id gq20mr44380100ejb.520.1606131948354; Mon, 23 Nov 2020 03:45:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606131948; cv=none; d=google.com; s=arc-20160816; b=oBD+VGVLvpSVwc01PRptDnp8Yh8MfErOx1xNjR5guCGSYcrp8O0pvhwHjbPKJg+hiP yF/QaCDaJ3KXz1IvFe37FByvQx6h01p7IdGDKn6dk99i/RGIAakoXx3hDNRQZNQHY9Ae OydhLxThxKx/3dKz02tIxoVum0W8XX9WwVvnDKLPgjZOsLiu3HtJT5Ae9Sr9pMyZFwFg 0BjytStpoml9/DgvxPQtG3rvbAj99eht4Xp5WGIYStV5J7yis2Z+pVoReveN6s46tKg7 Yf5820QOzSKlDQJbhEagQ5853wuKOm9JaCMzXzfz15qtHIWZQ9INKgt3XfNuB5NVK6s8 GuBQ== 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 :ironport-sdr:dkim-signature; bh=PXufsJ1hfYueFydu7K6AYi7uU9dAkXOAUCFChgMQTOE=; b=upiZAoWRzPHlWxChREoQM4rStvHHBLCX1FOg97xe6RACAze++/dhf8mXkyk26snGF1 uIF50wD/9zBdQWZwEgC8py5IjJo3URcyenro6i2xs+tc9e4WNB39i/SxnC0lvNW04kQc XDPbGeRfx8JJFM2HeT24gnOafmVUkTMSfm6BLP9rT9mq00dLZ3vFpEhJa3R95H3Wz8Sa hyob/J0oQ+yHnze+tnxVFN8CmleuBTVI6pD+B0Xi8R6bZNuuc7W3kpvppKqdkwBfYGv7 QZaiov2Z+lpCRK4VrjptnS/y7FGVnCN6gQFZYoqR5mPcGNTQkFc4IOppIwyJUl2D1TTe natg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=PaPGPifD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qc1si6495450ejb.315.2020.11.23.03.45.25; Mon, 23 Nov 2020 03:45:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=PaPGPifD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729195AbgKWLmt (ORCPT + 99 others); Mon, 23 Nov 2020 06:42:49 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:57251 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729179AbgKWLms (ORCPT ); Mon, 23 Nov 2020 06:42:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1606131767; x=1637667767; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7zj8OkiqVP0y2v8pLf60YgrsvbAJ9ccfq8Fe3AUJvYA=; b=PaPGPifDlP6Mskb2QlyEql76liuWY+P6jZPjNFVC8qtkaIYU2WButtDn bU17wnCEq4UGDxhCQPgqbO76G7HhlzQdS/TLoWcHMFl24ryV6/R8yVvDn t+nOqQbptM4gTyULB1bmpdtPH3yFJTWUGTVqo65RYYKJqOE7C4eX3D8hS Q/NXjEviuZ0XjMdQ0nL4rfsYmK82TZgBVxvzGaU+9ONcBCHX55BpZb2NI GA+ic3p9ZbnJMwiHBLiyaPos6u88DBDi0smNfgePCjHsuKsOotTj6WoDb /Psb9F6O5uSysdqIgW0P5rD0Uh4aFNyyZ06vfWNeItBXSKH8k3GTv7OTB A==; IronPort-SDR: Oe1fn3YdsYU/YWQYCm1SDQQbUf+SGt3Aj+HvL9v61x/YDfy+tP1lopTRQCb0eNNVGIHjuMjtjp qdRFl0jbJTUd1z3yn2KizuqPV2ykVSUrRnesGvZIfaOtWJMhuxE2j5zFxsd0GJPTa1TRiXL3iY hZAd4ypVPh0DPPHHoAUU3affMZb5+fIjD3MOSqBxVZyIrc4VUDUQDJvUPBNl6Edy8ZgN1sX6EI 4aMCIfzMUTgFaLv9dk8wAoW5iwAXVDgAclIzNY0+q9J2bCZ33DXIoiQCLkbWKFWuhvlYvEIQtP u0U= X-IronPort-AV: E=Sophos;i="5.78,363,1599548400"; d="scan'208";a="34686632" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Nov 2020 04:42:47 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 23 Nov 2020 04:42:46 -0700 Received: from mchp-dev-shegelun.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Mon, 23 Nov 2020 04:42:45 -0700 From: Steen Hegelund To: Kishon Vijay Abraham I , Vinod Koul CC: Steen Hegelund , Alexandre Belloni , Lars Povlsen , Bjarni Jonasson , Microsemi List , Microchip UNG Driver List , Subject: [PATCH v5 2/4] phy: Add ethernet serdes configuration option Date: Mon, 23 Nov 2020 12:42:32 +0100 Message-ID: <20201123114234.2292766-3-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201123114234.2292766-1-steen.hegelund@microchip.com> References: <20201123114234.2292766-1-steen.hegelund@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Provide a new ethernet phy configuration structure, that allow PHYs used for ethernet to be configured with speed, media type and clock information. Signed-off-by: Lars Povlsen Signed-off-by: Steen Hegelund --- include/linux/phy/phy-ethernet-serdes.h | 30 +++++++++++++++++++++++++ include/linux/phy/phy.h | 4 ++++ 2 files changed, 34 insertions(+) create mode 100644 include/linux/phy/phy-ethernet-serdes.h diff --git a/include/linux/phy/phy-ethernet-serdes.h b/include/linux/phy/phy-ethernet-serdes.h new file mode 100644 index 000000000000..d2462fadf179 --- /dev/null +++ b/include/linux/phy/phy-ethernet-serdes.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Microchip Sparx5 Ethernet SerDes driver + * + * Copyright (c) 2020 Microschip Inc + */ +#ifndef __PHY_ETHERNET_SERDES_H_ +#define __PHY_ETHERNET_SERDES_H_ + +#include + +enum ethernet_media_type { + ETH_MEDIA_DEFAULT, + ETH_MEDIA_SR, + ETH_MEDIA_DAC, +}; + +/** + * struct phy_configure_opts_eth_serdes - Ethernet SerDes This structure is used + * to represent the configuration state of a Ethernet Serdes PHY. + * @speed: Speed of the serdes interface in Mbps + * @media_type: Specifies which media the serdes will be using + */ +struct phy_configure_opts_eth_serdes { + u32 speed; + enum ethernet_media_type media_type; +}; + +#endif + diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index e435bdb0bab3..78ecb375cede 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -18,6 +18,7 @@ #include #include +#include struct phy; @@ -49,11 +50,14 @@ enum phy_mode { * * @mipi_dphy: Configuration set applicable for phys supporting * the MIPI_DPHY phy mode. + * @eth_serdes: Configuration set applicable for phys supporting + * the ethernet serdes. * @dp: Configuration set applicable for phys supporting * the DisplayPort protocol. */ union phy_configure_opts { struct phy_configure_opts_mipi_dphy mipi_dphy; + struct phy_configure_opts_eth_serdes eth_serdes; struct phy_configure_opts_dp dp; }; -- 2.29.2