linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support
@ 2015-06-04 18:53 Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 01/15] PM / Domains: Add DT bindings for the R-Car System Controller Geert Uytterhoeven
                   ` (14 more replies)
  0 siblings, 15 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

	Hi all,

The Renesas R-Car System Controller, as found in Renesas R-Car Gen1 and
Gen2 SoCs, provides power management for the CPU cores and various
coprocessors.

This RFC patch series adds preliminary DT support for the R-Car SYSC,
using the generic PM Domain.

Special cases, like PM domains containing CPU cores or SCUs, are
handled by scanning the DT topology.

The SYSCIER register value is derived from the PM domains found in DT,
which will allow to get rid of the hardcoded values in pm-rcar-gen2.c.
However, this means we have to scan for PM domains even if CONFIG_PM=n.
One step closer to making CONFIG_PM mandatory (and getting rid of
drivers/sh/pm_runtime.c ;-)?

Patches:
  - Patch 1 adds the DT binding documentation (alternatives I considered
    below the "---"-line),
  - Patch 2 contains the driver implementation,
  - Patches 3-6 add device nodes for the L2 cache-controller nodes, as
    R-Car Gen2 has separate power domains for the Cortex-A15 and/or
    Cortex-A7 L2 cache/SCU-combos,
  - Patches 7-10 add links from the CPU nodes to the L2 cache-controller
    nodes, and adds L1 cache information while we're at it,
  - Patches 11-15 add the SYSC PM domains themselves to the various dtsi
    files.

Questions:
  - What are the bindings for Cortex-A15/A7 L2 cache-controller nodes?
    For now I used 'compatible = "cache"', and some fairly standard
    properties.
  - Let's see how/if this integrates with "[PATCH RFC 0/3] PM / Domains:
    Generic PM domains for cpus" from Lina Iyer
    (http://www.spinics.net/lists/arm-kernel/msg423430.html)

Known issues:
  - Although this supports R-Car H1 (r8a7779), the DT PM domain code
    conflicts with the current setup code in pm-r8a7779, which is used
    regardless of DT,
  - This needs better integration with the PM code in pm-rcar-gen2, and
    the SMP code in smp-r8a7790.

Dependencies:
  - This is based on Simon Horman's renesas-devel-20150603-v4.1-rc6,
  - Series "[PATCH 00/11] ARM: shmobile: R-Mobile / R-Car PM Domain
    improvements", which I've just posted to linux-sh (only matters if
    you want to apply this series, not for the casual reviewer).

This was tested on r8a7791/koelsch.

Thanks for your comments!

Geert Uytterhoeven (15):
  PM / Domains: Add DT bindings for the R-Car System Controller
  ARM: shmobile: R-Car: Add DT support for PM domains
  ARM: shmobile: r8a7790 dtsi: Add L2 cache-controller nodes
  ARM: shmobile: r8a7791 dtsi: Add L2 cache-controller node
  ARM: shmobile: r8a7793 dtsi: Add L2 cache-controller node
  ARM: shmobile: r8a7794 dtsi: Add L2 cache-controller node
  ARM: shmobile: r8a7790 dtsi: Add L1 cache information to CPU nodes
  ARM: shmobile: r8a7791 dtsi: Add L1 cache information to CPU nodes
  ARM: shmobile: r8a7793 dtsi: Add L1 cache information to CPU node
  ARM: shmobile: r8a7794 dtsi: Add L1 cache information to CPU nodes
  ARM: shmobile: r8a7779 dtsi: Add SYSC PM domains
  ARM: shmobile: r8a7790 dtsi: Add SYSC PM domains
  ARM: shmobile: r8a7791 dtsi: Add SYSC PM domains
  ARM: shmobile: r8a7793 dtsi: Add SYSC PM domains
  ARM: shmobile: r8a7794 dtsi: Add SYSC PM domains

 .../bindings/power/renesas,sysc-rcar.txt           |  82 ++++++
 arch/arm/boot/dts/r8a7779.dtsi                     |  48 ++++
 arch/arm/boot/dts/r8a7790.dtsi                     | 193 +++++++++++++
 arch/arm/boot/dts/r8a7791.dtsi                     |  73 +++++
 arch/arm/boot/dts/r8a7793.dtsi                     |  61 +++++
 arch/arm/boot/dts/r8a7794.dtsi                     |  71 +++++
 arch/arm/mach-shmobile/pm-rcar.c                   | 299 +++++++++++++++++++++
 7 files changed, 827 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/renesas,sysc-rcar.txt

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH/RFC 01/15] PM / Domains: Add DT bindings for the R-Car System Controller
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 02/15] ARM: shmobile: R-Car: Add DT support for PM domains Geert Uytterhoeven
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

The Renesas R-Car System Controller provides power management for the
CPU cores and various coprocessors, following the generic PM domain
bindings in Documentation/devicetree/bindings/power/power_domain.txt.

This supports both R-Car Gen1 and Gen2.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Alternatives I considered:

  - Using a single node per power register block, even if it contains
    multiple domains.
      - You cannot just have a property with the number of domains, as
	index 0 is not used on R-Car H1. Hence the need for
	"renesas,pm-domain-indices" and "renesas,interrupt-bits",
      - "#power-domain-cells = <1>" for nodes with multiple domains,
	which allows typos in "power-domains = <&pd_ca15_cpu n>", using
	an invalid value of "n",
      - Hence my first version had:

	    pd_ca15_scu: ca15_scu@180 {
		    reg = <0x180 0x20>;
		    #address-cells = <1>;
		    #size-cells = <0>;
		    #power-domain-cells = <0>;
		    renesas,interrupt-bits = <12>;

		    pd_ca15_cpu: ca15_cpu@40 {
			    reg = <0x40 0x20>;
			    #power-domain-cells = <1>;
			    renesas,pm-domain-indices = <0 1>;
			    renesas,pm-domain-names =
				    "ca15_cpu0", "ca15_cpu1";
			    renesas,interrupt-bits = <0 1>;
		    };
	    };

  - Using a linear description in DT
      - Needs parent links for subdomains,
      - More complicated to parse (lesson learned from R-Mobile PM
	Domain support).
  - Keeping the power register block offset and the bit number as separate
    "reg" cells, increasing "#address-cells" from 2 to 3,
  - Merging the interrupt bit (which needs only 5 bits) in the other "reg"
    cell, decreasing "#address-cells" from 2 to 1.

 .../bindings/power/renesas,sysc-rcar.txt           | 82 ++++++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/renesas,sysc-rcar.txt

diff --git a/Documentation/devicetree/bindings/power/renesas,sysc-rcar.txt b/Documentation/devicetree/bindings/power/renesas,sysc-rcar.txt
new file mode 100644
index 0000000000000000..72d2fcd6beb98749
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/renesas,sysc-rcar.txt
@@ -0,0 +1,82 @@
+DT bindings for the Renesas R-Car System Controller
+
+== System Controller Node ==
+
+The R-Car System Controller provides power management for the CPU cores and
+various coprocessors.
+
+Required properties:
+  - compatible: Should be "renesas,sysc-<soctype>", "renesas,sysc-rcar" as
+	      fallback.
+	      Examples with soctypes are:
+		- "renesas,sysc-r8a7779" (R-Car H1)
+		- "renesas,sysc-r8a7790" (R-Car H2)
+		- "renesas,sysc-r8a7791" (R-Car M2-W)
+		- "renesas,sysc-r8a7793" (R-Car M2-N)
+		- "renesas,sysc-r8a7794" (R-Car E2)
+  - reg: Address start and address range for the device.
+  - pm-domains: This node contains a hierarchy of PM Domain Nodes.
+    Dependencies (e.g. parent SCUs should not be powered off while child CPUs
+    are on) should be reflected using subnodes.
+
+
+== PM Domain Nodes ==
+
+Each of the PM domain nodes represents a PM domain, as documented by the
+generic PM domain bindings in
+Documentation/devicetree/bindings/power/power_domain.txt.
+
+Required properties:
+  - #power-domain-cells: Must be 0.
+  - reg: This property must contain 2 values:
+	   - The first value is the number of the interrupt bit representing
+	     the power area in the various Interrupt Registers (e.g. SYSCISR,
+	     Interrupt Status Register),
+	   - The second value encodes the power register block offset (which is
+	     a multiple of 64), and the number of the bit representing the
+	     power area in the various Power Control Registers (e.g. PWROFFSR,
+	     Power Shutoff Status Register). This value is created by ORing
+	     these two numbers.
+	 The parent's node must contain the following two properties:
+	   - #address-cells: Must be 2,
+	   - #size-cells: Must be 0.
+
+
+Example:
+
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-r8a7791", "renesas,sysc-rcar";
+		reg = <0 0xe6180000 0 0x0200>;
+
+		pm-domains {
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			pd_ca15_scu: scu@12 {
+				reg = <12 0x180>;
+				#address-cells = <2>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_ca15_cpu0: cpu@0 {
+					reg = <0 0x40>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca15_cpu1: cpu@1 {
+					reg = <1 0x41>;
+					#power-domain-cells = <0>;
+				};
+			};
+
+			pd_sh: sh@16 {
+				reg = <16 0x80>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_sgx: sgx@20 {
+				reg = <20 0xc0>;
+				#power-domain-cells = <0>;
+			};
+		};
+	};
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 02/15] ARM: shmobile: R-Car: Add DT support for PM domains
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 01/15] PM / Domains: Add DT bindings for the R-Car System Controller Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-24 12:11   ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 03/15] ARM: shmobile: r8a7790 dtsi: Add L2 cache-controller nodes Geert Uytterhoeven
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Populate the PM domains from DT.

Special cases, like PM domains containing CPU cores or SCUs, are
handled by scanning the DT topology.

The SYSCIER register value is derived from the PM domains found in DT,
which will allow to get rid of the hardcoded values in pm-rcar-gen2.c.
However, this means we have to scan for PM domains even if CONFIG_PM=n.

Known issues:
  - Although this supports R-Car H1 (r8a7779), the DT PM domain code
    conflicts with the current setup code in pm-r8a7779, which is used
    regardless of DT,
  - This needs better integration with the PM code in pm-rcar-gen2, and
    the SMP code in smp-r8a7790.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/mach-shmobile/pm-rcar.c | 299 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 299 insertions(+)

diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c
index 4092ad16e0a42a26..13e5f1ee8d89d296 100644
--- a/arch/arm/mach-shmobile/pm-rcar.c
+++ b/arch/arm/mach-shmobile/pm-rcar.c
@@ -11,6 +11,9 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/mm.h>
+#include <linux/of_address.h>
+#include <linux/pm_domain.h>
+#include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <asm/io.h>
 #include "pm-rcar.h"
@@ -51,11 +54,29 @@
 static void __iomem *rcar_sysc_base;
 static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
 
+static unsigned int rcar_gen;
+
 static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch, bool on)
 {
 	unsigned int sr_bit, reg_offs;
 	int k;
 
+	/*
+	 * Only R-Car H1 can control power to CPUs
+	 * Use WFI to power off, CPG/APMU to resume ARM cores on later R-Car
+	 * Generations
+	 */
+	switch (rcar_gen) {
+	case 2:
+		/* FIXME Check rcar_pm_domain.cpu instead? */
+		switch (sysc_ch->chan_offs) {
+		case SYSC_PWR_CA15_CPU:
+		case SYSC_PWR_CA7_CPU:
+			pr_err("%s: Cannot control power to CPU\n", __func__);
+			return -EINVAL;
+		}
+	}
+
 	if (on) {
 		sr_bit = SYSCSR_PONENB;
 		reg_offs = PWRONCR_OFFS;
@@ -162,3 +183,281 @@ void __iomem *rcar_sysc_init(phys_addr_t base)
 
 	return rcar_sysc_base;
 }
+
+#ifndef CONFIG_ARCH_SHMOBILE_LEGACY
+struct rcar_pm_domain {
+	struct generic_pm_domain genpd;
+	struct dev_power_governor *gov;
+	struct rcar_sysc_ch ch;
+	unsigned busy:1;		/* Set if always -EBUSY */
+	unsigned cpu:1;			/* Set if domain contains CPU */
+	char name[0];
+};
+
+static inline struct rcar_pm_domain *to_rcar_pd(struct generic_pm_domain *d)
+{
+	return container_of(d, struct rcar_pm_domain, genpd);
+}
+
+static bool rcar_pd_active_wakeup(struct device *dev)
+{
+	return true;
+}
+
+static int rcar_pd_power_down(struct generic_pm_domain *genpd)
+{
+	struct rcar_pm_domain *rcar_pd = to_rcar_pd(genpd);
+
+	pr_debug("%s: %s\n", __func__, genpd->name);
+
+	if (rcar_pd->busy) {
+		pr_debug("%s: %s busy\n", __func__, genpd->name);
+		return -EBUSY;
+	}
+
+	return rcar_sysc_power_down(&rcar_pd->ch);
+}
+
+static int rcar_pd_power_up(struct generic_pm_domain *genpd)
+{
+	pr_debug("%s: %s\n", __func__, genpd->name);
+	return rcar_sysc_power_up(&to_rcar_pd(genpd)->ch);
+}
+
+static void rcar_init_pm_domain(struct rcar_pm_domain *rcar_pd)
+{
+	struct generic_pm_domain *genpd = &rcar_pd->genpd;
+	struct dev_power_governor *gov = rcar_pd->gov;
+
+	pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
+	genpd->dev_ops.active_wakeup	= rcar_pd_active_wakeup;
+	genpd->power_off		= rcar_pd_power_down;
+	genpd->power_on			= rcar_pd_power_up;
+
+	if (rcar_sysc_power_is_off(&rcar_pd->ch))
+		rcar_sysc_power_up(&rcar_pd->ch);
+}
+
+enum pd_types {
+	PD_NORMAL,
+	PD_CPU,
+	PD_SCU,
+};
+
+#define MAX_NUM_SPECIAL_PDS	16
+
+static struct special_pd {
+	struct device_node *pd;
+	enum pd_types type;
+} special_pds[MAX_NUM_SPECIAL_PDS] __initdata;
+
+static unsigned int num_special_pds __initdata;
+
+static void __init add_special_pd(struct device_node *np, enum pd_types type)
+{
+	unsigned int i;
+	struct device_node *pd;
+
+	pd = of_parse_phandle(np, "power-domains", 0);
+	if (!pd)
+		return;
+
+	for (i = 0; i < num_special_pds; i++)
+		if (pd == special_pds[i].pd && type == special_pds[i].type) {
+			of_node_put(pd);
+			return;
+		}
+
+	if (num_special_pds == ARRAY_SIZE(special_pds)) {
+		pr_warn("Too many special PM domains\n");
+		of_node_put(pd);
+		return;
+	}
+
+	pr_debug("Special PM domain %s type %d for %s\n", pd->name, type,
+		 np->full_name);
+
+	special_pds[num_special_pds].pd = pd;
+	special_pds[num_special_pds].type = type;
+	num_special_pds++;
+}
+
+static void __init get_special_pds(void)
+{
+	struct device_node *cpu, *scu;
+
+	/* PM domains containing CPUs */
+	for_each_node_by_type(cpu, "cpu") {
+		add_special_pd(cpu, PD_CPU);
+
+		/* SCU, represented by an L2 node */
+		scu = of_parse_phandle(cpu, "next-level-cache", 0);
+		if (scu) {
+			add_special_pd(scu, PD_SCU);
+			of_node_put(scu);
+		}
+	}
+}
+
+static void __init put_special_pds(void)
+{
+	unsigned int i;
+
+	for (i = 0; i < num_special_pds; i++)
+		of_node_put(special_pds[i].pd);
+}
+
+static enum pd_types __init pd_type(const struct device_node *pd)
+{
+	unsigned int i;
+
+	for (i = 0; i < num_special_pds; i++)
+		if (pd == special_pds[i].pd)
+			return special_pds[i].type;
+
+	return PD_NORMAL;
+}
+
+static void __init rcar_setup_pm_domain(struct device_node *np,
+					struct rcar_pm_domain *pd)
+{
+	const char *name = pd->genpd.name;
+
+	switch (pd_type(np)) {
+	case PD_CPU:
+		/*
+		 * This domain contains a CPU core and therefore it should
+		 * only be turned off if the CPU is not in use.
+		 */
+		pr_debug("PM domain %s contains CPU\n", name);
+		pd->gov = &pm_domain_always_on_gov;
+		pd->busy = true;
+		pd->cpu = true;
+		break;
+
+	case PD_SCU:
+		/*
+		 * This domain contains an SCU and cache-controller, and
+		 * therefore it should only be turned off if the CPU cores are
+		 * not in use.
+		 */
+		pr_debug("PM domain %s contains SCU\n", name);
+		pd->gov = &pm_domain_always_on_gov;
+		pd->busy = true;
+		break;
+
+	case PD_NORMAL:
+		break;
+	}
+
+	rcar_init_pm_domain(pd);
+}
+
+static int __init rcar_add_pm_domains(struct device_node *parent,
+				      struct generic_pm_domain *genpd_parent,
+				      u32 *syscier)
+{
+	struct device_node *np;
+
+	for_each_child_of_node(parent, np) {
+		struct rcar_pm_domain *pd;
+		u32 reg[2];
+		int n;
+
+		if (of_property_read_u32_array(np, "reg", reg, ARRAY_SIZE(reg)))
+			return -EINVAL;
+
+		*syscier |= BIT(reg[0]);
+
+		if (!IS_ENABLED(CONFIG_PM)) {
+			/* Just continue parsing "reg" to update *syscier */
+			rcar_add_pm_domains(np, NULL, syscier);
+			continue;
+		}
+
+		n = snprintf(NULL, 0, "%s@%u", np->name, reg[0]) + 1;
+
+		pd = kzalloc(sizeof(*pd) + n, GFP_KERNEL);
+		if (!pd)
+			return -ENOMEM;
+
+		snprintf(pd->name, n, "%s@%u", np->name, reg[0]);
+		pd->genpd.name = pd->name;
+		pd->ch.chan_offs = reg[1] & ~31;
+		pd->ch.chan_bit = reg[1] & 31;
+		pd->ch.isr_bit = reg[0];
+
+		rcar_setup_pm_domain(np, pd);
+		if (genpd_parent)
+			pm_genpd_add_subdomain(genpd_parent, &pd->genpd);
+		of_genpd_add_provider_simple(np, &pd->genpd);
+
+		rcar_add_pm_domains(np, &pd->genpd, syscier);
+	}
+	return 0;
+}
+
+static const struct of_device_id rcar_sysc_matches[] = {
+	{ .compatible = "renesas,sysc-r8a7779", .data = (void *)1 },
+	/* Default is R-Car Gen2 */
+	{ .compatible = "renesas,sysc-rcar", .data = (void *)2 },
+	{ /* sentinel */ }
+};
+
+static int __init rcar_init_pm_domains(void)
+{
+	const struct of_device_id *match;
+	struct device_node *np, *pmd;
+	bool scanned = false;
+	void __iomem *base;
+	int ret = 0;
+
+	for_each_matching_node_and_match(np, rcar_sysc_matches, &match) {
+		u32 syscier = 0;
+
+		rcar_gen = (unsigned int)match->data;
+
+		base = of_iomap(np, 0);
+		if (!base) {
+			pr_warn("%s cannot map reg 0\n", np->full_name);
+			continue;
+		}
+
+		rcar_sysc_base = base;	// FIXME conflicts with rcar_sysc_init()
+
+		pmd = of_get_child_by_name(np, "pm-domains");
+		if (!pmd) {
+			pr_warn("%s lacks pm-domains node\n", np->full_name);
+			continue;
+		}
+
+		if (!scanned) {
+			/* Find PM domains containing special blocks */
+			get_special_pds();
+			scanned = true;
+		}
+
+		ret = rcar_add_pm_domains(pmd, NULL, &syscier);
+		of_node_put(pmd);
+		if (ret) {
+			of_node_put(np);
+			break;
+		}
+
+		/*
+		 * Enable all interrupt sources, but do not use interrupt
+		 * handler
+		 */
+		pr_debug("%s: syscier = 0x%08x\n", np->full_name, syscier);
+		iowrite32(syscier, rcar_sysc_base + SYSCIER);
+		iowrite32(0, rcar_sysc_base + SYSCIMR);
+	}
+
+	put_special_pds();
+
+	return ret;
+}
+
+core_initcall(rcar_init_pm_domains);
+
+#endif /* !CONFIG_ARCH_SHMOBILE_LEGACY */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 03/15] ARM: shmobile: r8a7790 dtsi: Add L2 cache-controller nodes
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 01/15] PM / Domains: Add DT bindings for the R-Car System Controller Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 02/15] ARM: shmobile: R-Car: Add DT support for PM domains Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 04/15] ARM: shmobile: r8a7791 dtsi: Add L2 cache-controller node Geert Uytterhoeven
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add device nodes for the L2 caches:
  - The L2 cache for the Cortex-A15 CPU cores is 2 MiB large (organized
    as 128 KiB x 16 ways), and requires the following settings:
      - Tag RAM latency: 3 cycles,
      - Data RAM latency: 4 cycles,
      - Data RAM setup: 1 cycle,
  - The L2 cache for the Cortex-A7 CPU cores is 512 KiB large (organized
    as 64 KiB x 8 ways).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
What are the DT bindings for a Cortex-A15 L2 cache controller?
---
 arch/arm/boot/dts/r8a7790.dtsi | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 7fbcad087ee384e8..729172090f865e4d 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -112,6 +112,30 @@
 		};
 	};
 
+	L2_CA15: cache-controller@0 {
+		compatible = "cache";
+
+		arm,data-latency = <4 4 1>;
+		arm,tag-latency = <3 3 3>;
+		cache-unified;
+		cache-level = <2>;
+		cache-size = <0x200000>;
+		cache-sets = <4096>;
+		cache-block-size = <32>;
+		cache-line-size = <32>;
+	};
+
+	L2_CA7: cache-controller@1 {
+		compatible = "cache";
+
+		cache-unified;
+		cache-level = <2>;
+		cache-size = <0x80000>;
+		cache-sets = <2048>;
+		cache-block-size = <32>;
+		cache-line-size = <32>;
+	};
+
 	gic: interrupt-controller@f1001000 {
 		compatible = "arm,cortex-a15-gic";
 		#interrupt-cells = <3>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 04/15] ARM: shmobile: r8a7791 dtsi: Add L2 cache-controller node
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 03/15] ARM: shmobile: r8a7790 dtsi: Add L2 cache-controller nodes Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 05/15] ARM: shmobile: r8a7793 " Geert Uytterhoeven
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the L2 cache:
  - The L2 cache for the Cortex-A15 CPU cores is 1 MiB large (organized
    as 64 KiB x 16 ways), and requires the following settings:
      - Tag RAM latency: 3 cycles,
      - Data RAM latency: 4 cycles,
      - Data RAM setup: 0 cycles.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
What are the DT bindings for a Cortex-A15 L2 cache controller?
---
 arch/arm/boot/dts/r8a7791.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index b657c7e7363e3d99..8013223448b5b464 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -69,6 +69,19 @@
 		};
 	};
 
+	L2_CA15: cache-controller@0 {
+		compatible = "cache";
+
+		arm,data-latency = <4 4 0>;
+		arm,tag-latency = <3 3 3>;
+		cache-unified;
+		cache-level = <2>;
+		cache-size = <0x100000>;
+		cache-sets = <2048>;
+		cache-block-size = <32>;
+		cache-line-size = <32>;
+	};
+
 	gic: interrupt-controller@f1001000 {
 		compatible = "arm,cortex-a15-gic";
 		#interrupt-cells = <3>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 05/15] ARM: shmobile: r8a7793 dtsi: Add L2 cache-controller node
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 04/15] ARM: shmobile: r8a7791 dtsi: Add L2 cache-controller node Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 06/15] ARM: shmobile: r8a7794 " Geert Uytterhoeven
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the L2 cache:
  - The L2 cache for the Cortex-A15 CPU cores is 1 MiB large (organized
    as 64 KiB x 16 ways), and requires the following settings:
      - Tag RAM latency: 3 cycles,
      - Data RAM latency: 4 cycles,
      - Data RAM setup: 0 cycles.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
What are the DT bindings for a Cortex-A15 L2 cache controller?
---
 arch/arm/boot/dts/r8a7793.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index f337634888de7800..cf153b9c2367a211 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -41,6 +41,19 @@
 		};
 	};
 
+	L2_CA15: cache-controller@0 {
+		compatible = "cache";
+
+		arm,data-latency = <4 4 0>;
+		arm,tag-latency = <3 3 3>;
+		cache-unified;
+		cache-level = <2>;
+		cache-size = <0x100000>;
+		cache-sets = <2048>;
+		cache-block-size = <32>;
+		cache-line-size = <32>;
+	};
+
 	gic: interrupt-controller@f1001000 {
 		compatible = "arm,cortex-a15-gic";
 		#interrupt-cells = <3>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 06/15] ARM: shmobile: r8a7794 dtsi: Add L2 cache-controller node
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (4 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 05/15] ARM: shmobile: r8a7793 " Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 07/15] ARM: shmobile: r8a7790 dtsi: Add L1 cache information to CPU nodes Geert Uytterhoeven
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the L2 cache:
  - The L2 cache for the Cortex-A7 CPU cores is 512 KiB large (organized
    as 64 KiB x 8 ways).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
What are the DT bindings for a Cortex-A15 L2 cache controller?
---
 arch/arm/boot/dts/r8a7794.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index d26cce1f609dd7b8..0c3ab5febe0a88d8 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -38,6 +38,17 @@
 		};
 	};
 
+	L2_CA7: cache-controller@1 {
+		compatible = "cache";
+
+		cache-unified;
+		cache-level = <2>;
+		cache-size = <0x80000>;
+		cache-sets = <2048>;
+		cache-block-size = <32>;
+		cache-line-size = <32>;
+	};
+
 	gic: interrupt-controller@f1001000 {
 		compatible = "arm,cortex-a7-gic";
 		#interrupt-cells = <3>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 07/15] ARM: shmobile: r8a7790 dtsi: Add L1 cache information to CPU nodes
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (5 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 06/15] ARM: shmobile: r8a7794 " Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 08/15] ARM: shmobile: r8a7791 " Geert Uytterhoeven
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Describe the L1 instruction and data caches in the CPU nodes:
  - The L1 caches for the Cortex-A15 CPU cores, and the L1 instruction
    caches for the Cortex-A7 CPU cores are organized as 16 KiB x 2
    ways,
  - The L1 data caches for the Cortex-A7 CPU cores are organized as 8
    KiB x 4 ways.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7790.dtsi | 80 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 729172090f865e4d..bc98bb6cff635ae5 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -53,6 +53,16 @@
 			clocks = <&cpg_clocks R8A7790_CLK_Z>;
 			clock-latency = <300000>; /* 300 us */
 
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
+
 			/* kHz - uV - OPPs unknown yet */
 			operating-points = <1400000 1000000>,
 					   <1225000 1000000>,
@@ -67,6 +77,16 @@
 			compatible = "arm,cortex-a15";
 			reg = <1>;
 			clock-frequency = <1300000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
 		};
 
 		cpu2: cpu@2 {
@@ -74,6 +94,16 @@
 			compatible = "arm,cortex-a15";
 			reg = <2>;
 			clock-frequency = <1300000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
 		};
 
 		cpu3: cpu@3 {
@@ -81,6 +111,16 @@
 			compatible = "arm,cortex-a15";
 			reg = <3>;
 			clock-frequency = <1300000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
 		};
 
 		cpu4: cpu@4 {
@@ -88,6 +128,16 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x100>;
 			clock-frequency = <780000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <256>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA7>;
 		};
 
 		cpu5: cpu@5 {
@@ -95,6 +145,16 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x101>;
 			clock-frequency = <780000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <256>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA7>;
 		};
 
 		cpu6: cpu@6 {
@@ -102,6 +162,16 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x102>;
 			clock-frequency = <780000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <256>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA7>;
 		};
 
 		cpu7: cpu@7 {
@@ -109,6 +179,16 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x103>;
 			clock-frequency = <780000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <256>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA7>;
 		};
 	};
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 08/15] ARM: shmobile: r8a7791 dtsi: Add L1 cache information to CPU nodes
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 07/15] ARM: shmobile: r8a7790 dtsi: Add L1 cache information to CPU nodes Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 09/15] ARM: shmobile: r8a7793 dtsi: Add L1 cache information to CPU node Geert Uytterhoeven
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Describe the L1 instruction and data caches in the CPU nodes:
  - The L1 caches for the Cortex-A15 CPU cores are organized as 16 KiB x
    2 ways.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7791.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 8013223448b5b464..4e4011a2978bcfce 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -52,6 +52,16 @@
 			clocks = <&cpg_clocks R8A7791_CLK_Z>;
 			clock-latency = <300000>; /* 300 us */
 
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
+
 			/* kHz - uV - OPPs unknown yet */
 			operating-points = <1500000 1000000>,
 					   <1312500 1000000>,
@@ -66,6 +76,16 @@
 			compatible = "arm,cortex-a15";
 			reg = <1>;
 			clock-frequency = <1500000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
 		};
 	};
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 09/15] ARM: shmobile: r8a7793 dtsi: Add L1 cache information to CPU node
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (7 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 08/15] ARM: shmobile: r8a7791 " Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 10/15] ARM: shmobile: r8a7794 dtsi: Add L1 cache information to CPU nodes Geert Uytterhoeven
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Describe the L1 instruction and data caches in the CPU node:
  - The L1 caches for the Cortex-A15 CPU cores are organized as 16 KiB x
    2 ways.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7793.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index cf153b9c2367a211..a7e892fe3efa7fd3 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -38,6 +38,16 @@
 					   < 937500 1000000>,
 					   < 750000 1000000>,
 					   < 375000 1000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <512>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA15>;
 		};
 	};
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 10/15] ARM: shmobile: r8a7794 dtsi: Add L1 cache information to CPU nodes
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (8 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 09/15] ARM: shmobile: r8a7793 dtsi: Add L1 cache information to CPU node Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 11/15] ARM: shmobile: r8a7779 dtsi: Add SYSC PM domains Geert Uytterhoeven
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Describe the L1 instruction and data caches in the CPU nodes:
  - The L1 instruction caches for the Cortex-A7 CPU cores are organized
    as 16 KiB x 2 ways,
  - The L1 data caches for the Cortex-A7 CPU cores are organized as 8
    KiB x 4 ways.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7794.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 0c3ab5febe0a88d8..0ea502a43d553e25 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -28,6 +28,16 @@
 			compatible = "arm,cortex-a7";
 			reg = <0>;
 			clock-frequency = <1000000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <256>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA7>;
 		};
 
 		cpu1: cpu@1 {
@@ -35,6 +45,16 @@
 			compatible = "arm,cortex-a7";
 			reg = <1>;
 			clock-frequency = <1000000000>;
+
+			i-cache-size = <0x8000>;
+			i-cache-sets = <512>;
+			i-cache-block-size = <32>;
+			i-cache-line-size = <32>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <256>;
+			d-cache-block-size = <32>;
+			d-cache-line-size = <32>;
+			next-level-cache = <&L2_CA7>;
 		};
 	};
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 11/15] ARM: shmobile: r8a7779 dtsi: Add SYSC PM domains
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (9 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 10/15] ARM: shmobile: r8a7794 dtsi: Add L1 cache information to CPU nodes Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 12/15] ARM: shmobile: r8a7790 " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up ARM CPU cores 1-3 to their respective PM domains.
Note that ARM CPU core 0 cannot be shut off.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7779.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index d75f46a539749eae..fbcf02c09fa5b57c 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -34,18 +34,21 @@
 			compatible = "arm,cortex-a9";
 			reg = <1>;
 			clock-frequency = <1000000000>;
+			power-domains = <&pd_arm1>;
 		};
 		cpu@2 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <2>;
 			clock-frequency = <1000000000>;
+			power-domains = <&pd_arm2>;
 		};
 		cpu@3 {
 			device_type = "cpu";
 			compatible = "arm,cortex-a9";
 			reg = <3>;
 			clock-frequency = <1000000000>;
+			power-domains = <&pd_arm3>;
 		};
 	};
 
@@ -569,4 +572,49 @@
 				"mmc1", "mmc0";
 		};
 	};
+
+	sysc: system-controller@ffd85000 {
+		compatible = "renesas,sysc-r8a7779", "renesas,sysc-rcar";
+		reg = <0 0xffd85000 0 0x0200>;
+
+		pm-domains {
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			pd_arm1: cpu@1 {
+				reg = <1 0x41>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_arm2: cpu@2 {
+				reg = <2 0x42>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_arm3: cpu@3 {
+				reg = <3 0x43>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_sh: sh@16 {
+				reg = <16 0x80>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_sgx: sgx@20 {
+				reg = <20 0xc0>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_vdp: vdp@21 {
+				reg = <21 0x100>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_imp: imp@24 {
+				reg = <24 0x140>;
+				#power-domain-cells = <0>;
+			};
+		};
+	};
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 12/15] ARM: shmobile: r8a7790 dtsi: Add SYSC PM domains
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (10 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 11/15] ARM: shmobile: r8a7779 dtsi: Add SYSC PM domains Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 13/15] ARM: shmobile: r8a7791 " Geert Uytterhoeven
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up the Cortex-A15 and Cortex-A7 CPU cores and L2 caches/SCUs to
their respective PM domains.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7790.dtsi | 89 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index bc98bb6cff635ae5..ccae1e6d4b12ecc5 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -52,6 +52,7 @@
 			voltage-tolerance = <1>; /* 1% */
 			clocks = <&cpg_clocks R8A7790_CLK_Z>;
 			clock-latency = <300000>; /* 300 us */
+			power-domains = <&pd_ca15_cpu0>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -77,6 +78,7 @@
 			compatible = "arm,cortex-a15";
 			reg = <1>;
 			clock-frequency = <1300000000>;
+			power-domains = <&pd_ca15_cpu1>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -94,6 +96,7 @@
 			compatible = "arm,cortex-a15";
 			reg = <2>;
 			clock-frequency = <1300000000>;
+			power-domains = <&pd_ca15_cpu2>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -111,6 +114,7 @@
 			compatible = "arm,cortex-a15";
 			reg = <3>;
 			clock-frequency = <1300000000>;
+			power-domains = <&pd_ca15_cpu3>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -128,6 +132,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x100>;
 			clock-frequency = <780000000>;
+			power-domains = <&pd_ca7_cpu0>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -145,6 +150,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x101>;
 			clock-frequency = <780000000>;
+			power-domains = <&pd_ca7_cpu1>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -162,6 +168,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x102>;
 			clock-frequency = <780000000>;
+			power-domains = <&pd_ca7_cpu2>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -179,6 +186,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0x103>;
 			clock-frequency = <780000000>;
+			power-domains = <&pd_ca7_cpu3>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -194,6 +202,7 @@
 
 	L2_CA15: cache-controller@0 {
 		compatible = "cache";
+		power-domains = <&pd_ca15_scu>;
 
 		arm,data-latency = <4 4 1>;
 		arm,tag-latency = <3 3 3>;
@@ -207,6 +216,7 @@
 
 	L2_CA7: cache-controller@1 {
 		compatible = "cache";
+		power-domains = <&pd_ca7_scu>;
 
 		cache-unified;
 		cache-level = <2>;
@@ -1476,6 +1486,85 @@
 		};
 	};
 
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-r8a7790", "renesas,sysc-rcar";
+		reg = <0 0xe6180000 0 0x0200>;
+
+		pm-domains {
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			pd_ca15_scu: scu@12 {
+				reg = <12 0x180>;
+				#address-cells = <2>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_ca15_cpu0: cpu@0 {
+					reg = <0 0x40>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca15_cpu1: cpu@1 {
+					reg = <1 0x41>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca15_cpu2: cpu@2 {
+					reg = <2 0x42>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca15_cpu3: cpu@3 {
+					reg = <3 0x43>;
+					#power-domain-cells = <0>;
+				};
+			};
+
+			pd_ca7_scu: scu@21 {
+				reg = <21 0x100>;
+				#address-cells = <2>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_ca7_cpu0: cpu@5 {
+					reg = <5 0x1c0>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca7_cpu1: cpu@6 {
+					reg = <6 0x1c1>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca7_cpu2: cpu@7 {
+					reg = <7 0x1c2>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca7_cpu3: cpu@8 {
+					reg = <8 0x1c3>;
+					#power-domain-cells = <0>;
+				};
+			};
+
+			pd_sh: sh@16 {
+				reg = <16 0x80>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_rgx: rgx@20 {
+				reg = <20 0xc0>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_imp: imp@24 {
+				reg = <24 0x140>;
+				#power-domain-cells = <0>;
+			};
+		};
+	};
+
 	qspi: spi@e6b10000 {
 		compatible = "renesas,qspi-r8a7790", "renesas,qspi";
 		reg = <0 0xe6b10000 0 0x2c>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 13/15] ARM: shmobile: r8a7791 dtsi: Add SYSC PM domains
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (11 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 12/15] ARM: shmobile: r8a7790 " Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 14/15] ARM: shmobile: r8a7793 " Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 15/15] ARM: shmobile: r8a7794 " Geert Uytterhoeven
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up the Cortex-A15 CPU cores and the Cortex-A15 L2 cache/SCU to
their respective PM domains.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7791.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 4e4011a2978bcfce..3554043ee2af3b26 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -51,6 +51,7 @@
 			voltage-tolerance = <1>; /* 1% */
 			clocks = <&cpg_clocks R8A7791_CLK_Z>;
 			clock-latency = <300000>; /* 300 us */
+			power-domains = <&pd_ca15_cpu0>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -76,6 +77,7 @@
 			compatible = "arm,cortex-a15";
 			reg = <1>;
 			clock-frequency = <1500000000>;
+			power-domains = <&pd_ca15_cpu1>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -91,6 +93,7 @@
 
 	L2_CA15: cache-controller@0 {
 		compatible = "cache";
+		power-domains = <&pd_ca15_scu>;
 
 		arm,data-latency = <4 4 0>;
 		arm,tag-latency = <3 3 3>;
@@ -1406,6 +1409,43 @@
 		};
 	};
 
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-r8a7791", "renesas,sysc-rcar";
+		reg = <0 0xe6180000 0 0x0200>;
+
+		pm-domains {
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			pd_ca15_scu: scu@12 {
+				reg = <12 0x180>;
+				#address-cells = <2>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_ca15_cpu0: cpu@0 {
+					reg = <0 0x40>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca15_cpu1: cpu@1 {
+					reg = <1 0x41>;
+					#power-domain-cells = <0>;
+				};
+			};
+
+			pd_sh: sh@16 {
+				reg = <16 0x80>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_sgx: sgx@20 {
+				reg = <20 0xc0>;
+				#power-domain-cells = <0>;
+			};
+		};
+	};
+
 	qspi: spi@e6b10000 {
 		compatible = "renesas,qspi-r8a7791", "renesas,qspi";
 		reg = <0 0xe6b10000 0 0x2c>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 14/15] ARM: shmobile: r8a7793 dtsi: Add SYSC PM domains
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (12 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 13/15] ARM: shmobile: r8a7791 " Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  2015-06-04 18:53 ` [PATCH/RFC 15/15] ARM: shmobile: r8a7794 " Geert Uytterhoeven
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up the first Cortex-A15 CPU core and the Cortex-A15 L2 cache/SCU to
their respective PM domains.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7793.dtsi | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index a7e892fe3efa7fd3..498c9fb389f38fbd 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -30,6 +30,7 @@
 			voltage-tolerance = <1>; /* 1% */
 			clocks = <&cpg_clocks R8A7793_CLK_Z>;
 			clock-latency = <300000>; /* 300 us */
