Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp847470pxu; Wed, 2 Dec 2020 05:08:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFpzxVGNIhM6yOoExSP4YE9fooLGTGFu8MWvKztRmt6xShvzy2xpMQ7/XOUc6JZF97M/nS X-Received: by 2002:a17:906:15cc:: with SMTP id l12mr2094632ejd.363.1606914485010; Wed, 02 Dec 2020 05:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606914485; cv=none; d=google.com; s=arc-20160816; b=ODZoqlAzuRy2tolFLp0zH4Qn9enxX1absjlyPF/BFiu0c9bpYZiA5+B+SQnCTicwFE WrN3v/aPQ5g6+wmCeqq9cVN4WnUvg/Qdthgohxh5j85cWBaSUuaTdK8GN5poAKxojGdU Bukie5/kTqrmbwutHoB2B3a4wy6sLF3QzBfGoIv72Hq2P/09EwKtagbD0Bk8YgG4sD1D R5W3XWpqVl7e+1bpgwu/4ggIc8lym7IWDjs4d+S+O8OR8FjeUUrrvHn8Ti58M2xRVrL/ GyTd9WcGbwsIvCQ/xgyGhK0v+BKFoG06QnKUSO2ybt+i3K3YGr9qhM3nlnCYx+2zm+Zp rmBQ== 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=WitM8rB4VMWc/o06Cor7TPPD3vmdVzCkFRP7C/cCpmNNfWHfE0HV49A88klwjqjAjk LctwOBNKAe7+Nuna55+od5bnX5uIl3C+eESgJ+n8iWheSkTKZYznuzDu3ahs8pGu46V6 UcJnta5d7GhKNdOgHPk3kvkiD7UbmY14FHO4D/YKUik1hARFLG/jeV/lOr0hcElb3Gm0 phuRR/ocxQxNm557ho1URepLMaztgyd5c2UPATRh7nLmM1w8FgAlDDTBa4dfJ1ePoV2Z E/8O23X/6LrOfGPQlyFVQbUO//3r9+fYf/bWrZcM1PAx65fL0EYCyrYzxMHv994A4ZPw nFbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=eyRCU2ex; 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 hq7si616111ejc.539.2020.12.02.05.07.41; Wed, 02 Dec 2020 05:08:04 -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=eyRCU2ex; 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 S1729988AbgLBNF7 (ORCPT + 99 others); Wed, 2 Dec 2020 08:05:59 -0500 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:37233 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727102AbgLBNF6 (ORCPT ); Wed, 2 Dec 2020 08:05:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1606914358; x=1638450358; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7zj8OkiqVP0y2v8pLf60YgrsvbAJ9ccfq8Fe3AUJvYA=; b=eyRCU2exM3dFp/LS/AoFr3CKq3AzCIkd3lRMtwNP5rv5fL1b8/vesQ2Q M+t7WgzbX0zI9UjShM4Trglm7Mhcdpi/qhu6A3OkVwr1rFHvmt+sieauB I1n5ylP+luxUj03yS0YOCVtgMB3LNoJQPHgBD3rnhSGzkWDjq2nypv9RO RgJlYXU7EOH8r2TiwgFJGs2oFIdzjiVzyAcW1aOFUJS1m5jbdohEI5sdz yv2eG2pk/Eubf0freTrOL2uhW3iJkiWWmEuThINWfR9RaD2DZHbR0zNP7 Xk+SvwXBf+eIwy1Eaeaan1Jrh27aM2ziyfr6jRMJEdj0YLotN7ZBacpe7 g==; IronPort-SDR: d7zYue1ONbwHmpYXCcfPjq7P7hYvGEQQ0W9X8cS6o2xDJRE4wvS7eaaN8sTUHHZS38UZxMYkU2 OsMTPPqD8iQzM3RU/J2cC99yJphqWPtiPCcQmi9Jo6dawzKFC4ubmd/EAbscyX76glSw40vwNN H2Z6XEUFbxRvZ16dNRTOCjdN0PX80Ssqe59ngYAWNM0oukN+nYRv6vvnw/Wz3G/UaonPMqjSbY tdei/XpkTzX5/2HdWJeSiv8ZxmPJuS8PmMC95oOeia6XKWQfqNMUXY9VgyN6F7trCUttAGDwPB qN4= X-IronPort-AV: E=Sophos;i="5.78,386,1599548400"; d="scan'208";a="101125102" 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 06:04:52 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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 06:04:50 -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; Wed, 2 Dec 2020 06:04:48 -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 v7 2/4] phy: Add ethernet serdes configuration option Date: Wed, 2 Dec 2020 14:04:36 +0100 Message-ID: <20201202130438.3330228-3-steen.hegelund@microchip.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201202130438.3330228-1-steen.hegelund@microchip.com> References: <20201202130438.3330228-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