From patchwork Tue Dec 17 06:51:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandor Yu X-Patchwork-Id: 13911329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7888E7717F for ; Tue, 17 Dec 2024 07:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1uDNpPyF9LarO5kLDnVLbcMse6GUFA3xnyip2Ypj24Q=; b=zn6eoDZAe2c/3DfBGI8PHlo6Ex lW9Us0oUVRFCavlAik5rF4QgoJY9qXbv0LbJumxfT6K8jXKO9bFqZJUbBwIKmlDL5kY3XwDuBnL+P orEV9UdziW6wCWlEIEsvKaXiAL/OQZDyhOz6UAqvW+64glhE5vQvJCaWVaRSOfIIguFiADPFR1WF1 An1L/kGBImf4XxEPOgAWNxwjNDwHlMhyVj1JuU2mwIfogD5te5RFT3dT610nlUUG9b4JzvZCSRj/3 z8Akc8JhaEt+52xYx1RVYNt0GJL4iOz8rEtzyCW6qZkyEroHedfcwXK5D1AFcD7kMYzzcwmL2KlzH cocdp1VQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tNRuG-0000000CZCJ-3ys7; Tue, 17 Dec 2024 07:22:12 +0000 Received: from mail-vi1eur05on20616.outbound.protection.outlook.com ([2a01:111:f403:2613::616] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tNRgv-0000000CX1I-2Q7H; Tue, 17 Dec 2024 07:08:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v09+Ul+4kqdz0lKJmq5maoUW/g7kXnl5XaFcNUDhL5fW/DIwJc2QI7Shc6xXY36X761Qf4xyYwIYXwv3QGva+8Py5SV4R8T+t5A/31CmV+VQV1iE4UsRq88z77JJGm2fJz3/uB+rVaBcZnzoueUH7dflqcSHELyRIFaIXQpN6VUhVjDB1zLCxuKnf52lJQTAcvjG3Llrw4NpC8b1D9REK6W+S8TrwCo5CfOdytHsj5YkmUU0wLpMcQinDB8eryYA08GPoKIGiN95ScCSLzuQxClrIPNhPzo3FhyAxf18sJJ0Hl3FD/yzKKyKXGh9ZQ5E3gryVHMStrGsmOOQR8UUPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1uDNpPyF9LarO5kLDnVLbcMse6GUFA3xnyip2Ypj24Q=; b=LgNymNKlDdrx8HnvKvqfhJ30sfC+XREgz9w29kQqqfD6kVWIC6h2zUhecZVVZ5tQQqvqu8TLZmRyoILN0q80AfsrBTSpAKsPiJt4xm9QcjVw9pozJGt0DrbazizXEG21OL7xqOPd+09dCy13W1iI0iH3oQ2HCijuIWD3Vr2CEAGVoGTaV9p2w/pbC24EDjdYGC/tEi200Teom3/6MA+jJTb9R1wvTm5FQ7TSR6Isa9trnz3RH0uh1HWh9KXx0LDX0ueZ60G/9MYm3l8MNTdl1tHzoW6eL4Pil+fHqA5PVpBaIcVA8VDISTiVL/78+QusNhFSkxZxjii2YxwqGgjsiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1uDNpPyF9LarO5kLDnVLbcMse6GUFA3xnyip2Ypj24Q=; b=aR/yInQ64lHU8QhmkDnTJzy4XZPIykc/+pW4DhKRY0lAwEJTrtniNR0cPZqbF+gqJdfiWlycmHH16I4AAKLiv+taz8Dc258D6QpnoGvSTqk5BvfF0waIFHQgmvwDs3p90is7YLhvntCHRj7y/d86dDfNXcZYx9HI3XKq0lsTDoI8Ii3rgtRVZhSbCQx+Dgaj9nYJgOBWS6rPnS1D+VNX2Oi3IRGFzSOUtz+nY2e8Hc1RW5Ym1WphVXeGpgmIahdm8yWhHnKZ3vu/pgafbZu/yNIr673w5fNLIvw66ny59Eg8qyRA9zHpisdSAlpvMIYTFzUbVRF0o+4r760PLnCRTg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) by DU2PR04MB9196.eurprd04.prod.outlook.com (2603:10a6:10:2fb::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.15; Tue, 17 Dec 2024 06:53:36 +0000 Received: from PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::51ae:5f12:9744:1abc]) by PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::51ae:5f12:9744:1abc%2]) with mapi id 15.20.8251.015; Tue, 17 Dec 2024 06:53:36 +0000 From: Sandor Yu To: dmitry.baryshkov@linaro.org, andrzej.hajda@intel.com, neil.armstrong@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, vkoul@kernel.org, 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, mripard@kernel.org Cc: kernel@pengutronix.de, linux-imx@nxp.com, Sandor.yu@nxp.com, oliver.brown@nxp.com, alexander.stein@ew.tq-group.com, sam@ravnborg.org Subject: [PATCH v20 3/9] phy: Add HDMI configuration options Date: Tue, 17 Dec 2024 14:51:45 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-ClientProxiedBy: SG2PR04CA0214.apcprd04.prod.outlook.com (2603:1096:4:187::17) To PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9448:EE_|DU2PR04MB9196:EE_ X-MS-Office365-Filtering-Correlation-Id: d11b4c85-ae07-4a5d-ebd0-08dd1e67878f X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|366016|1800799024|921020|7053199007|38350700014; X-Microsoft-Antispam-Message-Info: rdXU3/hl8bORcT3D6pr+m6Riyn9EgFdzyVs94dF0BRLXoCvEtg6QwX7S0mrN5fT/cDCzoV8ULAQw3QsA/aWsgMH//dOhW/x2Yyz7WUx4cSVARDV/0Sh8EuvcZ2gHxvAo6+oPNdzmywnw7cAW4UWV5mBRiLQnPdAd5mojZvWDJIP8PfG8AjP3Roae5MPCm/fsOtM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n3Nd8wwsAZnQxHizVUuH/jT35T/ZEQWdHeiytaJR8Ryuf9FzTDfGv32iln1LbG100higof1EJnDrw2nv+T4xhpYMp+NGh/2OLJvXe9nZhCSjoI4JEXpMyu4nDTIJo4uKANFRNj7DS5cmboMxMdH8VE6wktCM1HjWA6GZaxHL1MF8HMcEmATM1XssA/DkAhvUy3kvjRAJOn0jTckkITaTUhd9hqFVO9/UQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9448.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(366016)(1800799024)(921020)(7053199007)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hk9UnDoune/WHBor9/I6YCo+43qP/diY94bBzbomWGV6pTIpm9iU7RCYxOfsDnoE1FpC/97rRql/t84KTuqBeVisRy+5kbgF5FPOtKXce8TNp1TITzlZwmQfJ6oZs+aC71rpEiZJDUQrrpw6qV2XSySM6nIKTvOWC1bsHDaZzT5Vx092+E5p42wd4NsdhPUXyJujn3WOIfr7kOku1iX1yjXHhCbsosDYVv9FuoTTFcttQKi7H9JN7oJSA3j0Guh5ncalDh9aPYNyzlHFdtYLKo4AOz9KzbtIDI9aTd5uun5JAnxSzq5eYXpfOSKHsNfn1JAyhl/awjd8SqCY+cygQFjM5NHm7aKPvP4KYJ2mo1k0njnVo5/de5GNTuva/7hqZ/0nuqYMC8nTZWZL4srnYCA+LkrS6l7KNdSEJoMZX5QCLqMTkzGktBgaWi5AVC5WN5S8GGMZqrIF6BFUn8YzMJ+U/kqwQKkY9yzU+VTkVXMiZdmujAGsGnTRI5dVrGfYDWOMu+Cbe9wKxL7DkKFEcsswt8cXCip46Vq0KAIFvbit6a3k1CC7yQLYYDb0V8fBrJJkclRJIVBh4y7vkXt/ukSQQX+RXOeTFpJijN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CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2024 06:53:36.3697 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ofpBEQjjPfjF732Rwt+gNEtweyLZf1EMypXEvndC6j26ih5Y4pfeQuL+jSbfE2FogE+Onbg4/YCFPC9utVoVaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9196 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241216_230825_608166_3DF22CD7 X-CRM114-Status: GOOD ( 16.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Maxime Ripard Acked-by: Vinod Koul --- v19->v20: - Add a-b tag. v17->v19: *No change. v16->v17: - remove headfile hdmi.h - add 2024 year to copyright - Add r-b tag. include/linux/phy/phy-hdmi.h | 19 +++++++++++++++++++ include/linux/phy/phy.h | 7 ++++++- 2 files changed, 25 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..6a696922bc7f2 --- /dev/null +++ b/include/linux/phy/phy-hdmi.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2022,2024 NXP + */ + +#ifndef __PHY_HDMI_H_ +#define __PHY_HDMI_H_ + +/** + * struct phy_configure_opts_hdmi - HDMI configuration set + * @tmds_char_rate: HDMI TMDS Character Rate in Hertz. + * + * This structure is used to represent the configuration state of a HDMI phy. + */ +struct phy_configure_opts_hdmi { + unsigned long long tmds_char_rate; +}; + +#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; }; /**