From patchwork Tue Aug 8 08:32:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandor Yu X-Patchwork-Id: 132618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2289707vqr; Tue, 8 Aug 2023 10:46:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExbqVKtjZh+Kt3VZYu1cIsb4LpNBmbLmkAOhRe6Dth1x6OGgP9XXlRFlB3r97r1g8zuJPO X-Received: by 2002:a17:902:d2d1:b0:1bb:994c:bc43 with SMTP id n17-20020a170902d2d100b001bb994cbc43mr427989plc.18.1691516815333; Tue, 08 Aug 2023 10:46:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691516815; cv=pass; d=google.com; s=arc-20160816; b=Kzp6e1LwGiCLAUlv9seCkJkOjIxiL/fL0fkDYFUz3iH4KCGSpGbFWP7Wr0BPjarj/O 9NA6QPd/jkTeaoNBZAF9zAe29TJ0JohDzNFD7OVTBtpujdaIocqpPEkxP7tDykwrXK2T URghL4EsMFG1xdXs869dg3JCoeE7gVIqPDmRo86swfJu2G9gmj0nPbW+Pgs7VDE7hC/H jbIoL3l8p9YBz0mpl6qBnkxtuSyUnAusJVR7EJA+o5gH2+JdQS/uDomplkiwGHk1gOiS 5GTxDSQ2ldtBByDPmA3fyEPj6DjPiPiOP+oEUjwgBnEi8ENQxjq7TNvsvYdQpa5cekgQ gkeA== 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=N5ObMoH6B1BmKP4uXBMBrn8q/JkKD29R3tM6WUEp/magPn0T71YrYGWgf7iqpoBtzZ +b+li0bcQib9JmR7sAvvj1iYPfocvtQXamq2lRleVillsAp/7ebrWAGklPfvghXKRvyn 9ROrhP4+/QYorFkgK7enl7HiCSWr3f9ELWIJTIF1OIpghNkegyogUDAvJH8ckEJt5nt8 TiJ5A4stFuub+Uyhg7Zs75W73CvRygsumq2zCB3Y/MogzlUWQ4+Nt4hUZlZ1nf9ylYld udHJNI26CAfrXe1DEj47zIfC4w0qI2IKY4jvx71+O31q64Pl4pNPQDpUgoltopne6I5Q Ui0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=qxt8btpO; 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 x69-20020a638648000000b0055c8b7f3523si7526285pgd.54.2023.08.08.10.46.41; Tue, 08 Aug 2023 10:46:55 -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=qxt8btpO; 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 S232591AbjHHQYw (ORCPT + 99 others); Tue, 8 Aug 2023 12:24:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231873AbjHHQXL (ORCPT ); Tue, 8 Aug 2023 12:23:11 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2049.outbound.protection.outlook.com [40.107.22.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BA9DA5CE; Tue, 8 Aug 2023 08:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TqLQsFnxn5yQpG1Mzve1RIl/HkrM6S9f4b5oWG7V0U7yKIZh47H7M4nm/QFUdcd6zLtRGDpyrI32t/dTV507VwrGIvrBzUOBRqalvvUibMLi6MPqPVytjxBdCABnx7neu7ugNi7h3LJtYcb/yGANDPHF4hWEekZcx9mZ0Yh6kARyOdKqYfVCP/8SvW4bhDwZp4+ilZY8VRU/B6oeqyW4aU6BLOofVNEOZu2T01455x0URrWX7toOzqdoTV21hohBGy/hW/9s2CnZLDutRzG+u43txzefNzoHPM0usvb3FR3Zk1RynRrVLV4rNNpM0u0NsZ8N0utIGYVkIi5lPVWmaw== 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=oWQUJ6q1IMZYe9txN+eLv3HzCjieA4P7NsIRJUvnLRSYJ+1VkzADCDob4JChoKQCPuPyH2P6xw+LXG3y9IHK75MfKYIuFOCXh+3Ba8eYDnMKuPR7R202GI0ZNX8q7d36GGj+CqZkydHTEm+pjPAAIAczmMb/MIOoN/IP9Sa3fLk2hQMCxRspVrb9hV91sM72SN8IbtpuFixVWBlBqab0VyAsQZ1Co1gI7ni9aFlXqEcD4pPURNbHqtqt5Foow3LCu32nTVs4e8dLRSzyBKIMyRY+tsHI+pMEXF/AIUSXldAaXAGe3X8N0XwCgWB7wsAjo7dsuBbdxVa+FRL78bDBJA== 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=qxt8btpO9ca6i1uFSYPgMCtYL4uykFpt8LX4n64iB3jkaafUUc8BK/ip+kDJf2Tdo84qFA4haOUptEbkKzU9X/rcoQBNpeg4cUEd8gLrBTwcPOwqW7qZ+zB413uLecDoIvJn1GBMj904LbGOK5qtdoLQMTtDD1HC9bBsWGNoyX0= 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 VE1PR04MB7296.eurprd04.prod.outlook.com (2603:10a6:800:1aa::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Tue, 8 Aug 2023 08:33:45 +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.6652.026; Tue, 8 Aug 2023 08:33:45 +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 v8 2/7] phy: Add HDMI configuration options Date: Tue, 8 Aug 2023 16:32:38 +0800 Message-Id: <20230808083243.3113192-3-Sandor.yu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230808083243.3113192-1-Sandor.yu@nxp.com> References: <20230808083243.3113192-1-Sandor.yu@nxp.com> X-ClientProxiedBy: SI1PR02CA0010.apcprd02.prod.outlook.com (2603:1096:4:1f7::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_|VE1PR04MB7296:EE_ X-MS-Office365-Filtering-Correlation-Id: bea2dff3-f681-451f-84b0-08db97ea2de6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 37mm9TZEfeiU08HenzNQ1R+4dCFyTFtP/Bet2uoZt4zAuZjoBCuVoWzTnHZsbRhq4Aq9qO/+GmvIxB8g7xxkU1X328hscx6FLe2P5eTctieD5PnZD3P9083fzT//DlW0s2okxFoJkOcYKlyUVJkFFx7WOIiBNXFKfmw3fqeHNovBrzC9bxbBGNi2NGGN1EXKDOOAhtXqZkCZtfN5yttk+eq7Nnl1G1BYqTp5kFA0WnKvYIBOckHnBX/wvYG/QepUlCUIFOpG/LsqVD5X3WuPoXz3iEIci+Rhcpb6pZJECfMQpr4dlbQoiKPNl4G0EVXjCYnxrJVExXSOpBLLqBN+achhQufn30zbSJ5/SN1aOQNAvTXw178rGXBIDFf4JomP5Suuyc0RVQpFeBzt1LpC76iCNPUKFMaR3BZ1HWGxfkw5fC7bLOhFUiOe5CyAoRJpZifdHRerJDy3khELBA6MWi9m3yE7TYXgaYAjc07Vxf6CDAsZavPGfcUh1Q8V95zuzo1ZOGYc0Nb0gLkBMuYboFCf9iNMApiZ99ronf6GKuHnOdGNW7CgST+MJElHvyrcSTBJEMZo8wJ/k1JrSSBhzin2Q3CnFHMh9MZKGmmClwRBi0AeSAQAclDZyqKocuuxKcRf4q1fMpxrjszVf7dOPg== 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)(136003)(396003)(376002)(39860400002)(366004)(346002)(451199021)(1800799003)(186006)(83380400001)(36756003)(2906002)(5660300002)(2616005)(6666004)(38100700002)(52116002)(38350700002)(6486002)(66476007)(66556008)(921005)(66946007)(6512007)(4326008)(316002)(41300700001)(86362001)(8676002)(26005)(7416002)(1076003)(8936002)(6506007)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9U+25sS7A0xW273cRaKv6bXH6tJxl0Qw4ltdfndyrMMvZz/uGi3SdBLrcuL2eyEK+Q99qGfr/VSAP8PO+dB/RW5H9Zf7HKRE2ZryYkm0h3/KwlEPgFxVB9V5my9bqPIzK4mI7JSGtA2MU/MHsYwJLSsIyZnMd/4CWypkA8xbMP2/RHLBD3HOTRZB6QcJ+kArpioUWbXWm8E1+0BbSnNY6HatefhnRRpisk0DVALHgpMgFV9r59c/bnofrqjzau7T3oMuW+dBFB1jZ0KEd0hR672ViigO9DRZsUaS+5AbXI5MYkV/qO2mMDCRj1zYxswwcmqP6VwsuPSvgtOAl4z1umjMDbHpXGq/H+IUB62yWhcPTpzrvWqQbUlIB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2xwvhveNPlgv3Qlt5yWbJNqwOOjeObgI/BocefUP+uAy+BsYZK23yb2ayz0IZ1QPQmlNQHAY5VwZe8Fvfd99NYYBNUP9XIhwQKR8ahSCMgbUJHEPMFqLBDgz5k X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bea2dff3-f681-451f-84b0-08db97ea2de6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9448.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 08:33:45.4240 (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: 4Io4E9nPFP7sANDXPdWhjgjTV9bDnNz1/7Nbaz6T2arAuIcW9E+Ef/uOkci54jvCVo6bFIBawFYs6ZVfsj0Yvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7296 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,URIBL_BLOCKED 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: 1773683935657144235 X-GMAIL-MSGID: 1773683935657144235 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 --- 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; }; /**