From patchwork Mon Jul 11 06:24:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 589568 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA87DCCA47B for ; Mon, 11 Jul 2022 06:23:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbiGKGX2 (ORCPT ); Mon, 11 Jul 2022 02:23:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229594AbiGKGX0 (ORCPT ); Mon, 11 Jul 2022 02:23:26 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80070.outbound.protection.outlook.com [40.107.8.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A906F1929D; Sun, 10 Jul 2022 23:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MtE77Vwxg6y4IUel2k/rUknjoMGFwKlwU2GqofvRv8Dd7Y0DchynoRaenE1wZgXe/aY8nklx33F2dpkNGSMvtcD4ntRSaafvWpXc2QT4i3dfHpR8HjUA1PSm6YOgEjPetl4ECAaQj75JroC9O7qWXQR5jxvQnzOjG9/N+fSddBSh8tkqHZqfRHxjLAcd/MCiuqGaQKYDSdNeyMUW/AEjB6Qmpv5mf8nKnlYkgDJmVp1RIfy9WQT218q7Uqats/QLQQ5ja/ON/9gDU6YVfnQCIvwOrzYtk7Fb2kdt4wrqu25v6QI+mHL+cT/oOkry/5OyFW6106ZDpjuwaj3VYZc4ZA== 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=FYqteWnq0EMa8IWuaaYYRk7VojM+EMQNIMUSx/73P/8=; b=DTUGIeX4Fnfjiz14g0IEvGtYgdwZ6h2//FKGnpIMMS7WZwdMAfI5mkIY79GkhkOGywdsf8sJiNo4ZdBeqRsbb0XcZWY5qalGYVkZyGXhI5bhDToAaHxlAZCqPmChfkVLlE0gk9Wle5Ckq09Sp4csMP+5FKk2AyPapPGHSsQQtogfI+//wYnifo4odUeZpkZuToriLVdZcyddImtmS2oPabcpshuq3DPl7S2JiVcWcHb/rNFbw4douBwB3UU7jcgUsTIB4gYbOpFRqx3aRw2jjocGZg7/gnKZm8feY0clJB95voO6ZwUQ+2vQxkQVPRYe+azLW1pn522us1i7RdYA1Q== 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=FYqteWnq0EMa8IWuaaYYRk7VojM+EMQNIMUSx/73P/8=; b=C7Ol4fFTNoWVcC2hm+0ZBmP/reeWr+YRUmoOO2oi/7zv7p3OkXmnqllIYAY1ePK3ZGN3mL68yQbvrn+NqTko9A6RezqjAbW3NHMAs/R+2f/kOMYo3QtXyLAjcFklfP7SrNnBrxh21ZFKhwoo00YmRGQiYgAJqRVIO+ZxqIePbcw= 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 DB7PR04MB5212.eurprd04.prod.outlook.com (2603:10a6:10:20::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Mon, 11 Jul 2022 06:23:22 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::fdd4:8557:334b:180d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::fdd4:8557:334b:180d%7]) with mapi id 15.20.5417.026; Mon, 11 Jul 2022 06:23:22 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: aisheng.dong@nxp.com, l.stach@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan , Krzysztof Kozlowski Subject: [PATCH V5 2/6] dt-bindings: soc: add i.MX93 mediamix blk ctrl Date: Mon, 11 Jul 2022 14:24:48 +0800 Message-Id: <20220711062452.3575032-3-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711062452.3575032-1-peng.fan@oss.nxp.com> References: <20220711062452.3575032-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0182.apcprd01.prod.exchangelabs.com (2603:1096:4:189::20) 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: 1bf0791f-1fb9-4e4a-c775-08da6305dab4 X-MS-TrafficTypeDiagnostic: DB7PR04MB5212: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: 012U6GJwwxl8nOgDE9f4gNbUBOh7eYCfRKjNf5J9ZHcvSxV0frjNrIO5mjO7H74qZRFVEyfAMxP4CaB0NueQdckVT/ilroIW5VzEbNg/o7LW88ChwHe9hWfU8hpPC4F1X/dmMnqItGgkKFo6TWyL4Oy9h3geRfp+y8jIlyLxRW3NXTYhBtPbVEQT5A8BbnicgA0HfOOZX9RETh9IGkQI62ssQZXHjIAoYerpLW3OPsBShad4kEB3JO5npImScKA4OEecBl0h+bdHy28mZWiJ0xotagaVQjOZln1Buk6OfyqMDjvRxH9Yftyg0YePWJT/yVh8qOkznOhzDvveU8IrG78NBT3XY4CYMhNTDKsW549ZvR2SYJlD1dB1FNPtVtDbyl2ssvrG/SY6Yk6ZkxlbZOhtWi57jLack1WnHEL4z2ziewtaF8NwDnj/AzYm2Fke56r7Yj190tQC1ss68dGh/T0aKyEuIhbCRKcg1PTmoOOqxczsG29Ukc35W0zCK29xSaBxu34jZQFCc9/HvMOcb/pDKjywJDVUAxSLR6uDoSWW2m+IXVAkf/DP6RBUQDPnJNexDJV7qKMyxR82R83X4+oMXF5SXWM9IjqX6iHbesVOtGp8Y9TRPUdSfb5BolICT98RIL+Jd+jjOa7ZMeiasNfdbHmbWISPoW9FOYfNBwG/dTul6YHx5/JNcNpCAS/hBC2mDUGltQPKTXZs/477d6//Gi3ncb7b4Kw7MvAq1xq/K93Qf66kshNaeQ1QxxmqzC7tUp3hNGLxWvYxsbHZ/p6sH9QWSx7owHa8o1qv/cvGEvmft+13Ybzu1EQ4ANGpOfWXE8TFJgNapalM8vTIguQz5abpQJ7s9bq5HCq96CcGCWy2oPy1CCsGOyl+1yJ0gFrGFjT/enIEPBbs6oHChg== 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)(39860400002)(376002)(396003)(366004)(136003)(346002)(66946007)(1076003)(66476007)(26005)(6512007)(66556008)(4326008)(8676002)(8936002)(5660300002)(186003)(2906002)(7416002)(316002)(54906003)(83380400001)(86362001)(478600001)(6506007)(41300700001)(6666004)(52116002)(2616005)(38100700002)(38350700002)(966005)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wrLhbdEfVE6kVJcYT9EszJ5Nvbj9pskvzdoQN0Ci6BJWYmvOYZNLKxETKvpSJ+U4G/1NOZFXX6nzng3aM+ajjzi97U/beldgPdEbmLFxjWRbJBXDQipHsf0dmO4dZSpEpgeiIwwB6u573BYZuJ5CbavqauCF1GaALNwjOFBVinW/goVc+VRNCvWLzQUSBByJbKHQ+PSNm8o0VVSBQiJzTC/D6RH9F/guRIUQPb/lnXsIkbvuSuz8K+feLIfE89QvtP4At8hvCi4D1UehDJi15noAiO+YEPbBjGg8/LVT4TTwiL0P//L7J7HK/ej4BZ/IAmaZl+PdvKEmjLTSQHD9sKNaoxSL4wwDHSOqUzp6tmrCTE0AlpNiSmZ0+U+sbRKr+favBCrIWvvc+QjZ9q9QlvV4QgqIC3ic3/yBPMt7p6o0HOQahAkeEvRJE8J1l81geylSZfsuFPaahNp2FoHPcG/1Q4RrFYFUqwqZVnqwsWFoC/LfGK/Sc8yzRJbhk9O3WBDZ5LQlcQM9nTU6eoPRc7REVuG7fS0b88w5fgAXMX52+nok6vmGKqPwJ1Zj3EOUWb8G1YLzxXlYaunPUtPuKtTwJw1dtmdW3mz60wvGOOSwk46XOqdxaxqNVjp58R3v4C83hvrNzI1WbEf7dRUi2Qy7cjNdlTtOyg+3x3heXX/NrpFk+emqeF7gZP6jqfLriFY7P/Q+yQxVXzPik7F4Ncbr1K2eQh+OsqeCv5rwXu/Zuo1NLKmNeQbNvZYpKuV/WcJjs2I5gTIYdbEkl2kzaAIPfEDxhH5Ndxm8TW6H0JCQckm5rggcXdtOGW05TYd42DkAHxQoZt1yO5jWfX1ZazTYvrCHMXLBwwPF4PFYfh5gEEmm1rED+fTW++wOGZksLruvfqWs707Dc1VqcQYPM21d3TOuEGN2xToZN7rSCGVzuEPWx5b5vvA1+Zikhh+3DkRqExV1Dh9jzX4uUc3Wn6v2XIvlFt5CejUiDVUanI2nsixlN0JV3oJ/wKRPiBSrHBBUNES/WxHjnUmDuIT5PkCozzhb+x0CFKHz2BmZYfKtBT4WnEHGVMtRSG2ti4MOe/KERx3ek7VkzMNRdFJJglgkB1zqFsds0f0xwqANbkfxa1Ed3xVqJtAOHBIg8bh6mdqGuVvlu4As6yPWHDH7EYNWp3B3vVo6qWeQ5hh22K0zqHLIUk5lX1k7CdOIZiWYRUU1Z2b67Zhciab+2hdhlfIAOWIPoe1/kRb6hlXZ5pnj0V8YKRulA30IyiHdKyn4B/LwBEnOSAX1m0SYo5YCmMI57I44qW5J2z8sn28dfDPzq8luhBNa133aFn9pMEGBpxITbko8dUUffDeiD+4VTNzCgJfrwiEWlQcgywuzp4M6u15cSJ6Qrh+BvRpTv1ZT0DUQtP+Hga5OmEpIzvxuYk44qZ3fszgF8N2qKVFze6+r16K7Pxki7TE/qM1B6jLaEW5UzViAGKzmhsRkXlr5f+NEINzAretxnXaf/UIWClwpA19Jb+s5K1cvn6etRuv2IZq0Es/CCW8JdJI3iDzQF68OQiHdvS1BMWUQSRA3s15fxfcrkRIbRhC3qxkcdCTn X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bf0791f-1fb9-4e4a-c775-08da6305dab4 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2022 06:23:22.3488 (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: ANgWwQVYAeI5oBuROzfTfSQU4y7ZOyHQZdx4xK3OM+SVMZigAFfw/x5kvN0Gr1Jc9J8Aasflhw40hk8NT4JU6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5212 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add DT bindings for i.MX93 MEDIAMIX BLK CTRL. Signed-off-by: Peng Fan Reviewed-by: Krzysztof Kozlowski --- .../soc/imx/fsl,imx93-media-blk-ctrl.yaml | 80 +++++++++++++++++++ include/dt-bindings/power/fsl,imx93-power.h | 15 ++++ 2 files changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml create mode 100644 include/dt-bindings/power/fsl,imx93-power.h diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml new file mode 100644 index 000000000000..792ebecec22d --- /dev/null +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/imx/fsl,imx93-media-blk-ctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX93 Media blk-ctrl + +maintainers: + - Peng Fan + +description: + The i.MX93 MEDIAMIX domain contains control and status registers known + as MEDIAMIX Block Control (MEDIAMIX BLK_CTRL). These registers include + clocking, reset, and miscellaneous top-level controls for peripherals + within the MEDIAMIX domain + +properties: + compatible: + items: + - const: fsl,imx93-media-blk-ctrl + - const: syscon + + reg: + maxItems: 1 + + '#power-domain-cells': + const: 1 + + power-domains: + maxItems: 1 + + clocks: + maxItems: 10 + + clock-names: + items: + - const: apb + - const: axi + - const: nic + - const: disp + - const: cam + - const: pxp + - const: lcdif + - const: isi + - const: csi + - const: dsi + +required: + - compatible + - reg + - power-domains + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + + media_blk_ctrl: system-controller@4ac10000 { + compatible = "fsl,imx93-media-blk-ctrl", "syscon"; + reg = <0x4ac10000 0x10000>; + power-domains = <&mediamix>; + clocks = <&clk IMX93_CLK_MEDIA_APB>, + <&clk IMX93_CLK_MEDIA_AXI>, + <&clk IMX93_CLK_NIC_MEDIA_GATE>, + <&clk IMX93_CLK_MEDIA_DISP_PIX>, + <&clk IMX93_CLK_CAM_PIX>, + <&clk IMX93_CLK_PXP_GATE>, + <&clk IMX93_CLK_LCDIF_GATE>, + <&clk IMX93_CLK_ISI_GATE>, + <&clk IMX93_CLK_MIPI_CSI_GATE>, + <&clk IMX93_CLK_MIPI_DSI_GATE>; + clock-names = "apb", "axi", "nic", "disp", "cam", + "pxp", "lcdif", "isi", "csi", "dsi"; + #power-domain-cells = <1>; + }; diff --git a/include/dt-bindings/power/fsl,imx93-power.h b/include/dt-bindings/power/fsl,imx93-power.h new file mode 100644 index 000000000000..17f9f015bf7d --- /dev/null +++ b/include/dt-bindings/power/fsl,imx93-power.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Copyright 2022 NXP + */ + +#ifndef __DT_BINDINGS_IMX93_POWER_H__ +#define __DT_BINDINGS_IMX93_POWER_H__ + +#define IMX93_MEDIABLK_PD_MIPI_DSI 0 +#define IMX93_MEDIABLK_PD_MIPI_CSI 1 +#define IMX93_MEDIABLK_PD_PXP 2 +#define IMX93_MEDIABLK_PD_LCDIF 3 +#define IMX93_MEDIABLK_PD_ISI 4 + +#endif From patchwork Mon Jul 11 06:24:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 589567 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44FC3CCA47B for ; Mon, 11 Jul 2022 06:23:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbiGKGXo (ORCPT ); Mon, 11 Jul 2022 02:23:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbiGKGXe (ORCPT ); Mon, 11 Jul 2022 02:23:34 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150043.outbound.protection.outlook.com [40.107.15.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33501C14; Sun, 10 Jul 2022 23:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cYtxz/54D18NjOn2LV8SDvt4F9AiKjDHuWa+ikOI9QRR4X74XQGC9fbRjVOQIQSeWuMDjfXSmsBvIutHJUHIvQ0Li2JL7ld2T3wPIXaCgu9VSzSqiQpMOMrw3536oCI6/ZqOwXFtWW90DOc9Zl6nN041BW1tmzBIy8ootc0lWPbUxO/VEQHGQIsjLQD5CIEu3HXy+yLzQdTAGB0H4A6cK6h7ctrkDfBoJAcQ9XMLI3gyIk1ddh2WvzClra/bFvaBozMfactkaooHGru/rwtNlBJE8U0Iw3nMX9Egtvimv8GbUkE5/f1Is18KHfdGNSyYVnr+kZWRarbjMZ/ugzreLw== 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=S79pV74eJBAb7LbBVc7vkbPAG7WWTIoZohKoHg2Z1sc=; b=e5on1FbIn5cCIUv2/kiT3P6BkfqxAH7sdIkQxG56IKjvqQLVNErcjgLYr5HPSTZkoMKySeJg3qHvj9A7YjEFznKegPmf5HzWda1SWbMoGE8FVS/1MzTeSwb+IdNqxsQhdpLQ3i50fizQl1lm6kHo/2owbAFh7MrnGdpu3wAwgbRJLz3f6PD4yrqdCGqvj6gxq6UDM9JV8FKJREYeyMTAafRV3WXIgviGIyDACAp3FBsQmXzkK0/4bhlPX1Ty/UtdTBtvMOc2O9U/vpoiTQ/AN3EBxWiKcJwZByUwD+QZQnB061dpTw2Iq+qyutkJ/3pVNQMbNb35YOaFJFvimqTeCQ== 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=S79pV74eJBAb7LbBVc7vkbPAG7WWTIoZohKoHg2Z1sc=; b=UNAaOR/ched6zHCT4LMnjm1OTkl6U6vZk+K2F8nbZt+V9BHmVOBf5v4kwnvjn4HtFasxESCdUE4eLEXwQTzZn81RYyFU0sG5wvuMFPswgYgy5E5aZJQG/+x2VxLEX9tvPIlW+ilqZpUlGjiP8S5CGQ38du04LydjuIb2Oh5u7no= 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 DB7PR04MB5212.eurprd04.prod.outlook.com (2603:10a6:10:20::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Mon, 11 Jul 2022 06:23:30 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::fdd4:8557:334b:180d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::fdd4:8557:334b:180d%7]) with mapi id 15.20.5417.026; Mon, 11 Jul 2022 06:23:30 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: aisheng.dong@nxp.com, l.stach@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan Subject: [PATCH V5 4/6] soc: imx: add i.MX93 media blk ctrl driver Date: Mon, 11 Jul 2022 14:24:50 +0800 Message-Id: <20220711062452.3575032-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711062452.3575032-1-peng.fan@oss.nxp.com> References: <20220711062452.3575032-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0182.apcprd01.prod.exchangelabs.com (2603:1096:4:189::20) 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: 0ad76f5b-9a12-4e56-c3a0-08da6305df64 X-MS-TrafficTypeDiagnostic: DB7PR04MB5212: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: G2ZMj6kOZ271+JL3KPU0yPUmWYfVdJJEjOkGKPOHpshLHMH8PvD3gCgGxIpZxpBVUeHWZxlCk2RPKPVW+7MiVlwY7dqnr4kFc6DQbitATeHDUFXU3+3aKaaMs6Z3pgvjw/1R0NIQElIdDixOO1q9jWmKIFAMikkGQdpOdBKQOB3XZHcFjAmSwBUfcjA92YRjPlfwxMnE73RgDIwJXa89z6c/F1taxFjIdEZTEY8n2t/g2GBZ74nUtcQTGflwceXtfSPJoGDcpTM5hsBB+JBM+o2CJT1zgxjxQWS2pftQbF1r/xT8xfJFBM5z/p3skNK3nlYhl6cOyIc3Dgvvq/7/xTaw8vkaJeEWpqAOJQ+7FGXEok0JhKL9vK9ze4ydjrepUABJ4LBH2EsyTQ4Islc9oYC7WfMGWf3nPPb3FbABCycBYG7C7rXzbEmaPge4HdbfrdOrQmXc8AtsgsnuUnGnunF2cWlcB5Ld7j02lVoTyWtMDMcf0OHeT6TYxn1H7G1FED7T+QVWAojcnke5KxJuthqQcuaxhS2nY+EG47GJC4CbW7GtrSRz2xFs1RhME9SG74KjHpdtFcrh8lDDWcIsyk2hTbpajEdLaIzmH5o1VjcWVxonyJ45svnRP3O2iz1P5x2V3uUNRl0+iZpyRrcAslEFYhFvifGlBI9O1FPNOzUWkezaJNbUzkEpyDqHiYdB/w4nrFgzA0oQGJq/velMX2JAhAOdqSfttQ+g0Z34s+DJYcqrBE35LQT8a0YqQg8j/MZgQV3GYvIGKonUlindSFUgmmrc6W7JJ4j6r49OK1Ane2h3MGHROiq7tI/Yi79l 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)(39860400002)(376002)(396003)(366004)(136003)(346002)(66946007)(1076003)(66476007)(26005)(6512007)(66556008)(4326008)(8676002)(8936002)(5660300002)(186003)(2906002)(7416002)(316002)(83380400001)(86362001)(478600001)(6506007)(41300700001)(6666004)(52116002)(2616005)(38100700002)(38350700002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ydlMqQhsGfmSa5qUQ6NgZVoUAOlVYb0tE47Y6KWXpT0Nlnf9mC2qnd6pruARHk0r6r4uNwJr3Mk5VZpyYfp8mrI5q+cAkvdW3DciQPkp008sT0bv8RYY7qb2jXg63nEL5RyXjhZx+qn/y1Uzk5OEnOjGebQQJd2w6+rYBGa/4AvVvg5eisalT9slaSXBKObq6dQGuryIPlchfzCQoxmQq+sndID1opi93iYTZC/ZbPwt3Nlz9NhUEZiAGGJ1IkCcUnK3PoxZwDkyGuQZmfDVRJHlLU+sE9MvLM2W9nrnLE+Av8dRyPs6+5uVv3/VKurZ3+AIesARni/CE37UhhS64PVNr4ltQuTkCkV77p6XLD07tC4R24nXC8qIAp0j2AaI5rURjoRHmG3t43jqBSVdVJqdiT1n/PUAcY+vWkui3WZlKbSqIp+S1HX7SWddlouwn+4bOPLkF6EQK1EkVU7DIssq6Ula3yiQaAL2SFLDYPd81KU35iQWrxrb1EDuFKcDDIFb26iY+j1XgHwL8S2NVqX6cVMbC6WDmL1m441mk+sJtBJVA7/WBOU0nOANwIiVvqLPf57dPostVFP54ENZ3J1IFHA9PD5drgWNNwxN/VjO2a4G0WFbRmIFf8s8mGMuVIEEnwXQygogI3qrmBUym6ed9DXKMJCPiyLKTxku/BKue9JUsvYnn9TuH7dIvIQ+5WnLt0EG0wgR/45zQPD26m9RVsJ1+8hixMUJ1/lbg7GyY79jPHnixMxZU2OfiD6iBWD+dB2nrBiwzSWHm9Vg6vixKbEeT0QqFMp9WW9+rIwGCIJWJS8hcCktv8a/npvlCVBTQU8XYnClg/IsV+BfSVCaLGGYqIfZ4PlW6SQNL+KvTyGjVzanrUxruFxlN+K+IdTkn1oWlfXLOLjxzafS5FDam3hdVS+gfTJH2gi8Gs5kglounR2nW4oy2GmEZCwa4aqUuwCXmLaLKqKP9+IIoB9q381Ghl984FbJd62JEZsw3wkHhw5F6edniw64ITQ4ofCG/DyuC0vFOEgsgy215wqxaD0006HobuWjyV4qmWN0MEdXgATPj5tp1o6sKk8xI/c0/gQO7CB+kOkNnZWAPNri84iv4s8HEKGPzdbgcU42jUHcSBCk9t55XI9eH4xQCcjHZGI5HppPpzZFlfPfbsullvVXW+OWkP7LHH+oFLTm/FsfRzTZHoiHyenQRtIiTfAMO0jfVqDtZuMHxX4oJ55qgR6FFpeNksXX3OXVNJOSnAUDUiTMHqNHayXI+pHBjFjhtadHPWkvrTU5C3f3e9XCkFJtgm2nNyvjYBkM+BfCJZDw7DD8stStD24vn7iCxG+gjDDjV02/D+7EyiCWAfHxz1/XnHiX1LxL8sCul1CioOn6/fniUPI7AXxfXKYISIL783a81+p9IHakiLJR3lUxiVLsIOQgMvNGXBX3PZ7OzelUolsJjSgYYy5CuIf0X3E/8VQTk/w992uzsXkfoQJ0gTu6ONahWzpVjGMNjRegnZalRgOftAeXpj236Dx6OHrXxxypNPEZcAEMXuPK2IvRGBXATiZGoLuTX++F0DrKQyUfDUqWcBamiudMpwUr X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ad76f5b-9a12-4e56-c3a0-08da6305df64 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2022 06:23:30.2755 (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: qW3e2u8TXz0QqmFrYaJdK2yuc/JbmSS8mkfIkAuyH8oTJl4uI+3rs7c0ys8TBnWL/byY0vV8QEJgeO0hZ/dTSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5212 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add i.MX93 mediamix blk ctrl support. Signed-off-by: Peng Fan --- drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/imx93-blk-ctrl.c | 333 +++++++++++++++++++++++++++++++ 2 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/imx/imx93-blk-ctrl.c diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile index a0baa2a01adb..754866e0a10d 100644 --- a/drivers/soc/imx/Makefile +++ b/drivers/soc/imx/Makefile @@ -7,4 +7,4 @@ obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o obj-$(CONFIG_SOC_IMX8M) += imx8m-blk-ctrl.o obj-$(CONFIG_SOC_IMX8M) += imx8mp-blk-ctrl.o -obj-$(CONFIG_SOC_IMX9) += imx93-src.o imx93-pd.o +obj-$(CONFIG_SOC_IMX9) += imx93-src.o imx93-pd.o imx93-blk-ctrl.o diff --git a/drivers/soc/imx/imx93-blk-ctrl.c b/drivers/soc/imx/imx93-blk-ctrl.c new file mode 100644 index 000000000000..42be09688cf1 --- /dev/null +++ b/drivers/soc/imx/imx93-blk-ctrl.c @@ -0,0 +1,333 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/* + * Copyright 2022 NXP, Peng Fan + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define BLK_SFT_RSTN 0x0 +#define BLK_CLK_EN 0x4 + +#define BLK_MAX_CLKS 4 + +struct imx93_blk_ctrl_domain; + +struct imx93_blk_ctrl { + struct device *dev; + struct regmap *regmap; + int num_clks; + struct clk_bulk_data clks[BLK_MAX_CLKS]; + struct imx93_blk_ctrl_domain *domains; + struct genpd_onecell_data onecell_data; +}; + +struct imx93_blk_ctrl_domain_data { + const char *name; + const char * const *clk_names; + int num_clks; + u32 rst_mask; + u32 clk_mask; + +}; + +#define DOMAIN_MAX_CLKS 4 + +struct imx93_blk_ctrl_domain { + struct generic_pm_domain genpd; + const struct imx93_blk_ctrl_domain_data *data; + struct clk_bulk_data clks[DOMAIN_MAX_CLKS]; + struct imx93_blk_ctrl *bc; +}; + +struct imx93_blk_ctrl_data { + int max_reg; + const struct imx93_blk_ctrl_domain_data *domains; + const struct imx93_blk_ctrl_domain_data *bus; + int num_domains; +}; + +static const struct imx93_blk_ctrl_domain_data imx93_media_blk_ctl_bus_data = { + .clk_names = (const char *[]){ "axi", "apb", "nic", }, + .num_clks = 3, +}; + +static inline struct imx93_blk_ctrl_domain * +to_imx93_blk_ctrl_domain(struct generic_pm_domain *genpd) +{ + return container_of(genpd, struct imx93_blk_ctrl_domain, genpd); +} + +static int imx93_blk_ctrl_power_on(struct generic_pm_domain *genpd) +{ + struct imx93_blk_ctrl_domain *domain = to_imx93_blk_ctrl_domain(genpd); + const struct imx93_blk_ctrl_domain_data *data = domain->data; + struct imx93_blk_ctrl *bc = domain->bc; + int ret; + + ret = clk_bulk_prepare_enable(bc->num_clks, bc->clks); + if (ret) { + dev_err(bc->dev, "failed to enable bus clocks\n"); + return ret; + } + + ret = clk_bulk_prepare_enable(data->num_clks, domain->clks); + if (ret) { + dev_err(bc->dev, "failed to enable clocks\n"); + return ret; + } + + ret = pm_runtime_get_sync(bc->dev); + if (ret < 0) { + pm_runtime_put_noidle(bc->dev); + dev_err(bc->dev, "failed to power up domain\n"); + goto disable_clk; + } + + /* ungate clk */ + regmap_clear_bits(bc->regmap, BLK_CLK_EN, data->clk_mask); + + /* release reset */ + regmap_set_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask); + + dev_info(bc->dev, "pd_on: name: %s\n", genpd->name); + + return 0; + +disable_clk: + clk_bulk_disable_unprepare(data->num_clks, domain->clks); + + return ret; +} + +static int imx93_blk_ctrl_power_off(struct generic_pm_domain *genpd) +{ + struct imx93_blk_ctrl_domain *domain = to_imx93_blk_ctrl_domain(genpd); + const struct imx93_blk_ctrl_domain_data *data = domain->data; + struct imx93_blk_ctrl *bc = domain->bc; + + dev_info(bc->dev, "pd_off: name: %s\n", genpd->name); + + regmap_clear_bits(bc->regmap, BLK_SFT_RSTN, data->rst_mask); + regmap_set_bits(bc->regmap, BLK_CLK_EN, data->clk_mask); + + pm_runtime_put(bc->dev); + + clk_bulk_disable_unprepare(data->num_clks, domain->clks); + + clk_bulk_disable_unprepare(bc->num_clks, bc->clks); + + return 0; +} + +static struct generic_pm_domain * +imx93_blk_ctrl_xlate(struct of_phandle_args *args, void *data) +{ + struct genpd_onecell_data *onecell_data = data; + unsigned int index = args->args[0]; + + if (args->args_count != 1 || + index >= onecell_data->num_domains) + return ERR_PTR(-EINVAL); + + return onecell_data->domains[index]; +} + +static int imx93_blk_ctrl_probe(struct platform_device *pdev) +{ + const struct imx93_blk_ctrl_data *bc_data; + struct device *dev = &pdev->dev; + struct imx93_blk_ctrl *bc; + void __iomem *base; + int i, ret; + const struct imx93_blk_ctrl_domain_data *bus; + + struct regmap_config regmap_config = { + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, + }; + + bc = devm_kzalloc(dev, sizeof(*bc), GFP_KERNEL); + if (!bc) + return -ENOMEM; + + bc->dev = dev; + + bc_data = of_device_get_match_data(dev); + + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + regmap_config.max_register = bc_data->max_reg; + bc->regmap = devm_regmap_init_mmio(dev, base, ®map_config); + if (IS_ERR(bc->regmap)) + return dev_err_probe(dev, PTR_ERR(bc->regmap), + "failed to init regmap\n"); + + bc->domains = devm_kcalloc(dev, bc_data->num_domains + 1, + sizeof(struct imx93_blk_ctrl_domain), + GFP_KERNEL); + if (!bc->domains) + return -ENOMEM; + + bus = bc_data->bus; + + bc->onecell_data.num_domains = bc_data->num_domains; + bc->onecell_data.xlate = imx93_blk_ctrl_xlate; + bc->onecell_data.domains = + devm_kcalloc(dev, bc_data->num_domains, + sizeof(struct generic_pm_domain *), GFP_KERNEL); + if (!bc->onecell_data.domains) + return -ENOMEM; + + for (i = 0; i < bus->num_clks; i++) + bc->clks[i].id = bus->clk_names[i]; + bc->num_clks = bus->num_clks; + + ret = devm_clk_bulk_get(dev, bc->num_clks, bc->clks); + if (ret) { + dev_err_probe(dev, ret, "failed to get bus clock\n"); + return ret; + } + + for (i = 0; i < bc_data->num_domains; i++) { + const struct imx93_blk_ctrl_domain_data *data = &bc_data->domains[i]; + struct imx93_blk_ctrl_domain *domain = &bc->domains[i]; + int j; + + domain->data = data; + + for (j = 0; j < data->num_clks; j++) + domain->clks[j].id = data->clk_names[j]; + + ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks); + if (ret) { + dev_err_probe(dev, ret, "failed to get clock\n"); + goto cleanup_pds; + } + + domain->genpd.name = data->name; + domain->genpd.power_on = imx93_blk_ctrl_power_on; + domain->genpd.power_off = imx93_blk_ctrl_power_off; + domain->bc = bc; + + ret = pm_genpd_init(&domain->genpd, NULL, true); + if (ret) { + dev_err_probe(dev, ret, "failed to init power domain\n"); + goto cleanup_pds; + } + + bc->onecell_data.domains[i] = &domain->genpd; + } + + pm_runtime_enable(dev); + + ret = of_genpd_add_provider_onecell(dev->of_node, &bc->onecell_data); + if (ret) { + dev_err_probe(dev, ret, "failed to add power domain provider\n"); + goto cleanup_pds; + } + + + dev_set_drvdata(dev, bc); + + return 0; + +cleanup_pds: + for (i--; i >= 0; i--) + pm_genpd_remove(&bc->domains[i].genpd); + + return ret; +} + +static int imx93_blk_ctrl_remove(struct platform_device *pdev) +{ + struct imx93_blk_ctrl *bc = dev_get_drvdata(&pdev->dev); + int i; + + of_genpd_del_provider(pdev->dev.of_node); + + for (i = 0; bc->onecell_data.num_domains; i++) { + struct imx93_blk_ctrl_domain *domain = &bc->domains[i]; + + pm_genpd_remove(&domain->genpd); + } + + return 0; +} + +static const struct imx93_blk_ctrl_domain_data imx93_media_blk_ctl_domain_data[] = { + [IMX93_MEDIABLK_PD_MIPI_DSI] = { + .name = "mediablk-mipi-dsi", + .clk_names = (const char *[]){ "dsi" }, + .num_clks = 1, + .rst_mask = BIT(11) | BIT(12), + .clk_mask = BIT(11) | BIT(12), + }, + [IMX93_MEDIABLK_PD_MIPI_CSI] = { + .name = "mediablk-mipi-csi", + .clk_names = (const char *[]){ "cam", "csi" }, + .num_clks = 2, + .rst_mask = BIT(9) | BIT(10), + .clk_mask = BIT(9) | BIT(10), + }, + [IMX93_MEDIABLK_PD_PXP] = { + .name = "mediablk-pxp", + .clk_names = (const char *[]){ "pxp" }, + .num_clks = 1, + .rst_mask = BIT(7) | BIT(8), + .clk_mask = BIT(7) | BIT(8), + }, + [IMX93_MEDIABLK_PD_LCDIF] = { + .name = "mediablk-lcdif", + .clk_names = (const char *[]){ "disp", "lcdif" }, + .num_clks = 2, + .rst_mask = BIT(4) | BIT(5) | BIT(6), + .clk_mask = BIT(4) | BIT(5) | BIT(6), + }, + [IMX93_MEDIABLK_PD_ISI] = { + .name = "mediablk-isi", + .clk_names = (const char *[]){ "isi" }, + .num_clks = 1, + .rst_mask = BIT(2) | BIT(3), + .clk_mask = BIT(2) | BIT(3), + }, +}; + +static const struct imx93_blk_ctrl_data imx93_media_blk_ctl_dev_data = { + .max_reg = 0x90, + .domains = imx93_media_blk_ctl_domain_data, + .bus = &imx93_media_blk_ctl_bus_data, + .num_domains = ARRAY_SIZE(imx93_media_blk_ctl_domain_data), +}; + +static const struct of_device_id imx93_blk_ctrl_of_match[] = { + { + .compatible = "fsl,imx93-media-blk-ctrl", + .data = &imx93_media_blk_ctl_dev_data + }, { + /* Sentinel */ + } +}; +MODULE_DEVICE_TABLE(of, imx93_blk_ctrl_of_match); + +static struct platform_driver imx93_blk_ctrl_driver = { + .probe = imx93_blk_ctrl_probe, + .remove = imx93_blk_ctrl_remove, + .driver = { + .name = "imx93-blk-ctrl", + .of_match_table = imx93_blk_ctrl_of_match, + }, +}; +module_platform_driver(imx93_blk_ctrl_driver); From patchwork Mon Jul 11 06:24:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 589566 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D53BCCA47B for ; Mon, 11 Jul 2022 06:24:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbiGKGYF (ORCPT ); Mon, 11 Jul 2022 02:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbiGKGXn (ORCPT ); Mon, 11 Jul 2022 02:23:43 -0400 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150053.outbound.protection.outlook.com [40.107.15.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22B2318365; Sun, 10 Jul 2022 23:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mN/LjUT03De4ivvUoR5S8k46i2dGe9VJ50BrwhEOnTPZ/4Gi8k5sUQvmmAcnp9Loj1abnMQgeT3hr+O7FFyXt+gUbNcPqMtDd7b9y00FkFGO7ioth9Iy8105B9P6VK5FH2IBYzlxTcDELrk6Q2eWgaedI5PisEliItKPuWF5jrA8b5tGIu6CJ5lZeoooZcYP+Hi0NcbwjfrVrFeXyM0/XR4RN68jC4xsPC60LmqnIHLaOLmBxRVhHW11kGzKWYdyBCJDKFWzX0VbDBy7+G0gOTkifKseNvIkpmVwm6jNuKyzA3I5KOdbGyIfuyHkF7yO9CHZJJfiL5js7G+rvOtupQ== 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=s5bdDglt1tblNlLtRJCdYhFCcgZcKfaN0LdTUoF47Yo=; b=DEHmKqVdhewCKD1pjTX+c1tuDmT0aalU+eFYDk0RrNeUc2aNoIfPNUEZk8ouSO+E8jFY+vgKByVcZRss0NOeHqkrPfZpBp1sY7vl6wA8HAJMYp1/uAnpm+pjw2MSHBb7mFSkDMaPWm7KLPlrSxicvGo/R32Drs//lT7GNGqF0Az5IPQzs+KREmEXoEzOP1yboZZXeIRl/LYVbLiMqoLdWCDz041BWO0lXXPycSlmOu0y5CuK4QMzFGN2CTEQlDhsGa8Ct4Y4D6NXT6/EbikFnucFJ34US9j/VnlGcgjDx7sui7Hvbc5oP713InudnvAzEZC7cd6YXmn/PQXdotxeGQ== 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=s5bdDglt1tblNlLtRJCdYhFCcgZcKfaN0LdTUoF47Yo=; b=BtY2s3ynXDy7JCxGLQzi/U43BiqLcCbiaP65owpy9YO/b6lDI8USQ9sCkBIbgg0rbQ4GWTu8aMF0uv91SLUEwT9Lpc/GNi3xKPvOwTahxmvwrgbJShZbaSQecXCsZx3vc/NYl7qhcc06GIm6aXQQgyq1FB9MpPMeef/AlqPsEts= 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 DB7PR04MB5212.eurprd04.prod.outlook.com (2603:10a6:10:20::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Mon, 11 Jul 2022 06:23:38 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::fdd4:8557:334b:180d]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::fdd4:8557:334b:180d%7]) with mapi id 15.20.5417.026; Mon, 11 Jul 2022 06:23:38 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: aisheng.dong@nxp.com, l.stach@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan Subject: [PATCH V5 6/6] arm64: dts: imx93: add mediamix blk ctrl node Date: Mon, 11 Jul 2022 14:24:52 +0800 Message-Id: <20220711062452.3575032-7-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711062452.3575032-1-peng.fan@oss.nxp.com> References: <20220711062452.3575032-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SG2PR01CA0182.apcprd01.prod.exchangelabs.com (2603:1096:4:189::20) 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: 334a147a-81e1-463b-4f88-08da6305e457 X-MS-TrafficTypeDiagnostic: DB7PR04MB5212: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: x2UTU3HlNwM8rHFiiv9mivVf8qIV1SIcFqv1798f2OY+fJ4u+5daUOPU+nzb3/YmNoRXdMTBtnoRdUwmdl46CZd7tQA497pI4fuebrFaaUo/cO0A2w5OOY5JeU0fTrYaSBCl0Cge03aYc2v1ApfQ/XqubI+Q+asOpXRSqq/RiNV83ffiSCY9jfT+LW7ApvQh8vaswqKo3NreTCjALh5lxNL5Fcu5mErtyHGb8EvAT4mYejluOVLmCd5abs2QLw+7QxaZb4mm8eXAyv8W3V8Fg3p7h7jHoeSKbP7XVPIjOTsCbX4n2hCACWsTKysIY9WRkgimfdzrsnPuke+8CkQHIqHdGUFeHJbX41UnqOrcwRfsi+cMH3BDm2w/7fJcswp/pUZijdstGSGKntQFhRwO0wexAaWbhxFUfDw/n5hF1oQXlF3Q5Dfu6i5Q+FfOXfiiqRMF5x0VWs3qJDOtaKjTGEllMaeYQz0Nl0VNsFNPj35td12QZZr7KuH19X5i4lWu5J/crtBQktx7sPCygWwStOeQ2yDj5/kqOCIhzHzZ+3yB8z0bgr+e6jLRUclkrzMuKWju7VnGpPnmqVDrxe8Op+MbbXTNpuZEfFAbEsHt1MgCPwO1i018pKMl+yncoT35Y24IaJq2EHq9JF1sTG7mP9tJ9yfhW5tZe458vKealrhuQ/xmpBXpo3Zdxv1MZEQQoNy/moH7jb76D22d8ula2ljN7+kdmG13FfYiXWp39eMz27jVc6ef5Vj02VM6fsK0R+FPa9EeoN1AgfsNOKXgyuGwBFfEcuZFKTenp5fEfepmdR7EWhVDXhVWJBsEEAV0 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)(39860400002)(376002)(396003)(366004)(136003)(346002)(66946007)(1076003)(66476007)(26005)(6512007)(66556008)(4326008)(8676002)(8936002)(5660300002)(186003)(2906002)(7416002)(316002)(83380400001)(86362001)(478600001)(6506007)(41300700001)(6666004)(52116002)(2616005)(38100700002)(38350700002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C5Gb/iDDYMh+4zbdUkHZwOoRXMUk96NyXaHUsCdzU37n+0eyqav92v69juvo+owgMA4LfEX3cX/tIkIIxppvpwdk/xuucQ4qu/71bVNdmj7PN2LfXYrLE/b7puyfYF9Hmo/LY9kAR3ErePrdifCzsU7v36WzjxgMx1JGsBdejXpodEyjUPVSA7LmO+bqFNdO4PKwTd95Kgmehu0pmjQsQzXjw3XcIO7efmkqscg34su+dP4TMXuY39GXOL4r0xIodXE/2MdpopHkqleRCcDxYBIfeTZh9P7SmqkZ6Vync/4sMh6AWet2tVVwS4diAVUcnfu4ikdptHVUqfK4n16mqp2dopzjRo322Ay6pXd6K8ws0uJDsbvGfaoDbSF7RBd0Oj+fWrv2Few8fp847vgukVupHAgP8LbVz0Urt/VdCB8RS4nyHT1poOmJGXTa1vj5Esng6vGBg1brdqn86KZLuezFOpmndjdN6O0KJd3EICW7WlryoTgfLj4wdiM5TQLkg//0zex2SPY+urxqUSB/L62GzoUez3WrsMDx7pg83Lkqd/pXaho4MXg8HVlSFFJpKTI0hYDiWhc2rE3a/0l+fh/NHhDgWrZ8cTY7Wm2LlRDu1eLdF0TM6aGDfibvFXTKNJ2nWwXky4S/8kYTZ7r3+xBFLFBlO2ePVuSxAfp6W4gPSlPGuyALleVA42jBOWTlW3EqgF94iWB49S9RXhTALs1UCN8MfC8xWDYZBAOythzzbfmdzL0jJUXgTqZb0kv3C6LE/6/HbCpeIF1Vk7MytNLR9ZRh4h1L4F+Fv5Q2OlbkpYnt1JfFeadetB96deuiZzbhPaagDXRBk4MIuptjL9zaf75EA8pGKTiDbdM4TFIY9H/4fCwfElYFXspEgUnBBsV5uOHqwvpo6M8b6twcu6h1BqkygF+2hO1+ISDPBZ6CASde4ohTEy07N/FjFKcT8V2vvVhYoOb3adeIIqkGEFpaZYKgz60A1Puu5lTW51QO6zavxuk8sD0UJQQHjlg0OyMC6DRrBsabLyWhcHwMKYs5HmdAKHN/MYO71QCob/jmuwOr/Ei2OyJ7e0LUkbeGrFWxfDkEnuM8xE8azqE2nWIO6AJlSe83nvaITqVapduPZXW5iWq93aFn4DtU9VsygxtkNnGErwmg6VTigSzZCTg3feH13HM+y+7h+yqHz5qfiQSWnkSVYdwGX0o7qAoOzJ2XiR23C3eaJKRBVWZf4+SUo95LV63JrlOEut7thK1OCgOGds6Xx0rM3upOph3yS3ruxINRwzETmjcvF0gdoDmhpo7Z1P6KLnyIDK1PP5A+ojdHfRnwLHkOQpttlf2F+prL89muM0h4lo/o0z0Fubh0wFl8CzlASHXQ8vJD5Y/5AzgGEU0HNO/nB8ca0gA3qX0rBHz8f5vwKNQhg46049u13BfAcJfuRmqk3aLrPMSuAHqMnroMKRKIe8Eg8XEKx134Q2PxbEwhxddYsjFXZ1jIdp0ff6bMm431+/BjC9auxJdEj24gJZiSCC1qfLV95zDYdHm9KtB+lwFJHJEl8mI0HP5YZzOEdKdwooVYeXTWUteIatZBJMVMRXHUgHN9 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 334a147a-81e1-463b-4f88-08da6305e457 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2022 06:23:38.4666 (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: iL1H3dOmx4F8T0P0slW7w0fFfF/0RWr7D2Knth2ubKxgvjrtld6Nj69Qp3nuSUMVUga1QNWBjSLzc/sl9QflHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5212 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peng Fan Add i.MX93 mediamix blk ctrl node Signed-off-by: Peng Fan --- arch/arm64/boot/dts/freescale/imx93.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi index 883d38920db4..7b93e5037a27 100644 --- a/arch/arm64/boot/dts/freescale/imx93.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include "imx93-pinfunc.h" @@ -346,5 +347,25 @@ gpio1: gpio@47400080 { #interrupt-cells = <2>; gpio-ranges = <&iomuxc 0 0 32>; }; + + media_blk_ctrl: power-controller@4ac10000 { + compatible = "fsl,imx93-media-blk-ctrl", "syscon"; + reg = <0x4ac10000 0x10000>; + power-domains = <&mediamix>; + clocks = <&clk IMX93_CLK_MEDIA_APB>, + <&clk IMX93_CLK_MEDIA_AXI>, + <&clk IMX93_CLK_NIC_MEDIA_GATE>, + <&clk IMX93_CLK_MEDIA_DISP_PIX>, + <&clk IMX93_CLK_CAM_PIX>, + <&clk IMX93_CLK_PXP_GATE>, + <&clk IMX93_CLK_LCDIF_GATE>, + <&clk IMX93_CLK_ISI_GATE>, + <&clk IMX93_CLK_MIPI_CSI_GATE>, + <&clk IMX93_CLK_MIPI_DSI_GATE>; + clock-names = "apb", "axi", "nic", "disp", "cam", + "pxp", "lcdif", "isi", "csi", "dsi"; + #power-domain-cells = <1>; + status = "disabled"; + }; }; };