From: Neil Armstrong <neil.armstrong@linaro.org>
To: xianwei.zhao@amlogic.com, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Jianxin Pan <jianxin.pan@amlogic.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/3] pmdomain: amlogic: Add support for A4 power domains controller
Date: Tue, 28 May 2024 10:41:56 +0200 [thread overview]
Message-ID: <2f074d47-3021-4d81-93cd-c8e4593f0b0f@linaro.org> (raw)
In-Reply-To: <20240528-a4_secpowerdomain-v1-2-2a9d7df9b128@amlogic.com>
On 28/05/2024 10:39, Xianwei Zhao via B4 Relay wrote:
> From: Xianwei Zhao <xianwei.zhao@amlogic.com>
>
> Add support for A4 power controller. A4 power control
> registers are in secure domain, and should be accessed by SMC.
>
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
> ---
> drivers/pmdomain/amlogic/meson-secure-pwrc.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/pmdomain/amlogic/meson-secure-pwrc.c b/drivers/pmdomain/amlogic/meson-secure-pwrc.c
> index 4d5bda0d60fc..3a84d8a74a5e 100644
> --- a/drivers/pmdomain/amlogic/meson-secure-pwrc.c
> +++ b/drivers/pmdomain/amlogic/meson-secure-pwrc.c
> @@ -14,6 +14,7 @@
> #include <dt-bindings/power/amlogic,c3-pwrc.h>
> #include <dt-bindings/power/meson-s4-power.h>
> #include <dt-bindings/power/amlogic,t7-pwrc.h>
> +#include <dt-bindings/power/amlogic,a4-pwrc.h>
> #include <linux/arm-smccc.h>
> #include <linux/firmware/meson/meson_sm.h>
> #include <linux/module.h>
> @@ -136,6 +137,24 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = {
> SEC_PD(RSA, 0),
> };
>
> +static struct meson_secure_pwrc_domain_desc a4_pwrc_domains[] = {
> + SEC_PD(A4_AUDIO, 0),
> + SEC_PD(A4_SDIOA, 0),
> + SEC_PD(A4_EMMC, 0),
> + SEC_PD(A4_USB_COMB, 0),
> + SEC_PD(A4_ETH, 0),
> + SEC_PD(A4_VOUT, 0),
> + SEC_PD(A4_AUDIO_PDM, 0),
> + /* DMC is for DDR PHY ana/dig and DMC, and should be always on */
> + SEC_PD(A4_DMC, GENPD_FLAG_ALWAYS_ON),
> + /* WRAP is secure_top, a lot of modules are included, and should be always on */
> + SEC_PD(A4_SYS_WRAP, GENPD_FLAG_ALWAYS_ON),
> + SEC_PD(A4_AO_I2C_S, 0),
> + SEC_PD(A4_AO_UART, 0),
> + /* IR is wake up trigger source, and should be always on */
> + SEC_PD(A4_AO_IR, GENPD_FLAG_ALWAYS_ON),
> +};
> +
> static struct meson_secure_pwrc_domain_desc c3_pwrc_domains[] = {
> SEC_PD(C3_NNA, 0),
> SEC_PD(C3_AUDIO, 0),
> @@ -311,6 +330,11 @@ static struct meson_secure_pwrc_domain_data meson_secure_a1_pwrc_data = {
> .count = ARRAY_SIZE(a1_pwrc_domains),
> };
>
> +static struct meson_secure_pwrc_domain_data amlogic_secure_a4_pwrc_data = {
> + .domains = a4_pwrc_domains,
> + .count = ARRAY_SIZE(a4_pwrc_domains),
> +};
> +
> static struct meson_secure_pwrc_domain_data amlogic_secure_c3_pwrc_data = {
> .domains = c3_pwrc_domains,
> .count = ARRAY_SIZE(c3_pwrc_domains),
> @@ -331,6 +355,10 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
> .compatible = "amlogic,meson-a1-pwrc",
> .data = &meson_secure_a1_pwrc_data,
> },
> + {
> + .compatible = "amlogic,a4-pwrc",
> + .data = &amlogic_secure_a4_pwrc_data,
> + },
> {
> .compatible = "amlogic,c3-pwrc",
> .data = &amlogic_secure_c3_pwrc_data,
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-05-28 8:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 8:39 [PATCH 0/3] Power: A4: add power domain driver Xianwei Zhao via B4 Relay
2024-05-28 8:39 ` [PATCH 1/3] dt-bindings: power: add Amlogic A4 power domains Xianwei Zhao via B4 Relay
2024-05-28 9:01 ` Krzysztof Kozlowski
2024-05-28 8:39 ` [PATCH 2/3] pmdomain: amlogic: Add support for A4 power domains controller Xianwei Zhao via B4 Relay
2024-05-28 8:41 ` Neil Armstrong [this message]
2024-05-28 8:39 ` [PATCH 3/3] arm64: dts: amlogic: a4: add power domain controller node Xianwei Zhao via B4 Relay
2024-05-28 8:46 ` Neil Armstrong
2024-05-28 9:00 ` Xianwei Zhao
2024-05-28 9:08 ` neil.armstrong
2024-05-28 9:17 ` Xianwei Zhao
2024-06-06 9:21 ` [PATCH 0/3] Power: A4: add power domain driver Neil Armstrong
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=2f074d47-3021-4d81-93cd-c8e4593f0b0f@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=jianxin.pan@amlogic.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=robh@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=xianwei.zhao@amlogic.com \
/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