Received: by 10.223.176.5 with SMTP id f5csp600263wra; Fri, 2 Feb 2018 03:06:52 -0800 (PST) X-Google-Smtp-Source: AH8x225/+XyazSporNch8AR/Q2QopNqy0fxC3lCcn/WIp8yiwhOWR5iTD0A74btwZg08FdLvL3cx X-Received: by 10.99.115.94 with SMTP id d30mr22181348pgn.172.1517569612354; Fri, 02 Feb 2018 03:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517569612; cv=none; d=google.com; s=arc-20160816; b=ay86g2qB3OjGky2TEMLnG1CpnFwcqsCtq7PvG/FY/fbcSpBfNFZ0YIRwRkjnuU7Udx m1VdN/bw/UhmHpkztQCQoMDMkTkc/IyeetoxmQCY58U58q243bhwCMzvU4HYbaGFpmrW l/6ilpFNSZI1hySEGX3xsZZOfLHx2cIZGDfqpQZqJ5diVEXowZa4XC0p2TIBdGT+5zPI aCSiMi3HBfAy0WXucptegK9dPzwtIVCmTGytDmySzNywiuCuWmMJSZUh3MdViamqORlc WgozM0cWvSAotTei499+zBJBEv5ZVDWJyQRDgAnq/NDSMhWgf2bzq9XbDuE5a/uXyrVL bRPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=TGB/X/OEe+Ql2Tj7i8u5P5Fy+L+/IEWm7Pw46uf5sYI=; b=v2Zc2ZDlQ/BJCVv1IJ/EPmEx+u4+0DZVGX1CBU8FVvEC16AzPXg7LxYzTciNDd/Ij/ TcPHpBLBLKFrldw9DFIr5tBa2WjhHmZIAr3q9XPySaSJwAEAnXOm6bb3R2xbbjqUZXMY fze+98jPfiZrqxZNkcuogl/Whjyko4ItJy/lbUtRUSuk3o5/wMHNaP0yp9qAoop1m0Z6 pvxpG7MaAgsq1YPKFojIaYJac7f05DBMGrwADHEa9I3tdab6nCtoL5vHjpH4KCmLXy8y 76fD1RPAaCP9GVdDNVInlZy6KSDN+6gUb4lkdPAZI54S1abuIWW9r9ypK116X5UNVpGC z/Gg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o22si1514386pfi.277.2018.02.02.03.06.37; Fri, 02 Feb 2018 03:06:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751675AbeBBLFp (ORCPT + 99 others); Fri, 2 Feb 2018 06:05:45 -0500 Received: from foss.arm.com ([217.140.101.70]:58016 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750773AbeBBLFk (ORCPT ); Fri, 2 Feb 2018 06:05:40 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 24F711529; Fri, 2 Feb 2018 03:05:40 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9EDE13F24D; Fri, 2 Feb 2018 03:05:38 -0800 (PST) Date: Fri, 2 Feb 2018 11:05:32 +0000 From: Mark Rutland To: Channa Cc: linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-arm@lists.infradead.org, linux-kernel@vger.kernel.org, tsoni@codeaurora.org, sboyd@codeaurora.org, kyan@codeaurora.org Subject: Re: [PATCH 1/2] dt-bindings: Documentation for qcom,llcc Message-ID: <20180202110532.n2eez3zqbmf2jelr@lakrids.cambridge.arm.com> References: <1516924513-20183-1-git-send-email-ckadabi@codeaurora.org> <1516924513-20183-2-git-send-email-ckadabi@codeaurora.org> <20180201104434.7j27fl2hb4glqd3v@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 01, 2018 at 12:39:09PM -0800, Channa wrote: > On 2018-02-01 02:44, Mark Rutland wrote: > > On Thu, Jan 25, 2018 at 03:55:12PM -0800, Channagoud Kadabi wrote: > > > Documentation for last level cache controller device tree bindings, > > > client bindings usage examples. > > > > > > Signed-off-by: Channagoud Kadabi > > > --- > > > .../devicetree/bindings/arm/msm/qcom,llcc.txt | 93 > > > ++++++++++++++++++++++ > > > 1 file changed, 93 insertions(+) > > > create mode 100644 > > > Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt > > > > > > diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt > > > b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt > > > new file mode 100644 > > > index 0000000..d433b0c > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt > > > @@ -0,0 +1,93 @@ > > > +* LLCC (Last Level Cache Controller) > > > + > > > +Properties: > > > +- compatible: > > > + Usage: required > > > + Value type: > > > + Definition: must be "qcom,llcc-core" > > > + > > > +- reg: > > > + Usage: required > > > + Value Type: > > > + Definition: must be addresses and sizes of the LLCC registers > > > + > > > +- llcc-bank-off: > > > + Usage: required > > > + Value Type: > > > + Definition: Offsets of llcc banks from llcc base address starting > > > from > > > + LLCC bank0. > > > + > > > +- llcc-broadcast-off: > > > + Usage: required > > > + Value Type: > > > + Definition: Offset of broadcast register from LLCC bank0 address. > > > > Please could we use "offset" rather than "off" for both of these? That > > way it's obvious these aren't properties for disabling some feature. > > > > How variable are these offsets in practice? Is the memory map not fixed? > > The offsets depends on the number of LLCC HW blocks. These number of HW > blocks vary from > chipset to chipset and new registers could be added that changes the offset. Surely if new registers are added, we need a new compatible string? Can't we encode the number of LLCC HW blocks, instead? Presumably that would give enough information to cover both llcc-bank-off and llcc-broadcast-off. [...] > > > + > > > +compatible devices: > > > + qcom,sdm845-llcc > > > > Huh? The "qcom,sdm845-llcc" bindings wasn't described above, and it's > > not clear what this means. > > > > > + > > > +Example: > > > + > > > + qcom,system-cache@1300000 { > > > + compatible = "qcom,llcc-core", "syscon", "simple-mfd"; > > > > This looks very wrong. Why do you need syscon and simple-mfd? > > LLCC HW block has 3 functionalities: > System cache core, ECC & AMON drivers for debugging. > All three drivers use the same register space for configuration, status etc. > In order to avoid remapping the same address region across multiple drivers, > I have implemented this driver as a syncon and simple-mfd. Please don't do that; that's completely dependent on Linux implementation details. Have one top level driver for the whole LLCC block, which maps the registers, and provides an API for accessing them. When that probes, it can cause the other drivers to be probed (e.g. with a platform device), and those can access the LLCC registers via that API. > > > + reg = <0x1300000 0x50000>; > > > + reg-names = "llcc_base"; > > > + > > > + llcc: qcom,sdm845-llcc { > > > + compatible = "qcom,sdm845-llcc"; > > > > Why is this a sub-node? > qcom,sdm845-llcc: This core driver as mentioned in the list above. > > > > Why isn't the top-level node just "qcom,sdm845-llcc" ? > > > > > + #cache-cells = <1>; > > > + max-slices = <32>; > > > + }; > > > + > > > + qcom,llcc-ecc { > > > + compatible = "qcom,llcc-ecc"; > > > + }; > > qcom,llcc-ecc: Driver #2 for ECC > > > > + > > > + qcom,llcc-amon { > > > + compatible = "qcom,llcc-amon"; > > > + qcom,fg-cnt = <0x7>; > > > + }; > > > + > > qcom,llcc-amon: Driver #3 for AMON Please describe the HW, not the drivers. As above, I don't believe you need multiple nodes here. Linux can instantiate the drivers as necessary. [...] > > > +- cache-slices: > > > + Usage: required > > > + Value type: > > > + Definition: The tuple has phandle to llcc device as the first > > > argument and the > > > + second argument is the usecase id of the client. > > > > What is a "usecase id" ? > > Usecase id for use case that wants to use system cache for eg: video-encode > and video-decode Sure, but how is the value used? Is it the index of a slice? Or something more abstract? Thanks, Mark.