Support cpufreq for t6031

This seems to work, and matches the info i can find.

Signed-off-by: Daniel Berlin <dberlin@dberlin.org>
This commit is contained in:
Daniel Berlin 2023-11-30 16:17:03 -05:00 committed by Hector Martin
parent 4b0fde22a3
commit 61cf1084d0

View file

@ -194,6 +194,12 @@ static const struct cluster_t t6022_clusters[] = {
{},
};
static const struct cluster_t t6031_clusters[] = {
{"ECPU0", 0x210e00000, false, 1, 5},
{"PCPU0", 0x211e00000, true, 1, 6},
{"PCPU1", 0x212e00000, true, 1, 6},
{},
};
const struct cluster_t *cpufreq_get_clusters(void)
{
switch (chip_id) {
@ -211,6 +217,8 @@ const struct cluster_t *cpufreq_get_clusters(void)
return t6020_clusters;
case T6022:
return t6022_clusters;
case T6031:
return t6031_clusters;
default:
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);
return NULL;
@ -250,6 +258,16 @@ static const struct feat_t t6020_features[] = {
{},
};
static const struct feat_t t6031_features[] = {
{"cpu-apsc", CLUSTER_PSTATE, CLUSTER_PSTATE_M2_APSC_DIS, 0, CLUSTER_PSTATE_APSC_BUSY, false},
{"ppt-thrtl", 0x48400, 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) {
@ -262,6 +280,8 @@ const struct feat_t *cpufreq_get_features(void)
case T6021:
case T6022:
return t6020_features;
case T6031:
return t6031_features;
default:
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);
return NULL;