From patchwork Mon Jul 17 08:03:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandor Yu X-Patchwork-Id: 13315318 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 76875EB64DC for ; Mon, 17 Jul 2023 08:05:26 +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=qFFxsQOiGsMHnntadm4hDEKrty4SFNvzINmNS496J3o=; b=tRLNXbhr/XmUPV i2mlvLJ9kcWGZjefcwiftZfj9S79yd6PzZcLEqszLSrOBHEkM+ZATRX1H/nPOys9tXPt7CP+iiehd ifRP1wvnxwbQPDjcAEHgSAFSYMgvpzFs2g9CZG+CepHayABAbXUtyVTKUC51fWpzL14jiuzPbUrfC aFAkeI0/GmtYIwMcefLD4Y3aIXBgVLtXUUmXcM0YMyEcbhc+Hbc6eqdhbarRW3QevEevJqxo5ouKM XMe3MbpWddcRwISOHqnF3AnACaFATLQqwqJmamGm7B7zie5vLRlWugGpA3UZeD3/4gbVZeIEwltEl XKhpfvQMI45SyZyYwd8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qLJEU-003Oy5-0O; Mon, 17 Jul 2023 08:05:26 +0000 Received: from mail-db3eur04on062f.outbound.protection.outlook.com ([2a01:111:f400:fe0c::62f] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLJE8-003Oli-1B; Mon, 17 Jul 2023 08:05:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=foFRzGAV2Rolz7e4cMiBkgD49wLtsr8oYZWKVqoD03+dgsQ5ViRQpcxV8ETFTok3nPugijsKYU8UUKs1qR5le4bpSyj2m3gtVEilhSvzVxH2YPvc64PCI9Uz/ZX7dATaNDcugx4g1c129DK3xKMQgaepLHuE8niVR1/ISGzAWjJ4RBbbLKyKurReEqPLuEhFndf26OayVw3Vwb8cOTmE8+9bf0HE1iBHjd6s+HJu93WyAwCTswgBRCacmhR23+t6Ne/Fc08YBC9XDlJREGH/ocSKOk9FmRBTHNiopbES/8qEuWI2JNQ9DkZDFl36v9w0X2Lrn3dggqLqtmB/aqY9Lw== 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=JodstHmgiu7wHelxOSqNRCconyWEo/2ieKC1lYgfdig=; b=cE3pbDqRgor76nYowsgls0VPqs5tspSQqd51mzH96XlhyVx5z+Z5I1rvBJnmC4fqJINInzKjNN7RkU5ucYnOEVz9A1xc98B1t3xuqUSLcD6Zld2ADab1Lfo43DhKx1s5Q+vVkvk2Hz1H/Xiy9qt6pocot343E3ZR5Gg9wkludFIDZaCvF/wX46R0Zq1trjkGZ0bx/BVT280CSHok+JKCcvOSTyKO+fSh6jR2huTBdUJh1k50N+ibfs7Gug5KIGKkN5H3Dk+73LJ8biiSEOLkDjKm3BPC9K4QNjurBv3CORUmsbJVKlAgmiCWDe8kpGZKv3tEAaPgYmLwk31dHgiFUQ== 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=JodstHmgiu7wHelxOSqNRCconyWEo/2ieKC1lYgfdig=; b=hd+GlxvBj6Ud3MhlwE7qGBk2wLgdCXjPbxrFEA89fbEKp8Og37aFtWLd5/+9V/Rfa3JhdtIXRw5zkj7JVDwwEXZiY/hi8l+MFRg5KawBpMQQjVs/LDnFssWZPS1+OC7RisrXYV3dPEKjHeWp2XaCvfhfmlGs3kT+cb07HBM+NKI= 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 AM9PR04MB8291.eurprd04.prod.outlook.com (2603:10a6:20b:3e5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.32; Mon, 17 Jul 2023 08:04:53 +0000 Received: from PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::3505:c499:96d4:1429]) by PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::3505:c499:96d4:1429%4]) with mapi id 15.20.6588.031; Mon, 17 Jul 2023 08:04:53 +0000 From: Sandor Yu To: 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 v7 2/7] phy: Add HDMI configuration options Date: Mon, 17 Jul 2023 16:03:48 +0800 Message-Id: <59e90f505664634125ce668b44629599d3d13276.1689580812.git.Sandor.yu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-ClientProxiedBy: SI2P153CA0030.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::15) To PAXPR04MB9448.eurprd04.prod.outlook.com (2603:10a6:102:2b1::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9448:EE_|AM9PR04MB8291:EE_ X-MS-Office365-Filtering-Correlation-Id: 45f6bf74-45aa-42da-b156-08db869c8047 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CmYyWSNVdHiz52JxMEdhqSqCV5bDp5uNwKNnUy5Mk0+4tgsmyrDx/5jZyVBt+sZJlvlKBjOqPOPG1gIKAi8BJc4r8NqEUvivuRZNHZUOeCk7KGItL1FpehR9fmii0wqoehmJWTzzPguSH82uYEkI8knQmqDXjWcrPdOPY5j/LBc1eY6hd7FGDyNQMrCzPSmUDXRi/wWwq//sOsas//CRdkoWZtPxbtYVRfrcMRNFRoAYMKEpEon4ohBKbBPnAgvEJ8cETnqh24jwFAtQ0laucyYBEjmM/G37tap/DW04W3vsUqvAvA7LcQQw6XcdbH/nx7Q2inXhdZqK9v1xYvZsrpnVJAlI1WFIKF3tiGdBt0lpQz78at1mzzQ+G5cEVNaMcooh3Ww/yr6ZFX7eRAV7UZ/TjXG/u3CKatFUxlz7Bwa/4bhfeoitjK6aflJIiJ/ngMWQi1jWQguAR7Cb6pLaspvr0ZZOf7WfmX57Z6xK6GXqJ/gZilywyGWX1nV4SXgJCGFGXJfPML0RWNRAKcrNUdGuERA1UMzj1SXUDPLz1ZW9HFdoES5GG7NTz53/Do2Z26HDCP+i60Q44uLc1hN9HBR1peOVKYZW4X7lowNaPCub6+ZHa9dHuA7Hl2YYiwN9KSGyHRRMfBnODS2TWmuTlg== 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:(13230028)(4636009)(366004)(346002)(136003)(39860400002)(396003)(376002)(451199021)(478600001)(52116002)(6486002)(6666004)(186003)(6506007)(26005)(6512007)(2906002)(41300700001)(316002)(4326008)(66476007)(66946007)(66556008)(5660300002)(36756003)(7416002)(8936002)(8676002)(38350700002)(38100700002)(921005)(86362001)(2616005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ge7LHzIXV0ssfpiyIV0MJJZpVOQsz8iL+q77/zlHYMnloO8SqV2hzyulXgVZCb9lQMVYmCxmlsnyYbZ7nMCOHmSwnkYhHbDZr6gc1LWaKbNRo/z8Gra1aYLGizWL5fNniDzt4aaIVQy6SrLacg23H56Fy8Z5PJlOP2a8VVjfEZWTAAIR5IWR4QFX0PnNI7HjW0Q547mKLIdBUnruJIkegdrmIXVBVt0JPIkRuK2nmRSH2nMFT4ZWRFJ0AzC0zxAbZrA+wOPZZmPjfZMJHW1cPgmXF47bPt68DbM76rySxyf7PLiNFFxpxvG/Iicbkry/4RjWKT4tNLNX3TMxjt88dq37ntYHdVLj0hyvQi+cpLfgoieQNEkkSz8TvGnin9somShm3Su9/+KHnmJi0AOe1ooOPTfI3WJq6qm//SYwPrd2p6Ys9P2IF7JJzHzcCrkg2tZW0lsIVLMCaKjpForOyP2H4sVEynzqeDTHD3p7k9R3Qk2Dvk8twk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0QVEU0oYpNbFqAd4dvWfFmR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45f6bf74-45aa-42da-b156-08db869c8047 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 08:04:52.9935 (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: Qp0K7TiuD2Zdf3k4Zh0TQKnkNPugvVOd5hHM2cVhHf2F2mpQyy38FokRHQXJukhUs6jOfV75cvygaGYr69BCFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8291 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230717_010505_088528_FFE4B76F X-CRM114-Status: GOOD ( 15.99 ) 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 --- 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 000000000000..b7de88e9090f --- /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 f6d607ef0e80..94d489a8a163 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; }; /**