From patchwork Mon Mar 23 10:36:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 6071461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DA4A99F318 for ; Mon, 23 Mar 2015 10:38:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF36120251 for ; Mon, 23 Mar 2015 10:38:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FE972024F for ; Mon, 23 Mar 2015 10:38:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YZzjK-00051Q-FO; Mon, 23 Mar 2015 10:37:10 +0000 Received: from mail-we0-x22c.google.com ([2a00:1450:400c:c03::22c]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YZzjA-0004VO-12 for linux-arm-kernel@lists.infradead.org; Mon, 23 Mar 2015 10:37:02 +0000 Received: by weop45 with SMTP id p45so134013334weo.0 for ; Mon, 23 Mar 2015 03:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=o0g6fIgX765jzSLu7v/gmFsU8UxVWwLUUIYXwiZVzCw=; b=aaTT+j11JzhyxlBKUsOSZPrfObkGAKvVnoGT/FUpepxjDh7eNWyTvuOCEK2fFNqp73 4Th70Iia1zKwoqDQ0oEJqvT21lhl3H+lKp3+9Juldmhk8t8I5k/EZIbLtoh5LL0saNI+ unvxUs6DUeotBxX5v4335J7HKL4sWVbEHORyHvDRv/plZx+9ua+O01fRHohBkt+bNQvj NS6iBBijCnwwYzrbERtmSH0bPkIybiL/+sRgYukgj6y+6vDIs2OYMgbZzmm+HcyzgPTg Bjcr6Dq1JTmqNDAq+o8nTyG2mqgV2PAqDTLAhjPy1FWx4v9aTRJcI3cgrYYyIDHaSpiR KVCw== X-Received: by 10.180.23.193 with SMTP id o1mr18173939wif.14.1427106997283; Mon, 23 Mar 2015 03:36:37 -0700 (PDT) Received: from localhost (port-22036.pppoe.wtnet.de. [46.59.147.192]) by mx.google.com with ESMTPSA id fo9sm10566644wib.16.2015.03.23.03.36.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 03:36:36 -0700 (PDT) From: Thierry Reding To: Thierry Reding Subject: [PATCH] soc/tegra: pmc: Add Tegra210 support Date: Mon, 23 Mar 2015 11:36:35 +0100 Message-Id: <1427106995-17265-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.3.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150323_033700_245040_B2F2E23D X-CRM114-Status: GOOD ( 10.27 ) X-Spam-Score: -0.8 (/) Cc: Alexandre Courbot , Stephen Warren , Paul Walmsley , linux-tegra@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding Tegra210 uses a power management controller that is compatible with earlier SoC generations but adds a couple of power partitions for new hardware blocks. Signed-off-by: Thierry Reding Reviewed-by: Paul Walmsley --- drivers/soc/tegra/pmc.c | 48 +++++++++++++++++++++++++++++ include/dt-bindings/power/tegra-powergate.h | 5 +++ 2 files changed, 53 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 7dabb8f812e0..e8914e0fb9d2 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -1223,7 +1223,55 @@ static const struct tegra_pmc_soc tegra124_pmc_soc = { .has_gpu_clamps = true, }; +static const char * const tegra210_powergates[] = { + [TEGRA_POWERGATE_CPU] = "crail", + [TEGRA_POWERGATE_3D] = "3d", + [TEGRA_POWERGATE_VENC] = "venc", + [TEGRA_POWERGATE_PCIE] = "pcie", + [TEGRA_POWERGATE_L2] = "l2", + [TEGRA_POWERGATE_MPE] = "mpe", + [TEGRA_POWERGATE_HEG] = "heg", + [TEGRA_POWERGATE_SATA] = "sata", + [TEGRA_POWERGATE_CPU1] = "cpu1", + [TEGRA_POWERGATE_CPU2] = "cpu2", + [TEGRA_POWERGATE_CPU3] = "cpu3", + [TEGRA_POWERGATE_CELP] = "celp", + [TEGRA_POWERGATE_CPU0] = "cpu0", + [TEGRA_POWERGATE_C0NC] = "c0nc", + [TEGRA_POWERGATE_C1NC] = "c1nc", + [TEGRA_POWERGATE_SOR] = "sor", + [TEGRA_POWERGATE_DIS] = "dis", + [TEGRA_POWERGATE_DISB] = "disb", + [TEGRA_POWERGATE_XUSBA] = "xusba", + [TEGRA_POWERGATE_XUSBB] = "xusbb", + [TEGRA_POWERGATE_XUSBC] = "xusbc", + [TEGRA_POWERGATE_VIC] = "vic", + [TEGRA_POWERGATE_IRAM] = "iram", + [TEGRA_POWERGATE_NVDEC] = "nvdec", + [TEGRA_POWERGATE_NVJPG] = "nvjpg", + [TEGRA_POWERGATE_AUD] = "aud", + [TEGRA_POWERGATE_DFD] = "dfd", + [TEGRA_POWERGATE_VE2] = "ve2", +}; + +static const u8 tegra210_cpu_powergates[] = { + TEGRA_POWERGATE_CPU0, + TEGRA_POWERGATE_CPU1, + TEGRA_POWERGATE_CPU2, + TEGRA_POWERGATE_CPU3, +}; + +static const struct tegra_pmc_soc tegra210_pmc_soc = { + .num_powergates = ARRAY_SIZE(tegra210_powergates), + .powergates = tegra210_powergates, + .num_cpu_powergates = ARRAY_SIZE(tegra210_cpu_powergates), + .cpu_powergates = tegra210_cpu_powergates, + .has_tsense_reset = true, + .has_gpu_clamps = true, +}; + static const struct of_device_id tegra_pmc_match[] = { + { .compatible = "nvidia,tegra210-pmc", .data = &tegra210_pmc_soc }, { .compatible = "nvidia,tegra132-pmc", .data = &tegra124_pmc_soc }, { .compatible = "nvidia,tegra124-pmc", .data = &tegra124_pmc_soc }, { .compatible = "nvidia,tegra114-pmc", .data = &tegra114_pmc_soc }, diff --git a/include/dt-bindings/power/tegra-powergate.h b/include/dt-bindings/power/tegra-powergate.h index b8265167c20e..12b72aa77d6a 100644 --- a/include/dt-bindings/power/tegra-powergate.h +++ b/include/dt-bindings/power/tegra-powergate.h @@ -26,5 +26,10 @@ #define TEGRA_POWERGATE_XUSBC 22 #define TEGRA_POWERGATE_VIC 23 #define TEGRA_POWERGATE_IRAM 24 +#define TEGRA_POWERGATE_NVDEC 25 +#define TEGRA_POWERGATE_NVJPG 26 +#define TEGRA_POWERGATE_AUD 27 +#define TEGRA_POWERGATE_DFD 28 +#define TEGRA_POWERGATE_VE2 29 #endif