Skip to content

Commit

Permalink
[v1.05][ARM] Add new Snapdragon SoCs (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Noob committed Jul 18, 2024
1 parent 8fca4cb commit a0ce761
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
27 changes: 26 additions & 1 deletion src/arm/soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,37 @@ bool match_special(char* soc_name, struct system_on_chip* soc) {
return true;
}

// Snapdragon 8 Gen 1 reported as "taro"
// New Snapdragon SoCs codenames
// https://github.com/sm8450-mainline/fdt?tab=readme-ov-file#chipsets
// https://github.com/Dr-Noob/cpufetch/issues/253
if (strcmp(soc_name, "cape") == 0) {
fill_soc(soc, "8+ Gen 1", SOC_SNAPD_SM8475, 4);
return true;
}

if(strcmp(soc_name, "taro") == 0) {
fill_soc(soc, "8 Gen 1", SOC_SNAPD_SM8450, 4);
return true;
}

if(strcmp(soc_name, "ukee") == 0) {
fill_soc(soc, "7+ Gen 2", SOC_SNAPD_SM7475, 4);
return true;
}

if(strcmp(soc_name, "diwali") == 0) {
fill_soc(soc, "7 Gen 1", SOC_SNAPD_SM7450, 4);
return true;
}

// parrot can be either SM7435 or SM6450, we need more data
// to distingish between those two

if(strcmp(soc_name, "ravelin") == 0) {
fill_soc(soc, "4 Gen 2", SOC_SNAPD_SM4450, 4);
return true;
}

// Google Pixel 6
// https://github.com/Dr-Noob/cpufetch/issues/134
if(strcmp(soc_name, "oriole") == 0) {
Expand Down
6 changes: 5 additions & 1 deletion src/arm/socs.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ enum {
SOC_SNAPD_SM6350,
SOC_SNAPD_SDM710,
SOC_SNAPD_SDM712,
SOC_SNAPD_SM4450,
SOC_SNAPD_SM7125,
SOC_SNAPD_SM7150_AA,
SOC_SNAPD_SM7150_AB,
Expand All @@ -283,6 +284,8 @@ enum {
SOC_SNAPD_SM7250_AA,
SOC_SNAPD_SM7250_AB,
SOC_SNAPD_SM7250_AC,
SOC_SNAPD_SM7450,
SOC_SNAPD_SM7475,
SOC_SNAPD_MSM8974AA,
SOC_SNAPD_MSM8974AB,
SOC_SNAPD_MSM8974AC,
Expand All @@ -303,6 +306,7 @@ enum {
SOC_SNAPD_SM8250_AB,
SOC_SNAPD_SM8350,
SOC_SNAPD_SM8450,
SOC_SNAPD_SM8475,
// APPLE
SOC_APPLE_M1,
SOC_APPLE_M1_PRO,
Expand Down Expand Up @@ -375,7 +379,7 @@ inline static VENDOR get_soc_vendor_from_soc(SOC soc) {
else if(soc >= SOC_KUNPENG_920 && soc <= SOC_KUNPENG_930) return SOC_VENDOR_KUNPENG;
else if(soc >= SOC_EXYNOS_3475 && soc <= SOC_EXYNOS_880) return SOC_VENDOR_EXYNOS;
else if(soc >= SOC_MTK_MT6893 && soc <= SOC_MTK_MT8783) return SOC_VENDOR_MEDIATEK;
else if(soc >= SOC_SNAPD_QSD8650 && soc <= SOC_SNAPD_SM8450) return SOC_VENDOR_SNAPDRAGON;
else if(soc >= SOC_SNAPD_QSD8650 && soc <= SOC_SNAPD_SM8475) return SOC_VENDOR_SNAPDRAGON;
else if(soc >= SOC_APPLE_M1 && soc <= SOC_APPLE_M3_MAX) return SOC_VENDOR_APPLE;
else if(soc >= SOC_ALLWINNER_A10 && soc <= SOC_ALLWINNER_R328) return SOC_VENDOR_ALLWINNER;
else if(soc >= SOC_ROCKCHIP_3288 && soc <= SOC_ROCKCHIP_3588) return SOC_VENDOR_ROCKCHIP;
Expand Down

0 comments on commit a0ce761

Please sign in to comment.