platform: generic: spacemit: k1: refactor platform support

K3 shares cache-control CSRs, PMU idle fields, cluster sizing, and the
CCI-550 programming sequence with K1. Keeping these definitions and the
CCI helper in K1-specific files would either duplicate them or make K3
depend on K1 support.

Add a hidden PLATFORM_SPACEMIT option and move the shared definitions to
spacemit/common.h. Move cci_enable_snoop_dvm_reqs() to spacemit.c while
keeping each SoC's CCI topology and boot flow in its own platform driver.

Rename the PMU idle fields to match the K1 and K3 User Manuals. Keep the
K1 power-down mask at 0x1b, so K1 power-management behavior remains
unchanged. Keep the K1 HSM implementation K1-specific and switch it to
the shared definitions.

This is a non-functional refactoring that prepares the common support
used by K3.

Signed-off-by: Xianbin Zhu <xianbin.zhu@linux.spacemit.com>
Tested-by: E Shattow <e@freeshell.de>
Co-developed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20261028-spacemit-k3-v6-4-01d984f60941@linux.spacemit.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xianbin Zhu authored and Anup Patel committed 2026-10-29 11:24:04 +05:30
1 parent acc2508c47
commit b223774f20
8 files changed
+169 -108

No files matched your search

+4
View File
@@ -107,9 +107,13 @@ config PLATFORM_THEAD
select THEAD_C9XX_PMU
default n
config PLATFORM_SPACEMIT
bool
config PLATFORM_SPACEMIT_K1
bool "Spacemit K1 support"
select FDT_HSM_SPACEMIT
select PLATFORM_SPACEMIT
default n
config CPU_MIPS_P8700