Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2103078yba; Fri, 19 Apr 2019 12:10:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIGpUmWIBYvxaMmyeH/Ehab4XvLPQrqsZCYi7RHQmVryNHjDxI1yf4upX9KhIZIfpF0n2l X-Received: by 2002:aa7:800e:: with SMTP id j14mr5517675pfi.157.1555701044061; Fri, 19 Apr 2019 12:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555701044; cv=none; d=google.com; s=arc-20160816; b=MHg+DtbH42ei73Uo5ETuLM2VbKVtDTzcXIpfeTotqUuQ1KkskSYFdNbywbOA2Kq+jn KiZNbYrqQ89sJDmjcshlUXVSDuptMDKZrJSGcpSC17CqssgcEl4q1Rf9R3kdJAosqa5p 65pbkchZKyjRRCsZ8fqpsZ1Mm6r69520/5+GnLYtk9CuR16GT5dE2PpBUGs7l/zlCR9X Okm5vWZffHoo04F7yCMz/Yuz408ar0UQxlaAuYoBTFrR6XLMc65z88R/OZSxwV4C6MPX zd7gaNp+JL/jj2sSjBdUaKfD1Y5mcmd10mCPlZkbO8SNWtxLUplCjrNkMmuXTF5FOwSB l0yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=laRurPPqZGLm21JPTycL20HYCYlH4Nx5jtw/RR3oQv8=; b=e1eo/mpIkj/VTP58HAu8Kuvz4V69l8xjsf5Q8HaXpAGDAZBi9BIfhzyJv3pA1yk5n8 Utc2FdErRP9fEBL0Z7LKdd9hWZ4O/YXD6/HgkC1SColLRZaDErPD0/i0i9X7OuTiiwOp FUVK74TdlYx3JM4Jx4KbMkgDgiKTf9U5osN7NrZ7zNcK+1BNY1gX0MWHTJ8tjf0NzPtW hogW4IU8cpbxz/BB0Zl/tt6I3+/urgLVNU5TPsCFYuWueBj34cFC68i+jzwhggMh4rFK ZdeSsil8cIojaXoQOYvzawrw6iZ1RVifbUaUsmh/JuznjI9CUHK6vS3nQsMj1nViKTWP Ti9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=lDuK7NcP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si6279530pff.158.2019.04.19.12.10.29; Fri, 19 Apr 2019 12:10:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=lDuK7NcP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729178AbfDSTJf (ORCPT + 99 others); Fri, 19 Apr 2019 15:09:35 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:54681 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729154AbfDSTHy (ORCPT ); Fri, 19 Apr 2019 15:07:54 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190419141940euoutp02fbc5c6a3dc3cb6b540265354f755308e~W5flk1rR32260722607euoutp02Y for ; Fri, 19 Apr 2019 14:19:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190419141940euoutp02fbc5c6a3dc3cb6b540265354f755308e~W5flk1rR32260722607euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1555683580; bh=laRurPPqZGLm21JPTycL20HYCYlH4Nx5jtw/RR3oQv8=; h=From:To:Cc:Subject:Date:References:From; b=lDuK7NcP4IBUNtuqIJcTd4n28RM82rSOpZrRjR/YC0OWgHMMAgsbveDnYkZLScczf DZY6RhP6JFYlSBltSHigOaiZ5pDAccD/DRwCKmuwvhTiIXSi6LnlsD9asxs1veewRm Vz3wQAapI7xmVUJa4wOeoJM9rsF+r8K47nGqN4fQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190419141939eucas1p23b391ac0c0158c9e4255499df89ed137~W5fkesHWX3160331603eucas1p2B; Fri, 19 Apr 2019 14:19:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 6A.B2.04325.AF8D9BC5; Fri, 19 Apr 2019 15:19:38 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190419141938eucas1p16ee6cdf897184df33cf67b55c5f3c449~W5fjMpx4m0188401884eucas1p1A; Fri, 19 Apr 2019 14:19:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190419141937eusmtrp1007d1aa685d250e62534f44018fb2fdd~W5fi_juGG1759317593eusmtrp1R; Fri, 19 Apr 2019 14:19:37 +0000 (GMT) X-AuditID: cbfec7f5-b75ff700000010e5-74-5cb9d8fad053 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E7.02.04146.9F8D9BC5; Fri, 19 Apr 2019 15:19:37 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190419141937eusmtip230c2262191a52e35f17d79aa58010bcf~W5fiOwPSS3043530435eusmtip27; Fri, 19 Apr 2019 14:19:36 +0000 (GMT) From: Lukasz Luba To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: b.zolnierkie@samsung.com, krzk@kernel.org, kgene@kernel.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, myungjoo.ham@samsung.com, keescook@chromium.org, tony@atomide.com, jroedel@suse.de, treding@nvidia.com, digetx@gmail.com, willy.mh.wolff.ml@gmail.com, Lukasz Luba Subject: [PATCH v6 0/10] Exynos5 Dynamic Memory Controller driver Date: Fri, 19 Apr 2019 16:19:18 +0200 Message-Id: <1555683568-20882-1-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA0VSa0hTYRju29nOjsPJcVp+zBsMIjPUotsHiWZJHYRoQkXUImceVHJTd9Sy 9WOpqVveUNChmV0oxTQvW6JWmtPUNJ2ipmlGKWbUMsJrWpHzTPr3fM/lfV5ePgITNfLERLQy gVYp5TESXMBt6Pxl9lkda5LtTinyR3X6Gh4aXZjlobKOfh56/HMaoIKeUg56c0uBcqe/Ychs ruWjvhQLH41r3NBQ820czWd3AKQ3t3BQdcckH03cqMBRuyWDh1qHQ9DEmgNa6p4Ch52opcV8 LlWiGeRSTcWTfKq+UotT2alzONU295xD5RgrAWXoVVPz9R5Su3MC/wg6JjqJVvkFhAmi8rJq eXGft19NHe8HGtDqrgN2BCT3wSdTY7gOCAgRWQFgzUwa3yqIyAUA9Q+SWGEewM6pWu5mYjS3 DmOFcgB182YO+1hPZJSlAR0gCJz0hY2V8daAM6mG70dbNwIYaeHAvtWVjUlOZBA0Vjdv1HHJ 7XBkeRmzYiEZAsd/fMLZNg/4rl+7EYZkJx8OvP4DWCEYZlWt2LAT/Npl5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givY8qWGCHelMTKqtSi/Pii0pzU4kOMpkDLJzJLiSbnA+M2ryTe 0NTQ3MLS0NzY3NjMQkmc97xBZZSQQHpiSWp2ampBahFMHxMHp1QDo0md6I/J95JUI3ge2MwO yXCN+r13dlTW3T8vqzqWr3C+Wbc7saW+/JqPSdKy2alsvtwqm+N/ywkdskhtFvn4oWXPyyln GBUdL5msfGNevfdW0Yf7mWxt+w5NMNidcFJhwb4jt7t9mjMrNoa9O+l78cHz3BbVVUGhcu/2 X1WuP8DPvv/n4Wn39JRYijMSDbWYi4oTASJCETOjAgAA X-CMS-MailID: 20190419141938eucas1p16ee6cdf897184df33cf67b55c5f3c449 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190419141938eucas1p16ee6cdf897184df33cf67b55c5f3c449 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190419141938eucas1p16ee6cdf897184df33cf67b55c5f3c449 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, This is v6 of the patch set which adds support of Dynamic Memory Controller for Exynos5422 SoC. The driver supports Dynamic Voltage and Frequency Scalling for the DMC and DRAM. It also provides needed timings for different speed operations of the DRAM memory. The patch set depends on changes to Exynos PPMU posted on LKLM as: [PATCH v3 0/4] Exynos Performance Monitoring Counters enhancements changes: v6: - driver code has been converted to use generic code which parses DT memory definition in drivers/memory/of_memory.c - extended of_memory by LPDDR3 support (there was LPDDR2 made by TI) - extended jedec_lpddr.h by the needed structures for LPDDR3 (AC timings) - driver file moved to proper directory, where other memory controllers live, which is in this case drivers/memory/samsung/ - driver code now uses regmap_{read|write} to access registers for pausing and changing timings set, as suggested by Chanwoo - DT contains simple definition of memory device, similar to LPDDR2 made by TI - driver code generates the needed timings for registered OPPs, based on memory description in DT - patch 1 contains Rob's ACK, - simplified memory bandwidth calculation - added debug information files with timings, raw counters and statistics - updated dt-bindings files accordingly - based on v5.1-rc5 (+ PPMU patches) v5: - removed unneeded wrapper functions i.e. for regulator_set_voltage - removed unused defines - removed direct access to clock register base and used CCF for pause and timing set usage - switched to OPP comming from DT according to Chanowoo's comments - switched to timings comming from DT, added parsing function - extended dt-binding with description of OPPs and timings - according to Rob Herring comment, moved dt-binding file before driver code in the patch set. - rebased on top of v5.0 v4: - removed unneeded DPLL and G3D clocks IDs - changed names of parent clocks for mout_mx_mspll_ccore_phy_p and added one more parent: mout_sclk_epll - removed 933Mhz and 138MHz from the BPLL ratio table v3: - in DTS align to proper indent the clocks and clock-names entries v2: - changed file name exynos5-dmc.c -> exynos5422-dmc.c and related entries in other files - changed dt-binding file name - changed config entry to CONFIG_ARM_EXYNOS5422_DMC_DEVFREQ - removed sysfs and print info messages (print only one line) - removed function exynos5_read_chip_info and compact code - changed dt-binding patch and move it up in the patch set - new entries in MAINTAINERS are added with the driver c code - clean-up in DTS file: renamed nodes to 'ppmu' and 'memory-controller', entries moved to suggested location (before nocp nodes or after), moved according to alfabetical order, compacted clocks names with right indent. Regards, Lukasz Luba Lukasz Luba (10): clk: samsung: add needed IDs for DMC clocks in Exynos5420 clk: samsung: add new clocks for DMC for Exynos5422 SoC clk: samsung: add BPLL rate table for Exynos 5422 SoC Documentation: dt: device tree bindings for LPDDR3 memories drivers: memory: extend of_memory by LPDDR3 support dt-bindings: memory-controllers: add Exynos5422 DMC device description drivers: memory: add DMC driver for Exynos5422 drivers: devfreq: events: add Exynos PPMU new events ARM: dts: exynos: add DMC device for exynos5422 ARM: exynos_defconfig: enable DMC driver .../devicetree/bindings/lpddr3/lpddr3-timings.txt | 57 + .../devicetree/bindings/lpddr3/lpddr3.txt | 93 + .../bindings/memory-controllers/exynos5422-dmc.txt | 73 + MAINTAINERS | 8 + arch/arm/boot/dts/exynos5420.dtsi | 120 ++ arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 120 ++ arch/arm/configs/exynos_defconfig | 1 + drivers/clk/samsung/clk-exynos5420.c | 59 +- drivers/devfreq/event/exynos-ppmu.c | 6 + drivers/memory/of_memory.c | 125 ++ drivers/memory/of_memory.h | 20 +- drivers/memory/samsung/Kconfig | 17 + drivers/memory/samsung/Makefile | 1 + drivers/memory/samsung/exynos5422-dmc.c | 1793 ++++++++++++++++++++ include/dt-bindings/clock/exynos5420.h | 18 +- include/memory/jedec_ddr.h | 62 + 16 files changed, 2566 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/lpddr3/lpddr3-timings.txt create mode 100644 Documentation/devicetree/bindings/lpddr3/lpddr3.txt create mode 100644 Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt create mode 100644 drivers/memory/samsung/exynos5422-dmc.c -- 2.7.4