Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp970611lqs; Wed, 6 Mar 2024 02:17:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXtRjZbGUVIBT/M3ku0yMZrBc2QaSGkmJB1vD4iPoQPJFWy03yX/UFsVPFQqXdUrXVV0sHb5qspcvyQeY7KYHplHmVhTmlNXGibPplidg== X-Google-Smtp-Source: AGHT+IGT2k+LmYSIQqgkhRY0lPW9QPhHJ/swV38WV2iWY9e/HEV83v0O0s2a5ZhBafbqrOChW+xt X-Received: by 2002:a05:6a21:8ccc:b0:1a1:4191:3cf9 with SMTP id ta12-20020a056a218ccc00b001a141913cf9mr5099616pzb.45.1709720228872; Wed, 06 Mar 2024 02:17:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709720228; cv=pass; d=google.com; s=arc-20160816; b=UV1dQnX3J072tYxVqi38I8cYg0QX88SHydPO2UrWZTbrvQAFcEIRxptGTfWL43dkht i5wbgPjGo7lCCtOXWVwBPJVaWHXMfAaD4lPvjUPXAZv2eYigAMT/UR85EmSsIdjE2mMq Y2CdztMTjBh5mRZmx/meF5fk6Ts5IbxhSZy6uPVT0Ka53GXkdNSsFDp+qL/CO2hQhuaj RJIOPEUfGVRXEiy5FurFta8WMEqlBHcV4e0cyxcfSx2FMWaNlTY/Mlf3fJQHDzLQY9E+ AygwZzA4HUn6nFoZgrF/BvmgL7lXwNMI+l0Hmy2uE1oEDt5kZnVzgViEq6BFFe4JUQKn nMWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=zaypW1xOUoJZkdMzg+koCFQiDKuaLfMq6IjZrmFfdLk=; fh=h4Pisj1DlwJqO1PSH+aMig2nmSVVu+oFpt2e+w/Jmd4=; b=t8R3BnvFT8pzJYqxHfVpxBuvPUyL7GzprLKvnkODoHGU9A7QCWovZD04fBsA5RI5Zs 1XgKtxymVKD0j77plQodIcT4YWibCFyd3wld0mvIOLe+gTrNzlJu+/a2ZC9BEAZDZOlc b8MsG/oofBp1/Vs2RgPzrZ5e7tPLkjMKpGBSjkWvy3emYreDtj/BibmBQ+aEsWCffmAI hV/CRbx16FYWPa7MWJnSQHvdiJVDKzWGqo+tClwyFnBZwCV3AoFLu1KYTDAbKwwaqtIu 9u5caZPgmAIXzDg4CYhPFKHdY/Uq+Kb7byfe+i5aDkjCWUE03X90wDQJc9chsEerNA3c Rwpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=aznpfpLj; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=rkf5+KmD; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-93724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h22-20020a63f916000000b005dc81a6b2absi11418562pgi.792.2024.03.06.02.17.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 02:17:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=aznpfpLj; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b=rkf5+KmD; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-kernel+bounces-93724-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7BAB8286E49 for ; Wed, 6 Mar 2024 10:17:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 794FB5FDB1; Wed, 6 Mar 2024 10:16:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="aznpfpLj"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="rkf5+KmD" Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07A1A5F86C; Wed, 6 Mar 2024 10:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709720212; cv=none; b=X2CDVZ6CsZ6gfyamePMor7gPM5nrOvXgNa5t3AtwGiIX55n+RJDXfFdYk5V+bOmYkkOWtxGVEwSV3AGiS2DlR4KRdaGboUBE+sf4a0rMG7YTFfPuJwLFk4vmi5hKA2tqKaUPphab0iBGPtSAXeibt4SGhIW9//3ilNauZqHWItc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709720212; c=relaxed/simple; bh=Ba70dy9yRLKb92GRApT21cy6FKM6y2i75c75juuJAI0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ggwu02gNDUC3vQkNzskepImh3uynQBvtLJwPRXLQ19VXCGkW1If3awgELY08yDX9wDfcrLZmQuFzXIdhSnR41IT80neWmzCkJgb9k6AG2eqbH4JoTUFrHohMJ6MGRVu9mJb/IHRAqbISMwzHJzYiknINQ2I99I68dIlPJDWZQFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=aznpfpLj; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=rkf5+KmD reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1709720210; x=1741256210; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zaypW1xOUoJZkdMzg+koCFQiDKuaLfMq6IjZrmFfdLk=; b=aznpfpLjkI6GHD7EIduF73XgW7kCdJetYSxqHU1tWR+eGvlO1ZQ9JTh7 3c2nTaVLGwhft+ipA0d1V8KBJBzuI/qXP9tc2ItTMNTOYehrxkg3mJIKn iojDYw4nExts9LLq5NRcI29AKe+2fveSoyi5hm61cxX+D4V9cP7WSqglS 8F6wK94BEKvy0brPDDZ86qAo8HwmIeBEPGgJaHbCDlSGo8qPeK29PyWXi +vdXa+dwCzbQyfxHukktymEAhIojxHkm+RqQHPcTKig0cXNHcMTApW/b5 lTLTS+uMUoR0iakk8IHTvtivaD48t/6mVXtX0WfI7hQerrls8Wof4l2bi w==; X-IronPort-AV: E=Sophos;i="6.06,208,1705359600"; d="scan'208";a="35760892" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 06 Mar 2024 11:16:49 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C5FF717026E; Wed, 6 Mar 2024 11:16:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1709720205; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=zaypW1xOUoJZkdMzg+koCFQiDKuaLfMq6IjZrmFfdLk=; b=rkf5+KmDT8xxAtyK4R65K8+PBH6AOYqeFQqDjvsFI//G+im0NuC1jHiq6q5jWiH+UgkWmQ SSIWMKJ6JPjw6+KA9zuJ3C0Z14chkmTigI8iidEgzvV1RTJAo81owa1c+Du6QJHBH1qepL qqhU0SZuVxA3cCQOW4/BYudo6vV9DR95y7qcAD+Zfr4lNr8wy/QBNJ+2OgBxahBAh1f1xN DLJqnTutB4j4/PRnlS13DU5B632+0YAyvn20RLv+zPbX0DB5ZsdFMa/E/RTgYQ6yzb9Bdl qN901yOb1M89m0J+WT7MFs2wxSVNlmOw1WA+/EgdZA3dtoW993753qq8USTQow== From: Alexander Stein To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Sandor Yu Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux@ew.tq-group.com, Dmitry Baryshkov Subject: [PATCH v15 2/8] phy: Add HDMI configuration options Date: Wed, 6 Mar 2024 11:16:19 +0100 Message-Id: <20240306101625.795732-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240306101625.795732-1-alexander.stein@ew.tq-group.com> References: <20240306101625.795732-1-alexander.stein@ew.tq-group.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 From: Sandor Yu 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 Reviewed-by: Dmitry Baryshkov Acked-by: Vinod Koul --- include/linux/phy/phy-hdmi.h | 24 ++++++++++++++++++++++++ include/linux/phy/phy.h | 7 ++++++- 2 files changed, 30 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 0000000000000..b7de88e9090f0 --- /dev/null +++ b/include/linux/phy/phy-hdmi.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2022 NXP + */ + +#ifndef __PHY_HDMI_H_ +#define __PHY_HDMI_H_ + +#include +/** + * 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_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_colorspace color_space; +}; + +#endif /* __PHY_HDMI_H_ */ diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 03cd5bae92d3f..4ac486b101fe4 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