Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13661664pxu; Mon, 4 Jan 2021 00:27:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaHFrehG55WKu3X7Ot20T5i/2e10Ich9jawmzS+6WPtv3AwZW3J8dvBkmGHnwGuv3xQLDM X-Received: by 2002:a17:906:4bc5:: with SMTP id x5mr65857440ejv.55.1609748820673; Mon, 04 Jan 2021 00:27:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609748820; cv=none; d=google.com; s=arc-20160816; b=NYLliBs9T/sIZhNP1MqRB+COfnWIJb2//swKRbJ/q/2Tu/bk2mAxQvhF9mtgmMcB4i ybKAaRIhtWXKFnZ1ku8NABwMj3ChT1sq7Uxl1DtJox4g9XQ79f9vpgjUKqnQbkb5vVs9 uaI16DxiT3f+2oFuJ85cwJ2SR5H2YiWoxtKGZRQjAmi6jPP16sd6Dnqu8XkX9Ig5Qz2u vZjxt9aFTN2U8P/vPLqnBZyIgWfpHhS9GlzbhNlr9RuEEB/SVYCbwc53kx1U2eN9EKTW aoPKcp9vlmmL/Tlc1dswPqOdf2k5b2b/1raKtuhFo/7srNEDhKCAoInmE/VOEuDoV1WY F/gw== 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=CO6jgPDR7mX9tyk/xKmsrHPSMFFYRBw9kKhf20IBSCw=; b=PpSlnBIl/huZkNdGv+8WGsraE7tjQTfA2T2LglNKqiyBabO8ScbNyMNNkDz7uk2iIi HxUl5MUcqGSStiJt31+uMbiECIZ67LaTgj6zUtUyBwdGNS4vUG3r5HEnLzicpIIsAiFU 2b+fSdTWev0pATzNTl77s45hc13q7/pMWUY9s1yQkFpqLlNOQMbm2wQTkn0UIYCbffm0 KYRlWeCtTIIoz5vW+IYNK1PHAiKZd5/Zp6PQoH7XciW8mdBjeQm91V0Qahm96JiLQejS y+sNTt2PQmnL2azdPTVgYrrVumzDIzGi7MS649HAoqZ56LHv640oJxArCpS90BBxRIBD p0HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=G2qIi83q; 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 b32si31948611edf.406.2021.01.04.00.26.37; Mon, 04 Jan 2021 00:27:00 -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=G2qIi83q; 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 S1726701AbhADIYZ (ORCPT + 99 others); Mon, 4 Jan 2021 03:24:25 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:36613 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbhADIYY (ORCPT ); Mon, 4 Jan 2021 03:24:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1609748663; x=1641284663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MP9WWZwJ7UQGmfkRmv2GckvnNbBy3hLcNw3ATo6M4Wk=; b=G2qIi83qNOcR6aNEGXVJB7ClIYd4ty/rjdHlo/fIY8YrUcSEQUjU3/3N Jw5oxKgwWPlPUVwE0WVAcEbVxK5rPd7oHucWzQqlvK2x9k60AQevQcjjr +OF12n9ZC4KfeBdqQKXsnlKR3LU+FPfggpr4bFAJgC+QGDEyenwEVCUmd w+VzmzP0v0l5ZbRwHBGyvdm+w1mKEkoB6j1mGQx/ivjHiJBBfqiTcvdmS LASRwoUIN45uf5dwdgh4GeWaJzcfVGOv/c9MALREJlDkarDtlRQEJN1E3 cWkZlOSDM8WqfmmI1vOQhUpAiszvcCh+aAeEevTynmmelMACb4Ut2I/f7 Q==; IronPort-SDR: EMOo3msJFQDN5Vm918p5A8IJBTkgwwX6ij3t3cVIa++/57wPswd9/kLCOZxpOl37vw4V1UN2Uk rJhPlw7KRUy3n5LmQr9DZvgJ3RehCDCwuAnh5bbgdxu91/wYWGtdfG6HTM2GH5ya2hswYjTbWU GIbHAA0Ckx0TdNoQhJ6enDN3NkeMCAHWsKqBwY6hEzLHKIHoZ8PtaKd54pnLTaaHUp5srV1nqJ hXVAcp2w/gZ4wuPNUjWwAJ2aGxpQnNpOsUr16rSzdrKn6nAsvmAs0rpSOtfvEKhIacylcKWi7B Wps= X-IronPort-AV: E=Sophos;i="5.78,473,1599548400"; d="scan'208";a="98886228" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Jan 2021 01:23:07 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 4 Jan 2021 01:22:32 -0700 Received: from mchp-dev-shegelun.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Mon, 4 Jan 2021 01:22:30 -0700 From: Steen Hegelund To: Kishon Vijay Abraham I , Vinod Koul CC: Steen Hegelund , Alexandre Belloni , Lars Povlsen , Bjarni Jonasson , Microchip UNG Driver List , , , Andrew Lunn Subject: [PATCH v11 2/4] phy: Add ethernet serdes configuration option Date: Mon, 4 Jan 2021 09:22:16 +0100 Message-ID: <20210104082218.1389450-3-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210104082218.1389450-1-steen.hegelund@microchip.com> References: <20210104082218.1389450-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 Reviewed-by: Andrew Lunn --- 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