Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4129265imw; Mon, 18 Jul 2022 23:34:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vJ3aHMlbVN4FfVHIosZdzkTokTvWQ3mMiuktc+D0N9pe2xFBht/Le89VPhCj+rKRXneeex X-Received: by 2002:a17:907:d88:b0:72b:1127:33f5 with SMTP id go8-20020a1709070d8800b0072b112733f5mr29727625ejc.725.1658212460397; Mon, 18 Jul 2022 23:34:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658212460; cv=pass; d=google.com; s=arc-20160816; b=K3XfqX7CAyy85bNXF371DWkjQTJXy//N73/X3gnRr/8DABRomE0aJYT+QQonEqwTRz yyfUlYYziEuME/85C8KYhSyF4AhGBeO41pJAKOUl4EivQ6lH8A+/7xwKWOpCvq3Nymmn PAKtk0qPn6N4to3wuphDlBxXlG3aparHRLMcxr7KsnN+dD7eCV3TZnnzFjpaD7nDFBM6 x8KQU5Roz6NHwpmC3DCrHJN/dwGMl1CCGRCAHwXX2u6P4p5qJQYTxkMXB9Fe0VbTGJ1Z rBD7E+qrYncV2vpPM7n9JDa7DXYRjyBVQJcCkrgPt6CJ6WrGiXiuGa7rtsnS+yXyK3JZ Dprg== 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=N3k4eqTbwfQlhfZty7gyIvUxvIQVou/wc+Y872Qm3Mk=; b=kEUXCu8WyjXNwD+n/EIvchOJ1tbnsIY1YasjNjFHcOeJb6Hmu3rlfbJEy6AsBtQ3f/ fK9KAbspbcFxaGzXFffmmKDZSgNfJ9qi96nYHJ8i+GASDbGfhAmtTYo3HLpYh4HYeOoL xTl9bQkcLFv3qCSQGpezUyF6Vobbhgbcm5vFBnjcL6ajQYLY3rsV8dVsJm9VQ5gDafKH 4rQ38aIzWrRkYPn4rum0MUo5oQdfv67bAmLQQyO3CGrkLdvOvwV4q00aYuXpxnos+46v /RQ+vFPYe74R3KMxT9UZxQ/l+voqRKwXVQfgFsQ8fynfUJFaanW4oWTVNSU6eduTBtov /+9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=RuAxi1jC; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u6-20020a50a406000000b0043ac1c303aasi16102351edb.337.2022.07.18.23.33.55; Mon, 18 Jul 2022 23:34:20 -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=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=RuAxi1jC; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236944AbiGSFuA (ORCPT + 99 others); Tue, 19 Jul 2022 01:50:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236850AbiGSFtz (ORCPT ); Tue, 19 Jul 2022 01:49:55 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70042.outbound.protection.outlook.com [40.107.7.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B9A531202; Mon, 18 Jul 2022 22:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=anjCXN4buu5ZGFD6AyKWIGRrOfbATCc2KX8OznVJjgSRVt2lpNx7SlFda+NqA6lvlgjlAl7y9K37n6RAfaANhLSXj8hg13urcrWukm76EX+2KXOA2xKpVeJ/fxSCJXDqQk+mh1E8SOYJMYN2CLenQ0EtvWrYdHJN+fsc6hnb5zG0faDgD6iCaRHiR9nwwMIN0JVPZpI26xVXBI4JESwVlLbG5DqSb7fYfkrRTxB9dK55Gds8LCj4fWC3KprKeEbQPGiHwg0j9/S9BCpbKHNKblXFMKBSnKeUt6RCW1NKJU0N0TDgHBzWWviBQviIpoZGvv6FELmnt2Qj3QPnDaFryA== 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=N3k4eqTbwfQlhfZty7gyIvUxvIQVou/wc+Y872Qm3Mk=; b=jp8Pwp4LsFtw+PN1f45QpwaJBpQO5TVTrLLihmlEMEY6xhQhpJUBoHqzU1G5SfxBKIUrzhzCP1N3DQLez+ojBFTsLuzPvJ7dulzCWV1wypqWA/Dc1Xn/GDHn/Oxa8+IJ1gt7t5oFxUn2T/wDqlUiUUNxgub1in8RatvJ5NWZnx1A/fQQAwZn5MHdCT9DTLGPO6/1myRWapbsA/Kmz1ZZw8WLHkT3cTP94vTaQduG+YrU/+78VOs7CezOohrrlTHmJ/i6r6gEzB5AHsyuNatiFg6r2ZjHms4wSjuXaJoNqXh25A4GZD4fS66tFC9PAz4z5EgRbiawkZ1kKFJhxAl5xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N3k4eqTbwfQlhfZty7gyIvUxvIQVou/wc+Y872Qm3Mk=; b=RuAxi1jCTiwAmZ6Bndyrg2Bz5eKjP0NtIAlHG/oyU2L/yOx0kTCNQqtmZWcBFivZKMv4xFALny1Iz27IA1RFUKipOWOloPOO8N2HLkAv5CljAhvPbDEPl665LYtJPZRQy2PBJ9oWuMCYnuvjGTWYHu8eX0cMEKmbKajZ+qCddGQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by HE1PR0402MB2937.eurprd04.prod.outlook.com (2603:10a6:3:d5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.23; Tue, 19 Jul 2022 05:49:48 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c0c2:ede7:3b85:1597]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c0c2:ede7:3b85:1597%3]) with mapi id 15.20.5438.023; Tue, 19 Jul 2022 05:49:48 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, l.stach@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, laurent.pinchart@ideasonboard.com, marex@denx.de, paul.elder@ideasonboard.com, aford173@gmail.com, Markus.Niebel@ew.tq-group.com, alexander.stein@ew.tq-group.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, aisheng.dong@nxp.com, Peng Fan Subject: [PATCH V3 4/7] soc: imx: add i.MX8MP HDMI blk ctrl HDCP/HRV Date: Tue, 19 Jul 2022 13:50:51 +0800 Message-Id: <20220719055054.3855979-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220719055054.3855979-1-peng.fan@oss.nxp.com> References: <20220719055054.3855979-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0034.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::17) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5dbfbec4-6e94-46b5-4ea1-08da694a7d9f X-MS-TrafficTypeDiagnostic: HE1PR0402MB2937:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Nw6qUDQ8PKKJBtW8AbCiK5Y8YDqaq5jxacH+1mRZW1D9svgfwxeHRlaEBbDhRE0bL7wNm1nRvGVflOkhRCozFoa3o1vHX6BsZVde1biGS43TFyYWhvL2Zu1SBQZmwo0e/Ato+RMKC0NuuTSjUhDUHZtekEzh+DAJw+UYySE3i4ej8yPCmJ+jhy3cr66GY77Xupiz6bGgVj8IvJQHTGqs1DKIKOq5O5ujldgQ+m1Owy+vpWcG07CY18k9S6iinr0HOYJu6SyDIKaK2VE0IdHorAnIW4nAjtWLvE8L5/tv7QPriKg+uwqgxN9LMrsp/3qXte75sUarlXEDezsdobZ8aZ87UuCq9f0oQ6Kw0ZhYaURcYPpIhCnxOzJ8ZI5NzTvYtrkJUd5P9Re7Gf0xRfn235nOE5DCGJo2gsDu9Y9BH/CkdK5zC/pZyiscBMUb7kt8GmS4ZzSDzbwAQdc8C+NhGCV1nrLLg8OsnFeJsfkTQ/eUJdL7/WPnF/YrcExUzAmZ3TCbqHwtyRlPzvhqXpiZzGt0wTFW92YGGVVRlSJm7tcU1Wh871nPRyNf4zK1P8hN3uq/S73xdPoHkjJqAztCO6PeEV5Hqj2ain0m6VGylh306Ygd7W/yzoNwZauKzO7XmiNUEeVBo10I0zk7kx102iQMjatJBtoXDy3whhD3J+8ox811lI/lGtFjgVckbuCMxDYFDQ+y1oMoRM6OmGdNxTzA3ZdrYes/9DbxH8sB2ZoWjHg79p8f4DS9aLHU9j94W+erxYtGGdwnoxdbAFI1xwppwjd4uNGmCwShEGwALjVAgK4OqnCdyqiFJCfM5+3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(376002)(366004)(136003)(346002)(39860400002)(41300700001)(7416002)(26005)(6512007)(6506007)(38100700002)(6666004)(2906002)(52116002)(38350700002)(2616005)(1076003)(186003)(316002)(66476007)(8936002)(478600001)(4326008)(86362001)(66556008)(8676002)(66946007)(5660300002)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pDsF/S1ZvpdGeCRUMIhnVpGmNfOO626f98vlH5GS8Zpit+ajRHsQh5AK1MWU?= =?us-ascii?Q?AsM32QEGlCOF3nwabjny6cPhA3y22CvrEO+rBY78m6MaRMyVaL5hu+mIPCQG?= =?us-ascii?Q?iUjHoBxpEnrvGNKwmLbj/aUjj0pdhpE3EgihJ429y8MhYrvV21K5WjjOOjQ/?= =?us-ascii?Q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gxJEuISwp7v?= =?us-ascii?Q?zuHGBQqILsfTldP+O+K3vvqXELDchMjAR+rnzzE85ZQecBCtxaWPYAmZQyuc?= =?us-ascii?Q?/m24W4hgjXY7oRblQSBNq/zCkWBgDuBo6YRw+zRhkKTh3Iu44I9Fyy1co365?= =?us-ascii?Q?G47smR1gTtlXnR6+nMHQTVoL+OgZYQy5l1wNa3BK52+5E8N+BfHHCRkEpxrT?= =?us-ascii?Q?5xJN9LoLAY2cDayojaNXsdxusCxuVVGFLA6JNzcxAYazFHRPz27/4aWsJ1kz?= =?us-ascii?Q?2K8g9Tlb6s4nQtGYwuKXbfu5szrEvPg+KxgViKCZ77la16wkjFHhWbtM8xxv?= =?us-ascii?Q?/8VNQL2CNqj3eFQ/FzCWCGmMU27mvnZ0V1QITAhaPxVTnDXVqiNOS2vmnDlG?= =?us-ascii?Q?yDVm2/CJ6Jap5oYetibJDylaqZf2rI8EscA/wWoXLVRFlDZzvbwsCMRGahcK?= =?us-ascii?Q?p9VheHuAt37eLN5ePCvNZKxRnlN9ogq3wVeFNM8Yo9JWOJunbzUOslQdfTDl?= =?us-ascii?Q?mscJBcaHdICTMpUBgtKt6XRPcDB2mZtTLZmSVujX?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dbfbec4-6e94-46b5-4ea1-08da694a7d9f X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2022 05:49:48.5079 (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: E+XRRjylGH/nyFvjLfBsF/gGZlNwBxkjBxMWgfPdu5LLhJ8jDB/oJ4tAmfwbdPHvfeEqVnZc1xbWeFdip5qZjw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB2937 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 From: Peng Fan i.MX8MP HDMI supports HDCP and HRV, so add them. Signed-off-by: Peng Fan --- drivers/soc/imx/imx8mp-blk-ctrl.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c index 6f983adcb47c..527d45d12a54 100644 --- a/drivers/soc/imx/imx8mp-blk-ctrl.c +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c @@ -235,6 +235,13 @@ static void imx8mp_hdmi_blk_ctrl_power_on(struct imx8mp_blk_ctrl *bc, regmap_set_bits(bc->regmap, HDMI_RTX_RESET_CTL0, BIT(12)); regmap_clear_bits(bc->regmap, HDMI_TX_CONTROL0, BIT(3)); break; + case IMX8MP_HDMIBLK_PD_HDCP: + regmap_set_bits(bc->regmap, HDMI_RTX_CLK_CTL0, BIT(11)); + break; + case IMX8MP_HDMIBLK_PD_HRV: + regmap_set_bits(bc->regmap, HDMI_RTX_CLK_CTL1, BIT(3) | BIT(4) | BIT(5)); + regmap_set_bits(bc->regmap, HDMI_RTX_RESET_CTL0, BIT(15)); + break; default: break; } @@ -283,6 +290,13 @@ static void imx8mp_hdmi_blk_ctrl_power_off(struct imx8mp_blk_ctrl *bc, regmap_clear_bits(bc->regmap, HDMI_RTX_RESET_CTL0, BIT(12)); regmap_clear_bits(bc->regmap, HDMI_RTX_CLK_CTL1, BIT(22) | BIT(24)); break; + case IMX8MP_HDMIBLK_PD_HDCP: + regmap_clear_bits(bc->regmap, HDMI_RTX_CLK_CTL0, BIT(11)); + break; + case IMX8MP_HDMIBLK_PD_HRV: + regmap_clear_bits(bc->regmap, HDMI_RTX_RESET_CTL0, BIT(15)); + regmap_clear_bits(bc->regmap, HDMI_RTX_CLK_CTL1, BIT(3) | BIT(4) | BIT(5)); + break; default: break; } @@ -365,6 +379,22 @@ static const struct imx8mp_blk_ctrl_domain_data imx8mp_hdmi_domain_data[] = { .num_clks = 2, .gpc_name = "hdmi-tx-phy", }, + [IMX8MP_HDMIBLK_PD_HRV] = { + .name = "hdmiblk-hrv", + .clk_names = (const char *[]){ "axi", "apb" }, + .num_clks = 2, + .gpc_name = "hrv", + .path_names = (const char *[]){"hrv"}, + .num_paths = 1, + }, + [IMX8MP_HDMIBLK_PD_HDCP] = { + .name = "hdmiblk-hdcp", + .clk_names = (const char *[]){ "axi", "apb" }, + .num_clks = 2, + .gpc_name = "hdcp", + .path_names = (const char *[]){"hdcp"}, + .num_paths = 1, + }, }; static const struct imx8mp_blk_ctrl_data imx8mp_hdmi_blk_ctl_dev_data = { -- 2.25.1