From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B77D9C2D0DC for ; Thu, 2 Jan 2020 11:28:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F7BC21655 for ; Thu, 2 Jan 2020 11:28:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="U+C4KPKc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728214AbgABL2Q (ORCPT ); Thu, 2 Jan 2020 06:28:16 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:60958 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728135AbgABL2Q (ORCPT ); Thu, 2 Jan 2020 06:28:16 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 002BSAKb037148; Thu, 2 Jan 2020 05:28:10 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1577964490; bh=pQMnuYBfYCD58YZSxUie6AtdWBn6T0NjGO56pZTzQTA=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=U+C4KPKcUCJvIVOn2IjXKD4HEmJVaIONKxXmlwyMeyHHMsFOXS1vHKfq0Ev0YBUTf rFals+cFbN4gbor8aRT73rAMfwxDtLQuKHHKT1xW2a6tze2LYT48V8sRoh2kLX04sN GrKkKKiYZSaOG/mY54fWyUAN00xYtmMFHVJVhL5Y= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 002BSAeh051345; Thu, 2 Jan 2020 05:28:10 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 2 Jan 2020 05:28:08 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 2 Jan 2020 05:28:08 -0600 Received: from [10.1.3.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 002BS6B1090483; Thu, 2 Jan 2020 05:28:06 -0600 Subject: Re: [PATCH v2] phy: Add DisplayPort configuration options To: Yuti Amonkar , , , , "ABRAHAM, KISHON VIJAY" CC: , , , References: <1577108473-29294-1-git-send-email-yamonkar@cadence.com> From: Jyri Sarha Autocrypt: addr=jsarha@ti.com; prefer-encrypt=mutual; keydata= xsFNBFbdWt8BEADnCIkQrHIvAmuDcDzp1h2pO9s22nacEffl0ZyzIS//ruiwjMfSnuzhhB33 fNEWzMjm7eqoUBi1BUAQIReS6won0cXIEXFg9nDYQ3wNTPyh+VRjBvlb/gRJlf4MQnJDTGDP S5i63HxYtOfjPMSsUSu8NvhbzayNkN5YKspJDu1cK5toRtyUn1bMzUSKDHfwpdmuCDgXZSj2 t+z+c6u7yx99/j4m9t0SVlaMt00p1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Rz+3FN0/fRdmoq2+bIHght4T6KZJ6jsrnBhm7y6gzjMOiftH6M5GXPjU0/FsU09qsk/af jbwLETaea0mlWMrLd9FC2KfVITA/f/YG2gqtUUF9WlizidyctWJqSTZn08MdzaoPItIkRUTv 6Bv6rmFn0daWkHt23BLd0ZP7e7pON1rqNVljWjWQ/b/E/SzeETrehgiyDr8pP+CLlC+vSQxi XtjhWjt1ItFLXxb4/HLZbb/L4gYX7zbZ3NwkON6Ifn3VU7UwqxGLmKfUwu/mFV+DXif1cKSS v6vWkVQ6Go9jPsSMFxMXPA5317sZZk/v18TAkIiwFqda3/SSjwc3e8Y76/DwPvUQd36lEbva uBrUXDDhCoiZnjQaNz/J+o9iYjuMTpY1Wp+igjIretYr9+kLvGsoPo/kTPWyiuh/WiFU2d6J PMCGFGhodTS5qmQA6IOuazek1qSZIl475u3E2uG98AEX/kRhSzgpsbvADPEUPaz75uvlmOCX tv+Sye9QT4Z1QCh3lV/Zh4GlY5lt4MwYnqFCxroK/1LpkLgdyQ4rRVw= Message-ID: <471995bd-ed4e-7f51-875e-925d64ca50c9@ti.com> Date: Thu, 2 Jan 2020 13:28:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <1577108473-29294-1-git-send-email-yamonkar@cadence.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-GB Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/12/2019 15:41, Yuti Amonkar wrote: > Allow DisplayPort PHYs to be configured through the generic > functions through a custom structure added to the generic union. > The configuration structure is used for reconfiguration of > DisplayPort PHYs during link training operation. > > The parameters added here are the ones defined in the DisplayPort > spec 1.4 which include link rate, number of lanes, voltage swing > and pre-emphasis. > > Signed-off-by: Yuti Amonkar I think we should also add phy mode for DisplayPort in this patch (or series). e.g. something like this: ------------------------------------------------------------------ diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index ba0aab59804f..79f25c8801f7 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -39,7 +39,8 @@ enum phy_mode { PHY_MODE_PCIE, PHY_MODE_ETHERNET, PHY_MODE_MIPI_DPHY, - PHY_MODE_SATA + PHY_MODE_SATA, + PHY_MODE_DISPLAYPORT }; /** ------------------------------------------------------------------ Without it (and an associated phy_ops set_mode() call by the phy client) the phy driver has no way to know how to interpret the "union phy_configure_opts" in phy_ops configure() call. Best regards, Jyri > --- > > This patch was a part of [1] series earlier but we think that it needs > to have a separate attention of the reviewers. Also as both [1] & [2] are > dependent on this patch, our sincere request to reviewers to have a > faster review of this patch. > > [1] > > https://lkml.org/lkml/2019/12/11/455 > > [2] > > https://patchwork.kernel.org/cover/11271191/ > > include/linux/phy/phy-dp.h | 95 ++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/phy/phy.h | 4 ++ > 2 files changed, 99 insertions(+) > create mode 100644 include/linux/phy/phy-dp.h > > diff --git a/include/linux/phy/phy-dp.h b/include/linux/phy/phy-dp.h > new file mode 100644 > index 0000000..18cad23 > --- /dev/null > +++ b/include/linux/phy/phy-dp.h > @@ -0,0 +1,95 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (C) 2019 Cadence Design Systems Inc. > + */ > + > +#ifndef __PHY_DP_H_ > +#define __PHY_DP_H_ > + > +#include > + > +/** > + * struct phy_configure_opts_dp - DisplayPort PHY configuration set > + * > + * This structure is used to represent the configuration state of a > + * DisplayPort phy. > + */ > +struct phy_configure_opts_dp { > + /** > + * @link_rate: > + * > + * Link Rate, in Mb/s, of the main link. > + * > + * Allowed values: 1620, 2160, 2430, 2700, 3240, 4320, 5400, 8100 Mb/s > + */ > + unsigned int link_rate; > + > + /** > + * @lanes: > + * > + * Number of active, consecutive, data lanes, starting from > + * lane 0, used for the transmissions on main link. > + * > + * Allowed values: 1, 2, 4 > + */ > + unsigned int lanes; > + > + /** > + * @voltage: > + * > + * Voltage swing levels, as specified by DisplayPort specification, > + * to be used by particular lanes. One value per lane. > + * voltage[0] is for lane 0, voltage[1] is for lane 1, etc. > + * > + * Maximum value: 3 > + */ > + unsigned int voltage[4]; > + > + /** > + * @pre: > + * > + * Pre-emphasis levels, as specified by DisplayPort specification, to be > + * used by particular lanes. One value per lane. > + * > + * Maximum value: 3 > + */ > + unsigned int pre[4]; > + > + /** > + * @ssc: > + * > + * Flag indicating, whether or not to enable spread-spectrum clocking. > + * > + */ > + u8 ssc : 1; > + > + /** > + * @set_rate: > + * > + * Flag indicating, whether or not reconfigure link rate and SSC to > + * requested values. > + * > + */ > + u8 set_rate : 1; > + > + /** > + * @set_lanes: > + * > + * Flag indicating, whether or not reconfigure lane count to > + * requested value. > + * > + */ > + u8 set_lanes : 1; > + > + /** > + * @set_voltages: > + * > + * Flag indicating, whether or not reconfigure voltage swing > + * and pre-emphasis to requested values. Only lanes specified > + * by "lanes" parameter will be affected. > + * > + */ > + u8 set_voltages : 1; > +}; > + > +#endif /* __PHY_DP_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index 15032f14..ba0aab5 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -16,6 +16,7 @@ > #include > #include > > +#include > #include > > struct phy; > @@ -46,9 +47,12 @@ enum phy_mode { > * > * @mipi_dphy: Configuration set applicable for phys supporting > * the MIPI_DPHY phy mode. > + * @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_dp dp; > }; > > /** > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki