1414#include <dt-bindings/power/amlogic,c3-pwrc.h>
1515#include <dt-bindings/power/meson-s4-power.h>
1616#include <dt-bindings/power/amlogic,t7-pwrc.h>
17+ #include <dt-bindings/power/amlogic,a4-pwrc.h>
1718#include <linux/arm-smccc.h>
1819#include <linux/firmware/meson/meson_sm.h>
1920#include <linux/module.h>
@@ -136,6 +137,24 @@ static struct meson_secure_pwrc_domain_desc a1_pwrc_domains[] = {
136137 SEC_PD (RSA , 0 ),
137138};
138139
140+ static struct meson_secure_pwrc_domain_desc a4_pwrc_domains [] = {
141+ SEC_PD (A4_AUDIO , 0 ),
142+ SEC_PD (A4_SDIOA , 0 ),
143+ SEC_PD (A4_EMMC , 0 ),
144+ SEC_PD (A4_USB_COMB , 0 ),
145+ SEC_PD (A4_ETH , 0 ),
146+ SEC_PD (A4_VOUT , 0 ),
147+ SEC_PD (A4_AUDIO_PDM , 0 ),
148+ /* DMC is for DDR PHY ana/dig and DMC, and should be always on */
149+ SEC_PD (A4_DMC , GENPD_FLAG_ALWAYS_ON ),
150+ /* WRAP is secure_top, a lot of modules are included, and should be always on */
151+ SEC_PD (A4_SYS_WRAP , GENPD_FLAG_ALWAYS_ON ),
152+ SEC_PD (A4_AO_I2C_S , 0 ),
153+ SEC_PD (A4_AO_UART , 0 ),
154+ /* IR is wake up trigger source, and should be always on */
155+ SEC_PD (A4_AO_IR , GENPD_FLAG_ALWAYS_ON ),
156+ };
157+
139158static struct meson_secure_pwrc_domain_desc c3_pwrc_domains [] = {
140159 SEC_PD (C3_NNA , 0 ),
141160 SEC_PD (C3_AUDIO , 0 ),
@@ -311,6 +330,11 @@ static struct meson_secure_pwrc_domain_data meson_secure_a1_pwrc_data = {
311330 .count = ARRAY_SIZE (a1_pwrc_domains ),
312331};
313332
333+ static struct meson_secure_pwrc_domain_data amlogic_secure_a4_pwrc_data = {
334+ .domains = a4_pwrc_domains ,
335+ .count = ARRAY_SIZE (a4_pwrc_domains ),
336+ };
337+
314338static struct meson_secure_pwrc_domain_data amlogic_secure_c3_pwrc_data = {
315339 .domains = c3_pwrc_domains ,
316340 .count = ARRAY_SIZE (c3_pwrc_domains ),
@@ -331,6 +355,10 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
331355 .compatible = "amlogic,meson-a1-pwrc" ,
332356 .data = & meson_secure_a1_pwrc_data ,
333357 },
358+ {
359+ .compatible = "amlogic,a4-pwrc" ,
360+ .data = & amlogic_secure_a4_pwrc_data ,
361+ },
334362 {
335363 .compatible = "amlogic,c3-pwrc" ,
336364 .data = & amlogic_secure_c3_pwrc_data ,
0 commit comments