[PATCH v2 2/2] sh: add SH7305 CPU subtype support

From: Artem Novak

Date: Fri Oct 02 2026 - 00:13:16 EST


Add the SH7305 as an SH4AL-DSP CPU subtype.

Recognize the SH7305 in the SH-4 CPU probe using the existing
0x300b PVR family with PRR value 0xc0, and expose the processor
name through the SH CPU information interface.

Signed-off-by: Artem Novak <artem122novak@xxxxxxxxx>
---
arch/sh/Kconfig | 9 +++++++++
arch/sh/include/asm/processor.h | 2 +-
arch/sh/kernel/cpu/proc.c | 3 ++-
arch/sh/kernel/cpu/sh4/probe.c | 3 +++
4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index d60f1d5a94c0..e71b5476769e 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -467,6 +467,15 @@ config CPU_SUBTYPE_SHX3

# SH4AL-DSP Processor Support

+config CPU_SUBTYPE_SH7305
+ bool "Support SH7305 processor"
+ select CPU_SH4AL_DSP
+ help
+ Select this option to build the kernel for systems based on the
+ Renesas SH7305 processor. The SH7305 belongs to the SH4AL-DSP
+ processor family and is used in embedded systems such as Casio
+ graphing calculators.
+
config CPU_SUBTYPE_SH7343
bool "Support SH7343 processor"
select CPU_SH4AL_DSP
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index 2a0b5713ab80..96321c46ce85 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -36,7 +36,7 @@ enum cpu_type {
CPU_SH7723, CPU_SH7724, CPU_SH7757, CPU_SH7734, CPU_SHX3,

/* SH4AL-DSP types */
- CPU_SH7343, CPU_SH7722, CPU_SH7366, CPU_SH7372,
+ CPU_SH7343, CPU_SH7305, CPU_SH7722, CPU_SH7366, CPU_SH7372,

/* Unknown subtype */
CPU_SH_NONE
diff --git a/arch/sh/kernel/cpu/proc.c b/arch/sh/kernel/cpu/proc.c
index 5f6d0e827bae..b6fbe27742e0 100644
--- a/arch/sh/kernel/cpu/proc.c
+++ b/arch/sh/kernel/cpu/proc.c
@@ -25,7 +25,8 @@ static const char *cpu_name[] = {
[CPU_SH7786] = "SH7786", [CPU_SH7757] = "SH7757",
[CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3",
[CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723",
- [CPU_SH7366] = "SH7366", [CPU_SH7724] = "SH7724",
+ [CPU_SH7305] = "SH7305", [CPU_SH7366] = "SH7366",
+ [CPU_SH7724] = "SH7724",
[CPU_SH7372] = "SH7372", [CPU_SH7734] = "SH7734",
[CPU_J2] = "J2",
[CPU_SH_NONE] = "Unknown"
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index ef4dd6295263..7f77fc64258c 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -143,6 +143,9 @@ void cpu_probe(void)
break;
case 0x300b:
switch (prr) {
+ case 0xc0:
+ boot_cpu_data.type = CPU_SH7305;
+ break;
case 0x20:
boot_cpu_data.type = CPU_SH7724;
boot_cpu_data.flags |= CPU_HAS_L2_CACHE;
--
2.55.0