From patchwork Thu May 6 04:15:51 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: 12241543 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,URIBL_BLOCKED, 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 9AE56C433ED for ; Thu, 6 May 2021 03:46:22 +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 23E91611CB for ; Thu, 6 May 2021 03:46:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23E91611CB 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=KfAtEdn/BvNm7or8Tisvj0b3ev7RHn3+bWN0BCF8zNE=; b=dSFYhHgap/9s42dU5EOpUlFNPx lYLR/QJi+ByNL2QLR75jvGVzh4dpULNvV+PhAa6nxyMKVTVCUchzFKDSg7s82Fpp2GWI+vRsN7Pb1 0kl6ykao+vtTDd1CT8zzw+9Gv0UotnlKhp1m0QWc730aWveO+E6PagMnEkGQ/RwjfwmvUy8m0CT5f 737feRqfXcG4Apncpqn6AMfPAQzBgu0Awz7ol857/EoqsAMKrSPqlH4plTkoVQzWle1Cl0e9ZDsPd OfZgkBVALR8m00+PGd3P4kyk/Nb33z+PwqCtar9ebwMdVsR2xtls+3pf54UnvUCs6DO1B5kX93WHq QULR2U1w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leUve-0032GH-Ij; Thu, 06 May 2021 03:43:58 +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 1leUvU-0032En-TN for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 03:43:54 +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=eGT1d37vH9P00gdUSvKDgoUFCDtvLKUsGhmlrfwOwxo=; b=cy+hN6G2MzlIGpO4Kah5LvLt1+ lXrCjEIp6WKG7zBoctmow1eE+i0BV3kImwobM+nOz/9n80v+KWJahmq14S1d/Kj/FkT7InXArQNrY CdyamOPCOtQzBg7Vms0L6KQsKbyLPdrtv33/USkSv8nW0ru4g+b5F0574iZnMstqjotxlUzEqseNx gWJpJ4OS4EWpnfjPkDzZmOK2mDjn58ly8TKJlYsMzxJwSX7Vy6/VbGLWPGcf2HbpUKb5EwhMDQdeV o0cQmyCLSv/HsCTLEAuYEvw7NtEZngLKG3vh/Eq8x4sSlE/EJMulBJrrGqIpok4VLV1TT5xkK8RHb iK4G2apA==; Received: from mail-db8eur05on2058.outbound.protection.outlook.com ([40.107.20.58] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leUvS-005Z2w-95 for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 03:43:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpwsSxTwGuGbI9LpiC7GTPT8Z4FyiYLpWyy2khMHFP6BvrrSHAP3dr8eRqKNe3Cp2sOnjtLLWYETwos5Mt22zty5EtFGKmbwDkANqiD1v/8hOSwNVEcsRNyCI/wblkJzMMVvbZY+sXXY+63w5aOJPtHNJ0yZ87coeqezBi7S08AtD5zZvz6Ixk0DUKaiVDFfHfgIov+ylHLpPLRILQaDXqvxkQQWla8UXKLF2srNjAYAFzSNjmBV5O8uhrHQC+RXUTrw0Y00VaDBy3vuWoRTKtqh5HuhU0chQuVBqpIsqIJdGeBGm4Swg3qyABVuTm9ngDJ1nASE2J5D33c22yX6Yw== 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=eGT1d37vH9P00gdUSvKDgoUFCDtvLKUsGhmlrfwOwxo=; b=gv/LOq2hPtGZQOES0H1gm2hTwWt7a4H+hrQGris/5t014eb+rBeyl3ZdTedTX3UBA1lE70lqwYqPXZZdI76/nmtSVhFvYsTvfEqqY8TJKOfg8sC1YXaV2tPfQ/VlOhny51IWwOlxS0pXLXSw56QrerJCrriArn/IqIvswAz9zrn/asfI4+oY/hIh03Y4IZuer6o77jmE2wAl1n1hoLtKpjoTIV1/8ilaEPNX64k5vquqgUa+0YW4OWVmyqI3BIW/2azUqydNe4rAI/SFAaASWQb8mdthDJYz09bEMvw0bNlpkJL9eRXAm++Um2cpl0jF3ZIOzgDmaZ6mt135IKy4fA== 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=eGT1d37vH9P00gdUSvKDgoUFCDtvLKUsGhmlrfwOwxo=; b=cUuwZbSxQEuGOfennJ78NUdgjecdBvubLsKHBukRmL/Dk+JuGf755Enoss3Z8w8I7BfJgO+NMwJFAE9ph4ZAtI4FHD3dQv279BMDjsgPiayt44PJl4CQwmZcwP7Ojv5MvYyxMZ0s6CN1s46I/D0YWDs1ICZzVQiIEVK+YIUf2JM= 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 (10.172.251.142) by DBBPR04MB7979.eurprd04.prod.outlook.com (20.182.191.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 6 May 2021 03:43:41 +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.4065.039; Thu, 6 May 2021 03:43:41 +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 V3 0/4] soc: imx: add i.MX BLK-CTL support Date: Thu, 6 May 2021 12:15:51 +0800 Message-Id: <20210506041555.10719-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) 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 SG2PR06CA0115.apcprd06.prod.outlook.com (2603:1096:1:1d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Thu, 6 May 2021 03:43:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 891079c4-e4aa-4b93-eb15-08d910412393 X-MS-TrafficTypeDiagnostic: DBBPR04MB7979: 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: hog21FsAWMUNDHcvHiRg3zp2BUmQQAZYchZS+apSekUYprqgFCYayUL49Y8uiRd1MudjrZCSwQrFrMGatoATMttWkMASgSgIMG02SeSnTCcdTK791XE2H/mtiasLb+cHHXQlDqPTsxXtMWznFhZOD6DpZm45AOQE/ycI0KiS2M4lJZjkBeo9j0t/u6V3acQOoj53GqatOkBc0IHrwLvEgdUwycorezYjkggn9eVsmOWbTjjaxKfywjzvB1Kacc8It1wUGCFJA3MI64hEPiofqtUoIeviaj+OTtuqbG3ElvwmCouuRCH4I22MeVPg8S3ShDe1CMoj+PmezpP47U0FTfS/mVuWjxR7Xp1xHV3vIYfACtjxTPaMqWx1yJVQpOkYxK53TI8C7TgE42oQ6sxvj7tVO0lmt7Bt02Ihgg14AxHcrgitZn3XugScMeYkU32XN3fPsissUgpA9D1kcAwjFl0sccsKh8nAimO1lw9YdJtkIqUZO0PlR0Hq1FBBapoM761hW0Vet1KOMQ2ORQ8sFxQl7E66aq1tiTPNzMBPfYRUJoTdYvOjBOrhzrASeMz4M8qc+XCoQZA4crG8HOWSCWWKvkKTnU1cr/I8mcEQMw0dyPLwJCeJ7+LNnaiKvO5PkO1kDF1i1hWu1TjlAHyqAo1FoDwAMkq9QnjhbJZWhJk= 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)(346002)(136003)(396003)(366004)(376002)(39850400004)(4326008)(2906002)(316002)(8676002)(6512007)(956004)(2616005)(5660300002)(6506007)(6666004)(66946007)(8936002)(66476007)(66556008)(83380400001)(52116002)(7416002)(478600001)(26005)(186003)(16526019)(1076003)(6486002)(86362001)(38100700002)(38350700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Hr+TaWpAoW6Ib6CSh7KvjggrxPo+1bEtOAGSILRtp1aFRunkxErujDwxaZs/bjL7Yor05lZXkEhpNAOQ3D4lskmMC+4aN/ziCs/SSesQajnr6JMQIWPuOsAhtz/L4hCGK3JmE5aL/Kc3X4YbGELr9CCdUyArE/rd9em3mKBZ9A7rlGndk7foWbyJ0+3urCfHr2/Wa7HvMIjrJezZ1I2aANRdou1e59owlHQpB0c8L1DbqdnxgKAIPUMYEdOH5QOrvxuTjUXLBtNtDXewNrrLEaEODjxbmqSd5/XrcVnuAybjGNBuv1dvC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X-MS-Exchange-CrossTenant-Network-Message-Id: 891079c4-e4aa-4b93-eb15-08d910412393 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2021 03:43:41.0008 (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: LwryIjPw2sdhcO2eB+CC9hvlSOsCVQMGu12itAYZbwE0nlxpae5viXVB0VU6/j9Zhf6db5zXgT7cWSCAAJ/asQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7979 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210505_204346_397671_AECEF929 X-CRM114-Status: GOOD ( 12.83 ) 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 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