* [PATCH v2 0/3] Adds PMU and S2R support for exynos5800
@ 2014-08-21 13:07 ` Vikas Sajjan
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc
Cc: kgene.kim, tomasz.figa, joshi, sajjan.linux, dianders, olof
Rebased on
1] Kukjin Kim's tree, master branch
http://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/
2] My 5420 PMU Series :
http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg35699.html
Tested on Exynos5800 based chromebook (peach-pi board) with help of
http://www.spinics.net/lists/linux-samsung-soc/msg33750.html (modified to support 5800)
Below procedures were followed to test S2R:
Procedure A:
1. make multi_v7_defconfig
2 enable MCPM for 5420
3. enable S3C RTC
4. pass "no_console_suspend" in bootargs
5. echo +20 > /sys/class/rtc/rtc0/wakealarm && echo mem > /sys/power/state
Procedure B:
1. make exynos_defconfig
2 disable BL_SWITCHER
3. pass "no_console_suspend" in bootargs
4. echo +20 > /sys/class/rtc/rtc0/wakealarm && echo mem > /sys/power/state
Vikas Sajjan (3):
ARM: dts: Add pmu node for exynos5800 SoC
ARM: exynos: Add exynos5800-pmu compatible entry
ARM: exynos: Add PMU and S2R support for exynos5800 SoC
.../devicetree/bindings/arm/samsung/pmu.txt | 1 +
arch/arm/boot/dts/exynos5800.dtsi | 4 ++++
arch/arm/mach-exynos/exynos.c | 1 +
arch/arm/mach-exynos/pm.c | 3 +++
arch/arm/mach-exynos/pmu.c | 22 ++++++++++++++++++++
arch/arm/mach-exynos/regs-pmu.h | 3 ++-
6 files changed, 33 insertions(+), 1 deletion(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 0/3] Adds PMU and S2R support for exynos5800
@ 2014-08-21 13:07 ` Vikas Sajjan
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel
Rebased on
1] Kukjin Kim's tree, master branch
http://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/
2] My 5420 PMU Series :
http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35699.html
Tested on Exynos5800 based chromebook (peach-pi board) with help of
http://www.spinics.net/lists/linux-samsung-soc/msg33750.html (modified to support 5800)
Below procedures were followed to test S2R:
Procedure A:
1. make multi_v7_defconfig
2 enable MCPM for 5420
3. enable S3C RTC
4. pass "no_console_suspend" in bootargs
5. echo +20 > /sys/class/rtc/rtc0/wakealarm && echo mem > /sys/power/state
Procedure B:
1. make exynos_defconfig
2 disable BL_SWITCHER
3. pass "no_console_suspend" in bootargs
4. echo +20 > /sys/class/rtc/rtc0/wakealarm && echo mem > /sys/power/state
Vikas Sajjan (3):
ARM: dts: Add pmu node for exynos5800 SoC
ARM: exynos: Add exynos5800-pmu compatible entry
ARM: exynos: Add PMU and S2R support for exynos5800 SoC
.../devicetree/bindings/arm/samsung/pmu.txt | 1 +
arch/arm/boot/dts/exynos5800.dtsi | 4 ++++
arch/arm/mach-exynos/exynos.c | 1 +
arch/arm/mach-exynos/pm.c | 3 +++
arch/arm/mach-exynos/pmu.c | 22 ++++++++++++++++++++
arch/arm/mach-exynos/regs-pmu.h | 3 ++-
6 files changed, 33 insertions(+), 1 deletion(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] ARM: dts: Add pmu node for exynos5800 SoC
2014-08-21 13:07 ` Vikas Sajjan
@ 2014-08-21 13:07 ` Vikas Sajjan
-1 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc
Cc: kgene.kim, tomasz.figa, joshi, sajjan.linux, dianders, olof
Adds pmu node for exynos5800 SoC.
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
.../devicetree/bindings/arm/samsung/pmu.txt | 1 +
arch/arm/boot/dts/exynos5800.dtsi | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
index 1e1979b..9647317 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
@@ -10,6 +10,7 @@ Properties:
- "samsung,exynos5260-pmu" - for Exynos5260 SoC.
- "samsung,exynos5410-pmu" - for Exynos5410 SoC,
- "samsung,exynos5420-pmu" - for Exynos5420 SoC.
+ - "samsung,exynos5800-pmu" - for Exynos5800 SoC.
second value must be always "syscon".
- reg : offset and length of the register set.
diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
index c0bb356..2009b9c 100644
--- a/arch/arm/boot/dts/exynos5800.dtsi
+++ b/arch/arm/boot/dts/exynos5800.dtsi
@@ -26,3 +26,7 @@
&mfc {
compatible = "samsung,mfc-v8";
};
+
+&pmu_system_controller {
+ compatible = "samsung,exynos5800-pmu", "syscon";
+};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] ARM: dts: Add pmu node for exynos5800 SoC
@ 2014-08-21 13:07 ` Vikas Sajjan
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel
Adds pmu node for exynos5800 SoC.
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
.../devicetree/bindings/arm/samsung/pmu.txt | 1 +
arch/arm/boot/dts/exynos5800.dtsi | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
index 1e1979b..9647317 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
@@ -10,6 +10,7 @@ Properties:
- "samsung,exynos5260-pmu" - for Exynos5260 SoC.
- "samsung,exynos5410-pmu" - for Exynos5410 SoC,
- "samsung,exynos5420-pmu" - for Exynos5420 SoC.
+ - "samsung,exynos5800-pmu" - for Exynos5800 SoC.
second value must be always "syscon".
- reg : offset and length of the register set.
diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi
index c0bb356..2009b9c 100644
--- a/arch/arm/boot/dts/exynos5800.dtsi
+++ b/arch/arm/boot/dts/exynos5800.dtsi
@@ -26,3 +26,7 @@
&mfc {
compatible = "samsung,mfc-v8";
};
+
+&pmu_system_controller {
+ compatible = "samsung,exynos5800-pmu", "syscon";
+};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] ARM: exynos: Add exynos5800-pmu compatible entry
2014-08-21 13:07 ` Vikas Sajjan
@ 2014-08-21 13:07 ` Vikas Sajjan
-1 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc
Cc: kgene.kim, tomasz.figa, joshi, sajjan.linux, dianders, olof
Adds exynos5800-pmu compatible string entry in the pmu table.
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6a24e11..90377c9 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -255,6 +255,7 @@ static const struct of_device_id exynos_dt_pmu_match[] = {
{ .compatible = "samsung,exynos5260-pmu" },
{ .compatible = "samsung,exynos5410-pmu" },
{ .compatible = "samsung,exynos5420-pmu" },
+ { .compatible = "samsung,exynos5800-pmu" },
{ /*sentinel*/ },
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] ARM: exynos: Add exynos5800-pmu compatible entry
@ 2014-08-21 13:07 ` Vikas Sajjan
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel
Adds exynos5800-pmu compatible string entry in the pmu table.
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 6a24e11..90377c9 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -255,6 +255,7 @@ static const struct of_device_id exynos_dt_pmu_match[] = {
{ .compatible = "samsung,exynos5260-pmu" },
{ .compatible = "samsung,exynos5410-pmu" },
{ .compatible = "samsung,exynos5420-pmu" },
+ { .compatible = "samsung,exynos5800-pmu" },
{ /*sentinel*/ },
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] ARM: exynos: Add PMU and S2R support for exynos5800 SoC
2014-08-21 13:07 ` Vikas Sajjan
@ 2014-08-21 13:07 ` Vikas Sajjan
-1 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel, linux-samsung-soc
Cc: kgene.kim, tomasz.figa, joshi, sajjan.linux, dianders, olof
Adds PMU and S2R support for exynos5800 SoC.
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
arch/arm/mach-exynos/pm.c | 3 +++
arch/arm/mach-exynos/pmu.c | 22 ++++++++++++++++++++++
arch/arm/mach-exynos/regs-pmu.h | 3 ++-
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index acdcf0b..41fc1c3 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -646,6 +646,9 @@ static struct of_device_id exynos_pmu_of_device_ids[] = {
}, {
.compatible = "samsung,exynos5420-pmu",
.data = &exynos5420_pm_data,
+ }, {
+ .compatible = "samsung,exynos5800-pmu",
+ .data = &exynos5420_pm_data,
},
{ /*sentinel*/ },
};
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index f8ced42..c1cd31c 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -719,6 +719,19 @@ static void exynos5420_pmu_init(void)
pr_info("EXYNOS5420 PMU initialized\n");
}
+static void exynos5800_pmu_init(void)
+{
+ unsigned int value;
+
+ exynos5420_pmu_init();
+
+ value = pmu_raw_readl(EXYNOS5420_LPI_MASK);
+ value |= EXYNOS5800_POWER_GATE_CTRL;
+ pmu_raw_writel(value, EXYNOS5420_LPI_MASK);
+
+ pr_info("EXYNOS5800 PMU initialized\n");
+}
+
static const struct exynos_pmu_data exynos4210_pmu_data = {
.pmu_config = exynos4210_pmu_config,
@@ -745,6 +758,12 @@ static struct exynos_pmu_data exynos5420_pmu_data = {
.powerdown_conf = exynos5420_powerdown_conf,
};
+static struct exynos_pmu_data exynos5800_pmu_data = {
+ .pmu_config = exynos5420_pmu_config,
+ .pmu_init = exynos5800_pmu_init,
+ .powerdown_conf = exynos5420_powerdown_conf,
+};
+
static const struct regmap_config pmu_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
@@ -770,6 +789,9 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = {
}, {
.compatible = "samsung,exynos5420-pmu",
.data = &exynos5420_pmu_data,
+ }, {
+ .compatible = "samsung,exynos5800-pmu",
+ .data = &exynos5800_pmu_data,
},
{ /*sentinel*/ },
};
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 3a6a559..3a0140c 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -555,5 +555,6 @@ static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr)
| EXYNOS5420_KFC_USE_STANDBY_WFI1 \
| EXYNOS5420_KFC_USE_STANDBY_WFI2 \
| EXYNOS5420_KFC_USE_STANDBY_WFI3)
-
+/* for exynos5800 only */
+#define EXYNOS5800_POWER_GATE_CTRL (1 << 15)
#endif /* __ASM_ARCH_REGS_PMU_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] ARM: exynos: Add PMU and S2R support for exynos5800 SoC
@ 2014-08-21 13:07 ` Vikas Sajjan
0 siblings, 0 replies; 8+ messages in thread
From: Vikas Sajjan @ 2014-08-21 13:07 UTC (permalink / raw)
To: linux-arm-kernel
Adds PMU and S2R support for exynos5800 SoC.
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
---
arch/arm/mach-exynos/pm.c | 3 +++
arch/arm/mach-exynos/pmu.c | 22 ++++++++++++++++++++++
arch/arm/mach-exynos/regs-pmu.h | 3 ++-
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index acdcf0b..41fc1c3 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -646,6 +646,9 @@ static struct of_device_id exynos_pmu_of_device_ids[] = {
}, {
.compatible = "samsung,exynos5420-pmu",
.data = &exynos5420_pm_data,
+ }, {
+ .compatible = "samsung,exynos5800-pmu",
+ .data = &exynos5420_pm_data,
},
{ /*sentinel*/ },
};
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index f8ced42..c1cd31c 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -719,6 +719,19 @@ static void exynos5420_pmu_init(void)
pr_info("EXYNOS5420 PMU initialized\n");
}
+static void exynos5800_pmu_init(void)
+{
+ unsigned int value;
+
+ exynos5420_pmu_init();
+
+ value = pmu_raw_readl(EXYNOS5420_LPI_MASK);
+ value |= EXYNOS5800_POWER_GATE_CTRL;
+ pmu_raw_writel(value, EXYNOS5420_LPI_MASK);
+
+ pr_info("EXYNOS5800 PMU initialized\n");
+}
+
static const struct exynos_pmu_data exynos4210_pmu_data = {
.pmu_config = exynos4210_pmu_config,
@@ -745,6 +758,12 @@ static struct exynos_pmu_data exynos5420_pmu_data = {
.powerdown_conf = exynos5420_powerdown_conf,
};
+static struct exynos_pmu_data exynos5800_pmu_data = {
+ .pmu_config = exynos5420_pmu_config,
+ .pmu_init = exynos5800_pmu_init,
+ .powerdown_conf = exynos5420_powerdown_conf,
+};
+
static const struct regmap_config pmu_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
@@ -770,6 +789,9 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = {
}, {
.compatible = "samsung,exynos5420-pmu",
.data = &exynos5420_pmu_data,
+ }, {
+ .compatible = "samsung,exynos5800-pmu",
+ .data = &exynos5800_pmu_data,
},
{ /*sentinel*/ },
};
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index 3a6a559..3a0140c 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -555,5 +555,6 @@ static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr)
| EXYNOS5420_KFC_USE_STANDBY_WFI1 \
| EXYNOS5420_KFC_USE_STANDBY_WFI2 \
| EXYNOS5420_KFC_USE_STANDBY_WFI3)
-
+/* for exynos5800 only */
+#define EXYNOS5800_POWER_GATE_CTRL (1 << 15)
#endif /* __ASM_ARCH_REGS_PMU_H */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-21 13:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 13:07 [PATCH v2 0/3] Adds PMU and S2R support for exynos5800 Vikas Sajjan
2014-08-21 13:07 ` Vikas Sajjan
2014-08-21 13:07 ` [PATCH v2 1/3] ARM: dts: Add pmu node for exynos5800 SoC Vikas Sajjan
2014-08-21 13:07 ` Vikas Sajjan
2014-08-21 13:07 ` [PATCH v2 2/3] ARM: exynos: Add exynos5800-pmu compatible entry Vikas Sajjan
2014-08-21 13:07 ` Vikas Sajjan
2014-08-21 13:07 ` [PATCH v2 3/3] ARM: exynos: Add PMU and S2R support for exynos5800 SoC Vikas Sajjan
2014-08-21 13:07 ` Vikas Sajjan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.