From 33db7aca1f0a86bb3db9b9b58cedd67a6c9289e2 Mon Sep 17 00:00:00 2001 From: Jaehyoung Choi Date: Thu, 3 May 2018 13:42:00 +0900 Subject: [PATCH] [9610] soc: samsung: Add EXYNOS9610 chip-id information Change-Id: I39715d220ff9bcd9e62c1bb5667168eee08f8cc4 Signed-off-by: Jaehyoung Choi --- drivers/soc/samsung/exynos-chipid.c | 15 +++++++++++++++ include/linux/soc/samsung/exynos-soc.h | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index c055c78b0311..cb2c50c08760 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -64,16 +64,31 @@ static const char * __init product_id_to_name(unsigned int product_id) case EXYNOS5800_SOC_ID: soc_name = "EXYNOS5800"; break; + case EXYNOS9610_SOC_ID: + soc_name = "EXYNOS9610"; + break; default: soc_name = "UNKNOWN"; } return soc_name; } +static const struct exynos_chipid_variant drv_data_exynos9610 = { + .product_ver = 1, + .unique_id_reg = 0x04, + .rev_reg = 0x10, + .main_rev_bit = 20, + .sub_rev_bit = 16, +}; + static const struct of_device_id of_exynos_chipid_ids[] __initconst = { { .compatible = "samsung,exynos4210-chipid", }, + { + .compatible = "samsung,exynos9610-chipid", + .data = &drv_data_exynos9610, + }, {}, }; diff --git a/include/linux/soc/samsung/exynos-soc.h b/include/linux/soc/samsung/exynos-soc.h index 08a75534f3ad..b721a3131941 100644 --- a/include/linux/soc/samsung/exynos-soc.h +++ b/include/linux/soc/samsung/exynos-soc.h @@ -24,6 +24,7 @@ #define EXYNOS5440_SOC_ID 0xE5440000 #define EXYNOS5800_SOC_ID 0xE5422000 #define EXYNOS8890_SOC_ID 0xE8890000 +#define EXYNOS9610_SOC_ID 0xE9610000 #define EXYNOS_SOC_MASK 0xFFFFF000 @@ -40,10 +41,29 @@ * @soc_revision: revision of exynos SoC */ +struct exynos_chipid_variant { + int product_ver; + int unique_id_reg; + int rev_reg; + int main_rev_bit; + int sub_rev_bit; +}; + +/** + * Struct exynos_chipid_info + * @soc_product_id: product id allocated to exynos SoC + * @soc_revision: revision of exynos SoC + */ struct exynos_chipid_info { + void __iomem *reg; u32 product_id; u32 revision; + u32 main_rev; + u32 sub_rev; + u32 lot_id; + char *lot_id2; u64 unique_id; + struct exynos_chipid_variant *drv_data; }; extern struct exynos_chipid_info exynos_soc_info; -- 2.20.1