Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp379193pxu; Thu, 3 Dec 2020 02:36:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1FIs0YbsrpTSs2InqpAN0psnbhZWGxML45V48dkLLQ7h1sBnQQ2VIJbldqnX+uITsHjEl X-Received: by 2002:a17:906:82ce:: with SMTP id a14mr1923594ejy.421.1606991769367; Thu, 03 Dec 2020 02:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606991769; cv=none; d=google.com; s=arc-20160816; b=m009Sancxpq4iBG9xoCrMEyddry884OtW0/jklqyuGxpBr76LOXNDciH6MQqt7Fhmq IuMKEko9LSXomyx63DLhqj9VFMHKta/3IN4sg7wHSoZzXmMhGwGp9PXhPLfit0kya0/U 6VNewqMmlISW2Zm3Mv9MT0hafJ/n1zJ8dvQNvBCtTtXMFjx0QYgKhQ71wLqP11h2HeZj yDqC65L8U33fSHjGXgScrsSpkOw90ZGMzmvFp4AnxsROF1eRZLXzHATsqxwaIhEgswT1 h/UHPIirOGz9Hw9YcfFDwyfeHo9QRooGtxO6aT/FAO4nmL/273rg3JQNL0Fo/Y6FLh0H shWg== 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=nl8IfJYvUqBBdjrX2zYsXUmcXt2tRoysb4JwyCZXb0wTKOMfVdD7u1/srMQMa7LFlM 2HN8IFN4kS1dkgczpCUJKz7nwdTRAObI+tX6/8VCefnDYq6hzioRTOt1ZkoUKJgWWkJG mcI6OhlKmZX4RzSqQ9bDgKSOJaa0c9yI1OUcrSE4XglZ/opXy3ZJHlAF5iiS83Ac62X9 zuZ5EaBTGVkGmb6THrUVVH/gXT/EoVGGuez6bwHDiyd08v9N6NzEF5iST6xZAZMBh4Wc hCuiivffKid3ucoVieu1w1e2UawJOVIAEzklXqVFQY4+LIQiIF2QrUOzdO+QX3cUwXDQ dJCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=K5KLpyse; 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 cb6si839851ejb.459.2020.12.03.02.35.46; Thu, 03 Dec 2020 02:36:09 -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=K5KLpyse; 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 S2388912AbgLCKbn (ORCPT + 99 others); Thu, 3 Dec 2020 05:31:43 -0500 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:61478 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388903AbgLCKbm (ORCPT ); Thu, 3 Dec 2020 05:31:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1606991502; x=1638527502; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7zj8OkiqVP0y2v8pLf60YgrsvbAJ9ccfq8Fe3AUJvYA=; b=K5KLpyse20ZyZh8CVeCzWvcavhlrVh0/0hkhwHRX5t153DkMMzu4psov MB5R9s0rxazAvGEF94JJVuvKMnwZjOa5o5vlhp3hOTGTen1oYd2RGqesr cIruEUDH6WoBfHBYu/W0cqLuz/nC24lqc5UTJ37+0qd5VjJAOfBvb9vlj 9Ner0eYYPPghDtDM8xSByD+pYr/1Vh2vlA1D4wvXNTuwK8QBp06aLV9Ku SpWtC57KIKHMCgJaak8JMCop3rxTThFKEI3cOLMhltZxGrc0H8SLUjaRM Z2GfCUc5Ti28KTi0Jb4bIhIkMUEGAA+qhp74j2Hy2SYBYngEDz0iRmzDQ Q==; IronPort-SDR: tpe8Cy1olXUX6vhzaxOq+9mV312iAUFjxoGm8D1wWz725bJnYsB9kYsheqN1YNwWEHjB+UyReP 3tPkOIBRhnhBDQ14XdbeW8M9NfXTYMvopetU0Ot6j88Wle9LkumkSpb+MZwMkOykmKXuzymmGl MwkPogCKVQDmV4j/XfQRyh1JRYuRvPR7soJ3VsI9mqnHupERnYrEQRA2yxKOOxnsR7wjt5viQj w1E9503MREeGh5Av7G74F0rQSpBNPl5kEE3wz3pCDRKSWWOSVzb7gxAbQFGEWTCuVLO6f4DUX2 BC4= X-IronPort-AV: E=Sophos;i="5.78,389,1599548400"; d="scan'208";a="100721567" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 Dec 2020 03:30:36 -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.1979.3; Thu, 3 Dec 2020 03:30:35 -0700 Received: from mchp-dev-shegelun.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 3 Dec 2020 03:30:33 -0700 From: Steen Hegelund To: Kishon Vijay Abraham I , Vinod Koul CC: Steen Hegelund , Alexandre Belloni , Lars Povlsen , Bjarni Jonasson , Microchip UNG Driver List , , Subject: [PATCH v8 2/4] phy: Add ethernet serdes configuration option Date: Thu, 3 Dec 2020 11:30:13 +0100 Message-ID: <20201203103015.3735373-3-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201203103015.3735373-1-steen.hegelund@microchip.com> References: <20201203103015.3735373-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