Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: aspeed: socinfo: Add new systems

Aspeed's u-boot sdk has been updated with the SoC IDs for the AST2605
variant, as well as A2 and A3 variants of the 2600 family.

>From u-boot's arch/arm/mach-aspeed/ast2600/scu_info.c:

SOC_ID("AST2600-A0", 0x0500030305000303),
SOC_ID("AST2600-A1", 0x0501030305010303),
SOC_ID("AST2620-A1", 0x0501020305010203),
SOC_ID("AST2600-A2", 0x0502030305010303),
SOC_ID("AST2620-A2", 0x0502020305010203),
SOC_ID("AST2605-A2", 0x0502010305010103),
SOC_ID("AST2600-A3", 0x0503030305030303),
SOC_ID("AST2620-A3", 0x0503020305030203),
SOC_ID("AST2605-A3", 0x0503010305030103),

Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver")
Link: https://lore.kernel.org/r/20210210114651.334324-1-joel@jms.id.au
Signed-off-by: Joel Stanley <joel@jms.id.au>

+24 -7
+24 -7
drivers/soc/aspeed/aspeed-socinfo.c
··· 25 25 /* AST2600 */ 26 26 { "AST2600", 0x05000303 }, 27 27 { "AST2620", 0x05010203 }, 28 + { "AST2605", 0x05030103 }, 28 29 }; 29 30 30 31 static const char *siliconid_to_name(u32 siliconid) ··· 44 43 static const char *siliconid_to_rev(u32 siliconid) 45 44 { 46 45 unsigned int rev = (siliconid >> 16) & 0xff; 46 + unsigned int gen = (siliconid >> 24) & 0xff; 47 47 48 - switch (rev) { 49 - case 0: 50 - return "A0"; 51 - case 1: 52 - return "A1"; 53 - case 3: 54 - return "A2"; 48 + if (gen < 0x5) { 49 + /* AST2500 and below */ 50 + switch (rev) { 51 + case 0: 52 + return "A0"; 53 + case 1: 54 + return "A1"; 55 + case 3: 56 + return "A2"; 57 + } 58 + } else { 59 + /* AST2600 */ 60 + switch (rev) { 61 + case 0: 62 + return "A0"; 63 + case 1: 64 + return "A1"; 65 + case 2: 66 + return "A2"; 67 + case 3: 68 + return "A3"; 69 + } 55 70 } 56 71 57 72 return "??";