T6D: add power domain config. [3/3]

PD#SWPL-164469

Problem:
t6d need power domain support.

Solution:
add power domain config in kernel.

Verify:
pxp

Change-Id: Idbafb1d0d68e444d846dfb07440c99f0d3cfeca7
Signed-off-by: hongyu.chen1 <hongyu.chen1@amlogic.com>
This commit is contained in:
hongyu.chen1
2024-04-18 17:02:50 +08:00
committed by jian.hu
parent 67aee41c41
commit 7fc0924582
3 changed files with 36 additions and 2 deletions
+3 -2
View File
@@ -11,6 +11,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-t5m-gpio.h>
#include <dt-bindings/power/t5m-pd.h>
#include <dt-bindings/power/t6d-pd.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/pwm/meson.h>
#include <dt-bindings/input/input.h>
@@ -288,9 +289,9 @@
};
pwrdm: power-domains {
compatible = "amlogic,t5m-power-domain";
compatible = "amlogic,t6d-power-domain";
#power-domain-cells = <1>;
status = "disabled";
status = "okay";
};
galcore {
+22
View File
@@ -26,6 +26,7 @@
#include <dt-bindings/power/s1a-pd.h>
#include <dt-bindings/power/s7d-pd.h>
#include <dt-bindings/power/s6-pd.h>
#include <dt-bindings/power/t6d-pd.h>
#include <linux/kallsyms.h>
struct sec_pm_private_domain {
@@ -806,6 +807,23 @@ static struct sec_pm_domain_data s6_pm_domain_data __initdata = {
.domains_count = ARRAY_SIZE(s6_pm_domains),
};
static struct sec_pm_private_domain t6d_pm_domains[] __initdata = {
[PDID_T6D_AMFC] = POWER_DOMAIN(amfc, PDID_T6D_AMFC,
DOMAIN_INIT_ON, GENPD_FLAG_ALWAYS_ON),
[PDID_T6D_DOS_HEVC] = POWER_DOMAIN(hevc, PDID_T6D_DOS_HEVC,
DOMAIN_INIT_ON, GENPD_FLAG_ALWAYS_ON),
[PDID_T6D_GE2D] = POWER_DOMAIN(ge2d, PDID_T6D_GE2D,
DOMAIN_INIT_ON, GENPD_FLAG_ALWAYS_ON),
[PDID_T6D_VPU_HDMI] = POWER_DOMAIN(vpu, PDID_T6D_VPU_HDMI,
DOMAIN_INIT_ON, GENPD_FLAG_ALWAYS_ON),
[PDID_T6D_DEMOD] = POWER_DOMAIN(demod, PDID_T6D_DEMOD,
DOMAIN_INIT_ON, GENPD_FLAG_ALWAYS_ON),
};
static struct sec_pm_domain_data t6d_pm_domain_data __initdata = {
.domains = t6d_pm_domains,
.domains_count = ARRAY_SIZE(t6d_pm_domains),
};
#endif
static struct sec_pm_private_domain s1a_pm_domains[] __initdata = {
@@ -1038,6 +1056,10 @@ static const struct of_device_id pd_match_table[] = {
.compatible = "amlogic,s6-power-domain",
.data = &s6_pm_domain_data,
},
{
.compatible = "amlogic,t6d-power-domain",
.data = &t6d_pm_domain_data,
},
#endif
{
.compatible = "amlogic,s1a-power-domain",
+11
View File
@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
#define PDID_T6D_AMFC 0
#define PDID_T6D_DOS_HEVC 1
#define PDID_T6D_GE2D 2
#define PDID_T6D_VPU_HDMI 3
#define PDID_T6D_DEMOD 4