|
16 | 16 | #include <linux/clk.h>
|
17 | 17 | #include <dt-bindings/power/meson8-power.h>
|
18 | 18 | #include <dt-bindings/power/meson-g12a-power.h>
|
| 19 | +#include <dt-bindings/power/meson-gxbb-power.h> |
19 | 20 | #include <dt-bindings/power/meson-sm1-power.h>
|
20 | 21 |
|
21 | 22 | /* AO Offsets */
|
@@ -75,7 +76,7 @@ struct meson_ee_pwrc_domain_data {
|
75 | 76 |
|
76 | 77 | /* TOP Power Domains */
|
77 | 78 |
|
78 |
| -static struct meson_ee_pwrc_top_domain g12a_pwrc_vpu = { |
| 79 | +static struct meson_ee_pwrc_top_domain gx_pwrc_vpu = { |
79 | 80 | .sleep_reg = GX_AO_RTI_GEN_PWR_SLEEP0,
|
80 | 81 | .sleep_mask = BIT(8),
|
81 | 82 | .iso_reg = GX_AO_RTI_GEN_PWR_SLEEP0,
|
@@ -140,6 +141,12 @@ static struct meson_ee_pwrc_mem_domain g12a_pwrc_mem_vpu[] = {
|
140 | 141 | VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
|
141 | 142 | };
|
142 | 143 |
|
| 144 | +static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = { |
| 145 | + VPU_MEMPD(HHI_VPU_MEM_PD_REG0), |
| 146 | + VPU_MEMPD(HHI_VPU_MEM_PD_REG1), |
| 147 | + VPU_HHI_MEMPD(HHI_MEM_PD_REG0), |
| 148 | +}; |
| 149 | + |
143 | 150 | static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_eth[] = {
|
144 | 151 | { HHI_MEM_PD_REG0, GENMASK(3, 2) },
|
145 | 152 | };
|
@@ -225,11 +232,17 @@ static struct meson_ee_pwrc_mem_domain sm1_pwrc_mem_audio[] = {
|
225 | 232 | static bool pwrc_ee_get_power(struct meson_ee_pwrc_domain *pwrc_domain);
|
226 | 233 |
|
227 | 234 | static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {
|
228 |
| - [PWRC_G12A_VPU_ID] = VPU_PD("VPU", &g12a_pwrc_vpu, g12a_pwrc_mem_vpu, |
| 235 | + [PWRC_G12A_VPU_ID] = VPU_PD("VPU", &gx_pwrc_vpu, g12a_pwrc_mem_vpu, |
229 | 236 | pwrc_ee_get_power, 11, 2),
|
230 | 237 | [PWRC_G12A_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth),
|
231 | 238 | };
|
232 | 239 |
|
| 240 | +static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] = { |
| 241 | + [PWRC_GXBB_VPU_ID] = VPU_PD("VPU", &gx_pwrc_vpu, gxbb_pwrc_mem_vpu, |
| 242 | + pwrc_ee_get_power, 12, 2), |
| 243 | + [PWRC_GXBB_ETHERNET_MEM_ID] = MEM_PD("ETH", meson_pwrc_mem_eth), |
| 244 | +}; |
| 245 | + |
233 | 246 | static struct meson_ee_pwrc_domain_desc meson8_pwrc_domains[] = {
|
234 | 247 | [PWRC_MESON8_VPU_ID] = VPU_PD("VPU", &meson8_pwrc_vpu,
|
235 | 248 | meson8_pwrc_mem_vpu, pwrc_ee_get_power,
|
@@ -516,6 +529,11 @@ static struct meson_ee_pwrc_domain_data meson_ee_g12a_pwrc_data = {
|
516 | 529 | .domains = g12a_pwrc_domains,
|
517 | 530 | };
|
518 | 531 |
|
| 532 | +static struct meson_ee_pwrc_domain_data meson_ee_gxbb_pwrc_data = { |
| 533 | + .count = ARRAY_SIZE(gxbb_pwrc_domains), |
| 534 | + .domains = gxbb_pwrc_domains, |
| 535 | +}; |
| 536 | + |
519 | 537 | static struct meson_ee_pwrc_domain_data meson_ee_m8_pwrc_data = {
|
520 | 538 | .count = ARRAY_SIZE(meson8_pwrc_domains),
|
521 | 539 | .domains = meson8_pwrc_domains,
|
@@ -544,6 +562,10 @@ static const struct of_device_id meson_ee_pwrc_match_table[] = {
|
544 | 562 | .compatible = "amlogic,meson8m2-pwrc",
|
545 | 563 | .data = &meson_ee_m8b_pwrc_data,
|
546 | 564 | },
|
| 565 | + { |
| 566 | + .compatible = "amlogic,meson-gxbb-pwrc", |
| 567 | + .data = &meson_ee_gxbb_pwrc_data, |
| 568 | + }, |
547 | 569 | {
|
548 | 570 | .compatible = "amlogic,meson-g12a-pwrc",
|
549 | 571 | .data = &meson_ee_g12a_pwrc_data,
|
|
0 commit comments