Skip to content

Commit 9b73944

Browse files
committed
Initial t6022 support
GPU stuff is a wild guess. Signed-off-by: Hector Martin <[email protected]>
1 parent 2870846 commit 9b73944

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/cpufreq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void cpufreq_fixup_cluster(const struct cluster_t *cluster)
133133
bits = CLUSTER_PSTATE_UNK_M1;
134134
break;
135135
case T8112:
136-
case T6020 ... T6021:
136+
case T6020 ... T6022:
137137
bits = CLUSTER_PSTATE_UNK_M2;
138138
break;
139139
default:
@@ -198,6 +198,7 @@ const struct cluster_t *cpufreq_get_clusters(void)
198198
return t8112_clusters;
199199
case T6020:
200200
case T6021:
201+
case T6022:
201202
return t6020_clusters;
202203
default:
203204
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);
@@ -248,6 +249,7 @@ const struct feat_t *cpufreq_get_features(void)
248249
return t8112_features;
249250
case T6020:
250251
case T6021:
252+
case T6022:
251253
return t6020_features;
252254
default:
253255
printf("cpufreq: Chip 0x%x is unsupported\n", chip_id);

src/kboot_gpu.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static int get_core_counts(u32 *count, u32 nclusters, u32 ncores)
6363
break;
6464
case T6020:
6565
case T6021:
66+
case T6022:
6667
cores[0] = read32(base + 0xe01500);
6768
cores[1] = read32(base + 0xe01504);
6869
cores[2] = read32(base + 0xe01508);
@@ -225,6 +226,13 @@ static int calc_power_t600x(u32 count, u32 table_count, const struct perf_state
225226
adjust_leakages = false; // pre-adjusted?
226227
imax = 24.0;
227228
break;
229+
case T6022:
230+
nclusters += 4;
231+
load_fuses(core_leak + 4, min(4, nclusters), 0x229e2cc1f8, 4, 13, 2, 2, false);
232+
load_fuses(sram_leak + 4, min(4, nclusters), 0x229e2cc208, 19, 9, 1, 1, false);
233+
load_fuses(cs_leak + 1, 1, 0x229e2cc204, 8, 12, 1, 1, false);
234+
load_fuses(afr_leak + 1, 1, 0x229e2cc210, 0, 12, 1, 1, false);
235+
// fallthrough
228236
case T6021:
229237
nclusters += 4;
230238
s_sram = 5.80760758;
@@ -452,6 +460,7 @@ int dt_set_gpu(void *dt)
452460
break;
453461
case T6020:
454462
case T6021:
463+
case T6022:
455464
has_cs_afr = true;
456465
/* fallthrough */
457466
case T6000:

src/smp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ void smp_start_secondaries(void)
210210
break;
211211
case T6020:
212212
case T6021:
213+
case T6022:
213214
cpu_start_off = CPU_START_OFF_T6020;
214215
break;
215216
default:

src/soc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
#define T6002 0x6002
1313
#define T6020 0x6020
1414
#define T6021 0x6021
15+
#define T6022 0x6022
1516

1617
#ifdef TARGET
1718

1819
#if TARGET == T8103
1920
#define EARLY_UART_BASE 0x235200000
20-
#elif TARGET == T6000 || TARGET == T6001 || TARGET == T6002 || TARGET == T6020 || TARGET == T6021
21+
#elif TARGET == T6000 || TARGET == T6001 || TARGET == T6002 || TARGET == T6020 || \
22+
TARGET == T6021 || TARGET == T6022
2123
#define EARLY_UART_BASE 0x39b200000
2224
#elif TARGET == T8112
2325
#define EARLY_UART_BASE 0x235200000

0 commit comments

Comments
 (0)