From: Shunzhou Jiang <shunzhou.jiang@amlogic.com> To: <shunzhou.jiang@amlogic.com> Cc: <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org> Subject: [PATCH V5 2/2] soc: s4: Add support for power domains controller Date: Wed, 2 Mar 2022 10:22:56 +0800 [thread overview] Message-ID: <20220302022256.4083714-3-shunzhou.jiang@amlogic.com> (raw) In-Reply-To: <20220302022256.4083714-1-shunzhou.jiang@amlogic.com> Add support s4 Power controller. In s4, power control registers are in secure domain, and should be accessed by smc. Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com> --- V1->V2: fix spelling error, patchset use cover-letter V2->V3: add power domain always on reason V3->V4: clear vpu and usb power domaon always on V4->V5: add reviewed owner in patchset --- drivers/soc/amlogic/meson-secure-pwrc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 59bd195fa9c9..a10a417a87db 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -11,6 +11,7 @@ #include <linux/platform_device.h> #include <linux/pm_domain.h> #include <dt-bindings/power/meson-a1-power.h> +#include <dt-bindings/power/meson-s4-power.h> #include <linux/arm-smccc.h> #include <linux/firmware/meson/meson_sm.h> #include <linux/module.h> @@ -119,6 +120,18 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = { SEC_PD(RSA, 0), }; +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = { + SEC_PD(S4_DOS_HEVC, 0), + SEC_PD(S4_DOS_VDEC, 0), + SEC_PD(S4_VPU_HDMI, 0), + SEC_PD(S4_USB_COMB, 0), + SEC_PD(S4_GE2D, 0), + /* ETH is for ethernet online wakeup, and should be always on */ + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON), + SEC_PD(S4_DEMOD, 0), + SEC_PD(S4_AUDIO, 0), +}; + static int meson_secure_pwrc_probe(struct platform_device *pdev) { int i; @@ -187,11 +200,20 @@ 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 meson_secure_s4_pwrc_data = { + .domains = s4_pwrc_domains, + .count = ARRAY_SIZE(s4_pwrc_domains), +}; + static const struct of_device_id meson_secure_pwrc_match_table[] = { { .compatible = "amlogic,meson-a1-pwrc", .data = &meson_secure_a1_pwrc_data, }, + { + .compatible = "amlogic,meson-s4-pwrc", + .data = &meson_secure_s4_pwrc_data, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table); -- 2.34.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: Shunzhou Jiang <shunzhou.jiang@amlogic.com> To: <shunzhou.jiang@amlogic.com> Cc: <linux-arm-kernel@lists.infradead.org>, <linux-amlogic@lists.infradead.org> Subject: [PATCH V5 2/2] soc: s4: Add support for power domains controller Date: Wed, 2 Mar 2022 10:22:56 +0800 [thread overview] Message-ID: <20220302022256.4083714-3-shunzhou.jiang@amlogic.com> (raw) In-Reply-To: <20220302022256.4083714-1-shunzhou.jiang@amlogic.com> Add support s4 Power controller. In s4, power control registers are in secure domain, and should be accessed by smc. Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com> --- V1->V2: fix spelling error, patchset use cover-letter V2->V3: add power domain always on reason V3->V4: clear vpu and usb power domaon always on V4->V5: add reviewed owner in patchset --- drivers/soc/amlogic/meson-secure-pwrc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/soc/amlogic/meson-secure-pwrc.c b/drivers/soc/amlogic/meson-secure-pwrc.c index 59bd195fa9c9..a10a417a87db 100644 --- a/drivers/soc/amlogic/meson-secure-pwrc.c +++ b/drivers/soc/amlogic/meson-secure-pwrc.c @@ -11,6 +11,7 @@ #include <linux/platform_device.h> #include <linux/pm_domain.h> #include <dt-bindings/power/meson-a1-power.h> +#include <dt-bindings/power/meson-s4-power.h> #include <linux/arm-smccc.h> #include <linux/firmware/meson/meson_sm.h> #include <linux/module.h> @@ -119,6 +120,18 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = { SEC_PD(RSA, 0), }; +static struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = { + SEC_PD(S4_DOS_HEVC, 0), + SEC_PD(S4_DOS_VDEC, 0), + SEC_PD(S4_VPU_HDMI, 0), + SEC_PD(S4_USB_COMB, 0), + SEC_PD(S4_GE2D, 0), + /* ETH is for ethernet online wakeup, and should be always on */ + SEC_PD(S4_ETH, GENPD_FLAG_ALWAYS_ON), + SEC_PD(S4_DEMOD, 0), + SEC_PD(S4_AUDIO, 0), +}; + static int meson_secure_pwrc_probe(struct platform_device *pdev) { int i; @@ -187,11 +200,20 @@ 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 meson_secure_s4_pwrc_data = { + .domains = s4_pwrc_domains, + .count = ARRAY_SIZE(s4_pwrc_domains), +}; + static const struct of_device_id meson_secure_pwrc_match_table[] = { { .compatible = "amlogic,meson-a1-pwrc", .data = &meson_secure_a1_pwrc_data, }, + { + .compatible = "amlogic,meson-s4-pwrc", + .data = &meson_secure_s4_pwrc_data, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, meson_secure_pwrc_match_table); -- 2.34.1 _______________________________________________ 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:[~2022-03-02 2:23 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-02 2:22 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 2:22 ` Shunzhou Jiang 2022-03-02 2:22 ` [PATCH V5 1/2] dt-bindings: power: add Amlogic s4 power domains bindings Shunzhou Jiang 2022-03-02 2:22 ` Shunzhou Jiang 2022-03-02 2:22 ` Shunzhou Jiang [this message] 2022-03-02 2:22 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang -- strict thread matches above, loose matches on Subject: below -- 2022-03-02 6:55 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 6:55 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 6:55 ` Shunzhou Jiang 2022-03-02 6:55 ` Shunzhou Jiang 2022-03-02 19:56 ` Kevin Hilman 2022-03-02 19:56 ` Kevin Hilman 2022-03-02 19:56 ` Kevin Hilman 2022-03-02 6:01 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 6:01 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 6:01 ` Shunzhou Jiang 2022-03-02 6:01 ` Shunzhou Jiang 2022-03-02 5:43 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 5:43 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 5:43 ` Shunzhou Jiang 2022-03-02 3:39 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 3:39 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 3:39 ` Shunzhou Jiang 2022-03-02 3:09 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 3:09 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 3:09 ` Shunzhou Jiang 2022-03-02 3:09 ` Shunzhou Jiang 2022-03-02 3:05 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 3:05 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 3:05 ` Shunzhou Jiang 2022-03-02 2:38 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-02 2:38 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-02 2:38 ` Shunzhou Jiang 2022-03-01 1:58 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-01 1:58 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-01 1:58 ` Shunzhou Jiang 2022-03-01 1:58 ` Shunzhou Jiang 2022-03-01 1:52 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-01 1:52 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-01 1:52 ` Shunzhou Jiang 2022-03-01 1:52 ` Shunzhou Jiang 2022-03-01 1:48 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-03-01 1:48 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-03-01 1:48 ` Shunzhou Jiang 2022-03-01 1:48 ` Shunzhou Jiang 2022-02-28 3:35 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-02-28 3:35 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-02-28 3:35 ` Shunzhou Jiang 2022-02-28 3:35 ` Shunzhou Jiang 2022-02-28 3:28 [PATCH V5 0/2] Power: meson-s4: add s4 power domain driver Shunzhou Jiang 2022-02-28 3:28 ` [PATCH V5 2/2] soc: s4: Add support for power domains controller Shunzhou Jiang 2022-02-28 3:28 ` Shunzhou Jiang 2022-02-28 3:28 ` Shunzhou Jiang
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=20220302022256.4083714-3-shunzhou.jiang@amlogic.com \ --to=shunzhou.jiang@amlogic.com \ --cc=linux-amlogic@lists.infradead.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.