From: cw00.choi@samsung.com (Chanwoo Choi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/9] soc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state
Date: Wed, 10 Jan 2018 10:46:32 +0900 [thread overview]
Message-ID: <5A557078.50101@samsung.com> (raw)
In-Reply-To: <b639da18-a069-aeb7-ceca-30c79b1c25c8@arm.com>
On 2018? 01? 09? 23:11, Sudeep Holla wrote:
>
>
> On 09/01/18 07:59, Chanwoo Choi wrote:
>> This patch adds the PMU (Power Management Unit) data of exynos5433 SoC
>> in order to support the various power modes. Each power mode has
>> the different value for reducing the power-consumption.
>>
>> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>> arch/arm/mach-exynos/common.h | 2 -
>> drivers/soc/samsung/Makefile | 3 +-
>> drivers/soc/samsung/exynos-pmu.c | 1 +
>> drivers/soc/samsung/exynos-pmu.h | 2 +
>> drivers/soc/samsung/exynos5433-pmu.c | 286 ++++++++++++++++++++++++++++
>> include/linux/soc/samsung/exynos-regs-pmu.h | 148 ++++++++++++++
>> 6 files changed, 439 insertions(+), 3 deletions(-)
>> create mode 100644 drivers/soc/samsung/exynos5433-pmu.c
>>
>
>> diff --git a/drivers/soc/samsung/exynos5433-pmu.c b/drivers/soc/samsung/exynos5433-pmu.c
>> new file mode 100644
>> index 000000000000..2571e61522f0
>> --- /dev/null
>> +++ b/drivers/soc/samsung/exynos5433-pmu.c
>> @@ -0,0 +1,286 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +//
>> +// Copyright (c) 2018 Samsung Electronics Co., Ltd.
>> +// Copyright (c) Jonghwa Lee <jonghwa3.lee@samsung.com>
>> +// Copyright (c) Chanwoo Choi <cw00.choi@samsung.com>
>> +//
>> +// EXYNOS5433 - CPU PMU (Power Management Unit) support
>> +
>> +#include <linux/soc/samsung/exynos-regs-pmu.h>
>> +#include <linux/soc/samsung/exynos-pmu.h>
>> +
>> +#include "exynos-pmu.h"
>> +
>> +static struct exynos_pmu_conf exynos5433_pmu_config[] = {
>> + /* { .offset = address, .val = { AFTR, LPA, SLEEP } } */
>> + { EXYNOS5433_ATLAS_CPU0_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_ATLAS_CPU0_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_ATLAS_CPU1_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_ATLAS_CPU1_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_ATLAS_CPU2_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_ATLAS_CPU2_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_ATLAS_CPU3_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_ATLAS_CPU3_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_APOLLO_CPU0_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_APOLLO_CPU0_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_APOLLO_CPU1_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_APOLLO_CPU1_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_APOLLO_CPU2_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_APOLLO_CPU2_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_APOLLO_CPU3_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_DIS_IRQ_APOLLO_CPU3_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0 } },
>> + { EXYNOS5433_ATLAS_NONCPU_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>> + { EXYNOS5433_APOLLO_NONCPU_SYS_PWR_REG, { 0x0, 0x0, 0x8 } },
>
>
> 1. First of all why do you need any of these CPU related PMU config
> registers in kernel ? From the information I gathered this is ARM64
> SoC using PSCI. These are needed just in PSCI implementation and not
> in kernel. So can you elaborate on why there are present here ?
The 32bit Exynos used the 'smc' call to enter the suspend mode
and need to handle the PMU registers.
Even if PSCI replaces the 'smc' call on the Exynos5433,
the Exynos5433's document requires the handling of PMU config
related to CPU for the suspend mode.
IMHO, If the secure OS implemented the all something related to CPU,
it might be unnecessary to handle the PMU registers. I think that
it depend on how to design the SoC by H/W Architect. This is just my opinion.
>
> 2. Are there any public documents that these names map to ?
There is no public document. It is confidential.
> If there is none, please replace these codenames(ATLAS, APOLLO) with
> appropriately.
In the Exynos5433, 'apollo' indicates the LITTLE cores (cpu0-3, cortex-a53)
and 'atlas' indicates the big cores (cpu4-7, cortex-a57)
Exynos5433 already used the 'apollo' and 'atlas' on clk-exynos5433.c driver
and thermal device-tree node. It is better to use the original register name
in the document in order to reduce the confusion of the change of register name
even if document is not public.
Also, exynos7 used the 'atlas' word for big cores.
>
> Sorry if these are already answered, just point me to those threads.
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
next prev parent reply other threads:[~2018-01-10 1:46 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180109075904epcas2p302d58aacfbb2195e455a25c90a1c610b@epcas2p3.samsung.com>
2018-01-09 7:58 ` [RFC PATCH 0/9] soc: samsung: Add support of suspend-to-RAM on Exynos5433 Chanwoo Choi
2018-01-09 7:58 ` [PATCH 1/9] clk: samsung: exynos5433: Add clock flag to support suspend-to-ram Chanwoo Choi
2018-01-09 11:44 ` Krzysztof Kozlowski
2018-01-10 9:31 ` Chanwoo Choi
2018-01-12 13:24 ` Marek Szyprowski
2018-01-09 7:58 ` [PATCH 2/9] soc: samsung: pmu: Add powerup_conf callback Chanwoo Choi
2018-01-09 11:52 ` Krzysztof Kozlowski
2018-01-09 7:59 ` [PATCH 3/9] soc: samsung: pmu: Add the PMU data of exynos5433 to support low-power state Chanwoo Choi
2018-01-09 12:23 ` Krzysztof Kozlowski
2018-01-11 5:39 ` Chanwoo Choi
2018-01-09 12:33 ` Krzysztof Kozlowski
2018-01-09 14:11 ` Sudeep Holla
2018-01-10 1:46 ` Chanwoo Choi [this message]
2018-01-10 10:53 ` Sudeep Holla
2018-01-10 23:51 ` Chanwoo Choi
2018-01-09 7:59 ` [RFC PATCH 4/9] soc: samsung: Add generic power-management driver for Exynos Chanwoo Choi
2018-01-09 12:37 ` Krzysztof Kozlowski
2018-01-11 5:44 ` Chanwoo Choi
2018-01-09 7:59 ` [RFC PATCH 5/9] soc: samsung: pm: Add support for suspend-to-ram of Exynos5433 Chanwoo Choi
2018-01-09 12:45 ` Krzysztof Kozlowski
2018-01-11 5:40 ` Chanwoo Choi
2018-01-09 7:59 ` [PATCH 6/9] arm64: dts: exynos: Add iRAM device-tree node for Exynos5433 Chanwoo Choi
2018-01-09 12:46 ` Krzysztof Kozlowski
2018-01-09 7:59 ` [PATCH 7/9] arm64: dts: exynos: Use power key as a wakeup source on TM2/TM2E board Chanwoo Choi
2018-01-09 7:59 ` [PATCH 8/9] arm64: dts: exynos: Add cpu_suspend property of PSCI for exynos5433 Chanwoo Choi
2018-01-09 7:59 ` [PATCH 9/9] arm64: dts: exynos: Add cpu topology information for Exynos5433 SoC Chanwoo Choi
2018-01-09 11:56 ` [RFC PATCH 0/9] soc: samsung: Add support of suspend-to-RAM on Exynos5433 Krzysztof Kozlowski
2018-01-10 9:19 ` Chanwoo Choi
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=5A557078.50101@samsung.com \
--to=cw00.choi@samsung.com \
--cc=linux-arm-kernel@lists.infradead.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).