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: 121131 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp983075vqt; Mon, 17 Jul 2023 01:45:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlEAliUZJ5CblAcrDmd7ujQwfDDsHXac7mM7/6MAkJ/9w9QfDNQm93Eg6n8v3Mn9m2sRq9jR X-Received: by 2002:a05:6402:3451:b0:51e:1af0:3a90 with SMTP id l17-20020a056402345100b0051e1af03a90mr10458993edc.37.1689583535592; Mon, 17 Jul 2023 01:45:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689583535; cv=pass; d=google.com; s=arc-20160816; b=wb9bz7TsdXcGt4bp0C3xgFfAe6blX7XIQCQp9OMnLiDAPwLY9w1Dsnuk+wYBTKzbAi aJXYPVRqPExzgX1CkDP0HT769sF+hwhyL/HGso7vXDXTbJtE4079psx+QKEuVRkdifl/ NkLzvZs1kmK/vhh2SsUKF5KeT8Oj09VsOmKod5LbSNLGUpu4O9D5xbebO5BR5/c1fYwu 3znqDNkh8HCY/ZNfzF3iU7UjIzLVzqbMrLDHXdLmsjAxeCpeub6EHYzR2SaD+UQ4Euoc nG5HwGY63Y0kJrgZkrOjqh7azgLAiTZbkyuxMOxghkApvlrAh2P8Oo5lEjoOWhrWMuQm 3Yag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JodstHmgiu7wHelxOSqNRCconyWEo/2ieKC1lYgfdig=; fh=PUBVPucWc8lRluY+e+5uvxRpT/FpFBsE6bTTCuvGxf8=; b=ZAxKMG5coKMlvlPxThVwgr8/ARkWk5kYL3hFdi4jx8ogDHSczKGp54xjzLc8D8wAxl b6i2TYGLIgeQpFNu4K2tR6ZiXFLZ1F0ONDW7g6cA19ahERdtZeAUfyOezxJU2OcZGK/I LX/gimAZhTTR+Qbe3Pue9BFUhqxcJznxBI7kpr7PRf9sPqlpKr5u7dMbBHt2ab+T5Qrl YLVeQbUVLoRYbVsvORlHzUvx9Jvzoo5JHH+SoZIj9uotXhhHGNHkJHChULkb+x8Mray0 C6fLAedp7z+yCQI+X6Pn98Cp5FqW8w2+azMLGcBQ6NtvaQtaO2vvZhJoKaJwj0jYa/5M FS5Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=hd+GlxvB; 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-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020aa7c38d000000b0051dd3314051si7543628edq.188.2023.07.17.01.45.11; Mon, 17 Jul 2023 01:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=hd+GlxvB; 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-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjGQIFL (ORCPT + 99 others); Mon, 17 Jul 2023 04:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229863AbjGQIFH (ORCPT ); Mon, 17 Jul 2023 04:05:07 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2083.outbound.protection.outlook.com [40.107.6.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DF1C138; Mon, 17 Jul 2023 01:05:03 -0700 (PDT) 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/+KHnmJ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rvSbqIVWQpfTU5SAXfLauKqfCnEBnYX9WBW4YE82ZfV82220/uhld9+2PzSi+QsZVOlZ0n4ZvCEeCm/fcrpA5dCrhfoPZotkPW5mONdvpm0QVEU0oYpNbFqAd4dvWfFmR 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771656745266255519 X-GMAIL-MSGID: 1771656745266255519 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; }; /**