Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1148321pxb; Fri, 26 Feb 2021 03:55:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWcMi6A8WEKUknZrGqLp+8bX2HuvFW4qFQTEjdyuvGmAfsqHRp/ZH1b9FwVSfDS5ay6meZ X-Received: by 2002:a05:6402:1691:: with SMTP id a17mr2324057edv.336.1614340524001; Fri, 26 Feb 2021 03:55:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614340523; cv=none; d=google.com; s=arc-20160816; b=YcOTq4OUsMEXSyAFHxSphUweXp+/PAwMI8g+J28Hcrxmpjh3bBg6JtRmdUNYUilGR0 BeBHevgj79Lqhzq0fDgK4bAEMIgtfUUx/PEelALUrcn+R3/3UX9Z3h2eY9htVMXT1rnd 32x0LnHe9ItIENYeiZFcSRAE1eth1YZ4zTCZFuM0e3ci/PnX0Iws65kyTzUDZAXuTuBK vFmc5+5poRDUiFw3zf3fgrFceiSHPWyIRfWKQytO+jsCJuBR9W7vwkz627+y/6jiy+ml HgcYlId8schfdjkUl74uxjzd77VBzIzyWZGN0QEhOktEdfHZTi80yq2nqnoBN27yyxme zHTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MboCJTnSVOsg8iDl/Ytx71C/vRtXv8vtcexDfc3Ue6Q=; b=LgcgJD/nahfHX2oCVq/xl4XPTpPYJqje0T0u8ZBOiK8SNl1xOv0qd0DazwXTUuT9ui BwFgb6RFIc9bwx4B19hqFLT3qODGtfkdRz8OkB+Yr6Fj9mfRcAnp65TGg/orzZpeAXdA KEpKq09BpDqayyH7Oj2XhaEcLLsiC1HUg+35X+RywuPOMbp21wrgFjo2qXq54mZxyT8Q 48z5ofeH0BHHU7Hy/SpYMdE0p8GGHDoGAy0p6xSNjIbJzQRSSjxZkZ/14OLmHyYGuHMg Mx6kfqi6GebGqFdPcnSoQXE7DPHv2lo8v+iS72nNX9HbJbaDChjt3ihgcwSJTSNaWCsy wa7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ciW/AiXB"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si5632017ejz.43.2021.02.26.03.55.01; Fri, 26 Feb 2021 03:55:23 -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=@linaro.org header.s=google header.b="ciW/AiXB"; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbhBZLxc (ORCPT + 99 others); Fri, 26 Feb 2021 06:53:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbhBZLxa (ORCPT ); Fri, 26 Feb 2021 06:53:30 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF23C061756 for ; Fri, 26 Feb 2021 03:52:50 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id e9so5184825plh.3 for ; Fri, 26 Feb 2021 03:52:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MboCJTnSVOsg8iDl/Ytx71C/vRtXv8vtcexDfc3Ue6Q=; b=ciW/AiXB8i8nLGP934iHFFnQEtqDN6xDF/7p7P/mEe1/XJTnSNexLZkPm7joRF7lOY cE0Cn3WHbKC1oskCjNIdD3Q/H/oWQt2cmsos27FAty4Wy+708ZaO2bywYURhJ4iZk5Cf ChaYps5qpb7yT8MlORTSqv+Iopb920EhqN7aUJo0SxaXLb1OvvCp/pMuglMoEOKDwLGr QuIqIrpUcduiuRCusADGM62Yu1pgizOs1+tM8TeFc40pirsqAg9i7tgVfF6V3zjNlckO qPDssRfGEHO5OYRvqGw2PQazlGsdTR/IZDwqQ0aymVuO0tEfRZTyaleLAH78Tlpjkig/ YYbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MboCJTnSVOsg8iDl/Ytx71C/vRtXv8vtcexDfc3Ue6Q=; b=AQoYoZUsS64rHzb6N0jXQriii/6YXGL8U81xuW3D0+65DXdBNEj3oUO2Sb6/hNbc8C xNFCO5XJ8AWFdsbOT/fI5Ua/EgJh3xfnmOg1+7YJLBJxxsZZlfP3QXlXvf3Jyx6Y3b9R ie+Io8vupeefUA4cOxquaP/m+QmQBctP329hh+MhffKiXF4HGLYglL1TJtqb5VboEpV7 9qlaRucdB69h0C5ZQJEwdBwSfhRy8bXr/zGv5aoyRI3P1Bbh2cDTQHMQlEGN8H/DrqN4 ePfPUjGqq+cwMFb9VdKQISQslfRFsoTo9kjxRaThFfODkKcmRzu1bFB6+hsJnksgjf4A jR3A== X-Gm-Message-State: AOAM530P8NX9CgLoH3kIcA1wo4J/IfJQRymp+Y5CxLM0FofD0lfX0+uD hMjHLIiN8j5Jg0jPaihgAuGpPl2zaQ/ajfjL4oEeuA== X-Received: by 2002:a17:90b:1b52:: with SMTP id nv18mr3187467pjb.19.1614340369882; Fri, 26 Feb 2021 03:52:49 -0800 (PST) MIME-Version: 1.0 References: <1613619715-28785-1-git-send-email-victor.liu@nxp.com> <1613619715-28785-2-git-send-email-victor.liu@nxp.com> In-Reply-To: <1613619715-28785-2-git-send-email-victor.liu@nxp.com> From: Robert Foss Date: Fri, 26 Feb 2021 12:52:39 +0100 Message-ID: Subject: Re: [PATCH v4 01/14] phy: Add LVDS configuration options To: Liu Ying Cc: dri-devel , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , linux-media , David Airlie , Daniel Vetter , Rob Herring , shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, Fabio Estevam , linux-imx@nxp.com, Mauro Carvalho Chehab , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , kishon@ti.com, Vinod Koul Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Liu, Thanks for submitting this series. This patch looks good to me. Reviewed-by: Robert Foss On Thu, 18 Feb 2021 at 04:56, 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 > --- > v3->v4: > * No change. > > v2->v3: > * No change. > > v1->v2: > * No change. > > 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; > + > + /** > + * @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; > }; > > /** > -- > 2.7.4 >