Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp839301pxu; Wed, 2 Dec 2020 04:57:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFVtABbr2Z39K1Jsbk0fNLCQFq4HdGvmS+omgentjxUrxw+nLiTKszyxu0wIpnFTNo7ma4 X-Received: by 2002:a50:b205:: with SMTP id o5mr2433895edd.304.1606913847223; Wed, 02 Dec 2020 04:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606913847; cv=none; d=google.com; s=arc-20160816; b=NiN8kvMKLr3CMIa9Fw/NJNSuxg5z3LePuPTDua64Onk2KTdcfMSSuPnh51Ja9io6pQ U1arVAwVuikRj2YeZdpzRWXXqSZFcZaDUBZMS3lzHo8d6QGEqTwiPKfH+6Y09L6+P4bW RK1OzVp50pXZKBijgeYO2XHcnJHmw6ir6+y402wk7krQF+j8wJiMitIxu8dTkZl9fufU 6z2qfEQ3V7WCVhOe4oaKmceAecRaCaPJZtH27Gyzgh+V0l3yrLUep0dDr++F7BL5VrBV cyEGYAIP5RtGwsUCFBsqDw4Y5GtWc4lXoPnX9CDoC1kRCDyEVaT4DgguCEAAxJsspQNG 7FBQ== 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=Nb4J3odrDJprSZ/gMPAhHMI9H9/+pfLBP4ApTbVxJ6d6ktBDABSqDx81SN9uMcOYBp 2ASI+aDdqSwNU+dvH2zvVQ6FgJ/DJKUk1vmN6081m5SsGYNO5inCz90lbW1ziD0wm5Im /QfrbIaOneO3/mavYLq+7idoWmSx2t6YooElG1QtpApAdS7GR/HaJFXOhS9zKwJICHHd S2GM2cki1cv4wgEa3oj7jzrVTQFnH/gGQGqwYakpEx6Dy9rapduXjGksPAgcOpBdunF5 fbKZ4xHrmb8h88+k+NNQiVaEY1ciMOocAcH0TaepvVzCZP941xUi0JBZXXyatmbSvp+u G25w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Iw1Y9jjm; 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 n12si1016540eds.188.2020.12.02.04.57.04; Wed, 02 Dec 2020 04:57:27 -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=Iw1Y9jjm; 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 S2388863AbgLBMy2 (ORCPT + 99 others); Wed, 2 Dec 2020 07:54:28 -0500 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:49782 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388857AbgLBMy1 (ORCPT ); Wed, 2 Dec 2020 07:54:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1606913666; x=1638449666; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7zj8OkiqVP0y2v8pLf60YgrsvbAJ9ccfq8Fe3AUJvYA=; b=Iw1Y9jjmy2njAyjnJUt1Q8/PQmpmmuiYJ6EE0QNes2azaeV1v9ZNpdZP n+BpUo6dasupR569Gp0O4eLNQFEkJe9YkNk/UKbcnPBbfmAftYhEFl3hW Piz/x8OYQLlMc+fTELX4DDHqJTE/+8td9T0ekyub1LvWGOoUZBniTgCFY vKqHGkd2QpyJKXDaA9haQdDb9fEBybUc50y02zWwBMwBvzht9lQmYYwS2 RVkJu0TGAZ9vY+7Rjzma8jIn97zSzGLMmxWbGFqiYSsDZ44BMqdbHWtCT yM5qwl/kLbYCypwho2fz2Q9lhV8MwSMWyWjOwDjNQaUT3VEenrWOLbY5a Q==; IronPort-SDR: Z0c9hXRFCy1wg5/rL0avgmNPKzEv5i2ETAGUP6lo80+8BrNAOmDEmoNRR3HfMi4fB3nitWtyE9 xbXOj9aMacYgZOhStah39gF653R6s3vKeHfcI8NwDV3txDxN/VoWSU4t9Xn9TAO5cdOJeSjfGW kDj7+AUC66kPZlOuxvHnOj8XLzBWgzWYfrJ9eeR4y0V3S386wRlXYf0J3pn60SGTNcRN8gY8Mo Ci37h3z1dWCgjtBY9kDiMSxUQOdiNPlIozd7bpSAzCwFaGvAnJa2m6aYZFMBYoaWJbzlU1VMQu rVk= X-IronPort-AV: E=Sophos;i="5.78,386,1599548400"; d="scan'208";a="101123453" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Dec 2020 05:53:21 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 2 Dec 2020 05:53:21 -0700 Received: from mchp-dev-shegelun.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Wed, 2 Dec 2020 05:53:19 -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 v6 2/4] phy: Add ethernet serdes configuration option Date: Wed, 2 Dec 2020 13:52:52 +0100 Message-ID: <20201202125254.3329835-3-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201202125254.3329835-1-steen.hegelund@microchip.com> References: <20201202125254.3329835-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