Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp208363pxb; Fri, 15 Jan 2021 00:50:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3crC2mx5cdFDJ4Oin4TWLksbp3lI/uEjQwJynQrkRXvkbqVQHCBgxYP2b7Cd37oWdkjtg X-Received: by 2002:a05:6402:7d7:: with SMTP id u23mr8508223edy.325.1610700620774; Fri, 15 Jan 2021 00:50:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610700620; cv=none; d=google.com; s=arc-20160816; b=wpSCyTOMrreSEhCRMAZTPi+OxP44nTI22IS5YrdQNOzUujFLXZMGm2c2ktt++5+9Zv HnJPgWI7KO7b+gvD/tZaIpur3PatsonzpMbaykIPP3UVynpPVM2LjLxtDWjz8kAPVN3l YBFWXJ25EM8Oh70aWR5gqO7EYp3mJUkcOr8Z0WfSIi0Qs8oLiJIDLXKDh9IV184reY/L Eidn+e19B8hbQ5VdkCTEdRm25ZwMrxTywuV/co4Z8k9CKlrfMGMkuYNIYdHYyUfLu8mN PoxiOjQ14AAFLUf7/tMzXQwJUS3F+xy0bIfwKOkHedS49sX0w3ZkfWiKpQztYLKLP9iD T90w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=T5opbELEPVZD8CSZzRFeTmLVA03iXY5+DsRAa8s1kHQ=; b=Kc5goRjSVbQKtpcPOkAjA9GsoMO6WPlK4ehpTbKRXYa5XOD8AHg+vjuYfMrgCTANcr UMHvRWDJ6W0FlmMGBarqKEy6kAzqMmIJiLSrpOq3ie0W5zG30U4ZFc1BIvVV+LKuY63p IVCgdk5MpIIZE+auJdd7u3uDc50oDszmNYZ5jdRQGqNWOL2Jvi7eg66p5YFylzVwGn9k OpjfCynVSxES+ENnLkbEWCHtw8m37JltCmazjwNp08Rq/ailn1XZSTafwnXeKmIitsfG sZKfaU95UygsTgK3++XnRy+IKrA5O5icjlErjKpeQY3syI0ogB/DMxSu+kITg+xpKDwC DiQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AVYlVE7G; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc14si1621ejb.161.2021.01.15.00.49.57; Fri, 15 Jan 2021 00:50:20 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AVYlVE7G; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730556AbhAOIpN (ORCPT + 99 others); Fri, 15 Jan 2021 03:45:13 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:59470 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725797AbhAOIpM (ORCPT ); Fri, 15 Jan 2021 03:45:12 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 10F8iMkr085444; Fri, 15 Jan 2021 02:44:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1610700262; bh=T5opbELEPVZD8CSZzRFeTmLVA03iXY5+DsRAa8s1kHQ=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=AVYlVE7GrP/tJDkO+Whhk4i7peL7BwcmeMokLuct5EMCSz2zVUYf51NODsKIIUrUX oAIxlvaawOYbcGO7CdldiKkJfP03CDq7MIdpM9QiRK3hCFd/rghOt5gB9E45g5GWI9 r0RiMVxKwe7H/AHaD+Ip98LgTAtCiEpJjpaJlaMc= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 10F8iM0m037004 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 15 Jan 2021 02:44:22 -0600 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 15 Jan 2021 02:44:22 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 15 Jan 2021 02:44:22 -0600 Received: from [10.250.235.36] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 10F8iIeq086209; Fri, 15 Jan 2021 02:44:19 -0600 Subject: Re: [PATCH v12 2/4] phy: Add ethernet serdes configuration option To: Steen Hegelund , Vinod Koul CC: Alexandre Belloni , Lars Povlsen , Bjarni Jonasson , Microchip UNG Driver List , , , Andrew Lunn References: <20210107091924.1569575-1-steen.hegelund@microchip.com> <20210107091924.1569575-3-steen.hegelund@microchip.com> From: Kishon Vijay Abraham I Message-ID: <41e40e7b-6a3a-cdb9-adfc-e42f6627ea7b@ti.com> Date: Fri, 15 Jan 2021 14:14:17 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210107091924.1569575-3-steen.hegelund@microchip.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 07/01/21 2:49 pm, Steen Hegelund wrote: > 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; > +}; Is media type going to be determined dynamically by the Ethernet controller. If it's not determined dynamically, it shouldn't be in PHY ops but rather as a DT parameter. phy_configure_opts is mostly used with things like DP where the controller probes the configurations supported by SERDES using the configure and validate ops. I don't think for Ethernet it is required. Thanks Kishon > + > +#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; > }; > >