From patchwork Thu Apr 4 17:17:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D97821669 for ; Thu, 4 Apr 2019 17:22:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB54428AE7 for ; Thu, 4 Apr 2019 17:22:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF19C28AF1; Thu, 4 Apr 2019 17:22:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2B85F28AF2 for ; Thu, 4 Apr 2019 17:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=WivEdqYdteBlqqLdZ6EyFvXI/HG45kruCyxX957e7uU=; b=taHGqUmIWhJYDr72l1nlsQdK02 elIbpuVI80HsRB9gaNWsKcalrXvq6zDgXPQW9r/oIp6UQ2WNS2elyqm7dbsFKzp47ncqvl07QICaN aSdxuDdwz5l6vuimF8zclgOt4cbzG5NvzXuuhyztxSZtArAG0sBd8U4LfiMxs4BXiWh9Bmhfpn7V/ IP3V98TNlJ7CRvlIluxIx2iiN9TghHEcT6E8DF+aXlZEKEE1V2HrUTy54E05OQMGWEvIqZF3GhV3g hVGMEPB5VT/lYtAFpjmDIcKoM3CDOWu5R3bLEZZpYHxqEJsGWC6XvgCqdVPeHkUhAtL4V1gM0FVVr Jzw3NURQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64U-00006j-Qy; Thu, 04 Apr 2019 17:22:38 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64L-0008L5-6P for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:22:34 +0000 Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190404172226epoutp0219b9bb7f0607467f91eac5a62a1ae7c5~SVT39deTR2371123711epoutp02c; Thu, 4 Apr 2019 17:22:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190404172226epoutp0219b9bb7f0607467f91eac5a62a1ae7c5~SVT39deTR2371123711epoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398546; bh=56F8YknQeIUdm0RoBagHdbdLbfVDNx3ZWv0Khy0irX0=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=P+6vRxJpjVHuvK1rFXw/N9/vbdSvUMPfc6qzAQzwbpoXbl9yAAlknYkOheTuKpA/A 6ulzFmN0udn9A7EtZd+EiObHx2MJIk6YKTQIaf11xLQaIdfYEaL+oKqUDwmQyUmoPG BPeUxBfjm27unO3+wO/WFwyu9hPqwhmhXZ84NpAE= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20190404172225epcas2p3a0b4c4d882c8fcf775b0fe7ab5aeabfd~SVT3rCooO0641906419epcas2p3M; Thu, 4 Apr 2019 17:22:25 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 72.13.04207.15D36AC5; Fri, 5 Apr 2019 02:22:25 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172224epcas2p21b449c0ae8e36f7e800ae67c18db35a2~SVT2yLCEj0820708207epcas2p2A; Thu, 4 Apr 2019 17:22:24 +0000 (GMT) X-AuditID: b6c32a48-6a1ff7000000106f-21-5ca63d51f5e0 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id BF.58.03620.05D36AC5; Fri, 5 Apr 2019 02:22:24 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:24 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 1/8] soc: samsung: Add exynos chipid driver support Date: Thu, 04 Apr 2019 19:17:28 +0200 Message-id: <20190404171735.12815-2-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsWy7bCmqW6g7bIYg9aduhYbZ6xntbj+5Tmr xfwj51gt+h+/ZrY4f34Du8Wmx9dYLS7vmsNmMeP8PiaLtUfuslssvX6RyeJ24wo2i0Vbv7Bb tO49wu7A67Fm3hpGj02rOtk8Ni+p9+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6Mjwf3MBZs 0q5YdnEzawPjFpUuRk4OCQETiVM3uplBbCGBHYwSnROVuxi5gOzvjBK/1jawwhS9u3KKBSKx m1Hi5PfvjBDOT0aJw99/sYBUsQkYSvQe7WMEsUUEhCXuLV3ODlLELHCCSWLWsWNgo4QF3CUu HG8DauDgYBFQlZj6xAfE5BWwlvi5IhximbzE6g0HwC7iFLCReLzkDRvIGAmBLWwSx/a/gLrI RaLxzV4oW1ri2aqNjBBFzYwSPbtvs0M4Exgl7h9fwAhRZS1x+PhFsA5mAT6JjsN/2UE2Swjw SnS0CUGUeEis/D2fDeKzfkaJKzfWsQGNWMDIsIpRLLWgODc9tdiowESvODG3uDQvXS85P3cT IzhCtTx2MB4453OIUYCDUYmHV4NpWYwQa2JZcWXuIUYJDmYlEd7g70tjhHhTEiurUovy44tK c1KLDzFKc7AoifM+lJ4bLSSQnliSmp2aWpBaBJNl4uCUamAs3J27fP/HU7WsCdtvx/zbM+fP Yb8v3uW73bUucte/OHNrd6vc4p7asLgzq2f1exsx+ol2ejRziDK565aonNq0IdpqZ9hR07Iz gd5NOpvi9/AzT9l3pUh5zqIX7hba83na3gWw/ivtbD4nOf/NtcoTad63RI5pvhNJK6xweiuZ 0znvCs9pn2IlluKMREMt5qLiRABG9xMSzAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOLMWRmVeSWpSXmKPExsVy+t9jAd0A22UxBts/6ltsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLsDr8eaeWsYPTat6mTz2Lyk3qNvyypGj8+b5AJYo7hsUlJzMstSi/TtErgyPh7cw1iw Sbti2cXNrA2MW1S6GDk5JARMJN5dOcXSxcjFISSwk1Fi/cOZUM5PRonHf3Yxg1SxCRhK9B7t YwSxRQSEJe4tXc4OUsQscIJJ4v/CNSwgCWEBd4kLx9uAbA4OFgFVialPfEBMXgFriZ8rwiGW yUus3nAAbCSngI3E4yVv2EBKhIBKvm9JmMDIs4CRYRWjZGpBcW56brFRgVFearlecWJucWle ul5yfu4mRmDwbTus1b+D8fGS+EOMAhyMSjy8GkzLYoRYE8uKK3MPMUpwMCuJ8AZ/XxojxJuS WFmVWpQfX1Sak1p8iFGag0VJnJc//1ikkEB6YklqdmpqQWoRTJaJg1OqgdE0/+VX8xetNs4O RnU7Hncq1ldNyp7HcPtNzxGuCau4ub7P2JSj9SMyLIbTc5fEVifzpOga9oNlKbxWCSsDdrC1 Kjvc+rKIeTNTxxN3NvH2nUGOszNz3m4IbbTWvfAmhkX40p2i13VXvVlfxu67+OuXi9TcR771 1/ylV+1cuCWhwvYZt6O1mxJLcUaioRZzUXEiAJ2+amk6AgAA X-CMS-MailID: 20190404172224epcas2p21b449c0ae8e36f7e800ae67c18db35a2 CMS-TYPE: 102P X-CMS-RootMailID: 20190404172224epcas2p21b449c0ae8e36f7e800ae67c18db35a2 References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102229_727103_4AA6501A X-CRM114-Status: GOOD ( 19.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pankaj Dubey Exynos SoCs have Chipid, for identification of product IDs and SoC revisions. This patch intends to provide initialization code for all these functionalities, at the same time it provides some sysfs entries for accessing these information to user-space. This driver uses existing binding for exynos-chipid. Changes by Bartlomiej: - fixed return values on errors - removed bogus kfree_const() - added missing Exynos4210 EVT0 id - converted code to use EXYNOS_MASK define - fixed np use after of_node_put() - fixed too early use of dev_info() - made driver fail for unknown SoC-s - added SPDX tag - updated Copyrights Signed-off-by: Pankaj Dubey [m.szyprowski: for suggestion and code snippet of product_id_to_soc_id] Signed-off-by: Marek Szyprowski Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/soc/samsung/Kconfig | 5 ++ drivers/soc/samsung/Makefile | 2 + drivers/soc/samsung/exynos-chipid.c | 111 ++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 drivers/soc/samsung/exynos-chipid.c -- 2.17.1 diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig index 2186285fda92..2905f5262197 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig @@ -7,6 +7,11 @@ menuconfig SOC_SAMSUNG if SOC_SAMSUNG +config EXYNOS_CHIPID + bool "Exynos Chipid controller driver" if COMPILE_TEST + depends on ARCH_EXYNOS || COMPILE_TEST + select SOC_BUS + config EXYNOS_PMU bool "Exynos PMU controller driver" if COMPILE_TEST depends on ARCH_EXYNOS || ((ARM || ARM64) && COMPILE_TEST) diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile index 29f294baac6e..3b6a8797416c 100644 --- a/drivers/soc/samsung/Makefile +++ b/drivers/soc/samsung/Makefile @@ -1,4 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_EXYNOS_CHIPID) += exynos-chipid.o obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS) += exynos3250-pmu.o exynos4-pmu.o \ diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c new file mode 100644 index 000000000000..5cb018807817 --- /dev/null +++ b/drivers/soc/samsung/exynos-chipid.c @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * + * EXYNOS - CHIP ID support + * Author: Pankaj Dubey + * Author: Bartlomiej Zolnierkiewicz + */ + +#include +#include +#include +#include +#include +#include +#include + +#define EXYNOS_SUBREV_MASK (0xF << 4) +#define EXYNOS_MAINREV_MASK (0xF << 0) +#define EXYNOS_REV_MASK (EXYNOS_SUBREV_MASK | EXYNOS_MAINREV_MASK) +#define EXYNOS_MASK 0xFFFFF000 + +static const struct exynos_soc_id { + const char *name; + unsigned int id; +} soc_ids[] = { + { "EXYNOS3250", 0xE3472000 }, + { "EXYNOS4210", 0x43200000 }, /* EVT0 revision */ + { "EXYNOS4210", 0x43210000 }, + { "EXYNOS4212", 0x43220000 }, + { "EXYNOS4412", 0xE4412000 }, + { "EXYNOS5250", 0x43520000 }, + { "EXYNOS5260", 0xE5260000 }, + { "EXYNOS5410", 0xE5410000 }, + { "EXYNOS5420", 0xE5420000 }, + { "EXYNOS5440", 0xE5440000 }, + { "EXYNOS5800", 0xE5422000 }, + { "EXYNOS7420", 0xE7420000 }, + { "EXYNOS5433", 0xE5433000 }, +}; + +static const char * __init 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) + return soc_ids[i].name; + return NULL; +} + +int __init exynos_chipid_early_init(void) +{ + struct soc_device_attribute *soc_dev_attr; + void __iomem *exynos_chipid_base; + struct soc_device *soc_dev; + struct device_node *root; + struct device_node *np; + u32 product_id; + u32 revision; + + /* look up for chipid node */ + np = of_find_compatible_node(NULL, NULL, "samsung,exynos4210-chipid"); + if (!np) + return -ENODEV; + + exynos_chipid_base = of_iomap(np, 0); + of_node_put(np); + + if (!exynos_chipid_base) { + pr_err("Failed to map SoC chipid\n"); + return -ENXIO; + } + + product_id = readl_relaxed(exynos_chipid_base); + revision = product_id & EXYNOS_REV_MASK; + iounmap(exynos_chipid_base); + + soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); + if (!soc_dev_attr) + return -ENOMEM; + + soc_dev_attr->family = "Samsung Exynos"; + + root = of_find_node_by_path("/"); + of_property_read_string(root, "model", &soc_dev_attr->machine); + of_node_put(root); + + soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%x", revision); + soc_dev_attr->soc_id = product_id_to_soc_id(product_id); + if (!soc_dev_attr->soc_id) { + pr_err("Unknown SoC\n"); + return -ENODEV; + } + + /* please note that the actual registration will be deferred */ + soc_dev = soc_device_register(soc_dev_attr); + if (IS_ERR(soc_dev)) { + kfree(soc_dev_attr->revision); + kfree(soc_dev_attr); + return PTR_ERR(soc_dev); + } + + /* it is too early to use dev_info() here (soc_dev is NULL) */ + pr_info("soc soc0: Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n", + soc_dev_attr->soc_id, product_id, revision); + + return 0; +} +early_initcall(exynos_chipid_early_init); From patchwork Thu Apr 4 17:17:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 998E21669 for ; Thu, 4 Apr 2019 17:23:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D5F928AD0 for ; Thu, 4 Apr 2019 17:23:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70A8028ADC; Thu, 4 Apr 2019 17:23:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B9C5C28AD0 for ; Thu, 4 Apr 2019 17:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rH1Gpbj2zGqDAGB0eHrR0rrIlVwqsRz5UAqPi1rGIWs=; b=YCuELqGivizFWS3wxLXyWOw3Mr DyhsMQDs+zW01diZYWppW8qUbzHjssqQOv8QDrA5wIWrACt7j/MH5Tyd9ztmMtXtzwSFf2jE2hyfF BtMq/VoxlKsfz3Nbu2q1gfLtnQU+e8Msk2vDqJyFjP+yuTgGE9jt3GY+YF8FmqRHYocmjBNfbqca2 O3++bk5icDFeypfa0buI7tm8N4DgQuP0IlrRgR9J9BLsd4oD+cLfVVD5TQJpbb7b7pHMNanLKRf/1 meO/VkuUu0auNaD90eOTwpE+mZQzoRCJI6WS/F2fsvjOdevlhhijkEt0lb6MQW1uZYt+ZW0ctD7h8 TmySf8GA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64j-0000SY-Pi; Thu, 04 Apr 2019 17:22:53 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64O-0008PC-Oz for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:22:37 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190404172230epoutp02eb0347b6a19e3c40fe6363c4725fc900~SVT8X_-av1978019780epoutp02Q; Thu, 4 Apr 2019 17:22:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190404172230epoutp02eb0347b6a19e3c40fe6363c4725fc900~SVT8X_-av1978019780epoutp02Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398550; bh=TYWpj8p9WaDYrR6UduDz4MgfkRQie1eBkkay1mt3QIA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=NVFGohpNxt5wqIoh2igHJGxPP+BuU/88xV4BrXO3I6BKKZ/YtAe6LTfB/oDiTOzpK p6LhzB+vFxg+MHxe4NTBPwAdxT32v13VIQIaYYAVPL80DiS877QxKelO4YBk5dtAB9 PVBHq4F1PYGozaPKmZGh1+iEYBqBRnWTamKOSzUc= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172230epcas2p2cc0798d06ffe3a1feb4e9d7007e3f3cd~SVT8AoaAB1739317393epcas2p2m; Thu, 4 Apr 2019 17:22:30 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 24.13.04207.65D36AC5; Fri, 5 Apr 2019 02:22:30 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172229epcas2p25a819e37035b26ccf53613e880bdcacf~SVT7KYg813185231852epcas2p2N; Thu, 4 Apr 2019 17:22:29 +0000 (GMT) X-AuditID: b6c32a48-6a1ff7000000106f-27-5ca63d564d71 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 90.68.03620.55D36AC5; Fri, 5 Apr 2019 02:22:29 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:29 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 2/8] soc: samsung: Exynos chipid driver update Date: Thu, 04 Apr 2019 19:17:29 +0200 Message-id: <20190404171735.12815-3-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRmVeSWpSXmKPExsWy7bCmuW6Y7bIYg4c3xCw2zljPanH9y3NW i/lHzrFa9D9+zWxx/vwGdotNj6+xWlzeNYfNYsb5fUwWa4/cZbdYev0ik8XtxhVsFou2fmG3 aN17hN3i8Jt2Vgc+jzXz1jB6bFrVyeaxeUm9R9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGWs WXuFveCTXMXM6/sZGxh7pboYOTkkBEwkms42sXUxcnEICexglNg7fT0LhPOdUWL23cvsXYwc YFXP76ZCxHczSjTuW8oK4fxklPh+7RsbyCg2AUOJ3qN9jCC2iICwxL2ly9lBipgFvjNJnHr9 lBUkISzgJHHm1XN2EJtFQFXi3fGrLCA2r4C1xLt9kxkhbpKXWL3hADOIzSlgI/F4yRs2iPgB NomLvTEQtotE//1jzBC2tMSzVRsZQZZJCDQzSvTsvs0O4UxglLh/fAHUVGuJw8cvgl3BLMAn 0XH4L9RvvBIdbUIQJR4S187ug/q/n1Fi9YwrTEAjFjAyrGIUSy0ozk1PLTYqMNErTswtLs1L 10vOz93ECI5WLY8djAfO+RxiFOBgVOLh1WBaFiPEmlhWXJl7iFGCg1lJhDf4+9IYId6UxMqq 1KL8+KLSnNTiQ4zSHCxK4rwPpedGCwmkJ5akZqemFqQWwWSZODilGhjFCo9cCFT8PcW7RKXm RECMsvHyvjTn+zGbJmYzvP9sJqRxbW3rtL6byo/tdevqLXNPCb9dYHs977JiSkwSr9wS0+Pf ZPXj/r2+r8h9NWfiHoYXOzZtDNcxb9C2KX+33UA+XEhQjTWtiTng9731J61jLrPbPJL78GPT uqnp0y6+7/7gZJl4eo4SS3FGoqEWc1FxIgC/Oulc0gIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDLMWRmVeSWpSXmKPExsVy+t9jAd1Q22UxBidWyFtsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLvF4TftrA58HmvmrWH02LSqk81j85J6j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4MpY s/YKe8EnuYqZ1/czNjD2SnUxcnBICJhIPL+b2sXIxSEksJNR4ve1T4wQzk9GiZe9G5i6GDk5 2AQMJXqP9jGC2CICwhL3li5nB7GZBb4zScyelwdiCws4SZx59RwsziKgKvHu+FUWEJtXwFri 3b7JYL0SAvISqzccYAaxOQVsJB4vecMGcoQQUM33LQkTGHkWMDKsYpRMLSjOTc8tNiowykst 1ytOzC0uzUvXS87P3cQIDMNth7X6dzA+XhJ/iFGAg1GJh1eDaVmMEGtiWXFl7iFGCQ5mJRHe 4O9LY4R4UxIrq1KL8uOLSnNSiw8xSnOwKInz8ucfixQSSE8sSc1OTS1ILYLJMnFwSjUwzsx8 I/Twiqeiyz6vLeoGCkIzHr8xYo/ZqF7IX5ewQHDSkYvdwX/zf9Z1R9oLX9K+4VZbdfjucqm7 kl3dNblZORduabhmmlxeEFmpkLM50tbltYzCG1N++6ULX3/lSzq1wO7yn55rSVvPdN97HNtX +uJxTei9gyvibkQ90P6h9PjmyZ/XF+8yUmIpzkg01GIuKk4EAKcrQJQ/AgAA X-CMS-MailID: 20190404172229epcas2p25a819e37035b26ccf53613e880bdcacf CMS-TYPE: 102P X-CMS-RootMailID: 20190404172229epcas2p25a819e37035b26ccf53613e880bdcacf References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102233_326386_2AC5D869 X-CRM114-Status: GOOD ( 16.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds definition of selected CHIP ID register offsets and register bit field definitions for Exynos5422 SoC. exynos_chipid_read() helper function is added to allow reading the CHIP ID block registers. Signed-off-by: Sylwester Nawrocki --- drivers/soc/samsung/exynos-chipid.c | 16 +++++----- drivers/soc/samsung/exynos-chipid.h | 48 +++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 drivers/soc/samsung/exynos-chipid.h diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 5cb018807817..4920f0ef2c55 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -16,10 +16,7 @@ #include #include -#define EXYNOS_SUBREV_MASK (0xF << 4) -#define EXYNOS_MAINREV_MASK (0xF << 0) -#define EXYNOS_REV_MASK (EXYNOS_SUBREV_MASK | EXYNOS_MAINREV_MASK) -#define EXYNOS_MASK 0xFFFFF000 +#include "exynos-chipid.h" static const struct exynos_soc_id { const char *name; @@ -40,6 +37,13 @@ static const struct exynos_soc_id { { "EXYNOS5433", 0xE5433000 }, }; +static void __iomem *exynos_chipid_base; + +unsigned int exynos_chipid_read(unsigned int offset) +{ + return readl_relaxed(exynos_chipid_base + offset); +} + static const char * __init product_id_to_soc_id(unsigned int product_id) { int i; @@ -53,7 +57,6 @@ static const char * __init product_id_to_soc_id(unsigned int product_id) int __init exynos_chipid_early_init(void) { struct soc_device_attribute *soc_dev_attr; - void __iomem *exynos_chipid_base; struct soc_device *soc_dev; struct device_node *root; struct device_node *np; @@ -73,9 +76,8 @@ int __init exynos_chipid_early_init(void) return -ENXIO; } - product_id = readl_relaxed(exynos_chipid_base); + product_id = exynos_chipid_read(EXYNOS_CHIPID_REG_PRO_ID); revision = product_id & EXYNOS_REV_MASK; - iounmap(exynos_chipid_base); soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); if (!soc_dev_attr) diff --git a/drivers/soc/samsung/exynos-chipid.h b/drivers/soc/samsung/exynos-chipid.h new file mode 100644 index 000000000000..826a12c25fa2 --- /dev/null +++ b/drivers/soc/samsung/exynos-chipid.h @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * + * EXYNOS - CHIP ID support + */ + +#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_MASK 0xfffff000 + +#define EXYNOS_CHIPID_REG_PKG_ID 0x04 + #define EXYNOS5422_IDS_OFFSET 24 + #define EXYNOS5422_IDS_MASK 0xff + #define EXYNOS5422_USESG_OFFSET 3 + #define EXYNOS5422_USESG_MASK 0x01 + #define EXYNOS5422_SG_OFFSET 0 + #define EXYNOS5422_SG_MASK 0x07 + #define EXYNOS5422_TABLE_OFFSET 8 + #define EXYNOS5422_TABLE_MASK 0x03 + #define EXYNOS5422_SG_A_OFFSET 17 + #define EXYNOS5422_SG_A_MASK 0x0f + #define EXYNOS5422_SG_B_OFFSET 21 + #define EXYNOS5422_SG_B_MASK 0x03 + #define EXYNOS5422_SG_BSIGN_OFFSET 23 + #define EXYNOS5422_SG_BSIGN_MASK 0x01 + #define EXYNOS5422_BIN2_OFFSET 12 + #define EXYNOS5422_BIN2_MASK 0x01 + +#define EXYNOS_CHIPID_REG_LOT_ID 0x14 + +#define EXYNOS_CHIPID_AUX_INFO 0x1c + #define EXYNOS5422_TMCB_OFFSET 0 + #define EXYNOS5422_TMCB_MASK 0x7f + #define EXYNOS5422_ARM_UP_OFFSET 8 + #define EXYNOS5422_ARM_UP_MASK 0x03 + #define EXYNOS5422_ARM_DN_OFFSET 10 + #define EXYNOS5422_ARM_DN_MASK 0x03 + #define EXYNOS5422_KFC_UP_OFFSET 12 + #define EXYNOS5422_KFC_UP_MASK 0x03 + #define EXYNOS5422_KFC_DN_OFFSET 14 + #define EXYNOS5422_KFC_DN_MASK 0x03 + +unsigned int exynos_chipid_read(unsigned int offset); From patchwork Thu Apr 4 17:17:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5965139A for ; Thu, 4 Apr 2019 17:23:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C972028AF2 for ; Thu, 4 Apr 2019 17:23:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C790F28AF6; Thu, 4 Apr 2019 17:23:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4EDCF28AF5 for ; Thu, 4 Apr 2019 17:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DOrXZhlyJ/Tfmybt4RHZhZtWQBgSKUfJ3sGYui7FCaI=; b=GALBw3oFS0KeeidfWQWiGRoqbS 4agjDxpw2kayxrPiGt2+prOSyU7FujMhCTqNnLH5KTKDiv5SQ9txDUPuk+L75973F1ztR9ZOiUNoI 6EuL9Y5O7mYiEPWzl0ao/xCbEw6sFBtB3NrHsxsmWbRtgJPZ98sMKrxA3FNDzzGuTl9OtfOuq5zIh K+CKexW8IgnGJYQJEugdHZXpc6voCa0+AYlv8rpP6t/S+mu6iNGEp2CCrRBVxZnLb3ePmurTBpbBG TaursKEs/ewSAsvOI53Q8iSwvXIw3VwGqXzC/RqHeWruXdQuiNnZ/E3ohxcYZFlb7wrG9bpHO+b9Z f6utYpSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64w-0000iG-U4; Thu, 04 Apr 2019 17:23:06 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64U-0008W1-8Q for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:22:42 +0000 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20190404172234epoutp019154d2fc719d617af26062fc0e585402~SVUAMOveP1973719737epoutp01o; Thu, 4 Apr 2019 17:22:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20190404172234epoutp019154d2fc719d617af26062fc0e585402~SVUAMOveP1973719737epoutp01o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398555; bh=W8DTg6qA6wx5700J5x+PkkOVM4sB5RSLmf3N0B6Mkp4=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=fiFNoWloLkbK4vmDd9zBRNNDzcda9LOY4YuZhiworY/jLQC7I0E+9e+/ke7fr4EAI YnoXhirL8XI5evE0pR6Vb/Ruykjkb1quaOLu/vLOavprYx2ClyTi+fQq171O7AumNt TeicjCogpw15icM3Dt1q5YPYKIUhrN/YMQ9u11Ss= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190404172234epcas1p3452c89b264d0fae64fa9e5c3a41c6bf3~SVT-2Esvj0484904849epcas1p37; Thu, 4 Apr 2019 17:22:34 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id CB.07.04108.A5D36AC5; Fri, 5 Apr 2019 02:22:34 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190404172234epcas1p37667ec0996000aff9297f13639908dfc~SVT-g5hm70262202622epcas1p3_; Thu, 4 Apr 2019 17:22:34 +0000 (GMT) X-AuditID: b6c32a39-8b7ff7000000100c-0d-5ca63d5ad0d2 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C4.B9.03598.A5D36AC5; Fri, 5 Apr 2019 02:22:34 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:34 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 3/8] dt-bindings: exynos: Add ASV tables binding documentation Date: Thu, 04 Apr 2019 19:17:30 +0200 Message-id: <20190404171735.12815-4-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsWy7bCmgW6U7bIYg9Wd8hYbZ6xntbj+5Tmr xfwj51gt+h+/ZrY4f34Du8Wmx9dYLS7vmsNmMeP8PiaLtUfuslssvX6RyeJ24wo2i0Vbv7Bb tO49wm5x+E07qwOfx5p5axg9Nq3qZPPYvKTeo2/LKkaPz5vkAlijuGxSUnMyy1KL9O0SuDJO /+1iKvgkV7F7/SXmBsbpEl2MnBwSAiYSFz9eYOti5OIQEtjBKHFv+0VWCOc7o0TTmU42mKp5 kxugErsZJSZdvcEE4fxklFi+YioLSBWbgKFE79E+RhBbREBY4t7S5ewgRcwC35kkTr1+ygqS EBYIkZj5awcTiM0ioCrR+WEnWJxXwFrizKztLBDr5CVWbzjADGJzCthIPF7yBuxACYEDbBIb 3jxihihykdjweQLQNg4gW1ri0lFbiJpmRome3bfZIZwJjBL3jy9ghGiwljh8/CLYNmYBPol3 X3tYIZp5JTrahCBKPCQ2XOtihHitn1FiWv9DNqARCxgZVjGKpRYU56anFhsWmOoVJ+YWl+al 6yXn525iBMerluUOxmPnfA4xCnAwKvHwNrAsixFiTSwrrsw9xCjBwawkwhv8fWmMEG9KYmVV alF+fFFpTmrxIUZpDhYlcd71Ds4xQgLpiSWp2ampBalFMFkmDk6pBsYidcnfX+Y/O/19U0HP 1LMqlVbs9g/Sz1bVlUdx6r++dkLq77W7f3ctOhxwxe1ia33cks36zlv5LRv9p8n1Gs0Vio5R st28xFiSz8T0/pSvMx9+va59ymTG1EkTI+Pdn05boBt8/0iG5OtAq5Or3uSeqjt3xEb4S9wz gWtteVuW/lv5dO4R7S9HlFiKMxINtZiLihMB5h868tMCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsVy+t9jAd0o22UxBnOncltsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLvF4TftrA58HmvmrWH02LSqk81j85J6j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4Mo4 /beLqeCTXMXu9ZeYGxinS3QxcnJICJhIzJvcwNrFyMUhJLCTUWJR8z4mCOcno8SW4z/ZQKrY BAwleo/2MYLYIgLCEveWLmcHsZkFvjNJzJ6XB2ILC4RIzPy1gwnEZhFQlej8sJMVxOYVsJY4 M2s7C8Q2eYnVGw4wg9icAjYSj5e8AZrPAbTMWuL7loQJjDwLGBlWMUqmFhTnpucWGxUY5qWW 6xUn5haX5qXrJefnbmIEBuK2w1p9OxjvL4k/xCjAwajEw6vBtCxGiDWxrLgy9xCjBAezkghv 8PelMUK8KYmVValF+fFFpTmpxYcYpTlYlMR5b+cdixQSSE8sSc1OTS1ILYLJMnFwSjUwiuUw vwkMf9R282jthKdf/vQt1v6fWy1po5KmcaTnddayTPf5runuZ085uHcwV29XaxZWquPykZXw uFnf/SOk7VmNCtMDw2dvZEo5MgvqdK9yFUoc+Ogg3Cmr+2hbyvNywcZtfkucs9clci8ounwo 8/yXN48WbveJTFBaGioqXSE8nbEh2FGJpTgj0VCLuag4EQCKp90/QAIAAA== X-CMS-MailID: 20190404172234epcas1p37667ec0996000aff9297f13639908dfc CMS-TYPE: 101P X-CMS-RootMailID: 20190404172234epcas1p37667ec0996000aff9297f13639908dfc References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102238_868218_9BA2075B X-CRM114-Status: GOOD ( 19.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds documentation of the Exynos ASV (Adaptive Voltage Supply) tables DT binding. Signed-off-by: Sylwester Nawrocki --- .../devicetree/bindings/arm/samsung/asv.txt | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/samsung/asv.txt diff --git a/Documentation/devicetree/bindings/arm/samsung/asv.txt b/Documentation/devicetree/bindings/arm/samsung/asv.txt new file mode 100644 index 000000000000..0db907263a91 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/samsung/asv.txt @@ -0,0 +1,76 @@ +Exynos Adaptive Supply Voltage (ASV) tables +------------------------------------------- + +The Adaptive Supply Voltage (ASV) on Exynos SoCs is a technique of adjusting +operating points, i.e. the power supply voltage for given clock frequency, +in order to better match actual capabilities of the hardware and optimize power +consumption. This applies to subsystem of the SoC like: CPU clusters, GPU, +the memory controller or camera ISP. During production process the SoC chip +is assigned to one of several bins (ASV groups) and the group information +is encoded in the SoC CHIPID block registers and/or OTP memory. This information +is then used by the OS to select more finely matching operating points for +devices. + +This binding describes data used to create actual operating points for the +subsystems. The data is in form of two-dimensional arrays of M x N cells, +where the first column contains frequency values and subsequent columns +associated with ASV groups contain corresponding voltage values. + + frequency group0 group1 ... group(N-1) + 0 1 2 ... N-1 +0 , +1 , +... < ... >, +M-1 , + +In simplest form the actual operating points set may be created by selecting +whole column for the voltage values, however also parts of multiple columns may +be combined by the OS to create series of voltage values corresponding to +frequencies in column 0. + +The ASV tables are defined as sub-nodes of parent node containing all tables. + +* Main node + +Required properties: + - compatible : should at least contain "samsung,exynos-asv-v1". + +* Table node + +Required properties: + - samsung,asv-table-size : specifies dimension of the table, the first cell is + total number of rows (M), the second cell is total number of columns (N), + - samsung,asv-table-id : ID of the table, lower 8-bits is an index (revision) + of the table, remaining bits (31...8) specify a subsystem the table applies + to: 0 - ARM/Eagle (big) CPU cluster, 1 - KFC (little) CPU cluster, + - samsung,asv-data : the ASV table data as described earlier in this document. + First cell is frequency value, then N-1 voltage values. Such sequence + is repeated M times. + +Optional properties: + - samsung,asv-common-data : a list of frequency, voltage pairs used to describe + operating points where voltage is same for all N-1 ASV groups. This allows + to avoid data duplication is the "samsung,asv-data" property. + +Example: + +&chipid { + asv { + compatible = "samsung,exynos-asv-v1"; + asv-table-0 { + samsung,asv-table-size = <8 6>; + samsung,asv-table-id = <0x0>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 */ + <1700 1187500 1175000 1162500 1150000 1137500 >, + <1500 1125000 1112500 1100000 1087500 1075000 >, + <1300 1075000 1062500 1050000 1037500 1025000 >, + <1000 987500 975000 962500 950000 937500 >, + < 900 950000 937500 925000 925000 925000 >, + < 700 925000 912500 912500 912500 912500 >; + /* ASV0...15 */ + samsung,asv-common-data = <600 900000>, + <500 900000>; + }; + }; +}; From patchwork Thu Apr 4 17:17:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96604139A for ; Thu, 4 Apr 2019 17:23:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78E75288D9 for ; Thu, 4 Apr 2019 17:23:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B63B28ADE; Thu, 4 Apr 2019 17:23:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 53AB828AD6 for ; Thu, 4 Apr 2019 17:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=PRWnRrlRof4w1sSM8JHKDoUk/iV0HdgROHAKwnZ4oZk=; b=UpDrhRZE2+xN+pg7naBIzwaT5y sNWO9kW1yrkQ5xIV01jHFvxxa/5M5C/u7QG6suXKyeE19EhqZB6xRgKQ9XZruuB5cbrAfL1HryiJb L02hWvpnbHW2E2KScLJtU5zJmIimkvgkaG830Pxkq6PL7OCB43loWY3Rv8KrBKirpbMtPcB1/KNVR T1UO4XJRVR8SMwHm7g2XSzCNzCAc9PYg3VxWELYSJb6N1x+YLtFg8kzs/BIeGn+u37ijkNIQnGw4u OsQdo4z1xstZW0wdVJ2v5WLG4GOa6FMJAgyuCTte6+zlFlOLluXTsgGko3Hi8CLRswMAZncVNqsaC 10m9iY9g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC657-0000yG-Aq; Thu, 04 Apr 2019 17:23:17 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64Y-0000CJ-LX for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:22:59 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190404172240epoutp020666eabc22d568d4c07c08c862c5b4f1~SVUFLvsXc2373723737epoutp02W; Thu, 4 Apr 2019 17:22:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190404172240epoutp020666eabc22d568d4c07c08c862c5b4f1~SVUFLvsXc2373723737epoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398560; bh=B11ea1innhdxdcFiV47lB6MPWRj7ZczCd4EndLFLAII=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=BNGuIuJqT8bzc29k0n16JiK/ZDrqoY9TVGeyGB7kkl1pIacxPkPdkWYr++G7+JUoQ Sgpg2BO84YGk5IXRof7wNYu/DZ2JgMe9rhzUT0Vx2ssX5RLjWJL2EEnGLUHA75Q1r8 NWc49JGbhjszwHcrGQv2cUYp3hJD9lp+sADaYuho= Received: from epsmges2p3.samsung.com (unknown [182.195.42.71]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172239epcas2p2d4c744967581215b528be8c1f1f6295e~SVUE2uHRf3185231852epcas2p2S; Thu, 4 Apr 2019 17:22:39 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id A1.34.04206.F5D36AC5; Fri, 5 Apr 2019 02:22:39 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172238epcas2p21ef28f46b728127dcd6e8ee72752a1b8~SVUD62Qol3184831848epcas2p2D; Thu, 4 Apr 2019 17:22:38 +0000 (GMT) X-AuditID: b6c32a47-14bff7000000106e-3b-5ca63d5fccf8 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 81.68.03620.E5D36AC5; Fri, 5 Apr 2019 02:22:38 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:38 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 4/8] soc: samsung: Add Exynos Adaptive Supply Voltage driver Date: Thu, 04 Apr 2019 19:17:31 +0200 Message-id: <20190404171735.12815-5-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsWy7bCmmW687bIYgxtXzS02zljPanH9y3NW i/lHzrFa9D9+zWxx/vwGdotNj6+xWlzeNYfNYsb5fUwWa4/cZbdYev0ik8XtxhVsFou2fmG3 aN17hN3i8Jt2Vgc+jzXz1jB6bFrVyeaxeUm9R9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGX8 PpJbsG4GY0XPz9NMDYy91V2MnBwSAiYSX6/+ZO1i5OIQEtjBKHH/8kdGCOc7o8T6TVNYYaq6 du5lgUjsZpTYdmouVMtPRom5124wgVSxCRhK9B7tYwSxRQSEJe4tXc4OUsQs8J1J4tTrp2Cj hAWCJFb3rgNrYBFQlXjT/JwdxOYVsJaY8eQiC8Q6eYnVGw4wg9icAjYSj5e8YQMZJCFwgE1i 35v5jBBFLhJ9K78xQdjSEs9WbWSEKGpmlOjZfZsdwpkA9NLxBVAd1hKHj18EO4NZgE+i4/Bf oCIOoDivREebEESJh8SBM7+ZIX7rZ5Q4uGgGK9CIBYwMqxjFUguKc9NTi40KjPWKE3OLS/PS 9ZLzczcxgiNWy30H47ZzPocYBTgYlXh4NZiWxQixJpYVV+YeYpTgYFYS4Q3+vjRGiDclsbIq tSg/vqg0J7X4EKM0B4uSOO9D6bnRQgLpiSWp2ampBalFMFkmDk6pBsYNcaYsjzeXBYhtCmxy YGOdfcksf1fZtgch7e7z3s6MWDn7d+SbCVfLbXe7+LRpKF2aY/+LJyj0Qt+XX7fXdKtV/Ona pdRjwHoqqZSzXztu8dGkvt9/Ttp8WFO6fsJrkS82jzdmbaza+PT3PD/RFe/PmiXu3RXySXCa 9yEx/19bzk9cavhljkahEktxRqKhFnNRcSIALtqwndQCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsVy+t9jAd0422UxBrdmmVtsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLvF4TftrA58HmvmrWH02LSqk81j85J6j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4Mr4 fSS3YN0Mxoqen6eZGhh7q7sYOTkkBEwkunbuZeli5OIQEtjJKHHj2Bk2COcno8TVvvVsIFVs AoYSvUf7GEFsEQFhiXtLl7OD2MwC35kkZs/LA7GFBQIkPq2dyQJiswioSrxpfg5WwytgLTHj yUUWiG3yEqs3HGAGsTkFbCQeL3kDNJ8DaJm1xPctCRMYeRYwMqxilEwtKM5Nzy02KjDKSy3X K07MLS7NS9dLzs/dxAgMxG2Htfp3MD5eEn+IUYCDUYmHV4NpWYwQa2JZcWXuIUYJDmYlEd7g 70tjhHhTEiurUovy44tKc1KLDzFKc7AoifPy5x+LFBJITyxJzU5NLUgtgskycXBKNTCeMlm5 b84Htkc8EYcW864QYL3Y3Lfjmfojp31Hf+1fcCDhkfHt14nK77fWcK1ruv62ccqd1f8Cc7w0 vpy4anPVLINj+jm1E72/DxVwLjx999dBzwd1lxq+8166fq7v/OEnok1r9nGK5WdtsmpLl+6a kJV1t7Gzv+9zTsXB6nOBZhPLX9m0X2mbpMRSnJFoqMVcVJwIADj6gklAAgAA X-CMS-MailID: 20190404172238epcas2p21ef28f46b728127dcd6e8ee72752a1b8 CMS-TYPE: 102P X-CMS-RootMailID: 20190404172238epcas2p21ef28f46b728127dcd6e8ee72752a1b8 References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102243_939976_34A62909 X-CRM114-Status: GOOD ( 23.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Adaptive Supply Voltage (ASV) on Exynos SoCs is a technique of adjusting operating points of devices in order to better match actual capabilities of the hardware and optimize power consumption. This patch adds common code for parsing the ASV tables from devicetree and updating CPU OPPs. Also support for Exynos5422/5800 SoC is added, the Exynos5422 specific part of the patch is partially based on code from https://github.com/hardkernel/linux repository, branch odroidxu4-4.14.y, files: arch/arm/mach-exynos/exynos5422-asv.[ch]. Tested on Odroid XU3, XU4, XU3 Lite. Signed-off-by: Sylwester Nawrocki --- drivers/soc/samsung/Kconfig | 11 ++ drivers/soc/samsung/Makefile | 3 + drivers/soc/samsung/exynos-asv.c | 279 +++++++++++++++++++++++++++ drivers/soc/samsung/exynos-asv.h | 114 +++++++++++ drivers/soc/samsung/exynos5422-asv.c | 209 ++++++++++++++++++++ drivers/soc/samsung/exynos5422-asv.h | 25 +++ 6 files changed, 641 insertions(+) create mode 100644 drivers/soc/samsung/exynos-asv.c create mode 100644 drivers/soc/samsung/exynos-asv.h create mode 100644 drivers/soc/samsung/exynos5422-asv.c create mode 100644 drivers/soc/samsung/exynos5422-asv.h diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig index 2905f5262197..4d121984f71a 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig @@ -7,6 +7,17 @@ menuconfig SOC_SAMSUNG if SOC_SAMSUNG +config EXYNOS_ASV + bool "Exynos Adaptive Supply Voltage support" if COMPILE_TEST + depends on ARCH_EXYNOS || ((ARM || ARM64) && COMPILE_TEST) + depends on EXYNOS_CHIPID + select EXYNOS_ASV_ARM if ARM && ARCH_EXYNOS + +# There is no need to enable these drivers for ARMv8 +config EXYNOS_ASV_ARM + bool "Exynos ASV ARMv7-specific driver extensions" if COMPILE_TEST + depends on EXYNOS_ASV + config EXYNOS_CHIPID bool "Exynos Chipid controller driver" if COMPILE_TEST depends on ARCH_EXYNOS || COMPILE_TEST diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile index 3b6a8797416c..edd1d6ea064d 100644 --- a/drivers/soc/samsung/Makefile +++ b/drivers/soc/samsung/Makefile @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_EXYNOS_ASV) += exynos-asv.o +obj-$(CONFIG_EXYNOS_ASV_ARM) += exynos5422-asv.o + obj-$(CONFIG_EXYNOS_CHIPID) += exynos-chipid.o obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o diff --git a/drivers/soc/samsung/exynos-asv.c b/drivers/soc/samsung/exynos-asv.c new file mode 100644 index 000000000000..60532c7eb3aa --- /dev/null +++ b/drivers/soc/samsung/exynos-asv.c @@ -0,0 +1,279 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018 - 2019 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * Author: Sylwester Nawrocki + * + * Samsung Exynos SoC Adaptive Supply Voltage support + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "exynos-asv.h" +#include "exynos5422-asv.h" +#include "exynos5433-asv.h" + +#ifndef MHZ +#define MHZ 1000000U +#endif + +static struct exynos_asv *exynos_asv; + +int exynos_asv_parse_of_table(struct device_node *node, + struct exynos_asv_table *table, + int index) +{ + u32 table_size, table_id = 0; + unsigned int len1, len2 = 0; + unsigned int num_cols, num_rows; + u32 tmp[20]; + u32 *buf; + int ret; + + ret = of_property_read_u32(node, "samsung,asv-table-id", + &table_id); + if (ret < 0) { + pr_err("ASV: Missing table id in %pOF\n", node); + return ret; + } + table->id = table_id; + + if (index >= 0 && asv_table_to_index(table_id) != index) + return -EBADR; + + ret = of_property_read_u32_array(node, "samsung,asv-table-size", + tmp, 2); + if (ret < 0) + return ret; + + num_rows = tmp[0]; + num_cols = tmp[1]; + if (num_rows > EXYNOS_ASV_MAX_LEVELS || + num_cols > (EXYNOS_ASV_MAX_GROUPS + 1)) { + pr_err("ASV: Unsupported ASV table size (%d x %d)\n", + num_rows, num_cols); + return -EINVAL; + } + + table_size = num_rows * num_cols; + buf = kcalloc(table_size, sizeof(u32), GFP_KERNEL); + if (!buf) + return -ENOMEM; + + ret = of_property_read_variable_u32_array(node, "samsung,asv-data", + buf, 0, table_size); + if (ret < 0) + goto err_free_buf; + + len1 = ret; + + if (ret < table_size) { + u32 *dst, *src; + ret = of_property_read_variable_u32_array(node, + "samsung,asv-common-data", + (u32 *)tmp, 0, + ARRAY_SIZE(tmp)); + if (ret < 0) { + pr_err("ASV: Not enough data for table #%x (%d x %d)\n", + table_id, num_rows, num_cols); + goto err_free_buf; + } + len2 = ret; + + if (len1 + ((len2 / 2) * num_cols) > table_size) { + pr_err("ASV: Incorrect table %#x definition\n", + table_id); + ret = -EINVAL; + goto err_free_buf; + } + /* + * Copy data common to all ASV levels to first and second column + * in the main buffer. We don't replicate data to further + * columns, instead they are left initialized to 0 (invalid, + * unused frequency value). We assume that users of the table + * will refer to voltage data in column 1 if 0 is encountered + * in any further column (2, 3,...). + */ + dst = buf + len1; + src = tmp; + + while (len2 >= 2) { + memcpy(dst, src, 2 * sizeof(u32)); + dst += num_cols; + src += 2; + len2 -= 2; + } + } + + table->num_cols = num_cols; + table->num_rows = num_rows; + table->buf = buf; + return 0; + +err_free_buf: + kfree(buf); + return ret; +} + +int exynos_asv_parse_cpu_tables(struct exynos_asv *asv, struct device_node *np, + int table_index) +{ + struct exynos_asv_subsys *subsys; + struct exynos_asv_table table; + struct device_node *child; + int ret; + + for_each_child_of_node(np, child) { + ret = exynos_asv_parse_of_table(child, &table, table_index); + if (ret < 0) { + if (ret == -EBADR) + continue; + of_node_put(child); + return ret; + } + + pr_debug("%s: Matching table: id: %#x at %pOF\n", + __func__, table.id, child); + + switch(asv_table_to_subsys_id(table.id)) { + case EXYNOS_ASV_SUBSYS_ID_ARM: + subsys = &asv->arm; + break; + case EXYNOS_ASV_SUBSYS_ID_KFC: + subsys = &asv->kfc; + break; + default: + of_node_put(child); + return -EINVAL; + } + + subsys->num_asv_levels = table.num_rows; + subsys->num_asv_groups = table.num_cols - 1; + subsys->table = table; + subsys->id = asv_table_to_subsys_id(table.id); + } + + return 0; +} + +static int exynos_asv_update_cpu_opps(struct device *cpu) +{ + struct exynos_asv_subsys *subsys = NULL; + struct dev_pm_opp *opp; + unsigned int opp_freq; + int i; + + if (of_device_is_compatible(cpu->of_node, + exynos_asv->arm.cpu_dt_compat)) + subsys = &exynos_asv->arm; + else if (of_device_is_compatible(cpu->of_node, + exynos_asv->kfc.cpu_dt_compat)) + subsys = &exynos_asv->kfc; + + if (!subsys) + return -EINVAL; + + for (i = 0; i < subsys->num_asv_levels; i++) { + unsigned int new_voltage; + unsigned int voltage; + int timeout = 1000; + int err; + + opp_freq = exynos_asv_opp_get_frequency(subsys, i); + + opp = dev_pm_opp_find_freq_exact(cpu, opp_freq * MHZ, true); + if (IS_ERR(opp)) { + pr_info("%s cpu%d opp%d, freq: %u missing\n", + __func__, cpu->id, i, opp_freq); + + continue; + } + + voltage = dev_pm_opp_get_voltage(opp); + new_voltage = exynos_asv->opp_get_voltage(subsys, i, voltage); + dev_pm_opp_put(opp); + + opp_freq *= MHZ; + dev_pm_opp_remove(cpu, opp_freq); + + while (--timeout) { + opp = dev_pm_opp_find_freq_exact(cpu, opp_freq, true); + if (IS_ERR(opp)) + break; + dev_pm_opp_put(opp); + msleep(1); + } + + err = dev_pm_opp_add(cpu, opp_freq, new_voltage); + if (err < 0) + pr_err("%s: Failed to add OPP %u Hz/%u uV for cpu%d\n", + __func__, opp_freq, new_voltage, cpu->id); + } + + return 0; +} + +static int exynos_asv_update_opps(void) +{ + struct opp_table *last_opp_table = NULL; + struct device *cpu; + int ret, cpuid; + + for_each_possible_cpu(cpuid) { + struct opp_table *opp_table; + + cpu = get_cpu_device(cpuid); + if (!cpu) + continue; + + opp_table = dev_pm_opp_get_opp_table(cpu); + if (IS_ERR(opp_table)) + continue; + + if (!last_opp_table || opp_table != last_opp_table) { + last_opp_table = opp_table; + + ret = exynos_asv_update_cpu_opps(cpu); + if (ret < 0) + pr_err("%s: Couldn't udate OPPs for cpu%d\n", + __func__, cpuid); + } + + dev_pm_opp_put_opp_table(opp_table); + } + + return 0; +} + +static int __init exynos_asv_init(void) +{ + int ret; + + exynos_asv = kcalloc(1, sizeof(struct exynos_asv), GFP_KERNEL); + if (!exynos_asv) + return -ENOMEM; + + if (of_machine_is_compatible("samsung,exynos5800") || + of_machine_is_compatible("samsung,exynos5420")) + ret = exynos5422_asv_init(exynos_asv); + else + return 0; + + if (ret < 0) + return ret; + + ret = exynos_asv_update_opps(); + + if (exynos_asv->release) + exynos_asv->release(exynos_asv); + + return ret; +} +late_initcall(exynos_asv_init) diff --git a/drivers/soc/samsung/exynos-asv.h b/drivers/soc/samsung/exynos-asv.h new file mode 100644 index 000000000000..3444b361e5e3 --- /dev/null +++ b/drivers/soc/samsung/exynos-asv.h @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018 - 2019 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * Author: Sylwester Nawrocki + * + * Samsung Exynos SoC Adaptive Supply Voltage support + */ +#ifndef __EXYNOS_ASV_H +#define __EXYNOS_ASV_H + +#define EXYNOS_ASV_MAX_GROUPS 16 +#define EXYNOS_ASV_MAX_LEVELS 24 + +#define EXYNOS_ASV_TABLE_INDEX_MASK (0xff) +#define EXYNOS_ASV_SUBSYS_ID_MASK (0xff << 8) + +#define asv_table_to_subsys_id(_id) ((_id >> 8) & 0xff) +#define asv_table_to_index(_id) ((_id) & 0xff) + +#define EXYNOS_ASV_SUBSYS_ID_ARM 0x0 +#define EXYNOS_ASV_SUBSYS_ID_EGL EXYNOS_ASV_SUBSYS_ID_ARM +#define EXYNOS_ASV_SUBSYS_ID_KFC 0x1 +#define EXYNOS_ASV_SUBSYS_ID_INT 0x2 +#define EXYNOS_ASV_SUBSYS_ID_MIF 0x3 +#define EXYNOS_ASV_SUBSYS_ID_G3D 0x4 +#define EXYNOS_ASV_SUBSYS_ID_CAM 0x5 +#define EXYNOS_ASV_SUBSYS_ID_MAX 0x6 + +struct device_node; + +/* HPM, IDS values to select target group */ +struct asv_limit_entry { + unsigned int hpm; + unsigned int ids; +}; + +struct exynos_asv_table { + unsigned int num_rows; + unsigned int num_cols; + unsigned int id; + u32 *buf; +}; + +struct exynos_asv_subsys { + int id; + char *cpu_dt_compat; + + unsigned int base_volt; + unsigned int num_asv_levels; + unsigned int num_asv_groups; + unsigned int offset_volt_h; + unsigned int offset_volt_l; + struct exynos_asv_table table; +}; + +struct exynos_asv { + struct device_node *chipid_node; + struct exynos_asv_subsys arm; + struct exynos_asv_subsys kfc; + + int (*opp_get_voltage)(struct exynos_asv_subsys *subs, int level, + unsigned int voltage); + void (*release)(struct exynos_asv *asv); + + unsigned int group; + unsigned int table; + + /* TODO: Move member fields below to SoC type specific data structure */ + unsigned int is_bin2; + unsigned int is_special_lot; +}; + +static inline u32 __exynos_asv_get_item(struct exynos_asv_table *table, + unsigned int row, unsigned int col) +{ + return table->buf[row * (table->num_cols) + col]; +} + +static inline u32 exynos_asv_opp_get_frequency(struct exynos_asv_subsys *subsys, + unsigned int index) +{ + return __exynos_asv_get_item(&subsys->table, index, 0); +} +/** + * exynos_asv_parse_of_table - Parse ASV table from devicetree + * + * @node: DT node containing the table + * @table: The parsed table data + * @index: Used to select table with specific index to parse, if >= 0. + * This argument is ignored if the value is less than 0. + * + * Returns: 0 on success, or negative value on failure. EBADR is returned + * when @index is >= 0 but the index value of the parsed table ID is different + * than @index. + */ +int exynos_asv_parse_of_table(struct device_node *node, + struct exynos_asv_table *table, + int index); + +/** + * exynos_asv_parse_cpu_tables - Parse ARM and KFC ASV tables from DT + * + * @asv: data structure to store the parsed data to + * @node: DT node containing the tables + * @index: Used to select table with specific index to parse, if >= 0. + * This argument is ignored if the value is less than 0. + * + * Returns: 0 on success, or negative value on failure. + */ +int exynos_asv_parse_cpu_tables(struct exynos_asv *asv, struct device_node *np, + int table_index); + +#endif /* __EXYNOS_ASV_H */ diff --git a/drivers/soc/samsung/exynos5422-asv.c b/drivers/soc/samsung/exynos5422-asv.c new file mode 100644 index 000000000000..f0b7bdd873a9 --- /dev/null +++ b/drivers/soc/samsung/exynos5422-asv.c @@ -0,0 +1,209 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018 - 2019 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * + * Samsung Exynos 5422 SoC Adaptive Supply Voltage support + */ + +#include +#include +#include +#include + +#include "exynos-asv.h" +#include "exynos-chipid.h" + +#define EXYNOS5422_NUM_ASV_GROUPS 14 + +static struct exynos_asv *exynos_asv; + +static int exynos5422_asv_get_table(void) +{ + unsigned int reg = exynos_chipid_read(EXYNOS_CHIPID_REG_PKG_ID); + + return (reg >> EXYNOS5422_TABLE_OFFSET) & EXYNOS5422_TABLE_MASK; +} + +static int exynos5422_asv_check_bin2(void) +{ + unsigned int reg = exynos_chipid_read(EXYNOS_CHIPID_REG_PKG_ID); + + return (reg >> EXYNOS5422_BIN2_OFFSET) & EXYNOS5422_BIN2_MASK; +} + +static bool exynos5422_asv_check_lot_id(void) +{ + unsigned int reg = exynos_chipid_read(EXYNOS_CHIPID_REG_PKG_ID); + + return ((reg >> EXYNOS5422_USESG_OFFSET) & EXYNOS5422_USESG_MASK); +} + +static const struct asv_limit_entry __asv_limits[EXYNOS5422_NUM_ASV_GROUPS] = { + { 13, 55 }, + { 21, 65 }, + { 25, 69 }, + { 30, 72 }, + { 36, 74 }, + { 43, 76 }, + { 51, 78 }, + { 65, 80 }, + { 81, 82 }, + { 98, 84 }, + { 119, 87 }, + { 135, 89 }, + { 150, 92 }, + { 999, 999 }, +}; + +static int exynos5422_asv_get_group(struct exynos_asv *asv) +{ + unsigned int pkgid_reg = exynos_chipid_read(EXYNOS_CHIPID_REG_PKG_ID); + unsigned int auxi_reg = exynos_chipid_read(EXYNOS_CHIPID_AUX_INFO); + int hpm, ids, i; + + if (asv->is_special_lot) { + u32 sga = (pkgid_reg >> EXYNOS5422_SG_A_OFFSET) & + EXYNOS5422_SG_A_MASK; + + u32 sgb = (pkgid_reg >> EXYNOS5422_SG_B_OFFSET) & + EXYNOS5422_SG_B_MASK; + + if ((pkgid_reg >> EXYNOS5422_SG_BSIGN_OFFSET) & + EXYNOS5422_SG_BSIGN_MASK) + return sga + sgb; + else + return sga - sgb; + } + + hpm = (auxi_reg >> EXYNOS5422_TMCB_OFFSET) & EXYNOS5422_TMCB_MASK; + ids = (pkgid_reg >> EXYNOS5422_IDS_OFFSET) & EXYNOS5422_IDS_MASK; + + for (i = 0; i < EXYNOS5422_NUM_ASV_GROUPS; i++) { + if (ids <= __asv_limits[i].ids) + break; + if (hpm <= __asv_limits[i].hpm) + break; + } + if (i < EXYNOS5422_NUM_ASV_GROUPS) + return i; + + return 0; +} + +static int __asv_offset_voltage(unsigned int index) +{ + static const unsigned int offset_table[] = { 12500, 50000, 25000 }; + + if (index == 0 || index > 3) + return 0; + + return offset_table[index - 1]; +} + +static void exynos5422_asv_offset_voltage_setup(struct exynos_asv *asv) +{ + struct exynos_asv_subsys *subsys; + unsigned int reg, value; + + reg = exynos_chipid_read(EXYNOS_CHIPID_AUX_INFO); + + /* ARM offset voltage setup */ + subsys = &asv->arm; + + subsys->base_volt = 1000000; + + value = (reg >> EXYNOS5422_ARM_UP_OFFSET) & EXYNOS5422_ARM_UP_MASK; + subsys->offset_volt_h = __asv_offset_voltage(value); + + value = (reg >> EXYNOS5422_ARM_DN_OFFSET) & EXYNOS5422_ARM_DN_MASK; + subsys->offset_volt_l = __asv_offset_voltage(value); + + /* KFC offset voltage setup */ + subsys = &asv->kfc; + + subsys->base_volt = 1000000; + + value = (reg >> EXYNOS5422_KFC_UP_OFFSET) & EXYNOS5422_KFC_UP_MASK; + subsys->offset_volt_h = __asv_offset_voltage(value); + + value = (reg >> EXYNOS5422_KFC_DN_OFFSET) & EXYNOS5422_KFC_DN_MASK; + subsys->offset_volt_l = __asv_offset_voltage(value); +} + +static int exynos5422_asv_opp_get_voltage(struct exynos_asv_subsys *subsys, + int level, unsigned int volt) +{ + unsigned int asv_volt; + + if (level >= subsys->num_asv_levels) + return volt; + + asv_volt = __exynos_asv_get_item(&subsys->table, level, + exynos_asv->group + 1); + if (asv_volt == 0 && exynos_asv->group > 1) + asv_volt = __exynos_asv_get_item(&subsys->table, level, 1); + + if (volt > subsys->base_volt) + asv_volt += subsys->offset_volt_h; + else + asv_volt += subsys->offset_volt_l; + + return asv_volt; +} + +static void __init exynos5422_asv_release(struct exynos_asv *asv) +{ + kfree(asv->arm.table.buf); + asv->arm.table.buf = NULL; + kfree(asv->kfc.table.buf); + asv->kfc.table.buf = NULL; +} + +int __init exynos5422_asv_init(struct exynos_asv *asv) +{ + struct device_node *node; + unsigned int table_index; + int ret; + + exynos_asv = asv; + + asv->is_bin2 = exynos5422_asv_check_bin2(); + asv->is_special_lot = exynos5422_asv_check_lot_id(); + + if (of_machine_is_compatible("hardkernel,odroid-xu3-lite")) { + asv->is_bin2 = true; + asv->is_special_lot = false; + } + + asv->group = exynos5422_asv_get_group(asv); + asv->table = exynos5422_asv_get_table(); + + exynos5422_asv_offset_voltage_setup(asv); + + node = of_find_compatible_node(NULL, NULL, "samsung,exynos-asv-v1"); + if (!node) + return -ENODEV; + + if (!asv->is_bin2) { + if (asv->table == 2 || asv->table == 3) + table_index = asv->table; + else + table_index = 0; + } else { + table_index = 4; + } + + ret = exynos_asv_parse_cpu_tables(asv, node, table_index); + of_node_put(node); + if (ret < 0) + return ret; + + asv->arm.cpu_dt_compat = "arm,cortex-a15"; + asv->kfc.cpu_dt_compat = "arm,cortex-a7"; + + asv->opp_get_voltage = exynos5422_asv_opp_get_voltage; + asv->release = exynos5422_asv_release; + + return ret; +} diff --git a/drivers/soc/samsung/exynos5422-asv.h b/drivers/soc/samsung/exynos5422-asv.h new file mode 100644 index 000000000000..f0d9107d6d0a --- /dev/null +++ b/drivers/soc/samsung/exynos5422-asv.h @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018 - 2019 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * + * Samsung Exynos 5422 SoC Adaptive Supply Voltage support + */ + +#ifndef __EXYNOS5422_ASV_H +#define __EXYNOS5422_ASV_H + +#include + +struct exynos_asv; + +#ifdef CONFIG_EXYNOS_ASV_ARM +int exynos5422_asv_init(struct exynos_asv *asv); +#else +static inline int exynos5422_asv_init(struct exynos_asv *asv) +{ + return -ENOTSUPP; +} +#endif + +#endif /* __EXYNOS5422_ASV_H */ From patchwork Thu Apr 4 17:17:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 88B6B1669 for ; Thu, 4 Apr 2019 17:23:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A7D028765 for ; Thu, 4 Apr 2019 17:23:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E8C228AB7; Thu, 4 Apr 2019 17:23:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 08C3928765 for ; Thu, 4 Apr 2019 17:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OzYeGV4JtDvFlOOlC6ttivHiZulHiBBYnn6cMlj/6oA=; b=KGVAc1V1SQlq6YwULQU0PejtwG X4Q+wLof9fheXDUdqVWhUU881w2mK1F9UmRdXEcOVNuQWQ5apY3O/x6WYTA6i+eTV3dEnL/Q+fU34 08mib4AsT+qfejoGC+idG+Ms+N/Bp4q5C/cJRNCcvgnox3OMqC/Qmz80cWlx0v9fzjNCFSdA17I8j Y4/wJu7dZVX4h6rmhdUpWNUFmEf0y7kzHOrYCI0KT95u5+hHfcTZ7ILlwD2feYmLyYdCytMyL49eN lMhzL/zR665/IWMsnPdwTZuisdjw5v55yykWJc41FmTovYSvJb5+M/3gJEJpEsLzSoUSK/uenljmn tZCOLfRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC65I-0001Dp-7M; Thu, 04 Apr 2019 17:23:28 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64d-0000Ib-CF for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:23:02 +0000 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20190404172245epoutp01b4728d9289925043af9a1b3a10a0d84c~SVUJuT_U91973719737epoutp01p; Thu, 4 Apr 2019 17:22:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20190404172245epoutp01b4728d9289925043af9a1b3a10a0d84c~SVUJuT_U91973719737epoutp01p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398565; bh=dDJj7cygsR/Ujzoc6i/7zV99lnRysyucTL0YNXQfzSQ=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=IzIsINoN+pDXK1XF99y6i0HgtfsKRxI+XVqVP6c7jDsdCvAxaXi5i4kAZjVytD6/G klbAl3AM5zT1Pp9FuqUHF5pTF7OmDYVBLxg8sPeHzeXVqeDfBIcOMCbwFdelYyNiaz IH8zolWugaiRFP2wPVF42+U1UDkozjQjLfCJ9DXs= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190404172244epcas1p15a340b6153cd1cad1eda0c5952dc727e~SVUJL2ESn1312213122epcas1p1P; Thu, 4 Apr 2019 17:22:44 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id ED.5A.04143.46D36AC5; Fri, 5 Apr 2019 02:22:44 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190404172243epcas1p39af2498a51772ee4ab2a31f26e469c5b~SVUH-YZ2E0537505375epcas1p3H; Thu, 4 Apr 2019 17:22:43 +0000 (GMT) X-AuditID: b6c32a37-f19ff7000000102f-78-5ca63d64f940 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B5.B9.03598.36D36AC5; Fri, 5 Apr 2019 02:22:43 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:43 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 5/8] ARM: EXYNOS: enable exynos_chipid for ARCH_EXYNOS Date: Thu, 04 Apr 2019 19:17:32 +0200 Message-id: <20190404171735.12815-6-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsWy7bCmvm6K7bIYg7kblCw2zljPanH9y3NW i/lHzrFa9D9+zWxx/vwGdotNj6+xWlzeNYfNYsb5fUwWa4/cZbdYev0ik8XtxhVsFou2fmG3 aN17hN2B12PNvDWMHptWdbJ5bF5S79G3ZRWjx+dNcgGsUVw2Kak5mWWpRfp2CVwZPz+9YCtY x1bxqm8iewPjJtYuRk4OCQETiemLXrN0MXJxCAnsYJQ4tGgDG4TznVGi88huuKqGvn3sEInd jBJzzuxihHB+MkqsnLGGEaSKTcBQovdoH5gtIiAscW/pcrAOZoETTBKzjh0DGyUs4CXxcPYS sCIWAVWJefN2Ai3n4OAVsJbY9sQNYpu8xOoNB5hBbE4BG4nHS96AnSQhsINN4nnfUhaIIheJ tWsmMIP0SghIS1w6agtR08wo0bP7NjuEM4FR4v7xBYwQDdYSh49fBDuCWYBP4t3XHlaIZl6J jjYhiBIPiQt7NrJCfNbPKLF9djMr0IgFjAyrGMVSC4pz01OLDQuM9YoTc4tL89L1kvNzNzGC Y1TLfAfjhnM+hxgFOBiVeHg1mJbFCLEmlhVX5h5ilOBgVhLhDf6+NEaINyWxsiq1KD++qDQn tfgQozQHi5I473oH5xghgfTEktTs1NSC1CKYLBMHp1QDo9uE4qP1H8xr+2scu2M2S2y+GfVY /4kkY0j3xIu37nzpvSSqvG1X4j+lqN6O9MNZJ59krJu2OTE7fWvO+Y51n38d379ZdWuqvOOW ddd/KpVfuP9mttQnQZlZab2lG5irOeNCNx+9Pe9K1vZdad8OqHDoKcxrne3vfnkL+92X0x9L pj+aejeZO0KJpTgj0VCLuag4EQD0YKmxzQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBLMWRmVeSWpSXmKPExsVy+t9jAd1k22UxBvcvCVhsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLsDr8eaeWsYPTat6mTz2Lyk3qNvyypGj8+b5AJYo7hsUlJzMstSi/TtErgyfn56wVaw jq3iVd9E9gbGTaxdjJwcEgImEg19+9i7GLk4hAR2Mkpc/PyJFcL5yShx7cQEJpAqNgFDid6j fYwgtoiAsMS9pcvBOpgFTjBJ/F+4hgUkISzgJfFw9hKwIhYBVYl583YCxTk4eAWsJbY9cYPY Ji+xesMBZhCbU8BG4vGSN2wgJUJAJd+3JExg5FnAyLCKUTK1oDg3PbfYqMAwL7Vcrzgxt7g0 L10vOT93EyMw/LYd1urbwXh/SfwhRgEORiUeXg2mZTFCrIllxZW5hxglOJiVRHiDvy+NEeJN SaysSi3Kjy8qzUktPsQozcGiJM57O+9YpJBAemJJanZqakFqEUyWiYNTqoFxscTGpr6e5pDt Tt82Cqx8/fP4t6mmIaeqEmUfvl1t4G+9+vXP0JoZhW/DG1xLa6ZK1KQsDxTqCdGN6XsR5vf7 zqca3w8dB88t2Xi8f990l6J1y2XDu9Iy7iXe+VFl6cO+YvkhD6ny5FeXZJyNf1pOvtpyw2fS eg/DoAU/Xadd+2H8oF2m1v6zEktxRqKhFnNRcSIANLPjCzsCAAA= X-CMS-MailID: 20190404172243epcas1p39af2498a51772ee4ab2a31f26e469c5b CMS-TYPE: 101P X-CMS-RootMailID: 20190404172243epcas1p39af2498a51772ee4ab2a31f26e469c5b References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102248_359433_A59422AA X-CRM114-Status: GOOD ( 15.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pankaj Dubey As now we have chipid driver to initialize SoC related information let's include it in build by default. Signed-off-by: Pankaj Dubey Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index b40963cf91c7..e3e63aa5d60a 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -13,6 +13,7 @@ menuconfig ARCH_EXYNOS select ARM_AMBA select ARM_GIC select COMMON_CLK_SAMSUNG + select EXYNOS_CHIPID select EXYNOS_THERMAL select EXYNOS_PMU select EXYNOS_SROM From patchwork Thu Apr 4 17:17:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DDCC017EE for ; Thu, 4 Apr 2019 17:37:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF31028AB9 for ; Thu, 4 Apr 2019 17:37:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2CC628AC0; Thu, 4 Apr 2019 17:37:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37C6C28AB9 for ; Thu, 4 Apr 2019 17:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=zBOg4KkcKWr9uGWGZzD4ZUnD8V5gpflK/JmGRr/Dv+I=; b=mjkenk8xhdWSIiMk+GoL6QIOOZ PwvQH5ylDDnN8Bxs3NZoCWZZpOCvdYg5M2GMDg8bkeozZVO+RKyqUlKEjsxzgSY/TnfCg3y6JQf8S i4hmG6BNfn/b5Oz5Gimd3WHZwk26xCcStr5UmC0RD0qPOIcMzWXyhP2hupyvvRHWzeOBVqN2uOVi3 6wsKCqeLqh0Z9htxW7iEx2XRNu7jWxaupkgP9DUkZPcFgyW88dkKxBolNYaOBipHNPPz12kdfueEA vQ0hKbLNTUWEMwz2F+hp5mG6pM6I/LeukSwy0d49AS6CtHjj+dANMgIaZLGwI0qmxFdli9Qk7VrJC bf45bnEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC6J5-0007l4-El; Thu, 04 Apr 2019 17:37:43 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64g-0000NK-U0 for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:23:15 +0000 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190404172248epoutp02e1317ce7991584789b36fe0159b3ef10~SVUM3Yu521978019780epoutp02R; Thu, 4 Apr 2019 17:22:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190404172248epoutp02e1317ce7991584789b36fe0159b3ef10~SVUM3Yu521978019780epoutp02R DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398568; bh=LsfL0Rn/AIXJ4Wot4MfRJXimLX/12DuBTziK/XGtHAI=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=n6uEq9Hf607UzyO1PXIgQf5k3KXbq50JzvRHC4p5m6HIuQNs9Nz4ck536+4untSOg F0YDcGrlWIQg/FUM234V6Frb5YZYR9ITI56zMFSmR2jD+/8EdWK5RsAihwqjgbcLOR nHU5DAzxfOMMzrmOICpTX2pOhZWxWEE7GYz30gNI= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20190404172248epcas2p1d51ffcb04e599b082322baca3ebd17fa~SVUMl6lT_0629106291epcas2p1k; Thu, 4 Apr 2019 17:22:48 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id D3.15.04195.86D36AC5; Fri, 5 Apr 2019 02:22:48 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172247epcas2p2d24f19f76db3cee177bd5b9df783eb3b~SVUMHXji91739317393epcas2p2t; Thu, 4 Apr 2019 17:22:47 +0000 (GMT) X-AuditID: b6c32a45-d47ff70000001063-91-5ca63d680f11 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 72.68.03620.76D36AC5; Fri, 5 Apr 2019 02:22:47 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:47 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 6/8] ARM64: EXYNOS: enable exynos_chipid for ARCH_EXYNOS Date: Thu, 04 Apr 2019 19:17:33 +0200 Message-id: <20190404171735.12815-7-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsWy7bCmqW6G7bIYgxcNXBYbZ6xntbj+5Tmr xfwj51gt+h+/ZrY4f34Du8Wmx9dYLS7vmsNmMeP8PiaLtUfuslssvX6RyeJ24wo2i0Vbv7Bb tO49wu7A67Fm3hpGj02rOtk8Ni+p9+jbsorR4/MmuQDWKC6blNSczLLUIn27BK6M7r4dbAUL 2CqWzH/O0sC4irWLkZNDQsBE4uWud8xdjFwcQgI7GCX2z7jLDpIQEvjOKLHzvwNMUc/70ywQ RbsZJZYsmg/V8ZNRYn3bREaQKjYBQ4neo31gtoiAsMS9pcvZQYqYBU4wScw6dgxsn7CAj8T3 UzdZQGwWAVWJjQu6gRo4OHgFrCV+/dWA2CYvsXrDAWYQm1PARuLxkjdsIHMkBHawSfxpWskE Ui8h4CLx/V49RL20xLNVGxkhapoZJXp232aHcCYwStw/voARospa4vDxi2BHMAvwSXQc/ssO MYhXoqNNCKLEQ2LexW5WiM/6GSV+3l3LDjRiASPDKkax1ILi3PTUYqMCQ73ixNzi0rx0veT8 3E2M4AjVct3BOOOczyFGAQ5GJR7eBpZlMUKsiWXFlbmHGCU4mJVEeIO/L40R4k1JrKxKLcqP LyrNSS0+xCjNwaIkzvtIem60kEB6YklqdmpqQWoRTJaJg1OqgVEsN9e/Ryit+NXH14u49hbU bOttnPT18JfLaaWXvyQzLJz9lO3Cj00V27Z9WjGXk2Prc6/DfBq82UbZHrLPpqe+zvvz4KZo O+e/+7NXati9KPj9e14n6y631BXBColxq1VZj+2TFoktktRRN6/y6bpe6TxLcdeenx1xlfPU uyu6u+cIqraK71NiKc5INNRiLipOBAAvRuinzAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBLMWRmVeSWpSXmKPExsVy+t9jAd1022UxBp+/qFtsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLsDr8eaeWsYPTat6mTz2Lyk3qNvyypGj8+b5AJYo7hsUlJzMstSi/TtErgyuvt2sBUs YKtYMv85SwPjKtYuRk4OCQETiZ73p1m6GLk4hAR2MkqcOXCbEcL5ySgxc/1ENpAqNgFDid6j fYwgtoiAsMS9pcvZQYqYBU4wSfxfuIYFJCEs4CPx/dRNMJtFQFVi44JuoAYODl4Ba4lffzUg tslLrN5wgBnE5hSwkXi85A0bSIkQUMn3LQkTGHkWMDKsYpRMLSjOTc8tNiowykst1ytOzC0u zUvXS87P3cQIDL9th7X6dzA+XhJ/iFGAg1GJh1eDaVmMEGtiWXFl7iFGCQ5mJRHe4O9LY4R4 UxIrq1KL8uOLSnNSiw8xSnOwKInz8ucfixQSSE8sSc1OTS1ILYLJMnFwSjUwms0U/eg1a6fq pZrfgXWdC+wOZE2MmqenHPhozgaNqdonLG26DL3ziqcdrGNkaXHYFFzEwqXlnds4ef+WQsv6 ulshc5VVJ9332FX5c+mfv1ELZiVd3tex70T/gRt7FXhuWZlOSE7pYjwseazYs1csbcLOPS9e eNv+8Mq+MPvYCvWtMo5ZLwNNlViKMxINtZiLihMBncr6+TsCAAA= X-CMS-MailID: 20190404172247epcas2p2d24f19f76db3cee177bd5b9df783eb3b CMS-TYPE: 102P X-CMS-RootMailID: 20190404172247epcas2p2d24f19f76db3cee177bd5b9df783eb3b References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102251_529245_ED2206BE X-CRM114-Status: GOOD ( 11.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Pankaj Dubey This patch enables exynos_chipid driver for ARCH_EXYNOS based SoC. Signed-off-by: Pankaj Dubey Signed-off-by: Bartlomiej Zolnierkiewicz --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 70498a033cf5..794c65a4910a 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -67,6 +67,7 @@ config ARCH_BRCMSTB config ARCH_EXYNOS bool "ARMv8 based Samsung Exynos SoC family" select COMMON_CLK_SAMSUNG + select EXYNOS_CHIPID select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select EXYNOS_PMU select HAVE_S3C2410_WATCHDOG if WATCHDOG From patchwork Thu Apr 4 17:17:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886023 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5B4C1669 for ; Thu, 4 Apr 2019 17:23:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A191288D9 for ; Thu, 4 Apr 2019 17:23:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E29A28AB9; Thu, 4 Apr 2019 17:23:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D6A8288D9 for ; Thu, 4 Apr 2019 17:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=iuGR5XFhAbBClUBht92bOcIXEjZqkHyOwePCzE0T0HY=; b=my5efTMqlYzk7gLEbQx7BPAxSe p2q2ZfFtFAPgZk6RaJ78eBcYccOemayjj9x8y3zdDv0T3mAtDo+gDeho0d0+OFUh2bgrfb8j/bxp5 K68zx2HJuVpbFluVGMhzA4W0ghqRbvA4o8PM3L4MvZjURUIXAikRvuFpfAI76d8M2DsJMbAQQvdRg dFc/NWSh/YILoOiSRHf2YskzuvSw/RHmKGL8Zd4RDX5XtsNF+s+SEyVaGNQpHuOB1G4pauAr2JMdK vaUdVmXvsj9iQHIPYgtxplbq9kM1AmapgnUv3qXYM6y5ONbkEZTu/Sk1rqNZ5GisJAbow0iAK+rfq XkiENoKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC65Z-0001Y6-DG; Thu, 04 Apr 2019 17:23:45 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64o-0000ZG-SX for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:23:29 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190404172253epoutp031febee5b5375070aea981f4fe862cb8d~SVURobTHB3170231702epoutp03e; Thu, 4 Apr 2019 17:22:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190404172253epoutp031febee5b5375070aea981f4fe862cb8d~SVURobTHB3170231702epoutp03e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398573; bh=mFu9pHyAERC20vEXDnsfmvOBo7ZAvPQhMkRL8LugJe8=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=gC4jb/bn+ZuY0OM0KehFN6vm3is+Ktee1AHplpFn9VHnswDezXyKRegRAYTBkXbxi aTCCHhAVZ5FQpRv5A+V9DTEYgANdEC1T3RZtIb79O13Xhh0nnoARcmG4Jn4O9rilyR yAKfaV7UhpzXl2BeINOuCTviBGS/59gnkXtPn5Hw= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172253epcas2p253a36cb320bbe5fb5447c0f2df87b4fa~SVURRIJgp3184831848epcas2p2L; Thu, 4 Apr 2019 17:22:53 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 99.15.04195.D6D36AC5; Fri, 5 Apr 2019 02:22:53 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20190404172252epcas2p284b7e2e9e7102f6f95c982d547ed9d64~SVUQZkOwK1739317393epcas2p2u; Thu, 4 Apr 2019 17:22:52 +0000 (GMT) X-AuditID: b6c32a45-d5fff70000001063-9a-5ca63d6d15db Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 53.68.03620.C6D36AC5; Fri, 5 Apr 2019 02:22:52 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:52 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 7/8] ARM: EXYNOS: Enable exynos-asv driver for ARCH_EXYNOS Date: Thu, 04 Apr 2019 19:17:34 +0200 Message-id: <20190404171735.12815-8-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRfUhTYRTGe7f7tdHs5Wr2skHBsCgxTYl4Qw2RhAUWgiRhoxx5/crNsaui ZjgRm47UxAX7I5fkpjLNdKWYWoZbCAUTCTUmamRppSGotLSE2q7+9xzO7zzPORxGzI4RciZf V8wZdJpCJSUlBt2n8GltYof6zJeNQ7jf+ozEs1srJH7s8ZK4aWlVjCcn+2jsWpoh8YfhRxS2 Tr4W4aeeeRo7ZqdEeK66i8JPBrZoXPvKQ2P3molMClH12HqAyuWsp1TP7VWqxhdOoNp0HU0j M6UJ2VxhfilniLmQJc1rH/XRei9RZmmdIYxgXWwGEgbBs+jv3E+RGUgZFg4BVL+zC4TCD1Db ioXap7Z/fAtOsHAEIOf3GAHaBsj7axYEGhSMRQ1vG4M6DIaiBUcnHYDE0C9C71a/kmbAMKEw DS0uxAQYAh5H5o1eUUDLYDzqXTCLhLBjqLvvTTBMAhPQkn2NCvggOEqh5RoLEKCLyGpyEoJW oGVnPxCgGoDuj8zRQvEAoMWJtr2JeOSemCIDWgxDUJ17lw5shKAM1d1jBUSFjL6BvfubAOoa qaf/W7SBA04Qzul5bS7Hx+ljo3mNli/R5UbfKtK6QPCtkSlDwOpNHQeQAcqDMiPRoWZJTSlf rh0HiBErw2TpfoealWVryis4Q9FNQ0khx48DBUMoj8g+K1qvszBXU8zd5jg9Z9jvihiJ3AhS yiylKcnllfMtNtOd89aMrRtJ8sOSvp7fVWqf7lO1vnu3gS3oMnaEXU58aC6TX123XPHkpTNx 7b4xe1ZJCx0+uolaXJEFjKM1yneXr4mI2Kms2DmpfnntXO103cf45oRm4s+0PcqvGrZdylDk dCYP2kzSyuxUmzdk80TOeyXB52liI8UGXvMPuwLWydICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDLMWRmVeSWpSXmKPExsVy+t9jAd0c22UxBnu6hC02zljPanH9y3NW i/lHzrFa9D9+zWxx/vwGdotNj6+xWlzeNYfNYsb5fUwWa4/cZbdYev0ik8XtxhVsFou2fmG3 aN17hN3i8Jt2Vgc+jzXz1jB6bFrVyeaxeUm9R9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGUs 3nOLveAcS8WUuddYGhjfM3cxcnJICJhI/Hz1Asjm4hAS2MkosXHvPlYI5yejxP+jK1lAqtgE DCV6j/YxgtgiAsIS95YuZwexmQW+M0nMnpfXxcjBISzgJzFrEi9ImEVAVaLr0zomEJtXwFpi 3b0uJohl8hKrNxwAW8wpYCPxeMkbNpBWIaCa71sSJjDyLGBkWMUomVpQnJueW2xUYJSXWq5X nJhbXJqXrpecn7uJERiG2w5r9e9gfLwk/hCjAAejEg+vBtOyGCHWxLLiytxDjBIczEoivMHf l8YI8aYkVlalFuXHF5XmpBYfYpTmYFES5+XPPxYpJJCeWJKanZpakFoEk2Xi4JRqYDR8PpnB 2uDcnf917nLMR2M11weE5+iq8JWwzLvBcPRYmNpW867A0sYzf3fOPZAt94j71MGH9XmO0kXz Nxw4bFizln3LfYZF37Q/R34V/WLU79uVEx73aFf09mPC8/gedZbtDzi4WM9gEffccpmAPU+Z Y843aZWVZD7TSbp/LT1+2e00K4ay10osxRmJhlrMRcWJAPDwQU0/AgAA X-CMS-MailID: 20190404172252epcas2p284b7e2e9e7102f6f95c982d547ed9d64 CMS-TYPE: 102P X-CMS-RootMailID: 20190404172252epcas2p284b7e2e9e7102f6f95c982d547ed9d64 References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_102259_636569_8889AA09 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Enable exynos-asv driver for Exynos 32-bit SoCs. Signed-off-by: Sylwester Nawrocki --- arch/arm/mach-exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e3e63aa5d60a..fe306a85228c 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -13,6 +13,7 @@ menuconfig ARCH_EXYNOS select ARM_AMBA select ARM_GIC select COMMON_CLK_SAMSUNG + select EXYNOS_ASV select EXYNOS_CHIPID select EXYNOS_THERMAL select EXYNOS_PMU From patchwork Thu Apr 4 17:17:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10886033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D471515AC for ; Thu, 4 Apr 2019 17:38:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8C5728ABB for ; Thu, 4 Apr 2019 17:38:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC72128AD2; Thu, 4 Apr 2019 17:38:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36BB028ABB for ; Thu, 4 Apr 2019 17:38:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=F99t6g2rGXpI/mmeyf23PGmgSqBpNAPpJBX7RLnrd1c=; b=uCe4R5CQtz0UjbIOe6LTvpeQL1 6ouKSsai4YyEDhVU7piEuU7qoChufULsxvKnKKpzRSFAuFVXkOXPV3ObJZlr369Lx7OCoG+WGzGnZ 9HU4cmcNuB6u0KyinQ98dyxx+yjKScArbDo/tVtAn3r6oaP5w8dSVugXPRYN1NOXu+yrxM0fR2BtF /LS9K7EBWCZ21sQ6wYo+LDORtce5UIv6fcQsQohFW9XwnFgLhT2OfBbQ1zBLZBe2Fj1J7NgXtVbuC /ffZMNQC0FvDmKgpqjXyPvY/Rf2PpO0UPkkmL3goXeTtrSQS0jXi9cSUfLGerxwpih9lFA0uv0chp /0+Ib/pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC6Jz-0008AR-MG; Thu, 04 Apr 2019 17:38:39 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC6Jy-00088m-IE for linux-arm-kernel@bombadil.infradead.org; Thu, 04 Apr 2019 17:38:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-reply-to:Message-id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2uipSXd6tExBRGlm91lNygPmpC3hUHiWSmuKVsa2UOc=; b=AgY38bxlcnj7BfvEeXB7u2oLn 6aeDtqhXIjFtHxYJYVdwZbKukv3lQLKiWuOBm/R8g3tX/8qW8ovIK9wzjmaB4uxwRCcKOBFdPvmF6 gj2zM6Dg69Ohu5EkHoMw7lHYMjagJmSYErUpY8tuupPl9nkgqZ3SOhNyy9uSRDy1BGyo/WwoOordd m8zokM+xo/+airpm6aFkj6PBB4LrK2hLJ80elNI2RQQTCZEoibxmtoSK9Kra1580oD9y7BedALw7x gitJpdBP/1kAcZtQQAD25B2RIPRvciW52Azf8UROpkHJsC0WIHCEDRoSDkChGcuRAbFrLSJD5t1P/ StiAjX2WA==; Received: from mailout4.samsung.com ([203.254.224.34]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC64u-0004WX-G9 for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 17:23:08 +0000 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20190404172258epoutp0441c20cbadf626d101ba5d3a570d14637~SVUV1y-NA1284412844epoutp04c; Thu, 4 Apr 2019 17:22:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20190404172258epoutp0441c20cbadf626d101ba5d3a570d14637~SVUV1y-NA1284412844epoutp04c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1554398578; bh=2uipSXd6tExBRGlm91lNygPmpC3hUHiWSmuKVsa2UOc=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=fWVrDv3/azUZgxivc/GDgBc96wwpKDW7eXr4ww/THHYH+n79AZci/yFlxsoVH1AKc x1mqreM9c3anlaCA0CIb0+vhAVwzPbVYF5qxwZ4qzjvdRNUycqMW+e9p9kh4C7S44B /Oqt32kSBf+JhMyGi+oNPgCvpcBnM6f+hJihUB/s= Received: from epsmges1p3.samsung.com (unknown [182.195.42.55]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20190404172257epcas1p3edcdc9e5680413cd8f37221e69818cee~SVUVfPxtv0484904849epcas1p3J; Thu, 4 Apr 2019 17:22:57 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id BF.5A.04143.17D36AC5; Fri, 5 Apr 2019 02:22:57 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190404172257epcas1p20d789242a2353dc8e9ffd7f435dc5eee~SVUU2Hd6M2579225792epcas1p2y; Thu, 4 Apr 2019 17:22:57 +0000 (GMT) X-AuditID: b6c32a37-f31ff7000000102f-8d-5ca63d7168a2 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B6.B9.03598.07D36AC5; Fri, 5 Apr 2019 02:22:57 +0900 (KST) Received: from AMDC3061.DIGITAL.local ([106.120.51.75]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PPG00B165KSW780@mmp1.samsung.com>; Fri, 05 Apr 2019 02:22:56 +0900 (KST) From: Sylwester Nawrocki To: krzk@kernel.org Subject: [PATCH RFC 8/8] ARM: dts: exynos: Add ASV tables for exynos5422/5800 Date: Thu, 04 Apr 2019 19:17:35 +0200 Message-id: <20190404171735.12815-9-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190404171735.12815-1-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHIsWRmVeSWpSXmKPExsWy7bCmrm6h7bIYg62nDSw2zljPanH9y3NW i/lHzrFa9D9+zWxx/vwGdotNj6+xWlzeNYfNYsb5fUwWa4/cZbdYev0ik8XtxhVsFou2fmG3 aN17hN3i8Jt2Vgc+jzXz1jB6bFrVyeaxeUm9R9+WVYwenzfJBbBGcdmkpOZklqUW6dslcGU8 7t/OWPC1ibFi1c+f7A2Mq5K7GDk4JARMJPYdr+9i5OIQEtjBKHFx3gpmCOc7o8SVv7PZuxg5 wYqO3+5ig0jsZpS4+v4VO4Tzk1Gi6dVSZpAqNgFDid6jfYwgtoiAsMS9pcvBipgFvjNJnHr9 lBUkISzgL/Hi0iowm0VAVWLzybVgzbwC1hKTLv5ngVgnL7F6wwGwOKeAjcTjJW/YIOIH2CT6 brpB2C4SE9/dY4T4QVri0lFbkF0SAs2MEj27b7NDOBMYJe4fX8AI0WAtcfj4RbDFzAJ8Eu++ 9rBCNPNKdLQJQZR4SCxdep0JxBYS6GeU2DMtCmjCAkaGVYxiqQXFuempxYYFxnrFibnFpXnp esn5uZsYwbGqZb6DccM5n0OMAhyMSjy8GkzLYoRYE8uKK3MPMUpwMCuJ8AZ/XxojxJuSWFmV WpQfX1Sak1p8iFGag0VJnHe9g3OMkEB6YklqdmpqQWoRTJaJg1OqgbHn9arNi1cVuIYeuuf6 eXVmdvPu4xvn/vH88fDWp3PfI6emiwpM35dbq1fZL7Nj3rmYBzvqHT+L7ZGxWR20jPtT5/lE K88zL7a1blpx5mH+ad/G2CqD2Tc/fV4oUhrlkL+Ab2N09IHpuRPdTax9HgiKBh1vfvHV+O3n Cz6bM4vONUvfj04oOHJBiaU4I9FQi7moOBEATHyzSNECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsVy+t9jAd1C22UxBi8/MVtsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BabHl9jtbi8aw6bxYzz+5gs1h65y26x9PpFJovbjSvYLBZt/cJu 0br3CLvF4TftrA58HmvmrWH02LSqk81j85J6j74tqxg9Pm+SC2CN4rJJSc3JLEst0rdL4Mp4 3L+dseBrE2PFqp8/2RsYVyV3MXJySAiYSBy/3cXWxcjFISSwk1Hi54RnzBDOT0aJxys/MIFU sQkYSvQe7WMEsUUEhCXuLV3ODmIzC3xnkpg9L6+LkYNDWMBXonNGIEiYRUBVYvPJtcwgNq+A tcSki/9ZIJbJS6zecAAszilgI/F4yRs2kFYhoJrvWxImMPIsYGRYxSiZWlCcm55bbFRgmJda rlecmFtcmpeul5yfu4kRGIjbDmv17WC8vyT+EKMAB6MSD68G07IYIdbEsuLK3EOMEhzMSiK8 wd+XxgjxpiRWVqUW5ccXleakFh9ilOZgURLnvZ13LFJIID2xJDU7NbUgtQgmy8TBKdXAuNRn +4Pzq1Kt4+a/vHj4b1TYXYbaSWl6/lzfOCMOPSh5+/aPa2j+lPLr6+5WTtqUe5PFPPLa3cZ9 joEP27fre7n0TGC/3/hmxdJX1j0Lp7k5Gc5KmJspIuLu+enh74xTQts53FuYmX+tqNtbGh2x d1G0q4WhpdaV7weuP1Cr1V8a/3OB1tN5L5VYijMSDbWYi4oTAaZHN8BAAgAA X-CMS-MailID: 20190404172257epcas1p20d789242a2353dc8e9ffd7f435dc5eee CMS-TYPE: 101P X-CMS-RootMailID: 20190404172257epcas1p20d789242a2353dc8e9ffd7f435dc5eee References: <20190404171735.12815-1-s.nawrocki@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_182305_157869_92AD816A X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, kgene@kernel.org, myungjoo.ham@samsung.com, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch ASV (Adaptive Supply Voltage) table entries for Exynos5422/5800 SoC. Signed-off-by: Sylwester Nawrocki --- arch/arm/boot/dts/exynos5.dtsi | 2 +- arch/arm/boot/dts/exynos5800.dtsi | 207 ++++++++++++++++++++++++++++++ 2 files changed, 208 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi index 67f9b4504a42..22eb951c614c 100644 --- a/arch/arm/boot/dts/exynos5.dtsi +++ b/arch/arm/boot/dts/exynos5.dtsi @@ -35,7 +35,7 @@ #size-cells = <1>; ranges; - chipid@10000000 { + chipid: chipid@10000000 { compatible = "samsung,exynos4210-chipid"; reg = <0x10000000 0x100>; }; diff --git a/arch/arm/boot/dts/exynos5800.dtsi b/arch/arm/boot/dts/exynos5800.dtsi index 57d3b319fd65..5358865f5c0b 100644 --- a/arch/arm/boot/dts/exynos5800.dtsi +++ b/arch/arm/boot/dts/exynos5800.dtsi @@ -16,6 +16,213 @@ compatible = "samsung,exynos5800", "samsung,exynos5"; }; +&chipid { + asv { + compatible = "samsung,exynos-asv-v1"; + asv-table-0 { + /* ARM 0, 1 */ + samsung,asv-table-size = <20 15>; + samsung,asv-table-id = <0x0>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <2100 1362500 1362500 1350000 1337500 1325000 1312500 1300000 1275000 1262500 1250000 1237500 1225000 1212500 1200000>, + <2000 1312500 1312500 1300000 1287500 1275000 1262500 1250000 1237500 1225000 1237500 1225000 1212500 1200000 1187500>, + <1900 1250000 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1162500 1150000 1137500 1125000 1112500>, + <1800 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1112500 1100000 1087500 1075000 1062500>, + <1700 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1075000 1062500 1050000 1037500 1025000>, + <1600 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1037500 1025000 1012500 1000000 987500>, + <1500 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 1000000 987500 975000 962500 950000>, + <1400 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 975000 962500 950000 937500 925000>, + <1300 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 962500 950000 937500 925000 912500>, + <1200 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 937500 925000 912500 900000 900000>, + <1100 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000>, + <1000 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000>, + < 900 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 800 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <700 900000>, + <600 900000>, + <500 900000>, + <400 900000>, + <300 900000>, + <200 900000>; + }; + asv-table-2 { + /* ARM 2 */ + samsung,asv-table-size = <20 15>; + samsung,asv-table-id = <0x2>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <2100 1362500 1362500 1350000 1337500 1325000 1312500 1300000 1275000 1262500 1250000 1237500 1225000 1212500 1200000>, + <2000 1312500 1312500 1312500 1300000 1275000 1262500 1250000 1237500 1225000 1237500 1225000 1212500 1200000 1187500>, + <1900 1262500 1250000 1250000 1237500 1212500 1200000 1187500 1175000 1162500 1175000 1162500 1150000 1137500 1125000>, + <1800 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1125000 1112500 1100000 1087500 1075000>, + <1700 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1087500 1075000 1062500 1050000 1037500>, + <1600 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1050000 1037500 1025000 1012500 1000000>, + <1500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 1012500 1000000 987500 975000 962500>, + <1400 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 987500 975000 962500 950000 937500>, + <1300 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 962500 950000 937500 925000 912500>, + <1200 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 937500 925000 912500 900000 900000>, + <1100 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000>, + <1000 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000>, + < 900 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 800 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <700 900000>, + <600 900000>, + <500 900000>, + <400 900000>, + <300 900000>, + <200 900000>; + }; + asv-table-3 { + /* ARM 3 */ + samsung,asv-table-size = <20 15>; + samsung,asv-table-id = <0x3>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <2100 1362500 1362500 1350000 1337500 1325000 1312500 1300000 1275000 1262500 1250000 1237500 1225000 1212500 1200000>, + <2000 1312500 1312500 1300000 1287500 1275000 1262500 1250000 1237500 1225000 1237500 1225000 1212500 1200000 1187500>, + <1900 1262500 1250000 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1175000 1162500 1150000 1137500 1125000>, + <1800 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1125000 1112500 1100000 1087500 1075000>, + <1700 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1087500 1075000 1062500 1050000 1037500>, + <1600 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1050000 1037500 1025000 1012500 1000000>, + <1500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 1012500 1000000 987500 975000 962500>, + <1400 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 987500 975000 962500 950000 937500>, + <1300 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 962500 950000 937500 925000 912500>, + <1200 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 937500 925000 912500 900000 900000>, + <1100 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000>, + <1000 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000>, + < 900 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 800 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <700 900000>, + <600 900000>, + <500 900000>, + <400 900000>, + <300 900000>, + <200 900000>; + }; + + asv-table-4 { + /* ARM BIN2 */ + samsung,asv-table-size = <17 15>; + samsung,asv-table-id = <0x4>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <1800 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1150000 1137500 1125000 1112500 1100000>, + <1700 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1112500 1100000 1087500 1075000 1062500>, + <1600 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1075000 1062500 1050000 1037500 1025000>, + <1500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1037500 1025000 1012500 1000000 987500>, + <1400 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 1012500 1000000 987500 975000 962500>, + <1300 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 1000000 987500 975000 962500 950000>, + <1200 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 975000 962500 950000 937500 925000>, + <1100 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500 950000 937500 925000 912500 900000>, + <1000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 925000 912500 900000 900000 900000>, + < 900 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000>, + < 800 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 700 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <600 900000>, + <500 900000>, + <400 900000>, + <300 900000>, + <200 900000>; + }; + + + asv-table-100 { + /* KFC 0, 1 */ + samsung,asv-table-size = <14 15>; + samsung,asv-table-id = <0x100>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <1500 1300000 1300000 1300000 1287500 1287500 1287500 1275000 1262500 1250000 1237500 1225000 1212500 1200000 1187500>, + <1400 1275000 1262500 1250000 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500>, + <1300 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500>, + <1200 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500>, + <1100 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000>, + <1000 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500>, + < 900 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000>, + < 800 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000>, + < 700 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000>, + < 600 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 500 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <400 900000>, + <300 900000>, + <200 900000>; + }; + + asv-table-102 { + /* KFC 2 */ + samsung,asv-table-size = <14 15>; + samsung,asv-table-id = <0x102>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <1500 1300000 1300000 1300000 1287500 1287500 1287500 1275000 1262500 1250000 1237500 1225000 1212500 1200000 1187500>, + <1400 1275000 1262500 1250000 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500>, + <1300 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500>, + <1200 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500>, + <1100 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000>, + <1000 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500>, + < 900 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000>, + < 800 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000>, + < 700 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000>, + < 600 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 500 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <400 900000>, + <300 900000>, + <200 900000>; + }; + + asv-table-103 { + /* KFC 3 */ + samsung,asv-table-size = <14 15>; + samsung,asv-table-id = <0x103>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <1500 1300000 1300000 1300000 1287500 1287500 1287500 1275000 1262500 1250000 1237500 1225000 1212500 1200000 1187500>, + <1400 1275000 1262500 1250000 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500>, + <1300 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500>, + <1200 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500>, + <1100 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000>, + <1000 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500>, + < 900 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000>, + < 800 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000>, + < 700 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000>, + < 600 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 500 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <400 900000>, + <300 900000>, + <200 900000>; + }; + + asv-table-104 { + /* KFC BIN2 */ + samsung,asv-table-size = <12 15>; + samsung,asv-table-id = <0x104>; + samsung,asv-data = + /* ASV0 ASV1 ASV2 ASV3 ASV4 ASV5 ASV6 ASV7 ASV8 ASV9 ASV10 ASV11 ASV12 ASV13 */ + <1300 1250000 1237500 1225000 1212500 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500>, + <1200 1200000 1187500 1175000 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500>, + <1100 1162500 1150000 1137500 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000>, + <1000 1125000 1112500 1100000 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500>, + < 900 1087500 1075000 1062500 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000>, + < 800 1050000 1037500 1025000 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000>, + < 700 1012500 1000000 987500 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000>, + < 600 975000 962500 950000 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000>, + < 500 937500 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>, + < 400 925000 912500 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000 900000>; + /* ASV0...13 */ + samsung,asv-common-data = <300 900000>, + <200 900000>; + }; + }; +}; + &clock { compatible = "samsung,exynos5800-clock"; };