From patchwork Mon May 10 04:07:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12246781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0210CC433B4 for ; Mon, 10 May 2021 03:39:24 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AF3C6109F for ; Mon, 10 May 2021 03:39:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AF3C6109F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=2gtMHxyJ4aY029+1afrUrEfOQi4jFDgcXMFNptvZuxE=; b=PFze3mqVjX+zZyUYujCP3gUa+A PJ3tJghJm+xx5AQONsvUjg5AUByCPH5/9v2TvvORWObkaDpgv5vpYs64RgYniS64qTyCEogNrm3il xzeDf55aKdToWwL7DYP5Uv4xvRHt1sh8Wb27yATpe32BvN6Db79TqKX2UtBRfl5ZFixMg4ngWXr1r ogQzJFQwpVNEzcixXiN418XKvO68dM6GBJupDWw5rD+AkXLBxmsSi2QQtQoiRtVj9w6ZMmmR+QP0G bWM9KQw3fdz3WiHrD1lFT52tc48EKQEfkGbLjb9V8Pm9OBfWRf+CL5OlCBqR8I0qRG2i2Pkxkua0n uZrBrZXA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfwj1-00D0Gf-1I; Mon, 10 May 2021 03:36:56 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfwgx-00Czdo-13 for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 03:34:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=OiicKOfqUvpU8NM/pzYIHgAp+3Ql+Qxw55dfv4dnKNs=; b=FHIjDeDzp+wyZWzd+07W3qSXG6 i6041v0Ss5n4sK32w/INd0FX1lSwAj2ktw/6oLKqro7e/5Jdjh1VjUgXuX4BHsQ8tUwSyCfIsmei7 cOLz7t78frpsu+EpLhHuWsu6T8q+1S38NMyBAave9i7j1Z/8lHap5OECQS/KxKpaTZyOk/leFXyMx US5+XZ8cllsdrHP5gJ979xhWDqKEwq6qaU510oyQEgTyrjcNirnmKZaZGmFTebMK3CDjf3YPJuajj 7fp3KlH4CkUr3hPFGRrJ1YGkOK94x1w2jD3ZttMegcsHl+9e9r4OA9ttuE+sLfuCqGFsQ3GkVF2R2 0W8et+BQ==; Received: from mail-db8eur05on2089.outbound.protection.outlook.com ([40.107.20.89] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfwgu-008F3M-7p for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 03:34:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mqqlmth5Q411sNGdZeif99wnWpuwmI+pCS6AoTvB6nLe16eNchKdJbBzH88i0+OnekeiRwscXpkRXMzrbpa1YggAoErM+FIIc+T/xsVXQyRcC8Bw54ZQ6hn4yWwCsmsZImKgEeYVBfJk4fNxI03Mobqne9ZzdHDcx6OND8h5Wl0fNZTE+Pmy0TvZJib6zVj9d8F+7h1CzHURH5MYqcgG2WSczLret3Yr8gf3PLId042CyWtfUs03xfH20b+ePP+QclQt0rDq7joXkvEUzAX7APblNFck8LLr2ovOMNcvSZ/eKdulMpSJxTzOlOUQQzeUvtQbN2oveK11aHb2ed013w== 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-SenderADCheck; bh=OiicKOfqUvpU8NM/pzYIHgAp+3Ql+Qxw55dfv4dnKNs=; b=CxDblbqLgNAw4pSfvGoAfpBprZoK3XiTSRL5sNnY1mrwXP+ZhgYEwbl7anp+LQwOIscr2cQq2a+tNItJX8bGDiat6AZpOEfuPFkQyCsxnvZ9R++tSTxA4TagwAs1Pt0jTHdWyIowsJhkYS+GzMgXyHEewN2r+xs6Sce+L6VJVFadRxpt8i5o+yKMEZtvuQ9v0o3xdTRQcFJXUs8LIloKl+yyzpdeOliJNMYB2WmvNwJzu9i3NLbataFexLozORbqLTuQHW0r8J3ioynT/W9GtkvjF8ZVe43F3Qi0MJZFt323nZR76Xe6/UwjGwRC9hgsXz5ie/H0Jm/+B+Bv2jpKjA== 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=OiicKOfqUvpU8NM/pzYIHgAp+3Ql+Qxw55dfv4dnKNs=; b=blM4Auuz3nmgJZjuLHSrWyK4b0txS1wesOu65elMcdKMlFsWpTD1+FNpu1oXc8iPWoUDITzuzlpK+PPKA9u08XfncYACwnBNUQKPei8PXHDOF+fYL5rC3k4YDYe2jjBCcqfZzvm/MN2/s9wGwWZ1Ezsqde1sfk0zaGYFyy+HBvU= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4091.eurprd04.prod.outlook.com (2603:10a6:5:1e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 03:34:40 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4108.031; Mon, 10 May 2021 03:34:40 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH V4 0/4] soc: imx: add i.MX BLK-CTL support Date: Mon, 10 May 2021 12:07:00 +0800 Message-Id: <20210510040704.14997-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR03CA0159.apcprd03.prod.outlook.com (2603:1096:4:c9::14) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR03CA0159.apcprd03.prod.outlook.com (2603:1096:4:c9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.12 via Frontend Transport; Mon, 10 May 2021 03:34:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 171b6dff-e9c3-4949-c2c7-08d913648b29 X-MS-TrafficTypeDiagnostic: DB7PR04MB4091: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2g6WMUacRxs8GknXXYHG2nBGNR9qWhz58pJ782QSxvzibD4LtYu19V3Z088AwGz8YlTxRt4NWHSY8lIQeBrgu/2c+xkNxsjnSEShSKmxGyloE76iOP9OOdl4ss4V/KM5YSXKjrUdKSQFvVkVMGMdkKrKJDDkV/nQkoh6OFV2H58xC38rpQhWxrpdc71nvYgDDM3MwR5HJNeqLc2ORWaQRQlhGhdcsWxAMa7H3yZVfQf2/IytQp30BP1WsMElmEVUCGsQ5gery3IinKlguJGtc7tr3Zk0KLX81vlC2K4T66HjS5otwCTZkmIpJapgQ/UxnWnJuvmk7xe3JJwN47XqIoo4EVpIlxMAJpHOHyOgGNIISPSXwoxtJTb7cLIfXs0rsKWAwcaOksU6WJuCQmO6JAR3c76H1+aax2bVe+HOFT7UbcD80k+ofFAtuEBHmNa3wy13sXPI/rR+UX9wn8BhQtQ+GmLSY80MRKreGZZs/Koipu//Or9bM3yzacuGmVsPXGLVvyhkW6JXR4iEXFhPLveVJpufkBSIlK1A5uSjP3cpkhUb4YK+YFWoWHoHmesrFUtEQCauio7amAWglf0gLOntNsROJDOmz6ogpb6cgeJ6vQEQu6ia7iRg/6jyoZI9EYLFHCFOEBFFSQRA0JHH+W9HR/TvQzsrCDNvF0tdS+M= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(366004)(136003)(39860400002)(396003)(316002)(86362001)(478600001)(4326008)(1076003)(2616005)(956004)(5660300002)(16526019)(6666004)(7416002)(66476007)(38100700002)(83380400001)(6506007)(52116002)(26005)(2906002)(38350700002)(6512007)(6486002)(66556008)(8936002)(186003)(8676002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vYhcAwpCAJuXv/ef3+9QpGHhktyHoJHEBG4XsJzLg7/AmitNutiGWT0vLI965F1z+HDJLIHYbuG392OxSLkFBqP1eYTNjqQYFdta1I0zwJUbozol024Ecvbf+72COlzMP9WR+JxtAOa3qeKvHtwHT/74ynGgEzUeU3Q3NibkqWoEjQpiLddVXLpxlaB3yKxX6InS6yT2HFenG86OqDdg3Y1qrBxRspyTH1Bx066GZqZVjuKd9IcrqGSJSThIn3TtmFxjVnqe4U31dthEDowGQbwCM7MICybcV5fcbMug2ci6V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Exchange-CrossTenant-Network-Message-Id: 171b6dff-e9c3-4949-c2c7-08d913648b29 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 03:34:40.5141 (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: CdCqnZETxB7yCFHok8HEtwrOHe3Fafk3roZZbtdTJrJ7UbMz0ip7mc6OxTrSI8sCmSC1v/RWa4d+fEJ98v7l7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4091 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210509_203444_305347_F4F1BFCF X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan V4: Add R-b tag Typo fix Update the power domain macro names Per Abel and Frieder V3: Add explaination for not listing items in patch 2 commit log Per Rob. Addressed comments from Lucas and Frieder on patch [3,4]. A few comments from Jacky was ignored, because following gpcv2 coding style. V2: Fix yaml check failure. Previously there is an effort from Abel that take BLK-CTL as clock provider, but it turns out that there is A/B lock issue and we are not able resolve that. Per discuss with Lucas and Jacky, we made an agreement that take BLK-CTL as a power domain provider and use GPC's domain as parent, the consumer node take BLK-CTL as power domain input. This patchset has been tested on i.MX8MM EVK board, but one hack is not included in the patchset is that the DISPMIX BLK-CTL MIPI_M/S_RESET not implemented. Per Lucas, we will finally have a MIPI DPHY driver, so fine to leave it. Thanks for Lucas's suggestion, Frieder Schrempf for collecting all the patches, Abel's previous BLK-CTL work, Jacky Bai on help debug issues. Peng Fan (4): dt-bindings: power: Add defines for i.MX8MM BLK-CTL power domains Documentation: bindings: clk: Add bindings for i.MX BLK_CTL soc: imx: Add generic blk-ctl driver soc: imx: Add blk-ctl driver for i.MX8MM .../bindings/soc/imx/fsl,imx-blk-ctl.yaml | 66 ++++ drivers/soc/imx/Makefile | 2 +- drivers/soc/imx/blk-ctl-imx8mm.c | 138 ++++++++ drivers/soc/imx/blk-ctl.c | 307 ++++++++++++++++++ drivers/soc/imx/blk-ctl.h | 77 +++++ include/dt-bindings/power/imx8mm-power.h | 11 + 6 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml create mode 100644 drivers/soc/imx/blk-ctl-imx8mm.c create mode 100644 drivers/soc/imx/blk-ctl.c create mode 100644 drivers/soc/imx/blk-ctl.h Tested-by: Frieder Schrempf