Initial t6022 support

GPU stuff is a wild guess.

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2023-08-07 16:46:24 +09:00
parent 28708461fc
commit 9b73944684
4 changed files with 16 additions and 2 deletions

View file

@ -133,7 +133,7 @@ void cpufreq_fixup_cluster(const struct cluster_t *cluster)
bits = CLUSTER_PSTATE_UNK_M1;
break;
case T8112:
case T6020 ... T6021:
case T6020 ... T6022:
bits = CLUSTER_PSTATE_UNK_M2;
break;
default:
@ -198,6 +198,7 @@ const struct cluster_t *cpufreq_get_clusters(void)
return t8112_clusters;
case T6020:
case T6021:
case T6022:
return t6020_clusters;
default:
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);
@ -248,6 +249,7 @@ const struct feat_t *cpufreq_get_features(void)
return t8112_features;
case T6020:
case T6021:
case T6022:
return t6020_features;
default:
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);

View file

@ -63,6 +63,7 @@ static int get_core_counts(u32 *count, u32 nclusters, u32 ncores)
break;
case T6020:
case T6021:
case T6022:
cores[0] = read32(base + 0xe01500);
cores[1] = read32(base + 0xe01504);
cores[2] = read32(base + 0xe01508);
@ -225,6 +226,13 @@ static int calc_power_t600x(u32 count, u32 table_count, const struct perf_state
adjust_leakages = false; // pre-adjusted?
imax = 24.0;
break;
case T6022:
nclusters += 4;
load_fuses(core_leak + 4, min(4, nclusters), 0x229e2cc1f8, 4, 13, 2, 2, false);
load_fuses(sram_leak + 4, min(4, nclusters), 0x229e2cc208, 19, 9, 1, 1, false);
load_fuses(cs_leak + 1, 1, 0x229e2cc204, 8, 12, 1, 1, false);
load_fuses(afr_leak + 1, 1, 0x229e2cc210, 0, 12, 1, 1, false);
// fallthrough
case T6021:
nclusters += 4;
s_sram = 5.80760758;
@ -452,6 +460,7 @@ int dt_set_gpu(void *dt)
break;
case T6020:
case T6021:
case T6022:
has_cs_afr = true;
/* fallthrough */
case T6000:

View file

@ -210,6 +210,7 @@ void smp_start_secondaries(void)
break;
case T6020:
case T6021:
case T6022:
cpu_start_off = CPU_START_OFF_T6020;
break;
default:

View file

@ -12,12 +12,14 @@
#define T6002 0x6002
#define T6020 0x6020
#define T6021 0x6021
#define T6022 0x6022
#ifdef TARGET
#if TARGET == T8103
#define EARLY_UART_BASE 0x235200000
#elif TARGET == T6000 || TARGET == T6001 || TARGET == T6002 || TARGET == T6020 || TARGET == T6021
#elif TARGET == T6000 || TARGET == T6001 || TARGET == T6002 || TARGET == T6020 || \
TARGET == T6021 || TARGET == T6022
#define EARLY_UART_BASE 0x39b200000
#elif TARGET == T8112
#define EARLY_UART_BASE 0x235200000