From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH V6 08/10] soc: tegra: pmc: Move powergate definitions to dt-bindings
Date: Fri, 26 Feb 2016 15:48:42 +0000 [thread overview]
Message-ID: <1456501724-28477-9-git-send-email-jonathanh@nvidia.com> (raw)
In-Reply-To: <1456501724-28477-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Move the Tegra Powergate definitions into include/dt-bindings so that
these can be used by the powergate bindings in device-tree source files.
Remove the TEGRA_POWERGATE_3D0 definition as this is an alias and is
not used anywhere.
Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/soc/tegra/pmc.c | 2 +
include/dt-bindings/power/tegra-powergate.h | 88 +++++++++++++++++++++++++++++
include/soc/tegra/pmc.h | 39 +------------
3 files changed, 93 insertions(+), 36 deletions(-)
create mode 100644 include/dt-bindings/power/tegra-powergate.h
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 9d2d204342c5..6c5833bc3fab 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -19,6 +19,8 @@
#define pr_fmt(fmt) "tegra-pmc: " fmt
+#include <dt-bindings/power/tegra-powergate.h>
+
#include <linux/kernel.h>
#include <linux/clk.h>
#include <linux/clk/tegra.h>
diff --git a/include/dt-bindings/power/tegra-powergate.h b/include/dt-bindings/power/tegra-powergate.h
new file mode 100644
index 000000000000..f45d64207bc0
--- /dev/null
+++ b/include/dt-bindings/power/tegra-powergate.h
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2016 NVIDIA Corporation
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _DT_BINDINGS_POWER_TEGRA_POWERGATE_H
+#define _DT_BINDINGS_POWER_TEGRA_POWERGATE_H
+
+/*
+ * The below definitions define the bit that is used to control the
+ * various powergates on the Tegra SoC devices. Note that not every
+ * powergate is available on a particular device. The following
+ * table provides a description of the powergates and shows which
+ * powergates are applicable to which devices.
+ *
+ * Name Description Devices Applicable
+ * TEGRA_POWERGATE_CPU CPU Cluster 0 All
+ * TEGRA_POWERGATE_3D 3D All
+ * TEGRA_POWERGATE_VENC Video Encode All
+ * TEGRA_POWERGATE_PCIE PCIE Tegra20/30/124/210
+ * TEGRA_POWERGATE_VDEC Video Decode Tegra20/30/114/124
+ * TEGRA_POWERGATE_L2 L2 Cache Tegra20/30/114/210
+ * TEGRA_POWERGATE_MPE MPEG Encode All
+ * TEGRA_POWERGATE_HEG 2D Tegra30/114/124/210
+ * TEGRA_POWERGATE_SATA SATA Tegra30/124/210
+ * TEGRA_POWERGATE_CPU1 CPU1 Tegra30/114/124/210
+ * TEGRA_POWERGATE_CPU2 CPU2 Tegra30/114/124/210
+ * TEGRA_POWERGATE_CPU3 CPU3 Tegra30/114/124/210
+ * TEGRA_POWERGATE_CELP Low-power CPU (cluster 1) Tegra30/114/124
+ * TEGRA_POWERGATE_3D1 3D1 Tegra30
+ * TEGRA_POWERGATE_CPU0 CPU0 Tegra114/124/210
+ * TEGRA_POWERGATE_C0NC Cluster 0 non-CPU Tegra114/124/210
+ * TEGRA_POWERGATE_C1NC Cluster 1 non-CPU Tegra114/124
+ * TEGRA_POWERGATE_SOR Display interfaces Tegra124/210
+ * TEGRA_POWERGATE_DIS Display A Tegra114/124/210
+ * TEGRA_POWERGATE_DISB Display B Tegra114/124/210
+ * TEGRA_POWERGATE_XUSBA XUSB A Tegra114/124/210
+ * TEGRA_POWERGATE_XUSBB XUSB B Tegra114/124/210
+ * TEGRA_POWERGATE_XUSBC XUSB C Tegra114/124/210
+ * TEGRA_POWERGATE_VIC Video Imaging Compositor Tegra124/210
+ * TEGRA_POWERGATE_IRAM Internal RAM Tegra124/210
+ * TEGRA_POWERGATE_NVDEC NV Video Decode Tegra210
+ * TEGRA_POWERGATE_NVJPG NV JPEG Tegra210
+ * TEGRA_POWERGATE_AUD Audio Tegra210
+ * TEGRA_POWERGATE_DFD Debug Tegra210
+ * TEGRA_POWERGATE_VE2 Video Encode 2 Tegra210
+ */
+#define TEGRA_POWERGATE_CPU 0
+#define TEGRA_POWERGATE_3D 1
+#define TEGRA_POWERGATE_VENC 2
+#define TEGRA_POWERGATE_PCIE 3
+#define TEGRA_POWERGATE_VDEC 4
+#define TEGRA_POWERGATE_L2 5
+#define TEGRA_POWERGATE_MPE 6
+#define TEGRA_POWERGATE_HEG 7
+#define TEGRA_POWERGATE_SATA 8
+#define TEGRA_POWERGATE_CPU1 9
+#define TEGRA_POWERGATE_CPU2 10
+#define TEGRA_POWERGATE_CPU3 11
+#define TEGRA_POWERGATE_CELP 12
+#define TEGRA_POWERGATE_3D1 13
+#define TEGRA_POWERGATE_CPU0 14
+#define TEGRA_POWERGATE_C0NC 15
+#define TEGRA_POWERGATE_C1NC 16
+#define TEGRA_POWERGATE_SOR 17
+#define TEGRA_POWERGATE_DIS 18
+#define TEGRA_POWERGATE_DISB 19
+#define TEGRA_POWERGATE_XUSBA 20
+#define TEGRA_POWERGATE_XUSBB 21
+#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
+#define TEGRA_POWERGATE_MAX TEGRA_POWERGATE_VE2
+
+#endif
diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index e9e53473a63e..c028557365ad 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -19,6 +19,8 @@
#ifndef __SOC_TEGRA_PMC_H__
#define __SOC_TEGRA_PMC_H__
+#include <dt-bindings/power/tegra-powergate.h>
+
#include <linux/reboot.h>
#include <soc/tegra/pm.h>
@@ -39,43 +41,8 @@ int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
#endif /* CONFIG_SMP */
/*
- * powergate and I/O rail APIs
+ * I/O rail APIs
*/
-
-#define TEGRA_POWERGATE_CPU 0
-#define TEGRA_POWERGATE_3D 1
-#define TEGRA_POWERGATE_VENC 2
-#define TEGRA_POWERGATE_PCIE 3
-#define TEGRA_POWERGATE_VDEC 4
-#define TEGRA_POWERGATE_L2 5
-#define TEGRA_POWERGATE_MPE 6
-#define TEGRA_POWERGATE_HEG 7
-#define TEGRA_POWERGATE_SATA 8
-#define TEGRA_POWERGATE_CPU1 9
-#define TEGRA_POWERGATE_CPU2 10
-#define TEGRA_POWERGATE_CPU3 11
-#define TEGRA_POWERGATE_CELP 12
-#define TEGRA_POWERGATE_3D1 13
-#define TEGRA_POWERGATE_CPU0 14
-#define TEGRA_POWERGATE_C0NC 15
-#define TEGRA_POWERGATE_C1NC 16
-#define TEGRA_POWERGATE_SOR 17
-#define TEGRA_POWERGATE_DIS 18
-#define TEGRA_POWERGATE_DISB 19
-#define TEGRA_POWERGATE_XUSBA 20
-#define TEGRA_POWERGATE_XUSBB 21
-#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
-#define TEGRA_POWERGATE_MAX TEGRA_POWERGATE_VE2
-
-#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D
-
#define TEGRA_IO_RAIL_CSIA 0
#define TEGRA_IO_RAIL_CSIB 1
#define TEGRA_IO_RAIL_DSI 2
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-26 15:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 15:48 [PATCH V6 00/10] Add generic PM domain support for Tegra Jon Hunter
2016-02-26 15:48 ` [PATCH V6 02/10] PM / Domains: Add function to get the last domain added Jon Hunter
[not found] ` <1456501724-28477-3-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 7:04 ` Thierry Reding
2016-02-29 13:32 ` Ulf Hansson
2016-02-26 15:48 ` [PATCH V6 05/10] Documentation: DT: bindings: Add power domain info for NVIDIA PMC Jon Hunter
[not found] ` <1456501724-28477-6-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 7:22 ` Thierry Reding
2016-02-29 10:37 ` Jon Hunter
[not found] ` <56D41F60.6010504-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 11:01 ` Thierry Reding
2016-03-01 11:36 ` Jon Hunter
2016-02-26 15:48 ` [PATCH V6 07/10] soc: tegra: pmc: Add generic PM domain support Jon Hunter
[not found] ` <1456501724-28477-8-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-02 0:18 ` Kevin Hilman
[not found] ` <1456501724-28477-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-26 15:48 ` [PATCH V6 01/10] PM / Domains: Fix removal of a subdomain Jon Hunter
[not found] ` <1456501724-28477-2-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 6:58 ` Thierry Reding
2016-02-29 12:13 ` Ulf Hansson
2016-02-26 15:48 ` [PATCH V6 03/10] PM / Domains: Add function to remove a pm-domain Jon Hunter
2016-02-29 7:15 ` Thierry Reding
2016-02-29 10:14 ` Jon Hunter
[not found] ` <56D41A17.20008-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 13:10 ` Jon Hunter
2016-02-29 13:45 ` Ulf Hansson
2016-02-26 15:48 ` [PATCH V6 04/10] Documentation: DT: bindings: Update NVIDIA PMC for Tegra Jon Hunter
2016-03-02 17:02 ` Thierry Reding
2016-02-26 15:48 ` [PATCH V6 06/10] soc: tegra: pmc: Wait for powergate state to change Jon Hunter
[not found] ` <1456501724-28477-7-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 7:24 ` Thierry Reding
2016-02-29 10:38 ` Jon Hunter
2016-02-29 12:14 ` Thierry Reding
2016-02-26 15:48 ` Jon Hunter [this message]
2016-02-26 15:48 ` [PATCH V6 09/10] ARM64: tegra: select PM_GENERIC_DOMAINS Jon Hunter
[not found] ` <1456501724-28477-10-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-02-29 13:48 ` Ulf Hansson
2016-02-26 15:48 ` [PATCH V6 10/10] ARM64: tegra: Add audio PM domain device node for Tegra210 Jon Hunter
2016-02-29 7:30 ` Thierry Reding
2016-02-29 10:41 ` Jon Hunter
2016-02-29 10:54 ` Thierry Reding
2016-03-02 15:35 ` [PATCH V6 00/10] Add generic PM domain support for Tegra Thierry Reding
[not found] ` <20160302153556.GB21035-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2016-03-02 19:36 ` Kevin Hilman
[not found] ` <7h7fhk3c4o.fsf-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-03-02 23:07 ` Rafael J. Wysocki
2016-03-03 3:22 ` Kevin Hilman
[not found] ` <7h7fhkxn1r.fsf-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-03-03 11:47 ` Jon Hunter
2016-03-07 13:32 ` Jon Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456501724-28477-9-git-send-email-jonathanh@nvidia.com \
--to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).