Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp758192ybi; Fri, 14 Jun 2019 02:54:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8u9FxeUEXrZaFRT3dVeCoD/nuFQUJbMAyoU2UPBNJB/2rEu+QYOZIkJr9+NZzNBUwRRMx X-Received: by 2002:a63:4104:: with SMTP id o4mr35986887pga.345.1560506056944; Fri, 14 Jun 2019 02:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560506056; cv=none; d=google.com; s=arc-20160816; b=cujxjQeoHLWHDi6K5USNrsHmvGgMu17FaaZ4ZL/43xz4/hefEoaDMabwJ+yRI+mFj8 DylyQGjPYcAMJRuPhCc4rp/w2ViBRjqq7PgfFniiAo5QZiS2hQAwYDhXakNkFdpxkJ4p q1p7F5JNFbO6cTPpAkVjIiCO/jotuZA4QX6ni8y5iPoAtJksNLurE2uESV52+3QkBgr7 ZHuFLAy1mhljEwEH2UkaPUEi9szs7UyXFjNoXryK6Q6SnExb6bR1S4IuiUXTgEXsokMl yDhp3/LN93M5rxTD2BADH/lQKw1TglNhfwy/h5mC3xwh9+nUXFH6+7tEeBS1sGi8Ta5m Te8g== 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:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=kHJVCTeohYCMusBRC0aBAn9CjjIj5zED4ztI6qCEjMQ=; b=nUI0N0i7z/zS8jRjLP3acI78cw52XKV6tR9ku78D1sXr4vf5/KGSj7UfA7mFAG3MOf ONnmJySQWCMj+Djq9yGN8Gf3CUQXKeL4k8QYoed/eYY/dzh4HUz0e15LdALV5ALcqqiN 7wufv/1zTX6bgIYOxEuQCaoAsnXdkHRQyIMhI75gSVFvBzGWOvF/bG5FjoKqGqjBEm9i W7xK6ynPZZayFHOuWZRbnAUMENBa1dMoVxw86yMDTOCUQ4oVdfuxnjgghzevDvusC50a YjyMjd0uToMDqbffgcqCMuUMssT8yFtyr8NT//rUiHV3D6dtOskV5Jy08TRzIDbL6kQY cCjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mZtxzb7v; 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 h21si2053549pgv.102.2019.06.14.02.54.00; Fri, 14 Jun 2019 02:54:16 -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=mZtxzb7v; 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 S1727483AbfFNJxm (ORCPT + 99 others); Fri, 14 Jun 2019 05:53:42 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:35884 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727416AbfFNJxf (ORCPT ); Fri, 14 Jun 2019 05:53:35 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190614095333euoutp014dae6e7dd429aec4558ab9d2e60649f8~oB-OPXD-a0907809078euoutp01M for ; Fri, 14 Jun 2019 09:53:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190614095333euoutp014dae6e7dd429aec4558ab9d2e60649f8~oB-OPXD-a0907809078euoutp01M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1560506013; bh=kHJVCTeohYCMusBRC0aBAn9CjjIj5zED4ztI6qCEjMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mZtxzb7vufr4ue/hz3gdh0lgxKGtvygrbnSubmq210WVB9gcQ/yyJUDUqhJpYXoM+ CbEI45vhgDZLJ+dBZUTx10fJpcnUNgOdQCwUq6lo/JTXIrfdswzV6l0hw2MakuEjun vUepvGkVRdsSomihmxl+jybO6gDLI/PNNqwYy99c= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190614095332eucas1p19ac680f2ae4a3719dea4f6edab5d2189~oB-NbdD_c1134111341eucas1p1a; Fri, 14 Jun 2019 09:53:32 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7C.F1.04325.C9E630D5; Fri, 14 Jun 2019 10:53:32 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190614095331eucas1p138707301cac47902f0d0d9a41bd4a8a4~oB-MiPmdw1137711377eucas1p1K; Fri, 14 Jun 2019 09:53:31 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190614095331eusmtrp223d3933ed832064d2beaa54a73d73b5b~oB-MSlLkX2148621486eusmtrp2K; Fri, 14 Jun 2019 09:53:31 +0000 (GMT) X-AuditID: cbfec7f5-fbbf09c0000010e5-2f-5d036e9c8613 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BC.EA.04140.B9E630D5; Fri, 14 Jun 2019 10:53:31 +0100 (BST) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190614095330eusmtip2c31677556257e67fb73e08c82588f15e~oB-LbFkI42320823208eusmtip2T; Fri, 14 Jun 2019 09:53:30 +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, linux-clk@vger.kernel.org Cc: mturquette@baylibre.com, sboyd@kernel.org, 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, gregkh@linuxfoundation.org, willy.mh.wolff.ml@gmail.com, Lukasz Luba Subject: [PATCH v10 12/13] ARM: dts: exynos: add DMC device for exynos5422 Date: Fri, 14 Jun 2019 11:53:08 +0200 Message-Id: <20190614095309.24100-13-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190614095309.24100-1-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTURzHPbuP3VmT23ydnsLKKCE1ijjNioKSqxREEZIyaulFJTdrN+1h xSrLnK5CSUVdWhKOaanTLe2l+cjQdJpWllmS9PIV5qMnK6931X/f8/19fuf7+x0OhcneEPOo WM0hVqtRxclJV9z28Lt9Rb4GUwa2VHiiipwyAj2f+ECggsZ2ApWMDQB0pqiMRJktRhF6nKZG FweGMGS3l4tR2+lhMXqpW4DG0l8TqOt2PonGDY0A5djvi9CNxj4x6mzZgnpPmUjUMJxCIMez ChzVdoei3p9uaOrRW7DRm5mazMCZzz1nxUyerhNnanL7xIzFnEoytcZSMWM4M0oyD0bvipgL VWbAVLYmMeOWRdtnhbuui2LjYhNZbcCGva4x6Ze7wYHqwCPXnmThOtC2RA8kFKRXw6KzRSI9 cKVktAnAp6V1YuEwAWD7o3ckT8nocQDvWB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n+udbFBFH1ilFjycx4bSDObgJ7EjlWFIHERgTmMEj+7tjGCOMwCZ5kldq94wwTSLSzg JfHj9ytWkAYWAVWJbV1mIGFeAQeJ5w0XoBbIS6zecABsMSdQ/Oj8N2DzhQTsJb7P4J/AyLeA kWEVo0hqaXFuem6xkV5xYm5xaV66XnJ+7iZGYARuO/Zzyw7GrnfBhxgFOBiVeHgPWDHFCrEm lhVX5h5ilOBgVhLhnWfNHCvEm5JYWZValB9fVJqTWnyI0RTopInMUqLJ+cDkkFcSb2hqaG5h aWhubG5sZqEkztshcDBGSCA9sSQ1OzW1ILUIpo+Jg1OqgXHPCoEzUwRy/x/9JaFXUT5B8OgE Jq8D88968u3/9l6vlLfswt7nxYtZ1p2M2aMux2OyRnTit3Xrz4pmuhlNjHisv0CoynHltJNL Jq8/sz1xk32VQsvquN8HpS5KHmZc3Dnto+7S7BVNE6b/aNLlUVgUtjP3YyHX6oo6br3p1XY5 L4p2S3JvTApXYinOSDTUYi4qTgQAInPcONYCAAA= X-CMS-MailID: 20190614095331eucas1p138707301cac47902f0d0d9a41bd4a8a4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190614095331eucas1p138707301cac47902f0d0d9a41bd4a8a4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190614095331eucas1p138707301cac47902f0d0d9a41bd4a8a4 References: <20190614095309.24100-1-l.luba@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add description of Dynamic Memory Controller and PPMU counters. They are used by exynos5422-dmc driver. There is a definition of the memory chip, which is then used during calculation of timings for each OPP. The algorithm in the driver needs these two sets to bound the timings. Signed-off-by: Lukasz Luba --- arch/arm/boot/dts/exynos5420.dtsi | 73 +++++++++++ arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 116 ++++++++++++++++++ 2 files changed, 189 insertions(+) diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index d153617ff1a3..79e74ae80938 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -235,6 +235,31 @@ status = "disabled"; }; + dmc: memory-controller@10c20000 { + compatible = "samsung,exynos5422-dmc"; + reg = <0x10c20000 0x100>, <0x10c30000 0x100>; + clocks = <&clock CLK_FOUT_SPLL>, + <&clock CLK_MOUT_SCLK_SPLL>, + <&clock CLK_FF_DOUT_SPLL2>, + <&clock CLK_FOUT_BPLL>, + <&clock CLK_MOUT_BPLL>, + <&clock CLK_SCLK_BPLL>, + <&clock CLK_MOUT_MX_MSPLL_CCORE>, + <&clock CLK_MOUT_MX_MSPLL_CCORE_PHY>, + <&clock CLK_MOUT_MCLK_CDREX>; + clock-names = "fout_spll", + "mout_sclk_spll", + "ff_dout_spll2", + "fout_bpll", + "mout_bpll", + "sclk_bpll", + "mout_mx_mspll_ccore", + "mout_mx_mspll_ccore_phy", + "mout_mclk_cdrex"; + samsung,syscon-clk = <&clock>; + status = "disabled"; + }; + nocp_mem0_0: nocp@10ca1000 { compatible = "samsung,exynos5420-nocp"; reg = <0x10CA1000 0x200>; @@ -271,6 +296,54 @@ status = "disabled"; }; + ppmu_dmc0_0: ppmu@10d00000 { + compatible = "samsung,exynos-ppmu"; + reg = <0x10d00000 0x2000>; + clocks = <&clock CLK_PCLK_PPMU_DREX0_0>; + clock-names = "ppmu"; + events { + ppmu_event3_dmc0_0: ppmu-event3-dmc0_0 { + event-name = "ppmu-event3-dmc0_0"; + }; + }; + }; + + ppmu_dmc0_1: ppmu@10d10000 { + compatible = "samsung,exynos-ppmu"; + reg = <0x10d10000 0x2000>; + clocks = <&clock CLK_PCLK_PPMU_DREX0_1>; + clock-names = "ppmu"; + events { + ppmu_event3_dmc0_1: ppmu-event3-dmc0_1 { + event-name = "ppmu-event3-dmc0_1"; + }; + }; + }; + + ppmu_dmc1_0: ppmu@10d60000 { + compatible = "samsung,exynos-ppmu"; + reg = <0x10d60000 0x2000>; + clocks = <&clock CLK_PCLK_PPMU_DREX1_0>; + clock-names = "ppmu"; + events { + ppmu_event3_dmc1_0: ppmu-event3-dmc1_0 { + event-name = "ppmu-event3-dmc1_0"; + }; + }; + }; + + ppmu_dmc1_1: ppmu@10d70000 { + compatible = "samsung,exynos-ppmu"; + reg = <0x10d70000 0x2000>; + clocks = <&clock CLK_PCLK_PPMU_DREX1_1>; + clock-names = "ppmu"; + events { + ppmu_event3_dmc1_1: ppmu-event3-dmc1_1 { + event-name = "ppmu-event3-dmc1_1"; + }; + }; + }; + gsc_pd: power-domain@10044000 { compatible = "samsung,exynos4210-pd"; reg = <0x10044000 0x20>; diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi index 25d95de15c9b..30e569c13ee7 100644 --- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi @@ -34,6 +34,97 @@ clock-frequency = <24000000>; }; }; + + dmc_opp_table: opp_table2 { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <165000000>; + opp-microvolt = <875000>; + }; + opp01 { + opp-hz = /bits/ 64 <206000000>; + opp-microvolt = <875000>; + }; + opp02 { + opp-hz = /bits/ 64 <275000000>; + opp-microvolt = <875000>; + }; + opp03 { + opp-hz = /bits/ 64 <413000000>; + opp-microvolt = <887500>; + }; + opp04 { + opp-hz = /bits/ 64 <543000000>; + opp-microvolt = <937500>; + }; + opp05 { + opp-hz = /bits/ 64 <633000000>; + opp-microvolt = <1012500>; + }; + opp06 { + opp-hz = /bits/ 64 <728000000>; + opp-microvolt = <1037500>; + }; + opp07 { + opp-hz = /bits/ 64 <825000000>; + opp-microvolt = <1050000>; + }; + }; + + samsung_K3QF2F20DB: lpddr3 { + compatible = "samsung,K3QF2F20DB", "jedec,lpddr3"; + density = <16384>; + io-width = <32>; + #address-cells = <1>; + #size-cells = <0>; + + tRFC-min-tck = <17>; + tRRD-min-tck = <2>; + tRPab-min-tck = <2>; + tRPpb-min-tck = <2>; + tRCD-min-tck = <3>; + tRC-min-tck = <6>; + tRAS-min-tck = <5>; + tWTR-min-tck = <2>; + tWR-min-tck = <7>; + tRTP-min-tck = <2>; + tW2W-C2C-min-tck = <0>; + tR2R-C2C-min-tck = <0>; + tWL-min-tck = <8>; + tDQSCK-min-tck = <5>; + tRL-min-tck = <14>; + tFAW-min-tck = <5>; + tXSR-min-tck = <12>; + tXP-min-tck = <2>; + tCKE-min-tck = <2>; + tCKESR-min-tck = <2>; + tMRD-min-tck = <5>; + + timings_samsung_K3QF2F20DB_800mhz: lpddr3-timings@800000000 { + compatible = "jedec,lpddr3-timings"; + reg = <800000000>; /* workaround: it shows max-freq */ + min-freq = <100000000>; + tRFC = <65000>; + tRRD = <6000>; + tRPab = <12000>; + tRPpb = <12000>; + tRCD = <10000>; + tRC = <33750>; + tRAS = <23000>; + tWTR = <3750>; + tWR = <7500>; + tRTP = <3750>; + tW2W-C2C = <0>; + tR2R-C2C = <0>; + tFAW = <25000>; + tXSR = <70000>; + tXP = <3750>; + tCKE = <3750>; + tCKESR = <3750>; + tMRD = <7000>; + }; + }; }; &adc { @@ -132,6 +223,15 @@ cpu-supply = <&buck2_reg>; }; +&dmc { + devfreq-events = <&ppmu_event3_dmc0_0>, <&ppmu_event3_dmc0_1>, + <&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>; + device-handle = <&samsung_K3QF2F20DB>; + operating-points-v2 = <&dmc_opp_table>; + vdd-supply = <&buck1_reg>; + status = "okay"; +}; + &hsi2c_4 { status = "okay"; @@ -540,6 +640,22 @@ }; }; +&ppmu_dmc0_0 { + status = "okay"; +}; + +&ppmu_dmc0_1 { + status = "okay"; +}; + +&ppmu_dmc1_0 { + status = "okay"; +}; + +&ppmu_dmc1_1 { + status = "okay"; +}; + &tmu_cpu0 { vtmu-supply = <&ldo7_reg>; }; -- 2.17.1