+			power-domains = <&pd_ca15_cpu0>;
 
 			/* kHz - uV - OPPs unknown yet */
 			operating-points = <1500000 1000000>,
@@ -53,6 +54,7 @@
 
 	L2_CA15: cache-controller@0 {
 		compatible = "cache";
+		power-domains = <&pd_ca15_scu>;
 
 		arm,data-latency = <4 4 0>;
 		arm,tag-latency = <3 3 3>;
@@ -396,4 +398,40 @@
 		};
 	};
 
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-r8a7793", "renesas,sysc-rcar";
+		reg = <0 0xe6180000 0 0x0200>;
+
+		pm-domains {
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			pd_ca15_scu: scu@12 {
+				reg = <12 0x180>;
+				#address-cells = <2>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_ca15_cpu0: cpu@0 {
+					reg = <0 0x40>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca15_cpu1: cpu@1 {
+					reg = <1 0x41>;
+					#power-domain-cells = <0>;
+				};
+			};
+
+			pd_sh: sh@16 {
+				reg = <16 0x80>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_sgx: sgx@20 {
+				reg = <20 0xc0>;
+				#power-domain-cells = <0>;
+			};
+		};
+	};
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH/RFC 15/15] ARM: shmobile: r8a7794 dtsi: Add SYSC PM domains
  2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
                   ` (13 preceding siblings ...)
  2015-06-04 18:53 ` [PATCH/RFC 14/15] ARM: shmobile: r8a7793 " Geert Uytterhoeven
