Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9205700rwd; Wed, 21 Jun 2023 04:37:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66emjVc7V5OLlOqtciLWt1rYryffpk9YSUEjd1KO7wTrSnHe+ATB4sC+ZRlFijxKIJ2rVF X-Received: by 2002:aa7:88ce:0:b0:668:7e84:32e6 with SMTP id k14-20020aa788ce000000b006687e8432e6mr7518721pff.29.1687347450084; Wed, 21 Jun 2023 04:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687347450; cv=none; d=google.com; s=arc-20160816; b=sIMU9HXHQXYxsOwzmFTcybwCHW103tt7PdOT2MkiGKXZuQGN7xvo2+KIZciFgkNisN fdIWqUjprAka4ljJ6HCWk4dsNFbUY4MXLQGfrxAySlS+2csRxtCTLlFMOKmCjpSFWUkW ayWT5CuIuTANjb6MI36EzljpXqC7SsHF3R63L/jWEpSs5atb/wx49COdCld2AGx3vUKv dI2QxACEw9B8apCga4cB98Kw2St4WybNFyVEroHf0mI2TYHQ7wVFU8K73QviexxOy506 1bmdyL6FL+nkXZ0IDm8x2cjINDKLCkQEM9nty4OtYfwvSM2GtoE0todbE4Vxca2NObiv +bfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=h4m2oeUrmGPZO26a51Jqp7HRpTqgXPnfblXHK21vb1o=; b=NM6AuHrfGzjWSZC+VHsBEqSehAiDx/t1TBRc8+AdY7LggZtpgbSkTUBDB14jo4Vs6G tobnG60zCI4PS3bHZmtrOeonZqx0HXwM3cAwgd+jiGjoj21i3UwFAUHGFDWSF4iqlpPb o+c8yEGzpaOdBe78IUcccQFNSBO5hIdL9t2ngcWtm9v1XvKd/uIwdMy3Ck0fGzPx+HV4 hf9WMaC5I5bSSlkNIHMVUxA3ybobmUx2QC74emKlONGbbI+r9VAsPbqaSsWMMQ8rtZPp XM8sVnxeB8jMFm8H6d2awooc4rJBKnIv7HNjIw90b2EwVowIYB40aYmSGzJoyEnfE54r jL9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nxTqnwdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c29-20020a056a00009d00b00662186eb4eesi7137pfj.273.2023.06.21.04.37.15; Wed, 21 Jun 2023 04:37:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nxTqnwdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232686AbjFULW2 (ORCPT + 99 others); Wed, 21 Jun 2023 07:22:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232578AbjFULWR (ORCPT ); Wed, 21 Jun 2023 07:22:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D604310E6; Wed, 21 Jun 2023 04:22:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6003E6150F; Wed, 21 Jun 2023 11:22:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04E0AC433C8; Wed, 21 Jun 2023 11:22:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687346534; bh=TPtp/wBNq5coEnbHykNNDWOE6xUuBP/0q5gXk4+rsY4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nxTqnwdbXoT8DkVcRS4i4H0Ibozx37ElkVB/qSX6mTww6Ue9LAASeRLoHCJPWiE4F DNxBd13MEuaW4As7pvYV7xGqhVm5JL8+JpupyEkZ2VLP50wJn9e/yr+OWzaFEY//gh bhpskCHYr7NJd4fFHF0j80PDyCXcHsyYYiNCeo1qMyPBtmTiRJ1lnGuwli29CqAoIN yB1w7SKKGwV/zFjoMYjh2uY6uMY4CxrMes+ZVWb+gS8MhpXNjrmNIr+IE7855MRNpl o7j7deh9IrqJPaRQJX+WKE4zPsWhRtk5KxTyNKXDY1HITMpavOqouExopRIJdq0sL9 UThAhgcivvEtw== Date: Wed, 21 Jun 2023 16:52:10 +0530 From: Vinod Koul To: Sandor Yu Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, robert.foss@linaro.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com, oliver.brown@nxp.com Subject: Re: [PATCH v6 4/8] phy: Add HDMI configuration options Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-06-23, 09:38, Sandor Yu wrote: > Allow HDMI PHYs to be configured through the generic > functions through a custom structure added to the generic union. > > The parameters added here are based on HDMI PHY > implementation practices. The current set of parameters > should cover the potential users. > > Signed-off-by: Sandor Yu > --- > include/linux/phy/phy-hdmi.h | 38 ++++++++++++++++++++++++++++++++++++ > include/linux/phy/phy.h | 7 ++++++- > 2 files changed, 44 insertions(+), 1 deletion(-) > create mode 100644 include/linux/phy/phy-hdmi.h > > diff --git a/include/linux/phy/phy-hdmi.h b/include/linux/phy/phy-hdmi.h > new file mode 100644 > index 000000000000..5765aa5bc175 > --- /dev/null > +++ b/include/linux/phy/phy-hdmi.h > @@ -0,0 +1,38 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright 2022 NXP > + */ > + > +#ifndef __PHY_HDMI_H_ > +#define __PHY_HDMI_H_ > + > +/** > + * Pixel Encoding as HDMI Specification > + * RGB, YUV422, YUV444:HDMI Specification 1.4a Section 6.5 > + * YUV420: HDMI Specification 2.a Section 7.1 > + */ > +enum hdmi_phy_colorspace { > + HDMI_PHY_COLORSPACE_RGB, /* RGB 4:4:4 */ > + HDMI_PHY_COLORSPACE_YUV422, /* YCbCr 4:2:2 */ > + HDMI_PHY_COLORSPACE_YUV444, /* YCbCr 4:4:4 */ > + HDMI_PHY_COLORSPACE_YUV420, /* YCbCr 4:2:0 */ Better add this comments and above one as expected by kernel-doc for enum.. > + HDMI_PHY_COLORSPACE_RESERVED4, > + HDMI_PHY_COLORSPACE_RESERVED5, > + HDMI_PHY_COLORSPACE_RESERVED6, > +}; > + > +/** > + * struct phy_configure_opts_hdmi - HDMI configuration set > + * @pixel_clk_rate: Pixel clock of video modes in KHz. > + * @bpc: Maximum bits per color channel. > + * @color_space: Colorspace in enum hdmi_phy_colorspace. > + * > + * This structure is used to represent the configuration state of a HDMI phy. > + */ > +struct phy_configure_opts_hdmi { > + unsigned int pixel_clk_rate; > + unsigned int bpc; > + enum hdmi_phy_colorspace color_space; > +}; > + > +#endif /* __PHY_HDMI_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index 3a570bc59fc7..93d77d45b1d4 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -17,6 +17,7 @@ > #include > > #include > +#include > #include > #include > > @@ -42,7 +43,8 @@ enum phy_mode { > PHY_MODE_MIPI_DPHY, > PHY_MODE_SATA, > PHY_MODE_LVDS, > - PHY_MODE_DP > + PHY_MODE_DP, > + PHY_MODE_HDMI, > }; > > enum phy_media { > @@ -60,11 +62,14 @@ enum phy_media { > * the DisplayPort protocol. > * @lvds: Configuration set applicable for phys supporting > * the LVDS phy mode. > + * @hdmi: Configuration set applicable for phys supporting > + * the HDMI 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; > + struct phy_configure_opts_hdmi hdmi; > }; > > /** > -- > 2.34.1 -- ~Vinod