From patchwork Thu Sep 1 22:31:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 9310069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B89B6607D6 for ; Thu, 1 Sep 2016 22:41:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E38F2951E for ; Thu, 1 Sep 2016 22:41:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 628612955C; Thu, 1 Sep 2016 22:41:23 +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=-3.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC2B92951E for ; Thu, 1 Sep 2016 22:41:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bfaeA-0005dU-K3; Thu, 01 Sep 2016 22:39:46 +0000 Received: from mail-pa0-f68.google.com ([209.85.220.68]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bfaWY-0005xP-Rv; Thu, 01 Sep 2016 22:32:11 +0000 Received: by mail-pa0-f68.google.com with SMTP id ez1so4708920pab.3; Thu, 01 Sep 2016 15:31:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LBQux7xsZpiGHKplDXZA9YIqantwEJ5ujf2JWre6wio=; b=jXuZz5gWHPZQW3pcfpz2j/RHixTw5CS263gMqrRKkjMEYPoFl+7swrr+qBOQ2li45c 60401OA5dTjsoYdHJzEWqU4rPxqAwKTgeSiTNuJvrFVNzFL7dHjdvrMYWNzR4tSUDFb8 fVYR+ud12jekHy5mizF5Kk1htmInEWNvvf7rzcW8vJanXvGiUtqaCKi4ZdceYT12pFJ1 gN7+oyuf0x0JQntoBOZAPnSoUuQwKH9j2S0K34KrNu2fOzlCmaLASnUIj3J6ywlhukVZ oobmBeIfiRKSmNKOE+wlLyN1EGrGzdoTGIsbjskVMUNDsHOe1/z8LFvfyqkM9t/xyKYS ZuZg== X-Gm-Message-State: AE9vXwMUXbrRW9vrLnXH+m8ZVWeJ8u+MhphR8NwOcRMneGuAunQGppkZyGnhLhCYBmEdtw== X-Received: by 10.66.21.167 with SMTP id w7mr30873933pae.62.1472769093429; Thu, 01 Sep 2016 15:31:33 -0700 (PDT) Received: from hl-ThinkPad-X240.corp.google.com ([172.22.52.196]) by smtp.gmail.com with ESMTPSA id k9sm9897400pfj.63.2016.09.01.15.31.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Sep 2016 15:31:32 -0700 (PDT) From: Lin Huang To: heiko@sntech.de Subject: [PATCH 3/5] Documentation: bindings: add dt documentation for rk3399 dmc Date: Fri, 2 Sep 2016 06:31:23 +0800 Message-Id: <1472769085-20715-4-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472769085-20715-1-git-send-email-hl@rock-chips.com> References: <1472769085-20715-1-git-send-email-hl@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160901_153155_424839_CD152696 X-CRM114-Status: GOOD ( 15.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tixy@linaro.org, mark.rutland@arm.com, devicetree@vger.kernel.org, typ@rock-chips.com, Lin Huang , linux-rockchip@lists.infradead.org, airlied@linux.ie, mturquette@baylibre.com, dbasehore@chromium.org, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, dianders@chromium.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, myungjoo.ham@samsung.com, sudeep.holla@arm.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.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 the documentation for rockchip rk3399 dmc driver. Signed-off-by: Lin Huang --- Changes in v8: - add ddr timing properties Changes in v7: -None Changes in v6: -Add more detail in Documentation Changes in v5: -None Changes in v4: -None Changes in v3: -None Changes in v2: -None Changes in v1: -None .../devicetree/bindings/devfreq/rk3399_dmc.txt | 173 +++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt diff --git a/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt new file mode 100644 index 0000000..1f39b5cb --- /dev/null +++ b/Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt @@ -0,0 +1,173 @@ +* Rockchip rk3399 DMC(Dynamic Memory Controller) device + +Required properties: +- compatible: Must be "rockchip,rk3399-dmc". +- devfreq-events: Node to get DDR loading, Refer to + Documentation/devicetree/bindings/devfreq/ + rockchip-dfi.txt +- interrupts: The interrupt number to the CPU. The interrupt + specifier format depends on the interrupt controller. + It should be DCF interrupts, when DDR dvfs finish, + it will happen. +- clocks: Phandles for clock specified in "clock-names" property +- clock-names : The name of clock used by the DFI, must be + "pclk_ddr_mon"; +- operating-points-v2: Refer to Documentation/devicetree/bindings/power/opp.txt + for details. +- center-supply: DMC supply node. +- status: Marks the node enabled/disabled. + +Following properties are ddr timing: + +- dram_speed_bin : Value is defined at include/dt-bindings/clock/ddr.h, + it select ddr3 cl-trp-trcd type, default value + "DDR3_DEFAULT".it must selected according to + "Speed Bin" in ddr3 datasheet, DO NOT use smaller + "Speed Bin" than ddr3 exactly is. + +- pd_idle : Config the PD_IDLE value, defined the power-down idle + period, memories are places into power-down mode if + bus is idle for PD_IDLE DFI clocks. + +- sr_idle : Configure the SR_IDLE value, defined the selfrefresh + idle period, memories are places into self-refresh + mode if bus is idle for SR_IDLE*1024 DFI clocks + (DFI clocks freq is half of dram's clocks), defaule + value is "0". + +- sr_mc_gate_idle : Defined the self-refresh with memory and controller + clock gating idle period, memories are places into + self-refresh mode and memory controller clock arg + gating if bus is idle for sr_mc_gate_idle*1024 DFI + clocks. + +- srpd_lite_idle : Defined the self-refresh power down idle period, + memories are places into self-refresh power down + mode if bus is idle for srpd_lite_idle*1024 DFI + clocks. This parameter is for LPDDR4 only. + +- standby_idle : Defined the standby idle period, memories are places + into self-refresh than controller, pi, phy and dram + clock will gating if bus is idle for + standby_idle * DFI clocks. + +- dram_dll_disb_freq : It's defined the DDR3 dll bypass frequency in MHz + when ddr freq less than DRAM_DLL_DISB_FREQ, ddr3 + dll will bypssed note: if dll was bypassed, the + odt also stop working. + +- phy_dll_disb_freq : Defined the PHY dll bypass frequency in MHz (Mega Hz), + when ddr freq less than DRAM_DLL_DISB_FREQ, phy dll + will bypssed. note: phy dll and phy odt are + independent + +- ddr3_odt_disb_freq : When dram type is DDR3, this parameter defined the + odt disable frequency in MHz (Mega Hz), when ddr + frequency less then ddr3_odt_disb_freq, the odt + on dram side and controller side are both disabled. + +- ddr3_drv : When dram type is DDR3, this parameter define the + dram side driver stength in ohm, default value is + DDR3_DS_40ohm. + +- ddr3_odt : When dram type is DDR3, this parameter define the + dram side ODT stength in ohm, default value is + DDR3_ODT_120ohm. + +- phy_ddr3_ca_drv : When dram type is DDR3, this parameter define the phy + side CA line(incluing command line, address line and + clock line) driver strength. default value is + PHY_DRV_ODT_40. + +- phy_ddr3_dq_drv : When dram type is DDR3, this parameter define the phy + side DQ line(incluing DQS/DQ/DM line) driver strength. + default value is PHY_DRV_ODT_40. + +- phy_ddr3_odt : When dram type is DDR3, this parameter define the + phy side odt strength, default value is + PHY_DRV_ODT_240. + +- lpddr3_odt_disb_freq : When dram type is LPDDR3, this parameter defined then + odt disable frequency in MHz (Mega Hz), when ddr + frequency less then ddr3_odt_disb_freq, the odt on + dram side and controller side are both disabled. + +- lpddr3_drv : When dram type is LPDDR3, this parameter define the + dram side driver stength in ohm, default value is + LP3_DS_34ohm. + +- lpddr3_odt : When dram type is LPDDR3, this parameter define the + dram side ODT stength in ohm, default value is + LP3_ODT_240ohm. + +- phy_lpddr3_ca_drv : When dram type is LPDDR3, this parameter define the + phy side CA line(incluing command line, address line + and clock line) driver strength. default value is + PHY_DRV_ODT_40. + +- phy_lpddr3_dq_drv : When dram type is LPDDR3, this parameter define the + phy side DQ line(incluing DQS/DQ/DM line) driver + strength. default value is PHY_DRV_ODT_40. + +- phy_lpddr3_odt : When dram type is LPDDR3, this parameter define the phy + side odt strength, default value is PHY_DRV_ODT_240. + +- lpddr4_odt_disb_freq : When dram type is LPDDR4, this parameter defined the + odt disable frequency in MHz (Mega Hz), when ddr + frequency less then ddr3_odt_disb_freq, the odt on + dram side and controller side are both disabled. + +- lpddr4_drv : When dram type is LPDDR4, this parameter define the + dram side driver stength in ohm, default value is + LP4_PDDS_60ohm. + +- lpddr4_dq_odt : When dram type is LPDDR4, this parameter define the + dram side ODT on dqs/dq line stength in ohm, default + value is LP4_DQ_ODT_40ohm. + +- lpddr4_ca_odt : When dram type is LPDDR4, this parameter define the + dram side ODT on ca line stength in ohm, default value + is LP4_CA_ODT_40ohm. + +- phy_lpddr4_ca_drv : When dram type is LPDDR4, this parameter define the + phy side CA line(incluing command address line) + driver strength. default value is PHY_DRV_ODT_40. + +- phy_lpddr4_ck_cs_drv : When dram type is LPDDR4, this parameter define the + phy side clock line and cs line driver strength. + default value is PHY_DRV_ODT_80. + +- phy_lpddr4_dq_drv : When dram type is LPDDR4, this parameter define the + phy side DQ line(incluing DQS/DQ/DM line) driver + strength. default value is PHY_DRV_ODT_80. + +- phy_lpddr4_odt : When dram type is LPDDR4, this parameter define the + phy side odt strength, default value is PHY_DRV_ODT_60. + +Example: + dmc_opp_table: dmc_opp_table { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <900000>; + }; + opp01 { + opp-hz = /bits/ 64 <666000000>; + opp-microvolt = <900000>; + }; + }; + + dmc: dmc { + compatible = "rockchip,rk3399-dmc"; + devfreq-events = <&dfi>; + interrupts = ; + clocks = <&cru SCLK_DDRCLK>; + clock-names = "dmc_clk"; + operating-points-v2 = <&dmc_opp_table>; + center-supply = <&ppvar_centerlogic>; + upthreshold = <15>; + downdifferential = <10>; + status = "disabled"; + }; +