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: 12231949 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 7AB68C43460 for ; Thu, 29 Apr 2021 21:19:07 +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 0339261445 for ; Thu, 29 Apr 2021 21:19:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0339261445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:References:In-Reply-To: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:List-Owner; bh=gT+x4NDo6vIgxUaMnBKIUu/p9cx38trVWkKmHOcFqCw=; b=dXS7BBQozMojz03tPFKyr334p jP5Xmv1zLj1mTTBXBJDibZZGPccS4XVLHXUbqhRystFjHmqNHTPUkSAdNHzuzhC3FLDnrdUfXDbQU JbokVfHGOJZMQMtLyD3Cm0BiFrTNsLd7QoHKgnHpobldJlrx4I3/+pmx88ZikFO2+ZXZIU9EKQBxW x4t/qkOje32c90/G1QPsVm9cWg97G0gZ4qjyQp3gBYrY97TAjy+la6+2Mp2BG02FYD3R/enEqkqtJ H0BaxOKAEBVU1jfdseSAHo26UR5e8m92odCU424GLRJlFM4TW4JShP0+j6CVrpqIl6hM7vnpLb4UX QN97ryxjw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcE2c-006Xud-Kc; Thu, 29 Apr 2021 21:17:47 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1n-006Xoc-SE for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 21:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=2yoj5H+QCx6bc+UM4nyFoXNp2IJ9VP/R50NAmY/87kc=; b=RH64wjtSINCKUNk78sTTmDKF5i ED7NhQFJ7gWqipEYXxzYpHGkAmeFWzZA2LjN3iCUSmi4EqwkcHdjrI1Yjr0uhpK25xGw3y1DVQWyE wXWGpRspFzwIbKhkxrgMu3pHV+ZT43CVxcjXvjh0Cz/BmXI2UIo38ImJYiDDKAzdQsIwE9A2+b/MH NrsrDlfuKB8wpFz3Dzzg1v7iUlbrjfgbhkrhnQt5cgjPqRSjIMWX+Z4x7kuGBqKxFftApRB+CLnfC HNnyn/u6od7Yp45cdA2kkNRwmUYc87GzJvIZZqMwRkkEPbLMcGGSKon8I1LCxlRNSecoefhcSfTcK KrsIVmVQ==; Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1c-000ybl-8d for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 21:16:45 +0000 Received: by mail-il1-x12d.google.com with SMTP id a9so1717119ilh.9 for ; 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=Kj1C15VJ7aOuSTyFMlDGJbZiocCVKfB4yHWQw/jMPv+39MkmdKC4XPKCiJbDsfSAxi MVrJbT0dUJe1uSIDHvGb8teeXpeeC5qBclrdCOth5XtsrewRkBOajokpMSALYQrUBWGj 96k1vI+jRJqdNWP9ram8a7O8WwdWyWgLrqAVdiWOBwwT0ZL/3mhh20XzyB8mi5GFz2JM sYrD4BUbrdB+zzDd6IBEjq6O/4f5mWn0Hjkyr9zr1Hxu9AhSsWgrw1GVvtxQ33SeJYPc CS6K7uJThkdk+zERZAhRTnb23+2iE9U4wrpmWDXtFniL7mjdCTjQz/3D8IrJP0qen3AS E6bA== X-Gm-Message-State: AOAM532LBkswmcs78XBuTSz9z0K2EtNcEBpMYfPqwleL9ELZ6XUAQWIS w9QcuV1y2NFnVH/PCigPKaqwFZtOSrFGpFec 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_141644_323578_161F2443 X-CRM114-Status: GOOD ( 12.50 ) 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 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: 12231947 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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=unavailable 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 58E3EC43461 for ; Thu, 29 Apr 2021 21:19:05 +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 D8CDC6144E for ; Thu, 29 Apr 2021 21:19:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8CDC6144E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:References:In-Reply-To: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:List-Owner; bh=0Q1CaZbvPAkC4vp5wKio/7KM65lhBwxP1vazOh/nnpI=; b=Y5Ml9DxtXnvv+dLWzu8JAo+xF sJZGMBgmruiCjsMF/PNBeHECBgI39sGKn/N5C1mi25AHWsCaqIFa1y7SPr/FDrwp6qckC+hQ4aaYG phtYtCkRBrpF0vuw/chAOwAm7vT49x/J4pH6RBASDv+pGrwMxd5Cfi6xqFj3X6KdoMvziU4KkZdX3 3W3E7wfJug7HF8sTExZubT1WvGt3kQ9+WgWcKayAhY31uhWu9LPKnBGMTjIrWXVCU1EsndvmLILRi fYzR20XvJOfUPPemf1KVUyMEpf9hCLMEZcXcdHAqK5W+k5K+yikX92EgBVJI8HzjB1VWR8jB5oJ6D WF4Dy+0Dg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcE2R-006Xsp-4g; Thu, 29 Apr 2021 21:17:35 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1n-006Xof-SD for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 21:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=xYWVhupWhI5RuXva/hi7QhlpY428PojYGow+2txhjvM=; b=DdWC1K0kgkLQh2NfKbB0nYXu3E F9b36+TMyHe8HUnerf0UCgXpargTsqDvT+ceYio7qihViTawheqFgWLH09Rcu9HXUZ/vxYkBKyn11 0cuzLHRyh37ZdSVhKm7NHaHg336jjTlj7GU4IHWmUTAiWZqnpiDNGFcuBO6pa8QdFJiRZQuvkZPTI MC5bjkihVkm3+7vNLjW+vVth12nCoLbVEWQMyP4dao3lT32YwKMN7Hh5jCGMeP2tJRfUKGFdrVvva p7T3s7VxV0PYJ60XDnndLqmYRy4DQ8mtjhpr9R4VN+Xjll4vtJmMWsaItLubsiVtICJF2l4VT1SQ5 i3mRFoXQ==; Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1e-000yc8-6Z for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 21:16:47 +0000 Received: by mail-io1-xd34.google.com with SMTP id g125so12212386iof.3 for ; 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=RAPT7DGRPnPf38PT3gOR4X8HJiFb2Cf4aZYWSirTf+baKsBtUVZvODIuiX3ghQp3SJ 2c/o3KssMRXh+jHXA6Y7mbXW0k/Sfk50iekwpStds3wUkcdUOBQLG3o3qzmKEClTlNUQ Jbc/XvLGUEfkfHxfkvFODX4tdJLAKYZFzqDIlVWuPUJD3AMdkcUPfpWKHKCA1FiWR8U8 +CA58IFR/Z2zS76lqbdIDDUUiwGTzx71Ei1QbcWLDQNarWkc8+1GKvrmvHGztwPHtnc7 0Vm8GwbTNrPVui2bAB9fEkrLLDnDf3g6a1TLhuaLIDfMsAT7L2WMY4Ur1eRWj/ecHOqz TkEA== X-Gm-Message-State: AOAM532mUke1MlBW1VuzviSfsZ1glZTDBK7j2QPedSbflBZlJv/l/q/l jNSyy0PE/MPS2NTkdlWwHKCvB3COMAXOsd// 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_141646_261366_E3FEEB77 X-CRM114-Status: GOOD ( 16.27 ) 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 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: 12231943 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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=unavailable 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 C1375C433ED for ; Thu, 29 Apr 2021 21:18:49 +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 3D2E9613DA for ; Thu, 29 Apr 2021 21:18:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D2E9613DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:References:In-Reply-To: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:List-Owner; bh=xHuWFSb7GXpS7Ook6jUFNqgrKP0wDPHoBFe/AgRX8Qo=; b=a/v9Dcfsr7CWQoTXpRXoVrfPW UPaGOXeztgUXn7GTFn6VgxfXmzcG7uV2bfPp0pIue+wngOztheXf8xG1zyRjvpH/t5lg5Dqp26s8t 5c3A/av30lB4i+1hJ8f4Tlzu+E3Uzmnp7m7AjQDTAjfhPwtrZ1UmAMcagRl8NEa4ro01sUjVFh6v+ KNLJbpnSsSxgHpRftejpLehSM20HhpWCY+Bx9pYKYyz+wMUc7xThd3EV88JmpIcU/CcYPRzlOFtUQ SQ9YfgH4CreVhKSRfuCJU+KCQPhUyiBt9HXFYpWBdnhDNNtlfcHIr9qhF1/YXG+bOrExEUhGmAPOx QwBw6iFug==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcE22-006XqU-6z; Thu, 29 Apr 2021 21:17:10 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1n-006Xog-SD for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 21:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=jPgVXT1uW8e6Y9HHaJbfKFsDy0UCQUs1OiFXNXzhl7c=; b=xGBLYZAi0QMWrKmI9aweV/ym6T D0geDdp7NLpHWV4+BuX0spbzPtNRDrVSnuHajkLpsNCC5/lCoEdOCDu8/ImvnLeWI2oKq80F0LRj4 NqRyDiAkitGtB5lTAKziCEZoEDHcOwA8uTdMsEIYhBzcIn59SbvkoKT1Wo7fiYQcq6SIGcBceMSFC ohiiO+R8v8XVfCDiOiKdlriEQ9gAAiaqrmeHpm+/DAy7uGIZX34hMpQaw5DiHznkyFATYAUkVqt2m p3Ks17t4Bud1LZRvZPyUIvf5iWd96xJ7VXNxuUdOVdug3E+owL7iAgcQusMfkzCTa0/soz7sLiMCl FpAK6pDA==; Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1f-000ycO-Ph for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 21:16:49 +0000 Received: by mail-il1-x12a.google.com with SMTP id c18so55013486iln.7 for ; 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=KAUBJhZQ0l9iLevdxk8kI5lzk1mNQc35diG6iLHxIIUQFaH9fWSe9JjMop4TTGbA2V cIgRyIk5X/M9g+agFiC+TBgwSCeEd+dWae7G1hrn2kNrF9MBTjrA0L2oEffc30s6SOm/ O3EuHt9t2Mdc44U2gXGStG8hI0DrpgtlnXBhoRSN+TZBfyDGOs7Fkrct4ByOsdHN5SlM rGNX5XB7R1dCSiSHEN/fFBRli9U0EOQUN6Kf5xDt5jSzGEeAwg2RFpQN1eKzjDLp53kC +15FsO3t0/wUQx+dL4LPLmR7i+jphNR5nKxQA+Rk0NmGK/NczStjKvpF5Xfet9xGppfl UfyQ== X-Gm-Message-State: AOAM5300zTDDF/3M7Zs39gJHwb66zQEp9+WjIpB4ISXx9gGsTIcvs99q CLsfGKTHuIIvNIOZDsLKOOd3ksmCvB2WoFr1 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_141647_851951_10142C69 X-CRM114-Status: GOOD ( 11.37 ) 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 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: 12231945 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 C04CEC433B4 for ; Thu, 29 Apr 2021 21:19:00 +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 39E146144E for ; Thu, 29 Apr 2021 21:19:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39E146144E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:References:In-Reply-To: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:List-Owner; bh=10eQIJO/BIWIzBIF29uknkuPi3+F6XEI6qRWCaks2JI=; b=pAW1+8+dTUq/k1KjXZncMTY53 ugcP/ID1dpvSTMpU+Zi2lLoFz3f5dACdFO3ziR+r1ru4zBpaSShA3sWcr3kwOtCfDBWFDs/AKBfA5 WRSgd0JPLjDEAZJdTStZy22Anug8BwGPQjAuaBiwubHlYDQ5FDwpT/Sh2VtDE5Bcif5u81QsELO54 BdRNi0alb0YQDyzFz4J3A1X4CgnX8VrLKOaWGPZDSInm+57pf/HclgyeIB9KEEjI2pZCQku3gxDw0 bk382J8ghCOHBqrhRZoK387WgxAiJNQmcHvgndZQaBq4EzbdrUgQKgoO4tr8E8JSo5G7VCRy2cvFh uW3jOm3xQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcE2D-006XrB-8o; Thu, 29 Apr 2021 21:17:22 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1n-006Xoi-SE for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 21:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=vTK3mS4c8midbEPil3hRb/cf5O5Pz60GCjhUinVTKwQ=; b=oL1sKm+yQrGSNVqTP5CSF8rL2f FgpfdP80Cj20AZ9qNs1KrTfiGkYi9nW4+hjwa8WimONu80lvJFtvO0JKwCiAFTKMl3WPPvOXR4X+i BpEqbXtzR/eGCY0NUsnekTfCCB98rjaCXM0WO/7ZOtQ5b1oDiYhJwDTrjpXK/uJLetzeRP4vVZt4+ gwRsKHE08An9r0/Jfs7O0rR5dMyMoeFCPU7e4oAK33u7LkhPGIRcefAw6eX4m3acTtbGosDmuOkNu kfaf6yPLYV7fb46GGsC2Nmscj+Fzw5s47mp/r7uqKT2aqlOVeGOyQVYfYGrovM9Oj2PN+MEgTWeCY 2ebnDcQA==; Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1h-000yce-Gb for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 21:16:50 +0000 Received: by mail-il1-x12b.google.com with SMTP id r5so14843444ilb.2 for ; Thu, 29 Apr 2021 14:16:49 -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=C9u6Lse2x0Eru5ydvtSIXPZuXVY399BDXfCE3Jl53XeoWFBG9Nqj3EKwYiMqXvvs2Z Glayw713eRasVmVMLwTUz0YP+61gv8H6BabtQ8k3/CBuXh177w+kLzx15ksZ5R6bewW5 cB3eJ/NNBXrZLzn2YinXRMbgbj2Jn4i+qBpftBvvAGImWpQJAi0K6yJQFCn/ZmKhlUyS 8rSQB36Nj5jcxIyT1P+IMqLdzSY/f+mrgd54Dza4ajs4lhLZVoiY/GONkoPDOs51Pbvm 9VUq47AUbqi/1ae0yxegziNmE3E2HONL84DedjC8baweGPaqW2Bis2S8NJLSLRDgR3vC Tmgw== X-Gm-Message-State: AOAM530NmRr9jM+PAYKVO/fqoTA38BKqsFopGlYV/r+IFXGpq9zhbEea N9LhPOBtESC1A9v7Xxj0c7ZZRY5es8VSFJQg 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_141649_567159_C756AC98 X-CRM114-Status: GOOD ( 10.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 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: 12231951 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 AC798C433B4 for ; Thu, 29 Apr 2021 21:19:32 +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 37EF361445 for ; Thu, 29 Apr 2021 21:19:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37EF361445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:References:In-Reply-To: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:List-Owner; bh=C+FYTizpHTOX/YPIRfcN7SNSCLTDuQojUtn05F8pdg4=; b=ShUDFf/giMqH/kdtQFyUMyMKq D2Wt9lugnuEy+GXnuQAf0GYZrJyHzznvdQe/2/wUXclNenP5gfZCVqlEmt9VnLRTqquqS1kFGzlBX mkLCDOADXgmV9lbdKQBRr3a4pT69o9BXGBLh3bxmunBX9hY8z4rHIZLHAIyz7do1W8ZPb5J5YuBxD KVHK+NfJp7mriO1c6G02IfL1l9adOzsFsh4nzdub2OGu7LsIuQZCM1aDZFGDku1Y0k3ayofhBFboO /+tyvH0EOWzJoC71YxrGMKEB+iCSSCP0jLqoeN3HeOpVo57dsghjELUR7nC9YdXhdDC08j6HAGacE s5RmqVQpw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lcE2r-006Xxo-4X; Thu, 29 Apr 2021 21:18:01 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1n-006Xp9-SD for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 21:16:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=jjYghAn3GYKlRzW30xaC+JWoAjT9ihkxsVSI8UNJwBw=; b=V3bat5trMT+ZwPA2eKcF6j/oUA KUgbRCCTxwKojaRpTQbIM76VAJqgLZUZw2lxBSLZdC1irxRwq4lom5RoPp6N8Euyex7LfNUZ22luw OsidJVz8dqxDrmFXzseuE9oBbWqRkUPw/lU1HFv9o5e5RgyE0s/zO83CzXd22qMvTPPELCZcooFoc wZodK8v1+plLPnV1b+LICFPxfokb1KWGC9axC7cVryRf2sh42teCy71xJPGdgN6R48lX8RMk+fFP+ 5LzFGnC3fDWJK+X+Es60Mo+/my+hRYfzl+eKGMemFCPPZ3Krdg0WKQ2apyplkVP7FZ0NSK+uYpNWk VtpDztGA==; Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lcE1j-000ycv-7F for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 21:16:52 +0000 Received: by mail-io1-xd2e.google.com with SMTP id f21so30374521ioh.8 for ; 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=WDAFGWyw7bzH4PX47ArqrUZW4yZDD5nfDAFM2dow2Ii1dRH0s0Wulsc23pD0raY3Vq 7hpXKG4gb62JgdW+KDzsN1r5CliIuVZ2WltCrX12EoXZWCX0QtZanNWRFBLiUqW2M9mD YaybyvkU+t60Ozuehgtxk+UI5vqg4m0IAhkt6jXDhRWJjZQVzGvPJ58jdtgEOTkkz5X+ sWipLNoHsd05g3gkjUNBCMHUsV5oIJtNHn/r3z2AGub9vnIH+y+0maSdywk+DVUe+5Dw Vxw+ayuEqRvcTG6jGyC6CZAQK7VzSr+N+OW9fP+tSpygRKl6zxio1ti2DYJYdTrpopuq Rymg== X-Gm-Message-State: AOAM530mO1c/qq1p2SONILjTEhukoVfkIyG+Z266mwETD64EUF1Advvn 2JG2aYF2Il56GO+byPWXPMfvvF+TOZhRLoY5 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_141651_278697_4B6F62F2 X-CRM114-Status: GOOD ( 11.01 ) 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 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>,