@ 2015-06-04 18:53 ` Geert Uytterhoeven
  14 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-04 18:53 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll
  Cc: linux-pm, devicetree, linux-sh, linux-arm-kernel, linux-kernel,
	Geert Uytterhoeven

Add a device node for the System Controller, with subnodes that
represent the hardware power area hierarchy.
Hook up the Cortex-A7 CPU cores and the Cortex-A7 L2 cache/SCU to their
respective PM domains.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/r8a7794.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 0ea502a43d553e25..3d844edaf433ac05 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -28,6 +28,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <0>;
 			clock-frequency = <1000000000>;
+			power-domains = <&pd_ca7_cpu0>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -45,6 +46,7 @@
 			compatible = "arm,cortex-a7";
 			reg = <1>;
 			clock-frequency = <1000000000>;
+			power-domains = <&pd_ca7_cpu1>;
 
 			i-cache-size = <0x8000>;
 			i-cache-sets = <512>;
@@ -60,6 +62,7 @@
 
 	L2_CA7: cache-controller@1 {
 		compatible = "cache";
+		power-domains = <&pd_ca7_scu>;
 
 		cache-unified;
 		cache-level = <2>;
@@ -787,6 +790,43 @@
 		};
 	};
 
+	sysc: system-controller@e6180000 {
+		compatible = "renesas,sysc-r8a7794", "renesas,sysc-rcar";
+		reg = <0 0xe6180000 0 0x0200>;
+
+		pm-domains {
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			pd_ca7_scu: scu@21 {
+				reg = <21 0x100>;
+				#address-cells = <2>;
+				#size-cells = <0>;
+				#power-domain-cells = <0>;
+
+				pd_ca7_cpu0: cpu@5 {
+					reg = <5 0x1c0>;
+					#power-domain-cells = <0>;
+				};
+
+				pd_ca7_cpu1: cpu@6 {
+					reg = <6 0x1c0>;
+					#power-domain-cells = <0>;
+				};
+			};
+
+			pd_sh: sh@16 {
+				reg = <16 0x80>;
+				#power-domain-cells = <0>;
+			};
+
+			pd_sgx: sgx@20 {
+				reg = <20 0xc0>;
+				#power-domain-cells = <0>;
+			};
+		};
+	};
+
 	ipmmu_sy0: mmu@e6280000 {
 		compatible = "renesas,ipmmu-vmsa";
 		reg = <0 0xe6280000 0 0x1000>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH/RFC 02/15] ARM: shmobile: R-Car: Add DT support for PM domains
  2015-06-04 18:53 ` [PATCH/RFC 02/15] ARM: shmobile: R-Car: Add DT support for PM domains Geert Uytterhoeven
