Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp683478rdd; Tue, 9 Jan 2024 17:11:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6I4WRO8A7Lutsxl5M5CIgmnc/d0YCEj1vO0bMc+C5x6oI5b7E/jqBTxVBwyRco/jhq8L6 X-Received: by 2002:a05:6871:28b:b0:206:100d:d410 with SMTP id i11-20020a056871028b00b00206100dd410mr360588oae.24.1704849095997; Tue, 09 Jan 2024 17:11:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704849095; cv=pass; d=google.com; s=arc-20160816; b=UghPY3fcS4NkoKdE8hKCbQfWeWoOOiY3GUua1Ywck4x7+PQjcjZW0FKotuEI/O9irZ YGV/jvDzN4oPHTRvqrrppOBvoH9wee5WlR+HLMKtYV1eMktfPmqZUxVb0nHbsSJl5ovA yrXx2o+vnLJvd2Iphqd33BUpSXsje+mIKgXt4rD5PRv7Ed5p8mCvrxeTSpXLn3m1gviH Sn5T/ipChQKElmzyKUo+V+obs+ACYXJF9KxjfpAh0P7Qn30jqq4uJZtHKXt8cXG8EKnP 0zZC5nfUAhp2R47YAvRwht1pO2UfJUY1lR7MRkAIhYTVK/P6JijycXmNJt1ii0Z648XX b1kw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ctJlFvUXzf9J9whabAcXvLasMIJ5Owm7IbUibAN3lTs=; fh=8NLGe14sCJly95EXmVPGTZNu7Y8L8QDjBnK0D9mygcM=; b=DNDkDWGMQOobi8M1X0Q7+3gDBsxfeaHRvloGTir38g4SufdB1fN12hToDQnWt/rM8j H6Y+d8sbI5lSQnc4SX3QtlvYMxTAr1Yay8A0W7QbxM8NihPfj6YEmeeyXmi+4kOE+A8b ZXDcvNLf2SHfiBJT1KwNIPYdFkZIziKYGZv79ZXq3sfbXnW64R9Ks/UrRvSXSPPVoCKd ofUgrEIQH7CffAPqpi9rlrGLkQlBsZoTDJaZxTL799tZwvPsE321/KV9VFCKQggYTEcQ YsUrgl3VHWTOMxckBzgBC3JjfJGUar7XMszQFvKyu8AAPojgB2MJj165UBYvRK2SzmFz 8e7Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=oyc9dqyv; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-21608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id r6-20020aa78446000000b006da8f665174si2408504pfn.239.2024.01.09.17.11.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 17:11:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=oyc9dqyv; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-21608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1678CB25A36 for ; Wed, 10 Jan 2024 01:10:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C57811C01; Wed, 10 Jan 2024 01:10:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="oyc9dqyv" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2070.outbound.protection.outlook.com [40.107.21.70]) (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 E61C21370; Wed, 10 Jan 2024 01:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ggUlrYv7CkNTC5VptpdvUzU6L957KqnI1OzOUaI81fUeso5sI0EkhmtruK/yLvdiFgqtwEt31V0uX9Agr59SOn7qTKv4vhc0AqrYY/OYFN8nw7Vik5XsLVE2qzvWK9f3LKBLgtR221QlSVmqQHeoPSI8RQQewbmBlDXiRPxBN6yLRofPAITuESHN7CoxTZhXRriEtYWPKB7q+u81GI06QNr7IcaCWrFEdIhuo5xRdtpO1nCWTwYGa5T0jELWY4GwkVXLKHUp2cwoPUpHbvl2YGRQqdDSxTNcrJrfgiK8s13reV5GaiRm+KsVPEC3A+z1OiNNfMxAu8WHnhNgr9HjKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ctJlFvUXzf9J9whabAcXvLasMIJ5Owm7IbUibAN3lTs=; b=mdyOJDrBoqG3AwLr/WOjrHTortIOfrtSOasNnachI8iWWz9RJOtU7Ky3IiEVCyZxjZ0fT3NKRyWF3AlTudUrnZdnbV+pYzbESKs3FKLs6VqUSlw0HBreNAjOOKTfq1WPFRAXijoSEBUMwJJH02CCCW2K/AMT1dmlBsBee2Dx534CxvAmBPe3gMpgURfj+jSUV9MEG9n3qawigWkCUTO3OPlQtuuzO22QZnnskZ+3abehcqk2N3AImEVc3EIHFmSCZE3Y+QvFKHuKe2ysL5yex0b7o+/hMDcJuewdNkxhzy032ALfVpaDYGfGUwPHtF18W1cAWICLwPVIOFI8w1IJeA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ctJlFvUXzf9J9whabAcXvLasMIJ5Owm7IbUibAN3lTs=; b=oyc9dqyvQrdpiP8sJvdJowpf+Vw9fsrox7k6cfupL1kAWVL/ijAxcQDeX0h1K3hsDVx7Jw1jl2GVDw+JLyjBSz/bFVc22fOZQheXkENjdy+4r4UQVy4J9RyDD5pqXf7S4DuA35xu/n1BuV4nIyIb/HMEW7lofUwTqryx5kgMwuU= 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 VI1PR04MB9836.eurprd04.prod.outlook.com (2603:10a6:800:1d9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.23; Wed, 10 Jan 2024 01:10:06 +0000 Received: from PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::e6e0:d026:3089:17d5]) by PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::e6e0:d026:3089:17d5%5]) with mapi id 15.20.7159.020; Wed, 10 Jan 2024 01:10:06 +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 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 v12 2/7] phy: Add HDMI configuration options Date: Wed, 10 Jan 2024 09:08:43 +0800 Message-Id: <19070c125268cfe900021dea6e7e8379b89c630e.1704785836.git.Sandor.yu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0045.apcprd02.prod.outlook.com (2603:1096:4:1f6::16) To PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9448:EE_|VI1PR04MB9836:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c48ee13-31a6-4af5-8d15-08dc1178e191 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; X-Microsoft-Antispam-Message-Info: C41mVvdKbANM3x5S2Eedwk7edRVsY42xcYNVcdgXtLHyp62nNtkiFXDjJpr/1d2ubFVY6XFBB9MSoyObPUiAwQ9bVnpT4q7xD+tQpufyV9MFDwEmC7qi7JhBHg5tKC104OVatIsCQrThCCAjpV2kcJBomZN1YRtu3zCyOFowqv5oZ7LnDcbivi0sX9OOOIogYJbKlF+Y1n4DVKVFx40EY/Pz9o9i714DvMYIut6usDWdgocCv5QniPr1fw8ZyEVkEOMwWdzOgUMDbq1tn6rqrYwYC9Cr1EPDh33J/mmBFselaY6a6u+n4x+xOIQx1RPlXgba0f8iQqyhg8Ttol/6M1UqnEIR0SnU1WQhcAZpt2nVO4yQ2qbc2ydJcGnacD1HxtvAZ7L7dSwFWJ+aBkD6jNk8il23Xcdxrws7v4v+Uefj21d/xo1ad5yGbpeBFcvTd5H/tnv5oTnMtRhSOLs36rOx/e4bNIa/pWNCH51byZj+CfSfPVgEMAsaZzbth7I0gK0PERLGYK/fT3gUOM0eyotJiMDYqwz9/CY+Hq2TStcy+VNcYn/loiG2j/32qm/tgSKfniPC4+uKsfM7Bsu6CTRgWJJE7CbVdj2usR3GLi4AthM5iU0L/dlycbCl1V6IzSMYPR9S77sSvugZsy4hrw== 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:(13230031)(39860400002)(376002)(366004)(396003)(136003)(346002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(83380400001)(38100700002)(38350700005)(36756003)(921011)(86362001)(26005)(2616005)(52116002)(6512007)(4326008)(316002)(66476007)(6486002)(8936002)(66556008)(66946007)(478600001)(6506007)(6666004)(8676002)(41300700001)(2906002)(5660300002)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Fq0oO8S/wSwhHm+0PvMZVHCkUMi2gafj6ZKLbNoNLwv0FVqz+6v5t4fZf1nh?= =?us-ascii?Q?JBFvLh7NwjOCv9y9eC+pL6D247C2sj780SuNOo0hKnAJJVLZ0W/m7KGGWceC?= =?us-ascii?Q?mMHYjSPjiaQnCNlPsBdH7Flb8HF0ZSNCfcdO9uKhOr75NtLEONulX1poejSd?= =?us-ascii?Q?w/1cpou9YkjM3YMhBPohH2FGKdZ81ooCsUSA5sTvCwJ0d/wpe2iMNb0GvMmv?= =?us-ascii?Q?vshsbF2/4BFNKSmfn6ZWr3JKS3smBFKvR4oP9uU4cmEI4U+CqNbENCmzSyNa?= =?us-ascii?Q?sMkphflj+wWyzl6r2Kpo7t7ScOh6sWZIUanvhf2tYMwndVbUMs+kOoGo/0Mi?= =?us-ascii?Q?oBtRnocc62MwstU3B5AEkuIZU8S3Q/PjzVdRu8yCGvTIa3xeFmuKzG/mTZIN?= =?us-ascii?Q?m42H6qD7LfsXEP0xWD4QzFY1pcgujBOUuULf/h5Gh01/Dd5iDBv8PyphjAGw?= =?us-ascii?Q?OpAUvH7U0/H8yrZD7ZsParTLCbDc7vLfFLm3GKPAIBThS9Tlhf0k6ajZiZT2?= =?us-ascii?Q?nqAv5rR3YZ+m/1jodN3M2WuveDTsD5ft76hiUeozK4WUrFqI27VO7jKzsyFD?= =?us-ascii?Q?RLQaHiaOQPlOzj3Xk6cTZgJAV6+l3P8Im870PuD4TV0MLGhXA27XxhobyChK?= =?us-ascii?Q?Mi0rJir/NnCJip/2RKOzriH2qz1WjKoTsz6tH7+r46wCEWabtNVF+4tJalBz?= =?us-ascii?Q?gDu0Q750Wp5kwOf+xAYSFyIOc1ucMunW8g95SrUTtfwx0VfDNcdqaBM1WJ/8?= =?us-ascii?Q?PqvDajStZ7N7ehFfGGVOtd0nynfxVeLpNAcZpEMABy3Wb63zPNzRtpPcLJsk?= =?us-ascii?Q?XO+KKaV1GblrnrtpFrA68fhSIkjbGJF7Hr+YN60BQNU+mJiafeeTsewyiYB3?= =?us-ascii?Q?LtFOvqlnjNYPRr/wbGxBwesCd7AzHRc+j4vDipU2u2s9YmxpSd9W4N8D7toP?= =?us-ascii?Q?5/fx7TwDHFwd9nzU/GLRU0JrNWFJ/EqLU4IKE+5g7I1awh1EkPliwywOhZVI?= =?us-ascii?Q?NQjuu+osOcy/RDhKHqKFiscdmcPfaEUuertuXzIJSU2Bd8aooxvgHybdA+GY?= =?us-ascii?Q?E8Kf6x3INK8W21TFdJieIHdPh6AoQdJTd4vd4HdaN+BjMN8dSlJh4raoVJT+?= =?us-ascii?Q?/qs6DYB5o8MJCeCP9LsuqRSFxo8k2xMzGRztcF46eASoqdiVdLfREXZkRbwV?= =?us-ascii?Q?pKr48bm+nEoGZZn3fpd4IfNjNiw7rWhTx1ZJLC2O19g7fXEhterjgxgH1cA+?= =?us-ascii?Q?2TArCVYkDApx0Diw2pml9UNmFjhXNw+1mpgLMkz1Nf6nSiYnhfDtYEhx/+IS?= =?us-ascii?Q?C8Qi4jNTmJ8iQaRCIqy/Fm9hBKC9Fy8YeH+54Tv4Giqkip5GnGW0y/3zWGsC?= =?us-ascii?Q?617WdHtt3lfRydyUkyOiJq9exw7oW8cf9AFZVKcGhfgYmAaNaCnA2sHaXk3B?= =?us-ascii?Q?gv0FpNMJuMK5huumPtmOQtug+fwnRn2QmPF3jzaTdcoDUnXls1V9YbHxgL38?= =?us-ascii?Q?YQtNuk71hKv7Jht1INc1/w3jsw/g6bHUvdlOd+8jXwDFDBO2lZv1jcNnwy7Q?= =?us-ascii?Q?4VxPACGvOBvExFMO3p8eBE3A18esQzfS0Wa/UOkm?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c48ee13-31a6-4af5-8d15-08dc1178e191 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2024 01:10:05.9711 (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: jfbFPpTccMd8hL9sAh1HSpgwZYnIadvos77L3w4A5ckuaRIy7US9aNhet/UYlp6iUxmzM+yWM7l26iDDpFRGfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9836 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 --- v9->v12: *No change. 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 f6d607ef0e801..94d489a8a163c 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