From patchwork Tue Apr 23 13:28:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 10912989 X-Patchwork-Delegate: viresh.linux@gmail.com 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 AE1E51390 for ; Tue, 23 Apr 2019 13:29:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A06D2286F2 for ; Tue, 23 Apr 2019 13:29:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9477D2873A; Tue, 23 Apr 2019 13:29:10 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38E1F286F2 for ; Tue, 23 Apr 2019 13:29:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728056AbfDWN3J (ORCPT ); Tue, 23 Apr 2019 09:29:09 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:44413 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727754AbfDWN2b (ORCPT ); Tue, 23 Apr 2019 09:28:31 -0400 Received: by mail-lj1-f194.google.com with SMTP id h16so959719ljg.11 for ; Tue, 23 Apr 2019 06:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3r+b8+ekNVHte2QeCZMZAWdkAU7CdygGrtvnF2S4meU=; b=lfCNfDiQGJnwV59072TgSQ/QI0Z22D8koaXNkdIjyMEzEPlQgEmHSAJSJkTSafGn/5 giGeB/hmkrFAmAPPNycokb+0Ds1tdk66Bbbdt5LDNso09R37cP9YqBmcqN4pg3ExcM7O rrOnBQLJT/B/auJOE/0fAjshwXn+mN0IHe22TUkmKy6MQHLE9HOfKLEqwnz44Fd9mhhY FFHUbj8SN6LXo4m51LYKVmGdaqLDbFFlYarUWbUQ6tXdFywNb7hIyfwTT7K8eVyRE8l4 NG60sR2bSizrP7APx+c31+9Sax/MyyYkRLHimkZoBkdm6OjnoHSuU55AhNquY90FDcTJ juJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3r+b8+ekNVHte2QeCZMZAWdkAU7CdygGrtvnF2S4meU=; b=jqVxIFDjoctmHQ5jwAkKuPeGdOWBFKSkER0m4B56H3DsoVtDWz8fIo3yOV/NA9Mkg8 I5UBjlxncN22pRKTDn/V2rIi6Lw/ILvAK5tKGT6QtZJgnAB2FjHch6sCsSX8Kxk3A0qI 1JXpt+fhHWza7nKj6TUQ970oGMqRIj3lNHKkZ9vHyScA/sLM63xEH7SirgHJTw6BDUW6 XSTRT8VrR/SMrW19zrRFe7OW3Rh7c4Ts9KX4Uye/O8l0Qt4O7gyGlo5/gkxdaQkK+Amd GDIGSV+RgZwBhxemDpMKU7vUye48tAkFn7j/wbnLAiSX5GG+tRdOejugAS/AG+UaiBep wnlw== X-Gm-Message-State: APjAAAV0o2dVdCOvE8nYK6wrdsP7kOr3GTE/Yaxr8YcfFn1T5J/Bnbuy qCH6hY4foWao+MWdD8w86PjxAA== X-Google-Smtp-Source: APXvYqxcThCJ9co/aWID+yA6D6uqJUhZ5RwV+8mms/Umltv4wn/p5ZH/93HikDYzo6iztlgRRsk5fw== X-Received: by 2002:a2e:9348:: with SMTP id m8mr14019864ljh.23.1556026108454; Tue, 23 Apr 2019 06:28:28 -0700 (PDT) Received: from localhost.localdomain ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id y206sm4617107lfc.72.2019.04.23.06.28.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Apr 2019 06:28:27 -0700 (PDT) From: Georgi Djakov To: vireshk@kernel.org, sboyd@kernel.org, nm@ti.com, robh+dt@kernel.org, mark.rutland@arm.com, rjw@rjwysocki.net Cc: jcrouse@codeaurora.org, vincent.guittot@linaro.org, bjorn.andersson@linaro.org, amit.kucheria@linaro.org, seansw@qti.qualcomm.com, daidavid1@codeaurora.org, evgreen@chromium.org, sibis@codeaurora.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v2 1/5] dt-bindings: opp: Introduce bandwidth-MBps bindings Date: Tue, 23 Apr 2019 16:28:19 +0300 Message-Id: <20190423132823.7915-2-georgi.djakov@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190423132823.7915-1-georgi.djakov@linaro.org> References: <20190423132823.7915-1-georgi.djakov@linaro.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In addition to frequency and voltage, some devices may have bandwidth requirements for their interconnect throughput - for example a CPU or GPU may also need to increase or decrease their bandwidth to DDR memory based on the current operating performance point. Extend the OPP tables with additional property to describe the bandwidth needs of a device. The average and peak bandwidth values depend on the hardware and its properties. Signed-off-by: Georgi Djakov --- Documentation/devicetree/bindings/opp/opp.txt | 38 +++++++++++++++++++ .../devicetree/bindings/property-units.txt | 4 ++ 2 files changed, 42 insertions(+) diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index 76b6c79604a5..830f0206aea7 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -132,6 +132,9 @@ Optional properties: - opp-level: A value representing the performance level of the device, expressed as a 32-bit integer. +- bandwidth-MBps: The interconnect bandwidth is specified with an array containing + the two integer values for average and peak bandwidth in megabytes per second. + - clock-latency-ns: Specifies the maximum possible transition latency (in nanoseconds) for switching to this OPP from any other OPP. @@ -546,3 +549,38 @@ Example 6: opp-microvolt-, opp-microamp-: }; }; }; + +Example 7: bandwidth-MBps: +Average and peak bandwidth values for the interconnects between CPU and DDR +memory and also between CPU and L3 are defined per each OPP. Bandwidth of both +interconnects is scaled together with CPU frequency. + +/ { + cpus { + CPU0: cpu@0 { + compatible = "arm,cortex-a53", "arm,armv8"; + ... + operating-points-v2 = <&cpu_opp_table>; + /* path between CPU and DDR memory and CPU and L3 */ + interconnects = <&noc MASTER_CPU &noc SLAVE_DDR>, + <&noc MASTER_CPU &noc SLAVE_L3>; + }; + }; + + cpu_opp_table: cpu_opp_table { + compatible = "operating-points-v2"; + opp-shared; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + /* CPU<->DDR bandwidth: 457 MB/s average, 1525 MB/s peak */ + * CPU<->L3 bandwidth: 914 MB/s average, 3050 MB/s peak */ + bandwidth-MBps = <457 1525>, <914 3050>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + /* CPU<->DDR bandwidth: 915 MB/s average, 3051 MB/s peak */ + * CPU<->L3 bandwidth: 1828 MB/s average, 6102 MB/s peak */ + bandwidth-MBps = <915 3051>, <1828 6102>; + }; + }; diff --git a/Documentation/devicetree/bindings/property-units.txt b/Documentation/devicetree/bindings/property-units.txt index bfd33734faca..9c3dbefcdae8 100644 --- a/Documentation/devicetree/bindings/property-units.txt +++ b/Documentation/devicetree/bindings/property-units.txt @@ -41,3 +41,7 @@ Temperature Pressure ---------------------------------------- -kpascal : kiloPascal + +Throughput +---------------------------------------- +-MBps : megabytes per second