From patchwork Tue Oct 29 06:02:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandor Yu X-Patchwork-Id: 13854389 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 30FF5D5B874 for ; Tue, 29 Oct 2024 06:08:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=5dD+jaaoWNwl3TyClgVBp9hmufT3lihPvjVXKLYs+zc=; b=4pgoUs4J2ZgLpT IJzcd567zTfBYaYrCWcop24Orb54r6xbgl7OqQJc0R1f92d7FH9KHHRYvObRKE+Nx9LwVfQrdgleR iR/YlZxCPuZzZ6iTzyMdqoRsB1TOuVZ5+5s5axAeAJ74/StBzM+g8hjoy7g4DUCKcRyzo2Rfck42u kmZMeKcjai94KbCWdrAdzB14CcuAeqZefIpimcPlLu3tdRz7ad7arNLeb2NnauceufmpIXV3raZ0V 86e/8qPJZ1J1kGLeGjfyWLTKXWhQjXoJrRlrorwYiUG1HzGAaBKgdegIltPSe/ntiZPUvYjOkxUPe pUVzZmWk9DRcukNI5GBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5fOc-0000000DKIv-3pxj; Tue, 29 Oct 2024 06:08:02 +0000 Received: from mail-vi1eur05on2061e.outbound.protection.outlook.com ([2a01:111:f403:2613::61e] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5fLM-0000000DJaV-1XLg; Tue, 29 Oct 2024 06:04:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fRcKyoUkg5fTjFGH1xpHRsgM88Ip+1E2X/MmyO5FkRoY5Ti30WzH/o51oWggNJfCGN/rbCrQsmsCe+OZ6Pg4Pr63MNn+AfF0XzrY7p2Nw/resPD8uP6R91SEH3OWrg1+EvKisw8B+xGvomU5ukF7gY9e5GNUHUd40C1DfWY2DZE7xoGFy5NZ7z/qK7h4y+VhXKcsFQS3FZvxBR/VZbqXw6Zwhon4Q41sHGHjJPcBwQZqd9XhndlZtFxRBDnloU4pkdTiIpYWjQo8hJx/8DZTkXYaFVPPsvhtNNCNYTqAH4q5+MseNXJueCFe4Xe026ix4122KU4dqTJct4njbIHvmA== 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=8cl2GgfvQrPuItTGFrR7habFXyGI34o7VUU/NOXY5KU=; b=nn69rACiecQPcfaLajkvcetAHanJGj25dtTyeWoZCwRbq3ZW99hVY8FBPMImmWeWijpBV4fnpnK8+gauP0AcNREs1ihCgT14Li6+N3yOF27zOejUTuBEegVFMdGmXJcRHPKeMKUmIS/yzIfoHAVrwf4dVupXdrx1JeV3717iseNQ/ggJ2T+SG6Zkd5RbtIDA0UmSEjhQoJGC/vIgLb/7NXBBOjT49jgI2j2fPCkKDqaiTvaLZsmw8rkP/cdZ+RRf/zaVhicHtUafCZ+SiHZdUaIUDIuxcbeCJQmdSsvXd5FE9mYGzqY6UHchfCk9OTXT4u63APuKCoUEDs7niGYTFg== 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=8cl2GgfvQrPuItTGFrR7habFXyGI34o7VUU/NOXY5KU=; b=H0llgiSmKU4JyhwNvAkyjAtW3zU1cjpdhi9B+uee+MUzlpsWO8pdxiMd3oLsRjb82DAJ8blCHMU0icEnug06zhG5/U1bB9i1ch/1Umq+S3gkXpA1JKy+9Yoa86fE3DOt0jJsln6mvO5JLVWDTMr6x8qKV1v1VjgjurH8fkZ8iLvdCHWrzf20YsMMWKSc+U3EcoLwV17oDk5thTZFeXjcBrZdPRFaD/aE7/OPzsIMAR9vWrBgZCZjtIrhzx/YYuP1YkX6ta97Exfl/s03hs2NeinJcp+AUhw9hk9Cf4aLICg3xNoQ5BlDFRRwK4iZEn6VJXdCIc3dtWaTnZIlvX84dw== 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 AM0PR04MB7172.eurprd04.prod.outlook.com (2603:10a6:208:192::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.27; Tue, 29 Oct 2024 06:04:35 +0000 Received: from PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::51ae:5f12:9744:1abc]) by PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::51ae:5f12:9744:1abc%6]) with mapi id 15.20.8093.018; Tue, 29 Oct 2024 06:04:35 +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 v18 2/8] phy: Add HDMI configuration options Date: Tue, 29 Oct 2024 14:02:10 +0800 Message-Id: <64f6885b5a5ca89c8214b3138cb58c3133ac2109.1730172244.git.Sandor.yu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-ClientProxiedBy: SI2P153CA0003.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::20) To PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9448:EE_|AM0PR04MB7172:EE_ X-MS-Office365-Filtering-Correlation-Id: 001e49d2-5472-4c79-f0a8-08dcf7df905e 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|366016|1800799024|7416014|52116014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: P4d30eftMQk+rdFhu4JfQMt4U+kZGYXDQwp9ugEbDLzaAoLtpl1pOMVCvefs8ks4koMFsWCTQkkIz/IYXWHAIw2kyaBy46PeactVb5Q7QFJYTutbZgZRRtIfqfzbnuc3Lyc+MOuxChS0TUFLmVO7Q6QRgN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CA3zSlLzmKJDfi/9jCH9tDhsIO8JIv1JX1nrzBDcMs153xaWnr9T+1UPs+qH6cxKsSnZEd/d4RVmHo+Zct6zHiOQx2/HJHzbNipFlSTSMlhmoF62QwfviLVuWLcTHgXFsQdz5BR3VumA5Df7fkIOBxVxPOY0Zw2Zn4PTyDM 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)(366016)(1800799024)(7416014)(52116014)(376014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1XDavMFBwBNz6scetqXbAvZzx2o8WZvpvAwTRd3IUtXp/wD8KI/EMD7uc1qL06/ffocn7B1bSZakDpz2RMCd5/qqd0uYT+UuE7x5CxZZm0l81id+KGIsx8/famPumtAEfx4ZZvFBwrDYlodjaeoRazb9HOu/F01jGszWwiQbJC1XTXL9+t3gugS2HaEC5pjEqcGlJAVjQptF1QH/Tmns7RoDz8D++1q10eWfMq/3ZwwdCts7zd8zxxtww6lj8BW3HxFJmYHiUJYCCSbReapV2J8cxOYH1dpkqazCblwWCnvY0iyeXpKUczsga24R7JC2m98h7RAgmLPhDkKsRpL2Bbm3nlzmoj2mzNJVsT9vslx8IPpQ8qxRQRI/WjhQuyTb/Qi2ePCHwW0Ip+kgq/XuqtC2tn2IuqNv2CmymhRE8J/oCU+cwNc4FhXTOg1GCZ7M84yYgY/gRPvcJo8x7DVQNTyktksc9JGCG3LZKNyYiGUvupQ7yFYQfkqE2MkGCbxp6fA3U4HCjHDFtLmhG/eF0WTFMmY3MA8uHFPNj0DT/e9wEnfA248E3ceh8dyU6AhorNWSzq9tvAvjFcLkbujg+TJFFVy18fdf/RnWtsIitd/o4a3+iToUflVkeUw46F8U5xRBXJkivEIs1+krKiH/cqsFuXzXJXzlepYjSQ8h1x73fyXYJF/qROGSha76d7OmC4fRcgGu8XSeS59QbejO7kReTQfkTZeaOya4JO5AXR/k1TkF7PN/aZ+RsUVLcftYJ+1pK2AbF2SuWjkiAPZSxajX+yWky/P0I8T2dmYQVUinpLpsol0FI7X+/R09QRKExDOF1cngt2S4WSxDs1r3GpkHiNk1L3Oh8NFx2tSbfVBFoGNzTWv3bFBHqDIQWHzdIMzubdOv1Xf1NMFYBPpB84/WSUm1mfmJ/+iZc/1993FsBTpLeC15ARJlj5ctX1O/AOxhAu28hPlBJ2GzBdJ+n6fZ5EQ4CIEAifLR5/fSiScVY89ycNwash11gY5n0qLqMDCZxWISpFcgn1beAzW8i/q+hGtKeSxXmmaUocBkEor7BvGLD9eJ7QpEwBCXf035oUb19SV0J8KorlwbmNjXac8Lh3JmwG731/XeDtylLYVCSi6ccEoxQ6tSEoe7/b/SEaQKcDVL1SL7enAQXnLLI4arvWyRhiLl4O0SvLKcSQZLTCIlDZhyj3L1DhbKqjxHaRLhuXz2yyvtPxrRfz/1kzaj2aK7lZYyhwojhCml2pbsIIntzpew5asmeQwT7ZKpyTyuWFyuAjnwwrkEg2JXRjZsQFOmqV2i1nE5IFMBvwPlx82PmD9LNUCtvZO2565KKGMwCCuNw1uhgJ9w/p44vdW8G1CukEwq+y8a8R3+4lylydJg1FFNzAqO4e6vBBwmh0NFwBaI9fRB3QJl8bZFmYloIbYqQeryiA9ormssyKM6Whyd709sN4TG+5dQAfZeT68AK5b9r7e6UB04+IWa/AejxlWxGs1TxpoeouI4pItSbq7nFPGQfLQTeEvPX0S5FP62oVuMw65atHpXsmU6LOV397EcrT+BYxepUnjIWCONvxESoXFP2ZYNMZEbmEFu X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 001e49d2-5472-4c79-f0a8-08dcf7df905e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 06:04:35.3515 (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: yKYhpLTE8FHd9WLFlNlS8zbNYKyAjT8mWiBmQuCwBIw2julnGwBC7bE32t/Mok9xglTd5RyFC+Zrq9uHZ01deQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7172 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_230440_528654_F31D07DF X-CRM114-Status: GOOD ( 17.02 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=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 --- v17->v18: *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; }; /**