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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 A5300C4167B for ; Tue, 8 Dec 2020 12:39:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B44723A84 for ; Tue, 8 Dec 2020 12:39:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729168AbgLHMjk (ORCPT ); Tue, 8 Dec 2020 07:39:40 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:53122 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbgLHMjj (ORCPT ); Tue, 8 Dec 2020 07:39:39 -0500 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5126CDD; Tue, 8 Dec 2020 13:38:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607431136; bh=v/1gJ9S8/WL7ZCOyvN/j+6KzE11E1+D7ZujUrs8lthI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUnh33RpWU/mAZ93S3wX/T6Ghd/YrHXmOCK2uw0qO9dPPMw5iy66Dl4YQpH2ILLpa qa3jBE3z39ofvUW7eeXdffHMk6o6HevMQT1dKUtF54nRU6rwXxxTMDmKTaqvJs2FIY rSmDAGO6Qir86/d0PhCEhA/iFhiw3kTPVlw/j1kA= Date: Tue, 8 Dec 2020 14:38:53 +0200 From: Laurent Pinchart To: Liu Ying Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, kishon@ti.com, vkoul@kernel.org, robh+dt@kernel.org, a.hajda@samsung.com, narmstrong@baylibre.com, jonas@kwiboo.se, jernej.skrabec@siol.net, airlied@linux.ie, daniel@ffwll.ch, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, agx@sigxcpu.org, robert.chiras@nxp.com, martin.kepplinger@puri.sm Subject: Re: [PATCH 2/4] phy: Add LVDS configuration options Message-ID: References: <1607067224-15616-1-git-send-email-victor.liu@nxp.com> <1607067224-15616-3-git-send-email-victor.liu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1607067224-15616-3-git-send-email-victor.liu@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Liu, Thank you for the patch. On Fri, Dec 04, 2020 at 03:33:42PM +0800, Liu Ying wrote: > This patch allows LVDS PHYs to be configured through > the generic functions and through a custom structure > added to the generic union. > > The parameters added here are based on common LVDS PHY > implementation practices. The set of parameters > should cover all potential users. > > Cc: Kishon Vijay Abraham I > Cc: Vinod Koul > Cc: NXP Linux Team > Signed-off-by: Liu Ying > --- > include/linux/phy/phy-lvds.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/phy/phy.h | 4 ++++ > 2 files changed, 52 insertions(+) > create mode 100644 include/linux/phy/phy-lvds.h > > diff --git a/include/linux/phy/phy-lvds.h b/include/linux/phy/phy-lvds.h > new file mode 100644 > index 00000000..1b5b9d6 > --- /dev/null > +++ b/include/linux/phy/phy-lvds.h > @@ -0,0 +1,48 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright 2020 NXP > + */ > + > +#ifndef __PHY_LVDS_H_ > +#define __PHY_LVDS_H_ > + > +/** > + * struct phy_configure_opts_lvds - LVDS configuration set > + * > + * This structure is used to represent the configuration state of a > + * LVDS phy. > + */ > +struct phy_configure_opts_lvds { > + /** > + * @bits_per_lane_and_dclk_cycle: > + * > + * Number of bits per data lane and differential clock cycle. > + */ > + unsigned int bits_per_lane_and_dclk_cycle; I see in patch 4/4 that you only support 7, can the value be any different ? > + > + /** > + * @differential_clk_rate: > + * > + * Clock rate, in Hertz, of the LVDS differential clock. > + */ > + unsigned long differential_clk_rate; > + > + /** > + * @lanes: > + * > + * Number of active, consecutive, data lanes, starting from > + * lane 0, used for the transmissions. > + */ > + unsigned int lanes; > + > + /** > + * @is_slave: > + * > + * Boolean, true if the phy is a slave which works together > + * with a master phy to support dual link transmission, > + * otherwise a regular phy or a master phy. > + */ > + bool is_slave; > +}; > + > +#endif /* __PHY_LVDS_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index e435bdb..d450b44 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -17,6 +17,7 @@ > #include > > #include > +#include > #include > > struct phy; > @@ -51,10 +52,13 @@ enum phy_mode { > * the MIPI_DPHY phy mode. > * @dp: Configuration set applicable for phys supporting > * the DisplayPort protocol. > + * @lvds: Configuration set applicable for phys supporting > + * the LVDS phy mode. > */ > union phy_configure_opts { > struct phy_configure_opts_mipi_dphy mipi_dphy; > struct phy_configure_opts_dp dp; > + struct phy_configure_opts_lvds lvds; > }; > > /** -- Regards, Laurent Pinchart 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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 275D9C433FE for ; Tue, 8 Dec 2020 12:40:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE50223A52 for ; Tue, 8 Dec 2020 12:40:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE50223A52 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cn+wT14Gp2nySnIy0S9cl/ZlB9wRoj92RccXJyBKQtc=; b=OX261lSjGT7f2cDxrJuPv3xWu +s/Ey2ABgHyeNECDpr+vp8+0g2fJKTG1Z6s6N00y1QI/7S5ThVddVyvATYYp24mF266AFK0BkfHWP nhdAKCDIAGYGwZo8jq3MufmOrJf1zjKJIvmzxJIH3txL23N4o76vXUThsfVd5RTMy4+upnITFyqy1 8HIOQ9d9smOmv0+aPWyA/a+IdZdsWQ6Ge4rRO9zlsbpSoVi5or0C3rDxQvYx7TKhJluGlYf0YPPLP EMwqws77nV7dzkyRVls0yDMxH2bn+6gLxPH2T9mnDjDq9MudnCR3njAgyVbXU2UBYvmTmplpDmsHf r/fiCajCw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmcGn-0006CG-Nz; Tue, 08 Dec 2020 12:39:05 +0000 Received: from perceval.ideasonboard.com ([2001:4b98:dc2:55:216:3eff:fef7:d647]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmcGl-0006AZ-4W for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 12:39:04 +0000 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5126CDD; Tue, 8 Dec 2020 13:38:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607431136; bh=v/1gJ9S8/WL7ZCOyvN/j+6KzE11E1+D7ZujUrs8lthI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUnh33RpWU/mAZ93S3wX/T6Ghd/YrHXmOCK2uw0qO9dPPMw5iy66Dl4YQpH2ILLpa qa3jBE3z39ofvUW7eeXdffHMk6o6HevMQT1dKUtF54nRU6rwXxxTMDmKTaqvJs2FIY rSmDAGO6Qir86/d0PhCEhA/iFhiw3kTPVlw/j1kA= Date: Tue, 8 Dec 2020 14:38:53 +0200 From: Laurent Pinchart To: Liu Ying Subject: Re: [PATCH 2/4] phy: Add LVDS configuration options Message-ID: References: <1607067224-15616-1-git-send-email-victor.liu@nxp.com> <1607067224-15616-3-git-send-email-victor.liu@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1607067224-15616-3-git-send-email-victor.liu@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_073903_504506_865660B3 X-CRM114-Status: GOOD ( 25.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jernej.skrabec@siol.net, kernel@pengutronix.de, narmstrong@baylibre.com, airlied@linux.ie, festevam@gmail.com, s.hauer@pengutronix.de, jonas@kwiboo.se, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kishon@ti.com, a.hajda@samsung.com, vkoul@kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, daniel@ffwll.ch, robert.chiras@nxp.com, martin.kepplinger@puri.sm, shawnguo@kernel.org, agx@sigxcpu.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Liu, Thank you for the patch. On Fri, Dec 04, 2020 at 03:33:42PM +0800, Liu Ying wrote: > This patch allows LVDS PHYs to be configured through > the generic functions and through a custom structure > added to the generic union. > > The parameters added here are based on common LVDS PHY > implementation practices. The set of parameters > should cover all potential users. > > Cc: Kishon Vijay Abraham I > Cc: Vinod Koul > Cc: NXP Linux Team > Signed-off-by: Liu Ying > --- > include/linux/phy/phy-lvds.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/phy/phy.h | 4 ++++ > 2 files changed, 52 insertions(+) > create mode 100644 include/linux/phy/phy-lvds.h > > diff --git a/include/linux/phy/phy-lvds.h b/include/linux/phy/phy-lvds.h > new file mode 100644 > index 00000000..1b5b9d6 > --- /dev/null > +++ b/include/linux/phy/phy-lvds.h > @@ -0,0 +1,48 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright 2020 NXP > + */ > + > +#ifndef __PHY_LVDS_H_ > +#define __PHY_LVDS_H_ > + > +/** > + * struct phy_configure_opts_lvds - LVDS configuration set > + * > + * This structure is used to represent the configuration state of a > + * LVDS phy. > + */ > +struct phy_configure_opts_lvds { > + /** > + * @bits_per_lane_and_dclk_cycle: > + * > + * Number of bits per data lane and differential clock cycle. > + */ > + unsigned int bits_per_lane_and_dclk_cycle; I see in patch 4/4 that you only support 7, can the value be any different ? > + > + /** > + * @differential_clk_rate: > + * > + * Clock rate, in Hertz, of the LVDS differential clock. > + */ > + unsigned long differential_clk_rate; > + > + /** > + * @lanes: > + * > + * Number of active, consecutive, data lanes, starting from > + * lane 0, used for the transmissions. > + */ > + unsigned int lanes; > + > + /** > + * @is_slave: > + * > + * Boolean, true if the phy is a slave which works together > + * with a master phy to support dual link transmission, > + * otherwise a regular phy or a master phy. > + */ > + bool is_slave; > +}; > + > +#endif /* __PHY_LVDS_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index e435bdb..d450b44 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -17,6 +17,7 @@ > #include > > #include > +#include > #include > > struct phy; > @@ -51,10 +52,13 @@ enum phy_mode { > * the MIPI_DPHY phy mode. > * @dp: Configuration set applicable for phys supporting > * the DisplayPort protocol. > + * @lvds: Configuration set applicable for phys supporting > + * the LVDS phy mode. > */ > union phy_configure_opts { > struct phy_configure_opts_mipi_dphy mipi_dphy; > struct phy_configure_opts_dp dp; > + struct phy_configure_opts_lvds lvds; > }; > > /** -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 11071C433FE for ; Tue, 8 Dec 2020 12:39:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BA08239D1 for ; Tue, 8 Dec 2020 12:38:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BA08239D1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 233756E161; Tue, 8 Dec 2020 12:38:59 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E0E36E161 for ; Tue, 8 Dec 2020 12:38:58 +0000 (UTC) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5126CDD; Tue, 8 Dec 2020 13:38:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1607431136; bh=v/1gJ9S8/WL7ZCOyvN/j+6KzE11E1+D7ZujUrs8lthI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gUnh33RpWU/mAZ93S3wX/T6Ghd/YrHXmOCK2uw0qO9dPPMw5iy66Dl4YQpH2ILLpa qa3jBE3z39ofvUW7eeXdffHMk6o6HevMQT1dKUtF54nRU6rwXxxTMDmKTaqvJs2FIY rSmDAGO6Qir86/d0PhCEhA/iFhiw3kTPVlw/j1kA= Date: Tue, 8 Dec 2020 14:38:53 +0200 From: Laurent Pinchart To: Liu Ying Subject: Re: [PATCH 2/4] phy: Add LVDS configuration options Message-ID: References: <1607067224-15616-1-git-send-email-victor.liu@nxp.com> <1607067224-15616-3-git-send-email-victor.liu@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1607067224-15616-3-git-send-email-victor.liu@nxp.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jernej.skrabec@siol.net, kernel@pengutronix.de, narmstrong@baylibre.com, airlied@linux.ie, s.hauer@pengutronix.de, jonas@kwiboo.se, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kishon@ti.com, a.hajda@samsung.com, vkoul@kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, robert.chiras@nxp.com, martin.kepplinger@puri.sm, shawnguo@kernel.org, agx@sigxcpu.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Liu, Thank you for the patch. On Fri, Dec 04, 2020 at 03:33:42PM +0800, Liu Ying wrote: > This patch allows LVDS PHYs to be configured through > the generic functions and through a custom structure > added to the generic union. > > The parameters added here are based on common LVDS PHY > implementation practices. The set of parameters > should cover all potential users. > > Cc: Kishon Vijay Abraham I > Cc: Vinod Koul > Cc: NXP Linux Team > Signed-off-by: Liu Ying > --- > include/linux/phy/phy-lvds.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/phy/phy.h | 4 ++++ > 2 files changed, 52 insertions(+) > create mode 100644 include/linux/phy/phy-lvds.h > > diff --git a/include/linux/phy/phy-lvds.h b/include/linux/phy/phy-lvds.h > new file mode 100644 > index 00000000..1b5b9d6 > --- /dev/null > +++ b/include/linux/phy/phy-lvds.h > @@ -0,0 +1,48 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright 2020 NXP > + */ > + > +#ifndef __PHY_LVDS_H_ > +#define __PHY_LVDS_H_ > + > +/** > + * struct phy_configure_opts_lvds - LVDS configuration set > + * > + * This structure is used to represent the configuration state of a > + * LVDS phy. > + */ > +struct phy_configure_opts_lvds { > + /** > + * @bits_per_lane_and_dclk_cycle: > + * > + * Number of bits per data lane and differential clock cycle. > + */ > + unsigned int bits_per_lane_and_dclk_cycle; I see in patch 4/4 that you only support 7, can the value be any different ? > + > + /** > + * @differential_clk_rate: > + * > + * Clock rate, in Hertz, of the LVDS differential clock. > + */ > + unsigned long differential_clk_rate; > + > + /** > + * @lanes: > + * > + * Number of active, consecutive, data lanes, starting from > + * lane 0, used for the transmissions. > + */ > + unsigned int lanes; > + > + /** > + * @is_slave: > + * > + * Boolean, true if the phy is a slave which works together > + * with a master phy to support dual link transmission, > + * otherwise a regular phy or a master phy. > + */ > + bool is_slave; > +}; > + > +#endif /* __PHY_LVDS_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index e435bdb..d450b44 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -17,6 +17,7 @@ > #include > > #include > +#include > #include > > struct phy; > @@ -51,10 +52,13 @@ enum phy_mode { > * the MIPI_DPHY phy mode. > * @dp: Configuration set applicable for phys supporting > * the DisplayPort protocol. > + * @lvds: Configuration set applicable for phys supporting > + * the LVDS phy mode. > */ > union phy_configure_opts { > struct phy_configure_opts_mipi_dphy mipi_dphy; > struct phy_configure_opts_dp dp; > + struct phy_configure_opts_lvds lvds; > }; > > /** -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel