From patchwork Tue Oct 12 17:16:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12553295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91CC2C433EF for ; Tue, 12 Oct 2021 17:16:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D5CC6108F for ; Tue, 12 Oct 2021 17:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231826AbhJLRSa (ORCPT ); Tue, 12 Oct 2021 13:18:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231672AbhJLRS3 (ORCPT ); Tue, 12 Oct 2021 13:18:29 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B9EC061745 for ; Tue, 12 Oct 2021 10:16:27 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id j21so265857lfe.0 for ; Tue, 12 Oct 2021 10:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YOJAucMV9YyITMCE0dWFpzbbe0z6mKCttuxJLNpSrfw=; b=sn5K8s+BAtX7xFh/Ec7Zp5MyJ6HKMfNJXpN2dWbsenSFa4yKInkQ+UouIMFmGDY/W2 5LChKxp6S6zwDUHlVK9MKCw4/IfB6bKl62m/zB8/KftWIVf0co/lMX3FILvhTmpfQE1Y ZHK1LRp/y3l2yCjj3zUNJ8VQR8hyE9OVWMMi2J6yke7/HFksUNNfQJRjhszSqTVP926f KAo9yBu20v1Iw77cedd+kZH9+L1fQL1DENHiNHxMuDJc3SHnmWhu+WErjDhGW5YnEIWO m4g2Ohc8KKy5t3YVAucV130BH04foDHg2q8Cdscg+cz6Cfl3x0QHKpHJs4Em6pm8GkHO RcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YOJAucMV9YyITMCE0dWFpzbbe0z6mKCttuxJLNpSrfw=; b=YSeaw9Rbms4trU/zH7ymjfYKtRUPRfX2LmBENk9mgBZ0RUypxBvZOI6AzB1JS+IP03 7g+9sj0BBPCcCX7FoH0rQzGkBX8efPxvbv/tGpl7aDiCSIai389lPFI6MwK4BlkEPllh 7Di1K9rRgn4quPM3fVbVabsSDlY7WG8sPg2bWymeLFJUd39BgSEH19CjCQWTI1Jn5W8W VDP8XIMSTDGlX8cmKYY6Oc+cC8Vs7UMugATq5vLyrIMICIiGIOO0IHfksv+AdImFfWVc GvmobJr29udjNmVnb/6zXj6WuMCX7D1LbXcTVi7OVQoPblQ3j2/Lwg/a5+YRcROXubV1 fbgA== X-Gm-Message-State: AOAM531MvPphZD7bqZv2J9G5PilRDFe+RZvAmgDBis5mNjy6tf4EwoV5 H07Gpa0pF58DkZZFaI8CHj6/YQ== X-Google-Smtp-Source: ABdhPJxIR+R0Uxc0QaF6AWCzzBDS6hvjuiFcAIky+SXxmGPpShYTTfu10/C013pd01tdqiPErm8aDA== X-Received: by 2002:a05:6512:400e:: with SMTP id br14mr10159122lfb.23.1634058985720; Tue, 12 Oct 2021 10:16:25 -0700 (PDT) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id s14sm1085022lfe.14.2021.10.12.10.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 10:16:25 -0700 (PDT) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Sumit Semwal , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] soc: samsung: exynos-chipid: Pass revision reg offsets Date: Tue, 12 Oct 2021 20:16:22 +0300 Message-Id: <20211012171624.14338-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Old Exynos SoCs have both Product ID and Revision ID in one single register, while new SoCs tend to have two separate registers for those IDs. Implement handling of both cases by passing Revision ID register offsets in driver data. Signed-off-by: Sam Protsenko --- drivers/soc/samsung/exynos-chipid.c | 67 +++++++++++++++++++---- include/linux/soc/samsung/exynos-chipid.h | 6 +- 2 files changed, 58 insertions(+), 15 deletions(-) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 5c1d0f97f766..1264a18aef97 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,17 @@ #include "exynos-asv.h" +struct exynos_chipid_variant { + unsigned int rev_reg; /* revision register offset */ + unsigned int main_rev_bit; /* main revision offset */ + unsigned int sub_rev_bit; /* sub revision offset */ +}; + +struct exynos_chipid_info { + u32 product_id; + u32 revision; +}; + static const struct exynos_soc_id { const char *name; unsigned int id; @@ -49,31 +61,55 @@ static const char *product_id_to_soc_id(unsigned int product_id) int i; for (i = 0; i < ARRAY_SIZE(soc_ids); i++) - if ((product_id & EXYNOS_MASK) == soc_ids[i].id) + if (product_id == soc_ids[i].id) return soc_ids[i].name; return NULL; } +static int exynos_chipid_get_chipid_info(struct regmap *regmap, + const struct exynos_chipid_variant *data, + struct exynos_chipid_info *soc_info) +{ + int ret; + unsigned int val, main_rev, sub_rev; + + ret = regmap_read(regmap, EXYNOS_CHIPID_REG_PRO_ID, &val); + if (ret < 0) + return ret; + soc_info->product_id = val & EXYNOS_MASK; + + ret = regmap_read(regmap, data->rev_reg, &val); + if (ret < 0) + return ret; + main_rev = (val >> data->main_rev_bit) & EXYNOS_REV_PART_LEN; + sub_rev = (val >> data->sub_rev_bit) & EXYNOS_REV_PART_LEN; + soc_info->revision = (main_rev << EXYNOS_REV_PART_OFF) | sub_rev; + + return 0; +} + static int exynos_chipid_probe(struct platform_device *pdev) { + const struct exynos_chipid_variant *drv_data; + struct exynos_chipid_info soc_info; struct soc_device_attribute *soc_dev_attr; struct soc_device *soc_dev; struct device_node *root; struct regmap *regmap; - u32 product_id; - u32 revision; int ret; + drv_data = of_device_get_match_data(&pdev->dev); + if (!drv_data) + return -EINVAL; + regmap = device_node_to_regmap(pdev->dev.of_node); if (IS_ERR(regmap)) return PTR_ERR(regmap); - ret = regmap_read(regmap, EXYNOS_CHIPID_REG_PRO_ID, &product_id); + ret = exynos_chipid_get_chipid_info(regmap, drv_data, &soc_info); if (ret < 0) return ret; - revision = product_id & EXYNOS_REV_MASK; - soc_dev_attr = devm_kzalloc(&pdev->dev, sizeof(*soc_dev_attr), GFP_KERNEL); if (!soc_dev_attr) @@ -86,8 +122,8 @@ static int exynos_chipid_probe(struct platform_device *pdev) of_node_put(root); soc_dev_attr->revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, - "%x", revision); - soc_dev_attr->soc_id = product_id_to_soc_id(product_id); + "%x", soc_info.revision); + soc_dev_attr->soc_id = product_id_to_soc_id(soc_info.product_id); if (!soc_dev_attr->soc_id) { pr_err("Unknown SoC\n"); return -ENODEV; @@ -106,7 +142,7 @@ static int exynos_chipid_probe(struct platform_device *pdev) dev_info(soc_device_to_device(soc_dev), "Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", - soc_dev_attr->soc_id, product_id, revision); + soc_dev_attr->soc_id, soc_info.product_id, soc_info.revision); return 0; @@ -125,9 +161,18 @@ static int exynos_chipid_remove(struct platform_device *pdev) return 0; } +static const struct exynos_chipid_variant exynos4210_chipid_drv_data = { + .rev_reg = 0x0, + .main_rev_bit = 0, + .sub_rev_bit = 4, +}; + static const struct of_device_id exynos_chipid_of_device_ids[] = { - { .compatible = "samsung,exynos4210-chipid" }, - {} + { + .compatible = "samsung,exynos4210-chipid", + .data = &exynos4210_chipid_drv_data, + }, + { } }; static struct platform_driver exynos_chipid_driver = { diff --git a/include/linux/soc/samsung/exynos-chipid.h b/include/linux/soc/samsung/exynos-chipid.h index 8bca6763f99c..5270725ba408 100644 --- a/include/linux/soc/samsung/exynos-chipid.h +++ b/include/linux/soc/samsung/exynos-chipid.h @@ -9,10 +9,8 @@ #define __LINUX_SOC_EXYNOS_CHIPID_H #define EXYNOS_CHIPID_REG_PRO_ID 0x00 -#define EXYNOS_SUBREV_MASK (0xf << 4) -#define EXYNOS_MAINREV_MASK (0xf << 0) -#define EXYNOS_REV_MASK (EXYNOS_SUBREV_MASK | \ - EXYNOS_MAINREV_MASK) +#define EXYNOS_REV_PART_LEN 0xf +#define EXYNOS_REV_PART_OFF 4 #define EXYNOS_MASK 0xfffff000 #define EXYNOS_CHIPID_REG_PKG_ID 0x04 From patchwork Tue Oct 12 17:16:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12553297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25A9AC433EF for ; Tue, 12 Oct 2021 17:16:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0896C60F21 for ; Tue, 12 Oct 2021 17:16:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232221AbhJLRSb (ORCPT ); Tue, 12 Oct 2021 13:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232134AbhJLRSb (ORCPT ); Tue, 12 Oct 2021 13:18:31 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31020C061746 for ; Tue, 12 Oct 2021 10:16:29 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id r19so87661779lfe.10 for ; Tue, 12 Oct 2021 10:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c+pdIjVhlHP+7rLIgR547hoyyJNbKcaM94b/z/uUGNg=; b=RMnxV/1YtFxE7Q8wud9+d7bLEPHNyIGrs+cww//wo4ndpXbcuTDow3HrHd081pG4V0 5Q0k/GeBegYJYpQwP59zv7lkhB+1vGA0LnH8HkXvBuMiEA+mWhcppcijyksHAuqvwFF3 13h+A+uTXW8KeKFP2BhWCwfdlsdNu+lwzVP1FuH6zbTvMlaDoPNhUVPuZUB8s5OfrVAG ofn2YRiZhB65RZMJNoM4priMldiaw809Gq7hhCATJ8ly45jDGSjrFKKGprZJaXwEb707 LaJSy66soeYeZ5CPhdFwaa/NMMcEWH9nV80y3vcuG/ncHGn/YAAt4KjE2wGwWGZTslVM HVjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c+pdIjVhlHP+7rLIgR547hoyyJNbKcaM94b/z/uUGNg=; b=QeQPYTg/3qTZpjJK50q/PdBNidlRy1aEeDfKc0DHfO0dyWTqRvoRxL/vIdfcCFVft+ 9mOeQD+cjpY9kkRTbRnOJOCstfM5/6shxBd6dprJ6eP7A0VE+G4pXS0b4FZj5WTyuQW9 l/yee7f3isuBuxWdu1BKE3bn2ptoXpnq8ajxCnGFm4Ibhh0cTkBgiDw2Al4egleS0JCk w2GWYO+KZxHiiqMUv/AXsZqB1RzH4pUeVGi/UF5AQM2pW5R8v0dWWdIvqrbasXRf0LPa RoFqWZpnAvbrQOD167M1K89moKlE7bhq8qqWjM7wCx4vJqAokQl8laaGvBjZJVzZN1RD Z40w== X-Gm-Message-State: AOAM532TiusGPlGNkIb/obJtqUDejlTZLdf4hULrcd73JoLgLYS5h4LF Dh0pI2rlNup00ho9i1/o32rIpjd3F2lk0QP7 X-Google-Smtp-Source: ABdhPJwwNkuxXjuENhbZ78o1lnzW5pPti+1zbyB4pQWzpRNwws0NrIb+iSfvg3PU0C0WWVi2Z3/cRQ== X-Received: by 2002:ac2:4bc2:: with SMTP id o2mr32675620lfq.462.1634058987323; Tue, 12 Oct 2021 10:16:27 -0700 (PDT) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id k24sm989627lfe.76.2021.10.12.10.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 10:16:26 -0700 (PDT) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Sumit Semwal , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] dt-bindings: samsung: exynos-chipid: Document Exynos850 compatible Date: Tue, 12 Oct 2021 20:16:23 +0300 Message-Id: <20211012171624.14338-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211012171624.14338-1-semen.protsenko@linaro.org> References: <20211012171624.14338-1-semen.protsenko@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add compatible string for Exynos850 chip-id. While at it, use enum instead of items/const, to reduce further cluttering of "compatible" list. Signed-off-by: Sam Protsenko --- .../devicetree/bindings/arm/samsung/exynos-chipid.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml index f99c0c6df21b..bfc352a2fdd6 100644 --- a/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml +++ b/Documentation/devicetree/bindings/arm/samsung/exynos-chipid.yaml @@ -11,8 +11,9 @@ maintainers: properties: compatible: - items: - - const: samsung,exynos4210-chipid + enum: + - samsung,exynos4210-chipid + - samsung,exynos850-chipid reg: maxItems: 1 From patchwork Tue Oct 12 17:16:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12553299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57E2EC433EF for ; Tue, 12 Oct 2021 17:18:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A0FD60E74 for ; Tue, 12 Oct 2021 17:18:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbhJLRUI (ORCPT ); Tue, 12 Oct 2021 13:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232300AbhJLRSc (ORCPT ); Tue, 12 Oct 2021 13:18:32 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E09C1C061570 for ; Tue, 12 Oct 2021 10:16:30 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id c16so73295lfb.3 for ; Tue, 12 Oct 2021 10:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WFagVVyJxqKqo+ujXIDBsFHUAz6WyHhioBswXi9enzg=; b=l8tZ/XIpe2FjRZm6OpvZ89THhtR+7+bJk8clRVzRy77EY2k97mh4wp6d6tFOppLwB1 g6melgiBFoChsTlxxWF2hnj8l4krWFPiogh86W0M2J971xPgUfjylimzBUq2uUDCSfDO MRGgM++68kRYWN+ibHvoxuibIUlhJwuiN452gnwI/EPDmodSdio9xc64/e3I7+J3tOKx mWmwCyB4uK2fsFZQhH5Ac0U2t13dzPmwybMhQWqRsZPuiNo5++w1yf/yzgDFfIV0840Q K1MON+2CB14+D0+h6aap2878Nsw1PL28BWSROpuHzdkYulIKZZpr+fTWVc/fTuUBXCy2 1GBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WFagVVyJxqKqo+ujXIDBsFHUAz6WyHhioBswXi9enzg=; b=dvGoq2aiAB4bm0Cxaq99D4u9tPBIvS2540Wf2fMQAJhUo5Bz4VsgDENPZ+JR7tPf6k 8OaQodaM/tp25gDY4/xsk4nNGNSTL/PvDnTm9DJgFYbzvEp8QEwesIELsSrl21GNqA/9 c5Ov25XR1+TY7liyaQ3cXXv5FBGHk9ux+APBief4gEPB7gub4lIbnxHsTssan2RY4hCM /ws9XCoWQzSzjkd16+pXrUx3H8byh8679edYDZ+LoaBWvCB3XgUXFUmhoUOsHqqT3eBJ +9J6MZamLNh5Jgq/u3u0BWm0M2pdDm94qokU7Fslkl54+QSBCXgS0GxWoRSDN+e6BMSt AHUw== X-Gm-Message-State: AOAM532OQzr8m2WAvQSi7B0HB5rd5XyVvK32eTE+fT1JSOae0CGAkJnI Wz867TETuFqvGfQOeg5TE+kXpEAuBZUNG9Jr X-Google-Smtp-Source: ABdhPJxCbQwIeJWlyTDgoEFoTvwbUkzTmQ1L43vpOdiNZ2m5MzmzHVSa5dNqORrTV4PL9kSTf2ZptA== X-Received: by 2002:a2e:9c92:: with SMTP id x18mr3738268lji.445.1634058988981; Tue, 12 Oct 2021 10:16:28 -0700 (PDT) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id v3sm713082lfr.61.2021.10.12.10.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 10:16:28 -0700 (PDT) From: Sam Protsenko To: Krzysztof Kozlowski , Rob Herring Cc: Sumit Semwal , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] soc: samsung: exynos-chipid: Add Exynos850 support Date: Tue, 12 Oct 2021 20:16:24 +0300 Message-Id: <20211012171624.14338-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211012171624.14338-1-semen.protsenko@linaro.org> References: <20211012171624.14338-1-semen.protsenko@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Add chip-id support for Exynos850 SoC. Despite its "E3830" ID, the actual SoC name is Exynos850 (Exynos3830 name is internal and outdated). Signed-off-by: Sam Protsenko --- drivers/soc/samsung/exynos-chipid.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 1264a18aef97..d160f9b082c4 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -54,6 +54,7 @@ static const struct exynos_soc_id { { "EXYNOS5440", 0xE5440000 }, { "EXYNOS5800", 0xE5422000 }, { "EXYNOS7420", 0xE7420000 }, + { "EXYNOS850", 0xE3830000 }, }; static const char *product_id_to_soc_id(unsigned int product_id) @@ -167,10 +168,19 @@ static const struct exynos_chipid_variant exynos4210_chipid_drv_data = { .sub_rev_bit = 4, }; +static const struct exynos_chipid_variant exynos850_chipid_drv_data = { + .rev_reg = 0x10, + .main_rev_bit = 20, + .sub_rev_bit = 16, +}; + static const struct of_device_id exynos_chipid_of_device_ids[] = { { .compatible = "samsung,exynos4210-chipid", .data = &exynos4210_chipid_drv_data, + }, { + .compatible = "samsung,exynos850-chipid", + .data = &exynos850_chipid_drv_data, }, { } };