From patchwork Thu Apr 29 21:16:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 429335 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 E5443C433B4 for ; Thu, 29 Apr 2021 21:16:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2D3961445 for ; Thu, 29 Apr 2021 21:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236890AbhD2VRa (ORCPT ); Thu, 29 Apr 2021 17:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233284AbhD2VRa (ORCPT ); Thu, 29 Apr 2021 17:17:30 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5407C06138B; Thu, 29 Apr 2021 14:16:43 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id c15so7608777ilj.1; Thu, 29 Apr 2021 14:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2yoj5H+QCx6bc+UM4nyFoXNp2IJ9VP/R50NAmY/87kc=; b=NWVvCJOUY1TRFUi91NRJDzxsqZsP5JqiA4xLNNf0Cj0VTaU6+fzqazEw99O02ZZCH+ Yq+PIS0TfzCVxY/0QdzsgD1moqX/0zVytssSbEM5iXa15IPNGNne8VvNA7hhcjMYSiv0 JS4YSKqQ6+8lvil6ImnNAQ6wFh0Myq37xvXzIwafR94Wd1ATGXfQezv1pu3WhondW3tl XfdBe5ukIsx2/uzaM0Cyt7D3ikCUhNrMDXgopU+jEWPl79XuBHgtg4lVDkyt6Qr/VfBu AIn6Q6+yypGAi386pl5IXCIuCGiB/rCv752p4/o2cYiaf7/M7ZZvqkcOuJQ+vIVYa/OR M7uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2yoj5H+QCx6bc+UM4nyFoXNp2IJ9VP/R50NAmY/87kc=; b=gjK1ygQWra6rRD6lrOWV+mrCmUsmQ4McNvGdZsQdLAhGq7eZImWjeT0lDHXCWmusR1 9UbO7/Bpng9tgh9Fbapon/FHYelg1pcsZAlSZ8tzpRA9OvhIe/29cls0lLM6DFa4QEs0 2PgeO70N/Uwta3SLme2doj8vLZf0Wvnw45cn9lxkHchM0NzWiXGuHtBC0EkNZP2qHBwf cECoRmdkfZuwK/7+akoqvbF36hPxErN7bnHuy0ThspmXVXwq8qj+6FBRVXdS6mkDNiDL 7tDpxdLahZ2BJ+1SbjIgo61GIwlCglrqfjCr0ipEgc8+KVhv41hovjzzFWmZxdBNG71D ZnJQ== X-Gm-Message-State: AOAM531O4Em62hsdaVMi4t3/wK+P7nU2FFp87nnBophFEKJ/mh+QAMTP HXTW/uHywNZ5aM/mKyIjYXA= X-Google-Smtp-Source: ABdhPJxffJBBOfq8QcNh7YQYQkt4hfOhbEItSfrLfjvnrmLhr64mYbChqPN3378MerLyXNvl6pGP4Q== X-Received: by 2002:a92:cec3:: with SMTP id z3mr1368665ilq.179.1619731002946; Thu, 29 Apr 2021 14:16:42 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:8a74:d2ad:27b:e619]) by smtp.gmail.com with ESMTPSA id q11sm1808076ile.56.2021.04.29.14.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 14:16:42 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: peng.fan@oss.nxp.com, marex@denx.de, frieder.schrempf@kontron.de, tharvey@gateworks.com, aford@beaconembedded.com, Adam Ford , Krzysztof Kozlowski , Rob Herring , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrey Smirnov , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 1/5] dt-bindings: add defines for i.MX8MN power domains Date: Thu, 29 Apr 2021 16:16:20 -0500 Message-Id: <20210429211625.1835702-2-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429211625.1835702-1-aford173@gmail.com> References: <20210429211625.1835702-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The i.MX8M Nano has a similar power domain controller to that of the mini, but it isn't fully compatible, so it needs a separate binding and power domain tables. Add the bindings and tables. Signed-off-by: Adam Ford Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring --- V3: Rebase on series starting https://lkml.org/lkml/2021/4/29/72 V2: No change diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml index d3539569d45f..a87c44c15ace 100644 --- a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml @@ -25,6 +25,7 @@ properties: compatible: enum: - fsl,imx7d-gpc + - fsl,imx8mn-gpc - fsl,imx8mq-gpc - fsl,imx8mm-gpc diff --git a/include/dt-bindings/power/imx8mn-power.h b/include/dt-bindings/power/imx8mn-power.h new file mode 100644 index 000000000000..102ee85a9b62 --- /dev/null +++ b/include/dt-bindings/power/imx8mn-power.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Copyright (C) 2020 Compass Electronics Group, LLC + */ + +#ifndef __DT_BINDINGS_IMX8MN_POWER_H__ +#define __DT_BINDINGS_IMX8MN_POWER_H__ + +#define IMX8MN_POWER_DOMAIN_HSIOMIX 0 +#define IMX8MN_POWER_DOMAIN_OTG1 1 +#define IMX8MN_POWER_DOMAIN_GPUMIX 2 +#define IMX8MN_POWER_DOMAIN_DISPMIX 3 +#define IMX8MN_POWER_DOMAIN_MIPI 4 + +#endif From patchwork Thu Apr 29 21:16:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 429986 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 D5B4CC433ED for ; Thu, 29 Apr 2021 21:16:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA5B761008 for ; Thu, 29 Apr 2021 21:16:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237276AbhD2VRe (ORCPT ); Thu, 29 Apr 2021 17:17:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237175AbhD2VRc (ORCPT ); Thu, 29 Apr 2021 17:17:32 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA51C06138B; Thu, 29 Apr 2021 14:16:45 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id f21so30374154ioh.8; Thu, 29 Apr 2021 14:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xYWVhupWhI5RuXva/hi7QhlpY428PojYGow+2txhjvM=; b=cM9kcr7UWKiktG2c8sLzRRJoXRWmshhF5PzzyBwIFsQO7lpzKtWUcI0gcKurP4enY3 hgB4a60msU64Z0REiAF9P4OMuJZbFcIuOYEWN0xpeKQUAcTf2OWvZJNTYEnDdgCOOPh0 P5m2Q2QzE7SRtdpBTUA+SAoDmufs8P/WMgltCw7rvmqz+l70XAi3xyuFgVHFneKG43lp 4K/ocOpeRRAgNclU5xrWAwh3DSRiDc3YMPEy5HFTwVJeKl/pEO7a1vfa/YXi+S3B9g/o DKDY5Y8rwMEWKIT22LZT6nbLL04FYJs2F/1bbi3ya7yYyANUE4L3p/qUxQcrXb3zYKft csXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xYWVhupWhI5RuXva/hi7QhlpY428PojYGow+2txhjvM=; b=fna9yAtx3vIG7sw3lRB6wcIQfAZLHKKZ1zZPTf9bycM5IIe5iVvFDNSmeQwnXV2qUy Oz/lNLKdX0pMs77787jkE/AxkTBtxSChuWE21rpr2zjsVMYEb3fdjPwiS6CD+ymphN69 E0ur5Xcw9PQGkJrAQqFpQrrmQ1b/0AwkyGZX7oQmuBFEC4OU4ZHnbbHzF5Ee/ignaYdu 1Rzfugs81CQ54qXvS3SfWBqwDPKDTU/be2KDMomdn208VgoS9wUE+BsYtVA05ixi5vY9 0SJIJSDaqoFuQgmHqxqZULQGLonrsxQw4L6RHHHU0OWd42vsyjBzvw7tE6IsSABrOgQW dD5Q== X-Gm-Message-State: AOAM532vh562MxaQgBMYTElQkErcWlONHDhbxKZCrWpCCjN8i80MOBrB 73fUJPiY6O+653Oo9eVPHGg= X-Google-Smtp-Source: ABdhPJw3EFlWzmPamLc3QnVKWOER2Th0R1IcAL9kbc+h+gVQQXk5FrBKbmj11k7hLdbUi9L1C6mgYw== X-Received: by 2002:a6b:be46:: with SMTP id o67mr1019606iof.89.1619731004688; Thu, 29 Apr 2021 14:16:44 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:8a74:d2ad:27b:e619]) by smtp.gmail.com with ESMTPSA id q11sm1808076ile.56.2021.04.29.14.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 14:16:44 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: peng.fan@oss.nxp.com, marex@denx.de, frieder.schrempf@kontron.de, tharvey@gateworks.com, aford@beaconembedded.com, Adam Ford , Krzysztof Kozlowski , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrey Smirnov , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 2/5] soc: imx: gpcv2: add support for i.MX8MN power domains Date: Thu, 29 Apr 2021 16:16:21 -0500 Message-Id: <20210429211625.1835702-3-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429211625.1835702-1-aford173@gmail.com> References: <20210429211625.1835702-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds support for the power domains founds on i.MX8MN. The Nano has fewer domains than the Mini, and the access to some of these domains is different than that of the Mini, the Mini power domains cannot be reused. Signed-off-by: Adam Ford Acked-by: Krzysztof Kozlowski --- V3: Rebase on series starting https://lkml.org/lkml/2021/4/29/72 V2: No change diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 04564017bfe9..6c93551b8729 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -20,6 +20,7 @@ #include #include #include +#include #define GPC_LPCR_A_CORE_BSC 0x000 @@ -58,6 +59,12 @@ #define IMX8MM_PCIE_A53_DOMAIN BIT(3) #define IMX8MM_MIPI_A53_DOMAIN BIT(2) +#define IMX8MN_DISPMIX_A53_DOMAIN BIT(12) +#define IMX8MN_GPUMIX_A53_DOMAIN BIT(9) +#define IMX8MN_DDR1_A53_DOMAIN BIT(7) +#define IMX8MN_OTG1_A53_DOMAIN BIT(4) +#define IMX8MN_MIPI_A53_DOMAIN BIT(2) + #define GPC_PU_PGC_SW_PUP_REQ 0x0f8 #define GPC_PU_PGC_SW_PDN_REQ 0x104 @@ -94,6 +101,12 @@ #define IMX8MM_PCIE_SW_Pxx_REQ BIT(1) #define IMX8MM_MIPI_SW_Pxx_REQ BIT(0) +#define IMX8MN_DISPMIX_SW_Pxx_REQ BIT(10) +#define IMX8MN_GPUMIX_SW_Pxx_REQ BIT(7) +#define IMX8MN_DDR1_SW_Pxx_REQ BIT(5) +#define IMX8MN_OTG1_SW_Pxx_REQ BIT(2) +#define IMX8MN_MIPI_SW_Pxx_REQ BIT(0) + #define GPC_M4_PU_PDN_FLG 0x1bc #define GPC_PU_PWRHSK 0x1fc @@ -116,6 +129,14 @@ #define IMX8MM_VPUMIX_HSK_PWRDNREQN BIT(8) #define IMX8MM_DISPMIX_HSK_PWRDNREQN BIT(7) #define IMX8MM_HSIO_HSK_PWRDNREQN (BIT(5) | BIT(6)) + +#define IMX8MN_GPUMIX_HSK_PWRDNACKN (BIT(29) | BIT(27)) +#define IMX8MN_DISPMIX_HSK_PWRDNACKN BIT(25) +#define IMX8MN_HSIO_HSK_PWRDNACKN BIT(23) +#define IMX8MN_GPUMIX_HSK_PWRDNREQN (BIT(11) | BIT(9)) +#define IMX8MN_DISPMIX_HSK_PWRDNREQN BIT(7) +#define IMX8MN_HSIO_HSK_PWRDNREQN BIT(5) + /* * The PGC offset values in Reference Manual * (Rev. 1, 01/2018 and the older ones) GPC chapter's @@ -152,6 +173,12 @@ #define IMX8MM_PGC_VPUG2 28 #define IMX8MM_PGC_VPUH1 29 +#define IMX8MN_PGC_MIPI 16 +#define IMX8MN_PGC_OTG1 18 +#define IMX8MN_PGC_DDR1 21 +#define IMX8MN_PGC_GPUMIX 23 +#define IMX8MN_PGC_DISPMIX 26 + #define GPC_PGC_CTRL(n) (0x800 + (n) * 0x40) #define GPC_PGC_SR(n) (GPC_PGC_CTRL(n) + 0xc) @@ -752,6 +779,71 @@ static const struct imx_pgc_domain_data imx8mm_pgc_domain_data = { .reg_access_table = &imx8mm_access_table, }; +static const struct imx_pgc_domain imx8mn_pgc_domains[] = { + [IMX8MN_POWER_DOMAIN_HSIOMIX] = { + .genpd = { + .name = "hsiomix", + }, + .bits = { + .pxx = 0, /* no power sequence control */ + .map = 0, /* no power sequence control */ + .hskreq = IMX8MN_HSIO_HSK_PWRDNREQN, + .hskack = IMX8MN_HSIO_HSK_PWRDNACKN, + }, + }, + + [IMX8MN_POWER_DOMAIN_OTG1] = { + .genpd = { + .name = "usb-otg1", + }, + .bits = { + .pxx = IMX8MN_OTG1_SW_Pxx_REQ, + .map = IMX8MN_OTG1_A53_DOMAIN, + }, + .pgc = IMX8MN_PGC_OTG1, + }, + + [IMX8MN_POWER_DOMAIN_GPUMIX] = { + .genpd = { + .name = "gpumix", + }, + .bits = { + .pxx = IMX8MN_GPUMIX_SW_Pxx_REQ, + .map = IMX8MN_GPUMIX_A53_DOMAIN, + .hskreq = IMX8MN_GPUMIX_HSK_PWRDNREQN, + .hskack = IMX8MN_GPUMIX_HSK_PWRDNACKN, + }, + .pgc = IMX8MN_PGC_GPUMIX, + }, +}; + +static const struct regmap_range imx8mn_yes_ranges[] = { + regmap_reg_range(GPC_LPCR_A_CORE_BSC, + GPC_PU_PWRHSK), + regmap_reg_range(GPC_PGC_CTRL(IMX8MN_PGC_MIPI), + GPC_PGC_SR(IMX8MN_PGC_MIPI)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MN_PGC_OTG1), + GPC_PGC_SR(IMX8MN_PGC_OTG1)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MN_PGC_DDR1), + GPC_PGC_SR(IMX8MN_PGC_DDR1)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MN_PGC_GPUMIX), + GPC_PGC_SR(IMX8MN_PGC_GPUMIX)), + regmap_reg_range(GPC_PGC_CTRL(IMX8MN_PGC_DISPMIX), + GPC_PGC_SR(IMX8MN_PGC_DISPMIX)), +}; + +static const struct regmap_access_table imx8mn_access_table = { + .yes_ranges = imx8mn_yes_ranges, + .n_yes_ranges = ARRAY_SIZE(imx8mn_yes_ranges), +}; + +static const struct imx_pgc_domain_data imx8mn_pgc_domain_data = { + .domains = imx8mn_pgc_domains, + .domains_num = ARRAY_SIZE(imx8mn_pgc_domains), + .reg_access_table = &imx8mn_access_table, +}; + + static int imx_pgc_domain_probe(struct platform_device *pdev) { struct imx_pgc_domain *domain = pdev->dev.platform_data; @@ -940,6 +1032,7 @@ static int imx_gpcv2_probe(struct platform_device *pdev) static const struct of_device_id imx_gpcv2_dt_ids[] = { { .compatible = "fsl,imx7d-gpc", .data = &imx7_pgc_domain_data, }, { .compatible = "fsl,imx8mm-gpc", .data = &imx8mm_pgc_domain_data, }, + { .compatible = "fsl,imx8mn-gpc", .data = &imx8mn_pgc_domain_data, }, { .compatible = "fsl,imx8mq-gpc", .data = &imx8m_pgc_domain_data, }, { } }; From patchwork Thu Apr 29 21:16:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 429334 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 F2BE4C43460 for ; Thu, 29 Apr 2021 21:16:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D09B761008 for ; Thu, 29 Apr 2021 21:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237339AbhD2VRf (ORCPT ); Thu, 29 Apr 2021 17:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237299AbhD2VRe (ORCPT ); Thu, 29 Apr 2021 17:17:34 -0400 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 397F6C061344; Thu, 29 Apr 2021 14:16:47 -0700 (PDT) Received: by mail-il1-x133.google.com with SMTP id c3so4789598ils.5; Thu, 29 Apr 2021 14:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jPgVXT1uW8e6Y9HHaJbfKFsDy0UCQUs1OiFXNXzhl7c=; b=RF2rOfLyhULT8rqUxBzQzMpM9sxh5+Fy+/qnjRZXYt8ZkJ7YZ/nGUs5f6XaSfJAgVX SlMhQ6GKS/NueJyWyQUe10tBr33lTybSeG+iWFEydZ5a6Qx2IYKQpVa0mA//XCRMcvsk bIYrAgsL//74qpOtC2jfp6OXH8DtMDsh38tJqfpH/8LF7Wboihn/1K3Z8lTGVtosOkDi HuGF3biuvBc3n8OLiUKpDgK0ea9u9gv3wCywyu95tgvbCxiFHf7LCHkpb79s0+Hhp0GB OnQd7eFKTuE++zsWuCfrxX92eWR86Jh9mJ6swQlO3S0Tn7GJ1PD+XI+DGUXPcNafbSyC ofoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jPgVXT1uW8e6Y9HHaJbfKFsDy0UCQUs1OiFXNXzhl7c=; b=DSxRCd32eEcyIh4M2fd5EP38F/fbTABL7lFDunv8uieZ/451xOh19HS3HVCk3Dc5kb VWR/bx8T+CTyGoW+MQMC/dwGEbIzjBvFbdfNHoE3cWo2vhQvWjpchWJWyM+nNCD/nsF7 nxD98YnzxExNuSyAuwlii++faQaq41gj1K9nz4USMZdqzUDH3AVTIMU5F2tvJT6LRJLW 97ECC7BDcYUKjKPnE1CtR8dJWqspHE3CDcQE9CqLKRlivaS4RcDgjWikTpBcjePruVly bYcAk0YDDzS5MOn2n6nKEzhGUPt5+K3lu1YBejvpIT+Ya0Z8SKlzXDh4T8ZD64OVQLY1 xxkg== X-Gm-Message-State: AOAM530IovfhI7amFdfRTHCsydrQpDDeEAIWwuv+p4lBp64mG07Tr067 hrrzTfUtPGMpgfuBCGFzG3U= X-Google-Smtp-Source: ABdhPJwDAoJ2qwUpVQvRt4s556II7kUnsvePTDZqEk4pZ8vOdYZhgQh6/YN0K/i1Xx4Uw/h0e59MYw== X-Received: by 2002:a92:ca0a:: with SMTP id j10mr1470621ils.73.1619731006477; Thu, 29 Apr 2021 14:16:46 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:8a74:d2ad:27b:e619]) by smtp.gmail.com with ESMTPSA id q11sm1808076ile.56.2021.04.29.14.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 14:16:46 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: peng.fan@oss.nxp.com, marex@denx.de, frieder.schrempf@kontron.de, tharvey@gateworks.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrey Smirnov , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 3/5] arm64: dts: imx8mn: add GPC node and power domains Date: Thu, 29 Apr 2021 16:16:22 -0500 Message-Id: <20210429211625.1835702-4-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429211625.1835702-1-aford173@gmail.com> References: <20210429211625.1835702-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds the DT nodes to describe the power domains available on the i.MX8MN. There are more power domains, but the displaymix and mipi power domains need a separate clock block controller which not yet available, so this limits it to the HSIO, OTG and GPU domains. Signed-off-by: Adam Ford --- V3: Rebase on series starting https://lkml.org/lkml/2021/4/29/72 V2: Fix missing includes Remove interrupt controller flag Remove domains which interact with blk-ctl Signed-off-by: Adam Ford diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index 16ea50089567..609294329c7b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -4,6 +4,8 @@ */ #include +#include +#include #include #include #include @@ -612,6 +614,40 @@ src: reset-controller@30390000 { interrupts = ; #reset-cells = <1>; }; + + gpc: gpc@303a0000 { + compatible = "fsl,imx8mn-gpc"; + reg = <0x303a0000 0x10000>; + interrupt-parent = <&gic>; + interrupts = ; + + pgc { + #address-cells = <1>; + #size-cells = <0>; + + pgc_hsiomix: power-domain@0 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MN_CLK_USB_BUS>; + }; + + pgc_otg1: power-domain@1 { + #power-domain-cells = <0>; + reg = ; + power-domains = <&pgc_hsiomix>; + }; + + pgc_gpumix: power-domain@2 { + #power-domain-cells = <0>; + reg = ; + clocks = <&clk IMX8MN_CLK_GPU_CORE_ROOT>, + <&clk IMX8MN_CLK_GPU_SHADER_DIV>, + <&clk IMX8MN_CLK_GPU_BUS_ROOT>, + <&clk IMX8MN_CLK_GPU_AHB>; + resets = <&src IMX8MQ_RESET_GPU_RESET>; + }; + }; + }; }; aips2: bus@30400000 { From patchwork Thu Apr 29 21:16:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 429985 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 F289DC433ED for ; Thu, 29 Apr 2021 21:16:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D405361008 for ; Thu, 29 Apr 2021 21:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237383AbhD2VRl (ORCPT ); Thu, 29 Apr 2021 17:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237352AbhD2VRh (ORCPT ); Thu, 29 Apr 2021 17:17:37 -0400 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4818C06138B; Thu, 29 Apr 2021 14:16:48 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id c18so55013528iln.7; Thu, 29 Apr 2021 14:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vTK3mS4c8midbEPil3hRb/cf5O5Pz60GCjhUinVTKwQ=; b=c3Q3gxKti2doNidSQpOmnHW1AUzSAXcBtiQoHbM6MBIw7fVrygPICGD/8WC2S0KLtW 28NZbFHZ4cRXC0g3IL1+3OIPnSc4V67vDjcfvumkSax+7tRVPEz7DSTDcyRIt+GW8PGY AO+GId61ZtWFO4/BlXamDeX39RTN+Yn5bhPZSRM7OuFInxPYm2zl8smklzmi2Jaqyhu+ QV5P9pOcFf3vRkwDpWwZuYjabNq+0WJX+yhDAthQOgAWI8x/EEERS8a253Frct+sEbpz 8abZMa3aT4vaHZjp5CioKmZ+altmUTxas4wZfYtHtIlkrRho6pthS2wCwc7n0foDvTfF OiEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vTK3mS4c8midbEPil3hRb/cf5O5Pz60GCjhUinVTKwQ=; b=gNeLxjB6CAf8iycBtG3L1Jjjx+KmBi48y723Kr+JwnHlsKiULZgT+IZWuwIp+lg+/U FgMla0dtk+ewIMaEgZW5F+8tgjdetWALvrPai3E2AALn0I0Z+JVclWD1DDMzngDqP0p5 ynSAgp5OXXVc78dkzOZLbTsfRGIGWzR3gl+/2D38t2s9rFUdiq5pLzvKxol9itc6RfoK zI16MEnh8rWgrXkwZw794qMHZFla29YpQ1+aukNIBa+pN5zo/DqPkeX8a2aOKeYFsi7r vpACHm8+9XQ9K1jQtCP3zszoCPtB/8rCQhAGOC/N6ZDEJAqaDmiDJecnHc+74U0R7C8Z XUyQ== X-Gm-Message-State: AOAM533FIQwAfqiOrFDEyt+a+tdRtaqGTMPtaM57TbHUM2Xw4dhY2/gR re4JZGbLEtcjfT+9Y2cCqNg= X-Google-Smtp-Source: ABdhPJx2AZEYz94gbie7+hSs9P3oH1b/Hu2t/eXSV8750JBqXy8MpdLV8tFszyERP3pseT6Kg4j4YQ== X-Received: by 2002:a92:1a0a:: with SMTP id a10mr1400984ila.195.1619731008220; Thu, 29 Apr 2021 14:16:48 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:8a74:d2ad:27b:e619]) by smtp.gmail.com with ESMTPSA id q11sm1808076ile.56.2021.04.29.14.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 14:16:47 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: peng.fan@oss.nxp.com, marex@denx.de, frieder.schrempf@kontron.de, tharvey@gateworks.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrey Smirnov , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 4/5] arm64: dts: imx8mn: Add power-domain reference in USB controller Date: Thu, 29 Apr 2021 16:16:23 -0500 Message-Id: <20210429211625.1835702-5-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429211625.1835702-1-aford173@gmail.com> References: <20210429211625.1835702-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The USB OTG controller cannot be used until the power-domain is enabled unless it was started in the bootloader. Adding the power-domain reference to the OTG node allows the OTG controller to operate. Signed-off-by: Adam Ford --- V3: Rebase on series starting https://lkml.org/lkml/2021/4/29/72 V2: No change diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index 609294329c7b..a2ca25aa8eb6 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -1000,6 +1000,7 @@ usbotg1: usb@32e40000 { assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_500M>; fsl,usbphy = <&usbphynop1>; fsl,usbmisc = <&usbmisc1 0>; + power-domains = <&pgc_otg1>; status = "disabled"; }; From patchwork Thu Apr 29 21:16:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 429333 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 4C338C43460 for ; Thu, 29 Apr 2021 21:16:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3081B6100A for ; Thu, 29 Apr 2021 21:16:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237406AbhD2VRm (ORCPT ); Thu, 29 Apr 2021 17:17:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237356AbhD2VRi (ORCPT ); Thu, 29 Apr 2021 17:17:38 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2A09C06138C; Thu, 29 Apr 2021 14:16:50 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id b9so14461762iod.13; Thu, 29 Apr 2021 14:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jjYghAn3GYKlRzW30xaC+JWoAjT9ihkxsVSI8UNJwBw=; b=CPW/k6FzLpOKN2RZNvbpYeLdRdJegr1jP9a3EOUeuyllpSJMjIq/UXwkL7Gz1gv06P HWnm+gVWN0RLEGStIzSZZFmfbgNIS41BKvBNV4C/CEtq7G9yBz0cvrU762fJ4Y7BH7CM BUS9tqtcoMZINhx2JqvcEddtS7GcwtDMEmZQa4nCXogOc8dU5EqxMZhuUjuIsK33F3T+ ZIjcBD53ttAc/Od9cvgqsis1riNwmygQ5o/mpQj4kvfQVVgO8LyavE6WR2n/YGLoY8GD 1yWppWBOOCjK+vxXDJy2M9MNImpAged2acs2YbDuP0uKf0cf3SPCBB4lF/HIlOhsJ7ca rq3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jjYghAn3GYKlRzW30xaC+JWoAjT9ihkxsVSI8UNJwBw=; b=EnUp9/YPLC9YcoFhXMoGlHCVlUrNNO2wHgjR0Cvd6ICjCNmpw2eAn4NYYnPTgEVdni MswtqVkPGO2b/qE0jDycH7CPXQ8LNIDiRFqIgKlCfjEkbgK0YBNTZX1Mcq+Hwpn+ZiPc B2JKkm20AfrOwmLxrc52ZPpjOSMxRmu8sDowJKLV++Tf8saWep+eWH+dP23Cw05vxjYn liKWdRlm5E8P3yxo8BFoIXvUTQx/G4d8l19dmaPC/AgibAIMTFaxVtHd+HUrKVFeradf wHP+hl3Jb0+K31Rw+n2qaP0J1jO98hXIoH+iJ2zVh0XuLIpHpg4HhMyD+/PLztsR9s+q xpKg== X-Gm-Message-State: AOAM532B2BFiV6XeadwC/pmLGaS9foUsU3aLWMSWVVqTyPXPFvJLpFOG uOIhRyyRo820F0KLiBfTVHo= X-Google-Smtp-Source: ABdhPJwoG7PPLrhqRaDUOYXGa5eYK++1PmUsrPg6b1IHR14ib8wvWaK9CiHcFuzZpaiTd5jomE90NQ== X-Received: by 2002:a6b:720b:: with SMTP id n11mr1228980ioc.80.1619731009993; Thu, 29 Apr 2021 14:16:49 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:8a74:d2ad:27b:e619]) by smtp.gmail.com with ESMTPSA id q11sm1808076ile.56.2021.04.29.14.16.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 14:16:49 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: peng.fan@oss.nxp.com, marex@denx.de, frieder.schrempf@kontron.de, tharvey@gateworks.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrey Smirnov , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 5/5] arm64: dts: imx8mn: Add GPU node Date: Thu, 29 Apr 2021 16:16:24 -0500 Message-Id: <20210429211625.1835702-6-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210429211625.1835702-1-aford173@gmail.com> References: <20210429211625.1835702-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org According to the documentation from NXP, the i.MX8M Nano has a Vivante GC7000 Ultra Lite as its GPU core. With this patch, the Etnaviv driver presents the GPU as: etnaviv-gpu 38000000.gpu: model: GC7000, revision: 6203 The stock operating voltage for the i.MX8M Nano is .85V which means the GPU needs to run at 400MHz. For boards where the operating voltage is higher, this can be increased. Signed-off-by: Adam Ford --- V3: Rebase on series starting https://lkml.org/lkml/2021/4/29/72 V2: Move into this series Update clocking description diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi index a2ca25aa8eb6..07a8ff58d44c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -1040,6 +1040,31 @@ gpmi: nand-controller@33002000 { status = "disabled"; }; + gpu: gpu@38000000 { + compatible = "vivante,gc"; + reg = <0x38000000 0x8000>; + interrupts = ; + clocks = <&clk IMX8MN_CLK_GPU_AHB>, + <&clk IMX8MN_CLK_GPU_BUS_ROOT>, + <&clk IMX8MN_CLK_GPU_CORE_ROOT>, + <&clk IMX8MN_CLK_GPU_SHADER_DIV>; + clock-names = "reg", "bus", "core", "shader"; + assigned-clocks = <&clk IMX8MN_CLK_GPU_CORE_SRC>, + <&clk IMX8MN_CLK_GPU_SHADER_SRC>, + <&clk IMX8MN_CLK_GPU_AXI>, + <&clk IMX8MN_CLK_GPU_AHB>, + <&clk IMX8MN_GPU_PLL>, + <&clk IMX8MN_CLK_GPU_CORE_DIV>, + <&clk IMX8MN_CLK_GPU_SHADER_DIV>; + assigned-clock-parents = <&clk IMX8MN_GPU_PLL_OUT>, + <&clk IMX8MN_GPU_PLL_OUT>, + <&clk IMX8MN_SYS_PLL1_800M>, + <&clk IMX8MN_SYS_PLL1_800M>; + assigned-clock-rates = <0>, <0>, <800000000>, <400000000>, <1200000000>, + <400000000>, <400000000>; + power-domains = <&pgc_gpumix>; + }; + gic: interrupt-controller@38800000 { compatible = "arm,gic-v3"; reg = <0x38800000 0x10000>,