@ 2015-06-24 12:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2015-06-24 12:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Rafael J. Wysocki, Kevin Hilman,
	Ulf Hansson, Lina Iyer, Mark Rutland, Pawel Moll, Linux PM list,
	devicetree, Linux-sh list, linux-arm-kernel, linux-kernel

On Thu, Jun 4, 2015 at 8:53 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> --- a/arch/arm/mach-shmobile/pm-rcar.c
> +++ b/arch/arm/mach-shmobile/pm-rcar.c

> @@ -51,11 +54,29 @@
>  static void __iomem *rcar_sysc_base;
>  static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
>
> +static unsigned int rcar_gen;
> +
>  static int rcar_sysc_pwr_on_off(const struct rcar_sysc_ch *sysc_ch, bool on)
>  {
>         unsigned int sr_bit, reg_offs;
>         int k;
>
> +       /*
> +        * Only R-Car H1 can control power to CPUs
> +        * Use WFI to power off, CPG/APMU to resume ARM cores on later R-Car
> +        * Generations
> +        */
> +       switch (rcar_gen) {
> +       case 2:
> +               /* FIXME Check rcar_pm_domain.cpu instead? */
> +               switch (sysc_ch->chan_offs) {
> +               case SYSC_PWR_CA15_CPU:
> +               case SYSC_PWR_CA7_CPU:

Woops, this patch lacked:

+/*
+ * SYSC Power Control Register Base Addresses (R-Car Gen2)
+ */
+#define SYSC_PWR_CA15_CPU      0x40    /* CA15 cores (incl. L1C) (H2/M2/V2H) */
+#define SYSC_PWR_CA7_CPU       0x1c0   /* CA7 cores (incl. L1C) (H2/E2) */

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-06-24 12:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 18:53 [PATCH/RFC 00/15] ARM: shmobile: R-Car: Add SYSC PM Domain DT Support Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 01/15] PM / Domains: Add DT bindings for the R-Car System Controller Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 02/15] ARM: shmobile: R-Car: Add DT support for PM domains Geert Uytterhoeven
2015-06-24 12:11   ` Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 03/15] ARM: shmobile: r8a7790 dtsi: Add L2 cache-controller nodes Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 04/15] ARM: shmobile: r8a7791 dtsi: Add L2 cache-controller node Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 05/15] ARM: shmobile: r8a7793 " Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 06/15] ARM: shmobile: r8a7794 " Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 07/15] ARM: shmobile: r8a7790 dtsi: Add L1 cache information to CPU nodes Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 08/15] ARM: shmobile: r8a7791 " Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 09/15] ARM: shmobile: r8a7793 dtsi: Add L1 cache information to CPU node Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 10/15] ARM: shmobile: r8a7794 dtsi: Add L1 cache information to CPU nodes Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 11/15] ARM: shmobile: r8a7779 dtsi: Add SYSC PM domains Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 12/15] ARM: shmobile: r8a7790 " Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 13/15] ARM: shmobile: r8a7791 " Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 14/15] ARM: shmobile: r8a7793 " Geert Uytterhoeven
2015-06-04 18:53 ` [PATCH/RFC 15/15] ARM: shmobile: r8a7794 " Geert Uytterhoeven

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).