Skip to content

Commit

Permalink
cpufreq: Initial T6030 support
Browse files Browse the repository at this point in the history
apsc cannot be initialized using bit 40 on the PCPU cluster without triggering an SError but can be set on ECPU

Signed-off-by: a-ramses <[email protected]>
  • Loading branch information
a-ramses committed Dec 13, 2024
1 parent a412466 commit 093efd2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ static const struct cluster_t t6031_clusters[] = {
{"PCPU1", 0x212e00000, true, 1, 6},
{},
};

static const struct cluster_t t6030_clusters[] = {
{"ECPU0", 0x210e00000, false, 1, 5},
{"PCPU0", 0x211e00000, true, 1, 6},
{},
};

const struct cluster_t *cpufreq_get_clusters(void)
{
switch (chip_id) {
Expand All @@ -217,6 +224,8 @@ const struct cluster_t *cpufreq_get_clusters(void)
return t6020_clusters;
case T6022:
return t6022_clusters;
case T6030:
return t6030_clusters;
case T6031:
return t6031_clusters;
default:
Expand Down Expand Up @@ -268,6 +277,18 @@ static const struct feat_t t6031_features[] = {
{},
};

static const struct feat_t t6030_features[] = {
{"cpu-apsc", CLUSTER_PSTATE, CLUSTER_PSTATE_M2_APSC_DIS, 0, CLUSTER_PSTATE_APSC_BUSY, false},
{"ppt-thrtl", 0x48400, 0, BIT(63), 0, false},
{"ppt-thrtl", 0x48408, 0, BIT(63), 0, false},
{"llc-thrtl", 0x40270, 0, BIT(63), 0, false},
{"amx-thrtl", 0x40250, 0, BIT(63), 0, false},
{"cpu-fixed-freq-pll-relock", CLUSTER_PSTATE, 0, CLUSTER_PSTATE_FIXED_FREQ_PLL_RECLOCK, 0,
false},
{},
};


const struct feat_t *cpufreq_get_features(void)
{
switch (chip_id) {
Expand All @@ -280,6 +301,8 @@ const struct feat_t *cpufreq_get_features(void)
case T6021:
case T6022:
return t6020_features;
case T6030:
return t6030_features;
case T6031:
return t6031_features;
default:
Expand Down

0 comments on commit 093efd2

Please sign in to comment.