Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1946413ybm; Thu, 23 May 2019 09:02:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqP++AdoaWhLH1Fi/o6CGVQwWBNQaGwObJmmbx2xCkFVjtdrihrhSJtixzCDYXGCe1AwE6 X-Received: by 2002:a63:5c45:: with SMTP id n5mr55816831pgm.172.1558627328055; Thu, 23 May 2019 09:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558627328; cv=none; d=google.com; s=arc-20160816; b=yvvYrWHBiMoPk1qmT34Zg3rs9tSZdSqFBRISvA8bNb5RxoBOxMfT7nyet+VGUl8Z9U v9ySp38gJvydksIAL2GD+sCm+wpaJJhhLbq6QYYpmbjRGp4QkycK5LtZKIJoUNqpNidG /DRCBFE88GAjK/1hr3Zi2ZFDXohk/OxOqFTrOxf/1jcMHUUltaEpg9jghxPFu8kOLk8S qC/Gv7NSkPAXl0KmZqoQQA7i3xxv2q60cyejSrUFQM1Y+aGDFYz3UYoZduFuwuopneLs HIxCUMwoFv/CpPNAKWKctkiaLTebLTpxlm2d7ReVsEp+JjsR77kOgGtJq4Iv8VAQQg4A aDBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:autocrypt :openpgp:from:references:cc:to:subject:dkim-signature; bh=814odXxcuVfRati0gurkRFNz500nIRSYGE0iZM3L0Ng=; b=yVLmC8iHkyZHlodkQavTcF4tcKZQ75kLijpGsf0tzT5FUTowwzJiroAue6ZZQZyjIi 7ed8ywl93W6GF23VFqIv/zA9P6uKSqaAAGfJTL6avBYCQwD83mbeXTVtMPhWYJWmA/CM bGtZClhKsx+xUapVyz3Sa/T0xlN34sHWmkUL0pRAvHALjbLFMs2iDUH2iDRhpwbGVtvC icQFawWjL0uHvn0VhCO+W+nSL4B4oFQLvuBurFoej7DRplqSgkI8oK19pAKa6ngpf89l mFTgd6HmUpwUmBupeYP9ov6+Z26CFsljusExKOAxadvWpoOcdP4WwLFb6z6KSAIRkG4I zeCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ageej1MS; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si30812605pgm.551.2019.05.23.09.01.49; Thu, 23 May 2019 09:02:08 -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=@linaro.org header.s=google header.b=Ageej1MS; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731181AbfEWP6z (ORCPT + 99 others); Thu, 23 May 2019 11:58:55 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45447 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731163AbfEWP6y (ORCPT ); Thu, 23 May 2019 11:58:54 -0400 Received: by mail-lf1-f65.google.com with SMTP id n22so4773703lfe.12 for ; Thu, 23 May 2019 08:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=814odXxcuVfRati0gurkRFNz500nIRSYGE0iZM3L0Ng=; b=Ageej1MS07LK+EGbOwJeeZnHugvJ2fp8glfAPww4ixElzxf7Mr9k2u3Mrabn3FHQUH 6SO7ORaAoUQeMS/Ib6Jl+nwx3QQAX0PLJpWHFwC/5HtQRVID9SLQlvX7gW7ilcysorAR A+cR1aXqoTu1wpK+PtW6Ijizg+zeJiF6Oc3y9NKLtVw2t4RFENGr5XhLiidgTWI2kqjs PIPdiyY4xg9HDeqVu1M6xogSrHQPgl5Y7RjoiNsU6Lem3maqXBls43ZlALdMseQC0soh qT86xHUKoGeN1JHZryZcT3CdO7vl+5N9A0Ym+LwtzsGFDst88ctcyGNcvFIDB7+5tCKe oRZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=814odXxcuVfRati0gurkRFNz500nIRSYGE0iZM3L0Ng=; b=Bopi7Po6B1SMEXB5mPgcCxsGUKVSbKZlwHAdGVyKCLuS1jcpjW9kp7dwWybw0v6358 Ya2Nq9iqvF+UJcTkasA6YW+hZ6rILdjNWNYMu59c7HTnpzUfh/ahe0e3fDx+vlro0OeS Ydfo2ylaSnjkklNBy8+Dya5fKNCzqTbluU7AwhkWQgabLZ9atgivMJS6LfF7HU2ESbS/ bMxOv2TkSp9KyfI6NUpnWCb4J79kg38+TXCLv4v8gvNIVrahw/lnNYLUYu/1GNd9yn9s 2F6r+1qwxM+ovf1WaC2QPiNamyRPgEvq4BCi8+ii50Ow9DlWjs2H6TwnJNp2NeWSt2nk 2XyQ== X-Gm-Message-State: APjAAAXQQe0Qsik/yoaXHFNXlIydh41AJKYmo00wEgjh5Vb3bAHngYZi /Wsu/AM9bAY2MuJ57GC9wlLPKw== X-Received: by 2002:ac2:4286:: with SMTP id m6mr6324069lfh.150.1558627131672; Thu, 23 May 2019 08:58:51 -0700 (PDT) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id r27sm385711lfp.73.2019.05.23.08.58.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 08:58:51 -0700 (PDT) Subject: Re: [PATCH v2 4/4] dt-bindings: interconnect: qcs404: Introduce qcom,qos DT property To: Bjorn Andersson , robh+dt@kernel.org Cc: vkoul@kernel.org, evgreen@chromium.org, daidavid1@codeaurora.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20190415104357.5305-1-georgi.djakov@linaro.org> <20190415104357.5305-5-georgi.djakov@linaro.org> <20190418225150.GN27005@builder> From: Georgi Djakov Openpgp: preference=signencrypt Autocrypt: addr=georgi.djakov@linaro.org; prefer-encrypt=mutual; keydata= mQINBFjTuRcBEACyAOVzghvyN19Sa/Nit4LPBWkICi5W20p6bwiZvdjhtuh50H5q4ktyxJtp 1+s8dMSa/j58hAWhrc2SNL3fttOCo+MM1bQWwe8uMBQJP4swgXf5ZUYkSssQlXxGKqBSbWLB uFHOOBTzaQBaNgsdXo+mQ1h8UCgM0zQOmbs2ort8aHnH2i65oLs5/Xgv/Qivde/FcFtvEFaL 0TZ7odM67u+M32VetH5nBVPESmnEDjRBPw/DOPhFBPXtal53ZFiiRr6Bm1qKVu3dOEYXHHDt nF13gB+vBZ6x5pjl02NUEucSHQiuCc2Aaavo6xnuBc3lnd4z/xk6GLBqFP3P/eJ56eJv4d0B 0LLgQ7c1T3fU4/5NDRRCnyk6HJ5+HSxD4KVuluj0jnXW4CKzFkKaTxOp7jE6ZD/9Sh74DM8v etN8uwDjtYsM07I3Szlh/I+iThxe/4zVtUQsvgXjwuoOOBWWc4m4KKg+W4zm8bSCqrd1DUgL f67WiEZgvN7tPXEzi84zT1PiUOM98dOnmREIamSpKOKFereIrKX2IcnZn8jyycE12zMkk+Sc ASMfXhfywB0tXRNmzsywdxQFcJ6jblPNxscnGMh2VlY2rezmqJdcK4G4Lprkc0jOHotV/6oJ mj9h95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eHNhtZJcMAIO89wZmj 7ayYJIXFqjl/X0KBcCbiAl4vbdBw1bqFnO4zd1lMXKVoa29UHqby4MPbQhjWNVv9kqp8A39+ E9xw890l1xdERkjVKX6IEJu2hf7X3MMl9tOjBK6MvdOUxvh1bNNmXh7OlBL1MpJYY/ydIm3B KEmKjLDvB0pePJkdTw== Message-ID: Date: Thu, 23 May 2019 18:58:47 +0300 MIME-Version: 1.0 In-Reply-To: <20190418225150.GN27005@builder> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn and Rob, On 4/19/19 01:51, Bjorn Andersson wrote: > On Mon 15 Apr 03:43 PDT 2019, Georgi Djakov wrote: > >> There are separate hardware blocks per each interconnect that allow QoS >> configuration to be applied to each port (node). There are different kinds of >> priorities that could be set on these ports. Each port supports also various >> QoS modes such as "fixed", "limiter", "bypass" and "regulator". Depending on >> the mode, there are a few additional knobs that could be configured. >> >> Introduce the qcom,qos property, so that we describe this relation in DT and >> allow the interconnect provider drivers can make use of it. >> > > As the example shows we will end up with two nodes describing the same > hardware with pretty much identical set of properties. I am still split and hesitant about what would be the best way to represent this in DT and it would be nice to reach some conclusion. So the idea is that the QoS driver could be a standalone driver that does some static QoS configuration. The clocks i have listed in the example below are not the same, sorry. We should list there some of the interface clocks that need to be enabled before configuring the port priorities instead. For example USB or UFS axi clock and not the NoC clocks. This makes the DT properties of the two nodes different. Оn one side we collect bandwidth requests and send them to the remote processor (RPM) and each NoC is represented in DT as child of RPM (like the rpm controlled regulators and clocks). On the other side we also have the mmio registers for configuring port priorities that may fit in DT under soc {} with their mmio registers and a list of iface clocks. > I really do think it's better to represent and implement the NoC > controllers on the mmio/platform bus and have a small "proxy" as a child > of the RPM. > > By doing this you avoid the duplication of the clock properties and you > don't need the qcom,qos reference to pair up each "bus performance > driver" to the "bus qos driver". The clock properties would contain different set of clocks - NoC clocks for the DT nodes in rpm {} and the iface clocks for the QoS DT nodes in soc {}. > And you still maintain the idea that the entity you request bandwidth > votes with are the NoC controller (which also will be the QoS > controller). I assume that the entities are the NoC controllers that we talk to through the RPM. Thanks, Georgi > > Regards, > Bjorn > >> Signed-off-by: Georgi Djakov >> --- >> >> v2: >> - New patch. >> >> .../bindings/interconnect/qcom,qcs404.txt | 31 +++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.txt b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.txt >> index 9befcd14a5b5..b971e0ee2963 100644 >> --- a/Documentation/devicetree/bindings/interconnect/qcom,qcs404.txt >> +++ b/Documentation/devicetree/bindings/interconnect/qcom,qcs404.txt >> @@ -11,9 +11,37 @@ Required properties : >> Optional properties : >> clocks : list of phandles and specifiers to all interconnect bus clocks >> clock-names : clock names should include both "bus_clk" and "bus_a_clk" >> +qcom,qos : phandle to the QoS device-tree node >> >> Example: >> >> +soc { >> + ... >> + bimc_qos: interconnect@400000 { >> + compatible = "qcom,qcs404-bimc-qos"; >> + reg = <0x400000 0x80000>; >> + clock-names = "bus_clk", "bus_a_clk"; >> + clocks = <&rpmcc RPM_SMD_BIMC_CLK>, >> + <&rpmcc RPM_SMD_BIMC_A_CLK>; >> + }; >> + >> + pcnoc_qos: interconnect@500000 { >> + compatible = "qcom,qcs404-pcnoc-qos"; >> + reg = <0x500000 0x15080>; >> + clock-names = "bus_clk", "bus_a_clk"; >> + clocks = <&rpmcc RPM_SMD_PNOC_CLK>, >> + <&rpmcc RPM_SMD_PNOC_A_CLK>; >> + }; >> + >> + snoc_qos: interconnect@580000 { >> + compatible = "qcom,qcs404-snoc-qos"; >> + reg = <0x580000 0x14000>; >> + clock-names = "bus_clk", "bus_a_clk"; >> + clocks = <&rpmcc RPM_SMD_SNOC_CLK>, >> + <&rpmcc RPM_SMD_SNOC_A_CLK>; >> + }; >> +}; >> + >> rpm-glink { >> ... >> rpm_requests: glink-channel { >> @@ -24,6 +52,7 @@ rpm-glink { >> clock-names = "bus_clk", "bus_a_clk"; >> clocks = <&rpmcc RPM_SMD_BIMC_CLK>, >> <&rpmcc RPM_SMD_BIMC_A_CLK>; >> + qcom,qos = <&bimc_qos>; >> }; >> >> pnoc: interconnect@1 { >> @@ -32,6 +61,7 @@ rpm-glink { >> clock-names = "bus_clk", "bus_a_clk"; >> clocks = <&rpmcc RPM_SMD_PNOC_CLK>, >> <&rpmcc RPM_SMD_PNOC_A_CLK>; >> + qcom,qos = <&pcnoc_qos>; >> }; >> >> snoc: interconnect@2 { >> @@ -40,6 +70,7 @@ rpm-glink { >> clock-names = "bus_clk", "bus_a_clk"; >> clocks = <&rpmcc RPM_SMD_SNOC_CLK>, >> <&rpmcc RPM_SMD_SNOC_A_CLK>; >> + qcom,qos = <&snoc_qos>; >> }; >> }; >> };