Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp706923rdg; Thu, 12 Oct 2023 20:27:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGuL5kS95Ty5xJNp2ZCUrQB9/11K7tzkHOufqimYRGp6YymsF9rqevAh0NqJjE2AUqegFaO X-Received: by 2002:a25:d48:0:b0:d9a:4e29:6354 with SMTP id 69-20020a250d48000000b00d9a4e296354mr10511841ybn.39.1697167656545; Thu, 12 Oct 2023 20:27:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697167656; cv=pass; d=google.com; s=arc-20160816; b=P2a64ABFkB1fwCsUYr9xYpO4YHC8U66z+JJve5mtnAfwNISy63L3U+uMv9/NYFRKDr 2so4GtkHf2FSDtkm83eDAO19MapCAVT5Oucbmf725/otR7qweB8PRLduPeSIrzeI1UFf fiXMxtfkxcCqm/QQVztmZBSJ1R8whHu6r9fCw+jFXqVQQYiI695Aq6D125b0whJ3dYRz Q+dzqyOq0d1xxnAPG41y3diBvYe2R/sGH9CGE3O/+7qq8NA24UgCStvJMjiXo7aBVg6p wmH/Z+0UnJB2l6F+PzWNeKMIomRdqtXD61hJL91ZN/kjfQ5zEmSvXgRpTKyhJvfKcNKA FiLw== 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=/lO3qOymfqU2eweowaCys8bto6Ii6+c35U1DMSbKqsU=; fh=8NLGe14sCJly95EXmVPGTZNu7Y8L8QDjBnK0D9mygcM=; b=mfEZXCzhaqT/j9CAcHAN9pXlC6Z765e9p4h0S4kt9QwHD8X+Lc3FN2koTpV9Dn44h8 6NWM4oVElG9fEQKS8UCL8KfNRRom2Auihn9jdEfimDv/xZS3A5EmKJ+4wN1rzUsQ7zc2 C09XLJSZXDS95BA1owijIqELQjXvYPbgwP/n2W3e4pZJr7wF4m56m3nltuPoQjDf9EOK SqlORzUn70zFbGs5jhnRLh6sus7gFDVMXYqteUfFQ5QKyR7IIVc7reHjYHhjnmPeMHul WCODtxFIKZI6+xBLDpxlkiiG8Zda7Oukug/C3kJkhN0tyqlPNsyiTzLrXD9XkztqxArQ 0k2Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=gZSDxUDQ; 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::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id y3-20020a634b03000000b00585a454179fsi3639716pga.162.2023.10.12.20.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 20:27:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=gZSDxUDQ; 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::3:6 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id D04A28095809; Thu, 12 Oct 2023 20:26:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbjJMDZz (ORCPT + 99 others); Thu, 12 Oct 2023 23:25:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjJMDZx (ORCPT ); Thu, 12 Oct 2023 23:25:53 -0400 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2043.outbound.protection.outlook.com [40.107.14.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42BB6BB; Thu, 12 Oct 2023 20:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KYjR0g2OvyIPp7DJGqGb9XtwWg/rqskE4mXGMa8esw+I5M++NUoaT3K+BVi/7wUabqReRW3tZ9zXCz20CW0iab8OahOUrroRs3tQpKbIKFsfJ8kKruC1/WZ5QXcQG5fpDC+bGpU+tl7z4aYhvJwNa2qxIqfJZY8+JeeJ+rQcVHTrQlSbPR5/o81KVAAPEX2BCrd/anb4PjXaRnXNhsM/ke/73Y07nKm1UkrrE9B/ZuEBcE04YzHHyg0cTromu2gukouVMyex1C3pxSn4sb23m4GZEsIg5PuuPhcDzw4r1W/DZJ+3FIHXXkqElWLc6C9uKf4z3WewO8RGB7h5djDvKg== 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=/lO3qOymfqU2eweowaCys8bto6Ii6+c35U1DMSbKqsU=; b=dFsxIYAjXIp6HRDGPyNEPoQswJzgcuMF43BPgbs0EI2KT476Dj4kEiM7LK53EKdAnx0CS80BYHLlUWIs51iVDcHQFLq1kWP4QvWh45F/Sp0oFEc5H22hGppEF8C1pXztQl5KVJdv6uxPTb25oKsNOZJ5CskSLKN4hYx0QAOFmDnQw9Oybh4VVqgZ2UsBh8UwJcJTDNAKA26qkj8JDrmuodzT//HqS2kV9ezTBbyg41z7JkGgPu2XH+0ky7TbLsZKtmm8Dtedf4NYpFAR2h/sdRS6vC6t6ij5R9E3+GtO60zRo7dl3IZSev8VBYqo/DEUIvZEBwwr6/taF2Z31s1PWg== 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=/lO3qOymfqU2eweowaCys8bto6Ii6+c35U1DMSbKqsU=; b=gZSDxUDQqAYIEpV4oD5KAt9mfo1AsBg1izAO+n+gNW0n0y4M3cSKC2ISLR9x1bHmDvn0qPjC8gj4em73ng2Tm9G+4jQqiRM8aBffzXjx95fakkUL3DNGKYzFsbLcO+dWrj/+0aX7xLGbXj3aECXWODRr0bDjyLrOaCRyEZanRhA= 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 AM0PR04MB6978.eurprd04.prod.outlook.com (2603:10a6:208:17d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.45; Fri, 13 Oct 2023 03:25:47 +0000 Received: from PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::3b23:7c3d:fd28:c3f2]) by PAXPR04MB9448.eurprd04.prod.outlook.com ([fe80::3b23:7c3d:fd28:c3f2%7]) with mapi id 15.20.6863.043; Fri, 13 Oct 2023 03:25:47 +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 v10 2/7] phy: Add HDMI configuration options Date: Fri, 13 Oct 2023 11:24:21 +0800 Message-Id: <91822a63435dcbcd7d132ec7c396e22bbe30df18.1697162990.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: SG2PR04CA0179.apcprd04.prod.outlook.com (2603:1096:4:14::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_|AM0PR04MB6978:EE_ X-MS-Office365-Filtering-Correlation-Id: 3529afdf-9c68-4c92-6d55-08dbcb9c17ae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xZwDL7pkGyu/TuhRpMxAfm0gsrbDVnCX83tRd82CoXw9fJ1WUICCg8yDmBzuOuKqy9XE7L6f/tHcZ3n0vtChZtHe1RV7JS2URjGUTco0wK2LqFsxnE5gKb2Vigxyic5ru9Od43CqdbrwvcuwNlzywGR7ZWP/5Sw2A2zowPxDY2nSljxotzqG/z83hdvKAhC+WosvdFhvmw3xJ40CQaS8/xd0ITUvW+XFGc9N0DbfPLYcBb5M0KVI3VyKB4RJ/85ZxcqjUAvkvAJHHsXmeTJOumCFFiew+i1CUSh2ccVzn+PMlljNEFYL8BRTWM9HSHbbXiGBKCujmPKFhDKYAbzwIkkAwKSL2cad9xpyr/Yvd6snLhGBfAqPWYhdlP3qsGVhAwpdJoCW65qvl233WLEGy4JtVaDlxgDirxl+ahCsrgYcXoLhUKYcHnJhkZHhjPQaM/SY2ZE0ai6QIJ21qcvmI7msYXvlt2iYah6n9aPNvU4ZfFPsNSqRJSnvNdliF52wsZuY1muTHeuwAq7WRGc2T0n3iEXe2HH4u+8TWnGUffZieV3WsdjmFYu0vhyqPN8MGk4kS5zaBPVmcToR0N9kdrUIGQDkDg9UKKhYTNeNmnIG8ZZTggCTH+jhN6EvSH7m8+YQl7sO6u0WBgA0g8JV/g== 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)(366004)(376002)(346002)(136003)(396003)(230922051799003)(451199024)(64100799003)(1800799009)(186009)(83380400001)(86362001)(7416002)(921005)(36756003)(2906002)(38350700002)(38100700002)(41300700001)(52116002)(6666004)(6506007)(6512007)(8936002)(8676002)(5660300002)(478600001)(6486002)(66946007)(66556008)(66476007)(316002)(26005)(4326008)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hqRikfL4H7OicI0hkTNgC7H8lCtdqPVeCIlQ16qK27S39w+EtKmr6vx+ujs0?= =?us-ascii?Q?Zs1dBPdnx/Panl+4g3M7t3PExv2YIWhyquXJfjUaEjiW7064LC1FlXlkfeLz?= =?us-ascii?Q?Wog35vuv6xtIojDZTbIKbh+sIEhbANnsS+n3zHw3+TFlCQx0gExjB5gDN5QP?= =?us-ascii?Q?11ieMbwJQNUpNy3fQ8GmK7BU63myFx1B1l4ivra3ES0EMh71tUjr5Ab7of+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jn2Z5tj8+SbkJyrpZWxGyyIy/CE?= =?us-ascii?Q?OtmdDcLxtQtGmIA/1iD3ftUzYJS2CMHmtpMOrZ36cyALRFGOWLeKFp+y+J/f?= =?us-ascii?Q?U1tAdVYw76mt+XgeyKNinlXEWQ6ZP26to/oYopyi16gpT8DvYWCcKiZgF7hs?= =?us-ascii?Q?rd1j0SePMgQ4mPa0QxKQNSI65bs3nsk7MYJnWRZ6C6Lq/hhbQKq6OFzORgKZ?= =?us-ascii?Q?mVK16iMDuxvsaW43lxuJ12s5h3StwrYUHSDdPygjOdBmxDLSOiaX9J9Shwkq?= =?us-ascii?Q?K/NPs1dp4LTEe4FoOat4zlGxKkDX+ovU/v1QuSl2CKoMR7pr1WKf5Am36VP/?= =?us-ascii?Q?LZ/fQT1gBxYi69y1VEae8Nv9dY4uHeoZS0py0H2pW/v1Em0ntY3wEmtx+/Wv?= =?us-ascii?Q?gPQmqcPIXlgwARSxcqeXKdcclWkN2IDHuxnQc6sg1uE6Zy8niXX/sCEb3QP9?= =?us-ascii?Q?qJhOUef25GdFRJVnLjfZsV5i/lhvRSvJTeiQXqer?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3529afdf-9c68-4c92-6d55-08dbcb9c17ae X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 03:25:47.7388 (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: HlIVBTteACvMfw/bReca+WWtjpfPFtGVfE/iRTrREQJo3O3+sad7bWZh41+r7ulvxbHrHhx0Gyk4I5ZTuq0GGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6978 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 12 Oct 2023 20:26:25 -0700 (PDT) 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->v10: *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