Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3883512imb; Tue, 5 Mar 2019 23:16:12 -0800 (PST) X-Google-Smtp-Source: APXvYqySXGqG0MgjDmFhGKwpKyG3TJEM/DmJhM19cZiRWkUDnANUKZiY4JIadGLIC7+6q8Ww8ip6 X-Received: by 2002:a62:404:: with SMTP id 4mr5782500pfe.131.1551856572139; Tue, 05 Mar 2019 23:16:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551856572; cv=none; d=google.com; s=arc-20160816; b=DB3MQj+a9T80TcnC1d6pqiwzF1iC92rlLwgAGCUDNo2EcmfxqR7WRjllqCLGEA0waR KizK8ki5F1edyD1121M7SxjEwjDDWHRCdYmjmA5iuwNfDOvvDRKJbi+lbI4+m3J9e0p4 XOkr5EtKdmynL/PDcVeH1NrHcy2DWpjenkhbX3b6oASn85ivRYqzzmtKQfD+gu90SLaM YWZ6lP7C1Q3i3WK5R8lYWmNNl6JIxjDNglJIQUwYSm4rP9kcErc9YwJh0bv7BTRuQk2/ cbyLzH2jgUJuDULMDrO0Hvi0dDWRX71aIcrlZU56Vmj5Tw9PZgrmUOjwXNns95hO9XZ+ eggA== 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 :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=2Vp5Su1aejLRO7gL1QYmoYAYjCNLauRaJSt3asUz014=; b=cnFJBUG1c5kO8/RIJ2zLtg0kiW32T/ANR2MAP0cH/M7CkSnGor125ij3L5FX7l7zSL uxoXJdneXL4HByJ4Owkgt8cgE0RbElW791TVE4MJqc84kRP+WLvE6mLKWBnWmcnfZCaY bEFcygQ20hwEVRs8ibSE5nIjv1tHhKnX2ysdbdGoZerrZIXJ5yyMCZbogKnuKsp1tGfx eNzRP12hsj5T+oZ9c/g+LnbCEczv8hqFTmv1lUj8Iw/Cr6OEsWqCC6lgKXs+sBlvVX8O FoIaX4GKgVLo5ODEmrqpHqr23M5i7/yvpKLok0BhrOuVVHr0q29X4aaS2yfDy1KDTbZ7 UjWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=eL4wSCFZ; 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 z21si766162plo.317.2019.03.05.23.15.57; Tue, 05 Mar 2019 23:16:12 -0800 (PST) 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=eL4wSCFZ; 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 S1729383AbfCFHPD (ORCPT + 99 others); Wed, 6 Mar 2019 02:15:03 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50473 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729299AbfCFHPB (ORCPT ); Wed, 6 Mar 2019 02:15:01 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190306071459euoutp019ce0a6474dbaba6503f330c691642da9~JTUOpKd3D1580915809euoutp01m for ; Wed, 6 Mar 2019 07:14:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190306071459euoutp019ce0a6474dbaba6503f330c691642da9~JTUOpKd3D1580915809euoutp01m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1551856499; bh=2Vp5Su1aejLRO7gL1QYmoYAYjCNLauRaJSt3asUz014=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=eL4wSCFZCUDC/MByKDvP46PDcbzFTd05U+q02nCBgaiRg8th3eeWz4mlef0NXjPX8 qjgqmPTt00Ev/VSXdcZ1nukbF8637ob50qO/mNkHIc4bWICXqc7WDcQWpjn6ALSZYC dwN49UQ8egEQuRKgs/jESx/Kc29mBJ539jjJkk3A= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190306071458eucas1p1be64464c08951f29d255421726517a68~JTUNzqyc_0106301063eucas1p1m; Wed, 6 Mar 2019 07:14:58 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id D6.9A.04806.2737F7C5; Wed, 6 Mar 2019 07:14:58 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190306071457eucas1p17f62f1ed8ed3304e7db7f0d20416f1f3~JTUMzcZrc0106401064eucas1p1O; Wed, 6 Mar 2019 07:14:57 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190306071457eusmtrp248d15a28c8cfeeb65505ac813349bc2d~JTUMkh7XM0539305393eusmtrp2T; Wed, 6 Mar 2019 07:14:57 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-10-5c7f7372b37e Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 8E.D0.04284.1737F7C5; Wed, 6 Mar 2019 07:14:57 +0000 (GMT) Received: from [106.120.51.20] (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190306071456eusmtip1077561c3ef1ba02c76ab68a43a7ddfac~JTUMAQ8Gi1829518295eusmtip1j; Wed, 6 Mar 2019 07:14:56 +0000 (GMT) Subject: Re: [PATCH v5 4/8] dt-bindings: devfreq: add Exynos5422 DMC device description To: Chanwoo Choi , 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, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, myungjoo.ham@samsung.com From: Lukasz Luba Message-ID: <1800b874-75c3-420d-71df-9b9a8e7ad1c8@partner.samsung.com> Date: Wed, 6 Mar 2019 08:14:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <3f413631-1a6f-61f7-58aa-38df3e2ffea4@samsung.com> Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBKsWRmVeSWpSXmKPExsWy7djPc7pFxfUxBk/XSVtsnLGe1eL6l+es FvOPnGO16H/8mtni/PkN7BZnm96wW1zeNYfN4nPvEUaLGef3MVmsPXKX3eJ24wo2i8Nv2lkd eDw2repk8+jbsorR4/MmuQDmKC6blNSczLLUIn27BK6MaW0P2Qtu2lbsvTmZtYFxsUEXIyeH hICJxJVJfYxdjFwcQgIrGCW+tj5mhXC+MErs6b3EBFIlJPCZUWLSf9MuRg6wjnOzVSFqljNK dB2YDtXwllFie895RpAGYYFIiTXHGthAEiICixklpq78zQTiMAusYpTYPHUVI8goNgE9iR2r CkEaeAXcJP72PgFrZhFQkdh4eB8ziC0qECFxuPcdI0SNoMTJmU9YQGxOAXuJ3mlvwWqYBcQl bj2ZzwRhy0s0b53NDLJLQuAcu8Tvv7PZIB51kdjYvpYJwhaWe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nJhbXJqXrpecn7uJERiR24793LyD8dLG4EOMAhyM Sjy8E1rrYoRYE8uKK3MPMUpwMCuJ8Hpm1ccI8aYkVlalFuXHF5XmpBYfYjQFem4is5Rocj4w WeSVxBuaGppbWBqaG5sbm1koifOeN6iMEhJITyxJzU5NLUgtgulj4uCUamCcNT/weMlpZpUf MZYbHKO8Kss/ebFe5PRZrPyMwb1tc+jenI1Lw1+3SjZp8bifYNts/OWb9nKb10Wxf0zawusZ Jv1NXlZ/Nc639HJ8qfn0bb9Fzd+eFCos0P2dsHv6lFx11ldRC/fkbDz5nElm1fOuTV8cXs/s vL4iYD37qpgrM1OP+aoYVoUqsRRnJBpqMRcVJwIADU1wEt4CAAA= X-CMS-MailID: 20190306071457eucas1p17f62f1ed8ed3304e7db7f0d20416f1f3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190305101926eucas1p2eee36b9cb50cbcf511fab7bae59e24bb X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190305101926eucas1p2eee36b9cb50cbcf511fab7bae59e24bb References: <1551781151-5562-1-git-send-email-l.luba@partner.samsung.com> <1551781151-5562-5-git-send-email-l.luba@partner.samsung.com> <3f413631-1a6f-61f7-58aa-38df3e2ffea4@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chanwoo, On 3/6/19 5:18 AM, Chanwoo Choi wrote: > Hi Lukasz, > > On 19. 3. 5. 오후 7:19, Lukasz Luba wrote: >> The patch adds description for DT binding for a new Exynos5422 Dynamic >> Memory Controller device. >> >> Signed-off-by: Lukasz Luba >> --- >> .../devicetree/bindings/devfreq/exynos5422-dmc.txt | 177 +++++++++++++++++++++ >> 1 file changed, 177 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/devfreq/exynos5422-dmc.txt >> >> diff --git a/Documentation/devicetree/bindings/devfreq/exynos5422-dmc.txt b/Documentation/devicetree/bindings/devfreq/exynos5422-dmc.txt >> new file mode 100644 >> index 0000000..0e73e98 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/devfreq/exynos5422-dmc.txt >> @@ -0,0 +1,177 @@ >> +* Exynos5422 frequency and voltage scaling for Dynamic Memory Controller device >> + >> +The Samsung Exynos5422 SoC has DMC (Dynamic Memory Controller) to which the DRAM >> +memory chips are connected. The driver is to monitor the controller in runtime >> +and switch frequency and voltage. To monitor the usage of the controller in >> +runtime, the driver uses the PPMU (Platform Performance Monitoring Unit), which >> +is able to measure the current load of the memory. >> +When 'userspace' governor is used for the driver, an application is able to >> +switch the DMC frequency. >> + >> +Required properties for DMC device for Exynos5422: >> +- compatible: Should be "samsung,exynos5422-bus". >> +- clock-names : the name of clock used by the bus, "bus". >> +- clocks : phandles for clock specified in "clock-names" property. >> +- devfreq-events : phandles for PPMU devices connected to this DMC. > > > I already replied with following comments on v4 patch[1]. > But, you didn't reply anything. We can reduce the duplicate > review by keeping the basic review rule. I have lost these changes while I was adding the OPPs, timings into the dt-binding. > > - Re: [PATCH v4 5/8] dt-bindings: devfreq: add Exynos5422 DMC device description > [1] https://do-db2.lkml.org/lkml/2019/2/3/64 > > > [Following comments were replied on v4 patch[1]] > >> +- compatible: Should be "samsung,exynos5422-bus". > > The compatible name is wrong. > - exynos5422-bus -> exynos5422-dmc > >> +- clock-names : the name of clock used by the bus, "bus". > > 'bus' is right? right > >> +- clocks : phandles for clock specified in "clock-names" property. >> +- devfreq-events : phandles for PPMU devices connected to this DMC. > > The dt-binging file doesn't contain the any description for 'reg' properties. There are 3 regs: cdrex0, cdrex1, chip_id. I will add this description. The patch set has this OPPs and timings coming from DT as you requested but I am not sure if it is in the right place in the DT. Thus dt-binding you may consider as 'in-progress' till the DT entries are fixed Regards, Lukasz > > > >> + >> +The example definition of a DMC and PPMU devices declared in DT is shown below: >> + >> + ppmu_dmc0_0: ppmu@10d00000 { >> + compatible = "samsung,exynos-ppmu"; >> + reg = <0x10d00000 0x2000>; >> + clocks = <&clock CLK_PCLK_PPMU_DREX0_0>; >> + clock-names = "ppmu"; >> + status = "okay"; >> + events { >> + ppmu_event_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"; >> + status = "okay"; >> + events { >> + ppmu_event_dmc0_1: ppmu-event3-dmc0_1 { >> + event-name = "ppmu-event3-dmc0_1"; >> + }; >> + }; >> + }; >> + >> + ppmu_dmc1_0: ppmu@10d10000 { >> + compatible = "samsung,exynos-ppmu"; >> + reg = <0x10d60000 0x2000>; >> + clocks = <&clock CLK_PCLK_PPMU_DREX1_0>; >> + clock-names = "ppmu"; >> + status = "okay"; >> + events { >> + ppmu_event_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"; >> + status = "okay"; >> + events { >> + ppmu_event_dmc1_1: ppmu-event3-dmc1_1 { >> + event-name = "ppmu-event3-dmc1_1"; >> + }; >> + }; >> + }; >> + >> + dmc: memory-controller@10c20000 { >> + compatible = "samsung,exynos5422-dmc"; >> + reg = <0x10c20000 0x10000>, <0x10c30000 0x10000>, >> + <0x10000000 0x1000>; >> + 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 CLK_DOUT_CLK2X_PHY0>, >> + <&clock CLK_CLKM_PHY0>, >> + <&clock CLK_CLKM_PHY1>, >> + <&clock CLK_CDREX_PAUSE>, >> + <&clock CLK_CDREX_TIMING_SET>; >> + 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", >> + "dout_clk2x_phy0", >> + "clkm_phy0", >> + "clkm_phy1", >> + "clk_cdrex_pause", >> + "clk_cdrex_timing_set"; >> + status = "okay"; >> + operating-points-v2 = <&dmc_opp_table>; >> + devfreq-events = <&ppmu_dmc0_0>, <&ppmu_dmc0_1>, >> + <&ppmu_dmc1_0>, <&ppmu_dmc1_1>; >> + }; >> + >> +The needed timings of DRAM memory are stored in dedicated nodes. >> +There are two nodes with regular timings and for bypass mode. >> + >> + dmc_bypass_mode: bypass_mode { >> + compatible = "samsung,dmc-bypass-mode"; >> + >> + freq-hz = <400000000>; >> + volt-uv = <887500>; >> + dram-timing-row = <0x365a9713>; >> + dram-timing-data = <0x4740085e>; >> + dram-timing-power = <0x543a0446>; >> + }; >> + >> + dram_timing: timing { >> + compatible = "samsung,dram-timing"; >> + >> + dram-timing-names = "165MHz", "206MHz", "275MHz", "413MHz", >> + "543MHz", "633MHz", "728MHz", "825MHz"; >> + dram-timing-row = <0x11223185>, <0x112331C6>, <0x12244287>, >> + <0x1B35538A>, <0x244764CD>, <0x2A48758F>, >> + <0x30598651>, <0x365A9713>; >> + dram-timing-data = <0x2720085E>, <0x2720085E>, <0x2720085E>, >> + <0x2720085E>, <0x3730085E>, <0x3730085E>, >> + <0x3730085E>, <0x4740085E>; >> + dram-timing-power = <0x140C0225>, <0x180F0225>, <0x1C140225>, >> + <0x2C1D0225>, <0x38270335>, <0x402D0335>, >> + <0x4C330336>, <0x543A0446>; >> + }; >> + >> +The frequencies supported by the DMC are stored in OPP table v2. >> + >> + 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>; >> + }; >> + }; >> + >> > >