Skip to content

Commit 8fbed2d

Browse files
Xianwei Zhaostorulf
authored andcommitted
pmdomain: amlogic: Add support for A5 power domains controller
Add support for the A5 power controller, whose registers are in the secure domain and should be accessed via SMC. Signed-off-by: Hongyu Chen <[email protected]> Signed-off-by: Xianwei Zhao <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 1a53b80 commit 8fbed2d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

drivers/pmdomain/amlogic/meson-secure-pwrc.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <dt-bindings/power/meson-s4-power.h>
1616
#include <dt-bindings/power/amlogic,t7-pwrc.h>
1717
#include <dt-bindings/power/amlogic,a4-pwrc.h>
18+
#include <dt-bindings/power/amlogic,a5-pwrc.h>
1819
#include <linux/arm-smccc.h>
1920
#include <linux/firmware/meson/meson_sm.h>
2021
#include <linux/module.h>
@@ -155,6 +156,22 @@ static struct meson_secure_pwrc_domain_desc a4_pwrc_domains[] = {
155156
SEC_PD(A4_AO_IR, GENPD_FLAG_ALWAYS_ON),
156157
};
157158

159+
static struct meson_secure_pwrc_domain_desc a5_pwrc_domains[] = {
160+
SEC_PD(A5_NNA, 0),
161+
SEC_PD(A5_AUDIO, 0),
162+
SEC_PD(A5_SDIOA, 0),
163+
SEC_PD(A5_EMMC, 0),
164+
SEC_PD(A5_USB_COMB, 0),
165+
SEC_PD(A5_ETH, 0),
166+
SEC_PD(A5_RSA, 0),
167+
SEC_PD(A5_AUDIO_PDM, 0),
168+
/* DMC is for DDR PHY ana/dig and DMC, and should be always on */
169+
SEC_PD(A5_DMC, GENPD_FLAG_ALWAYS_ON),
170+
/* WRAP is secure_top, a lot of modules are included, and should be always on */
171+
SEC_PD(A5_SYS_WRAP, GENPD_FLAG_ALWAYS_ON),
172+
SEC_PD(A5_DSPA, 0),
173+
};
174+
158175
static struct meson_secure_pwrc_domain_desc c3_pwrc_domains[] = {
159176
SEC_PD(C3_NNA, 0),
160177
SEC_PD(C3_AUDIO, 0),
@@ -335,6 +352,11 @@ static struct meson_secure_pwrc_domain_data amlogic_secure_a4_pwrc_data = {
335352
.count = ARRAY_SIZE(a4_pwrc_domains),
336353
};
337354

355+
static struct meson_secure_pwrc_domain_data amlogic_secure_a5_pwrc_data = {
356+
.domains = a5_pwrc_domains,
357+
.count = ARRAY_SIZE(a5_pwrc_domains),
358+
};
359+
338360
static struct meson_secure_pwrc_domain_data amlogic_secure_c3_pwrc_data = {
339361
.domains = c3_pwrc_domains,
340362
.count = ARRAY_SIZE(c3_pwrc_domains),
@@ -359,6 +381,10 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
359381
.compatible = "amlogic,a4-pwrc",
360382
.data = &amlogic_secure_a4_pwrc_data,
361383
},
384+
{
385+
.compatible = "amlogic,a5-pwrc",
386+
.data = &amlogic_secure_a5_pwrc_data,
387+
},
362388
{
363389
.compatible = "amlogic,c3-pwrc",
364390
.data = &amlogic_secure_c3_pwrc_data,

0 commit comments

Comments
 (0)