Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2405522ybl; Thu, 9 Jan 2020 12:10:21 -0800 (PST) X-Google-Smtp-Source: APXvYqzgmyrTARzNAGI8RHTgWjsnb0+g9pcmAZ+pN2PMNuI48njn2a22yvTf9HSGfF8gfucGin79 X-Received: by 2002:a9d:784b:: with SMTP id c11mr9388670otm.246.1578600621491; Thu, 09 Jan 2020 12:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578600621; cv=none; d=google.com; s=arc-20160816; b=sQpsvYyA7hCMCYR9fj1X4UycKKS5KpoT7EPXTGanB401SNQBQNP/oTDSnZ1sm+7zoW B447yMGwu6ub/ztP/dYD4H4en5Nl/kj4wgKRcu+LUrn8ej04Prcpaj1l0RF8MrAuBWQL Z4MCn4QA1PbErGQWAcP+p+lTi+9tovTmV8veNjYx6uq91/O8foGpCUH5nzPNi+d/nnB1 rbWtOulrLMl7HDcMYHZ2+k0tNQWIfZGmcNhpn/2NKcwvPYEk3Mf+rwow+fhabxO3h7KK MrkBfFc6vOuxVVt/FGr9O1vA3RdyCLw2CzOYX1+bNdUJOACqk4ufZivvlXx1yqTPUAw6 PXfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MNKydIimaPSt4DEL/IrI9A8mOCzgpW/hvB1WfMkJ6Vo=; b=lFU+qgiL//902/AUhjbLTopLhLPaAZ514/4YVS9ngfgLG4HfpDwhMD4LJiQBg8s0u2 4oITOHL0HD2Rw20jDB/z0YGkt6VdlYys/lfe+cQ3o2pv6H858+WN9u1AZBsdnc5E4VDm PzZQ4Os0s7VjiX+cAzVvXh5Ks8nHz834YN90ROdJLh8OoCrmjlJeTnzvvYeK1c2WdFp3 lpbIs9PWD7+z2kmsiQb1ADczSWcnqlyXKXcjvh4302jsEnCvrGxsR60lasj+El6GvM+5 vFB552BIJ5UB9BXU08PbPyUDlz3WSwN91KAsbDs8TzKpS/dZXJYM7YaZiCrqEbRTGQPR buTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZSQIHVCM; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si4185246oic.40.2020.01.09.12.10.09; Thu, 09 Jan 2020 12:10:21 -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=@kernel.org header.s=default header.b=ZSQIHVCM; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732437AbgAIPcC (ORCPT + 99 others); Thu, 9 Jan 2020 10:32:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:38670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732374AbgAIPcB (ORCPT ); Thu, 9 Jan 2020 10:32:01 -0500 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 40E992075D; Thu, 9 Jan 2020 15:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578583920; bh=Hn4tjjgwi3+in4jXN65JjSaynghmcVXRXyVZVHU3QjE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZSQIHVCMCfpRCRvlV7H1IfAqc59b3kdLkhnvouwDuvdeAOhByg1FmPx46KN9AgHws GzYomRmbxTpIsBADwRCUwpn6jgiXMUipwWkV4NRmCsCT5v2iKP1Q5nobXMDufWCV7Z gTJ4/FsVhIvW6L7qtepbFVqHRb395qBcWj/SkAGk= Received: by mail-qk1-f180.google.com with SMTP id c16so6316439qko.6; Thu, 09 Jan 2020 07:32:00 -0800 (PST) X-Gm-Message-State: APjAAAWU5MNAaKhcNC/YctENhD5o3ugfgZb/9VQ6qdRyhFqBnqyt4+e0 yFd42qm7K0eFof88K/0LpTHZVh0LFyV/4CLzsQ== X-Received: by 2002:a37:a70b:: with SMTP id q11mr9940102qke.393.1578583919273; Thu, 09 Jan 2020 07:31:59 -0800 (PST) MIME-Version: 1.0 References: <1577165532-28772-1-git-send-email-sthella@codeaurora.org> <20200108163943.GA26863@bogus> <8aeb91730552357db340f8bfb21e6d15@codeaurora.org> In-Reply-To: <8aeb91730552357db340f8bfb21e6d15@codeaurora.org> From: Rob Herring Date: Thu, 9 Jan 2020 09:31:46 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] dt-bindings: nvmem: add binding for QTI SPMI SDAM To: sthella@codeaurora.org Cc: Andy Gross , Srinivas Kandagatla , Mark Rutland , linux-arm-msm , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 9, 2020 at 4:57 AM wrote: > > On 2020-01-08 22:09, Rob Herring wrote: > > On Tue, Dec 24, 2019 at 11:02:12AM +0530, Shyam Kumar Thella wrote: > >> QTI SDAM allows PMIC peripherals to access the shared memory that is > >> available on QTI PMICs. Add documentation for it. > >> > >> Signed-off-by: Shyam Kumar Thella > >> --- > >> .../devicetree/bindings/nvmem/qcom,spmi-sdam.yaml | 79 > >> ++++++++++++++++++++++ > >> 1 file changed, 79 insertions(+) > >> create mode 100644 > >> Documentation/devicetree/bindings/nvmem/qcom,spmi-sdam.yaml > >> > >> diff --git > >> a/Documentation/devicetree/bindings/nvmem/qcom,spmi-sdam.yaml > >> b/Documentation/devicetree/bindings/nvmem/qcom,spmi-sdam.yaml > >> new file mode 100644 > >> index 0000000..8961a99 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/nvmem/qcom,spmi-sdam.yaml > >> @@ -0,0 +1,79 @@ > >> +# SPDX-License-Identifier: GPL-2.0 > > > > Dual license new bindings: > > > > (GPL-2.0-only OR BSD-2-Clause) > > > > Please spread the word in QCom. > Sure. I will add Dual license in next patchset. > > > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/nvmem/qcom,spmi-sdam.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: Qualcomm Technologies, Inc. SPMI SDAM DT bindings > >> + > >> +maintainers: > >> + - Shyam Kumar Thella > >> + > >> +description: | > >> + The SDAM provides scratch register space for the PMIC clients. This > >> + memory can be used by software to store information or communicate > >> + to/from the PBUS. > >> + > >> +allOf: > >> + - $ref: "nvmem.yaml#" > >> + > >> +properties: > >> + compatible: > >> + enum: > >> + - qcom,spmi-sdam > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + "#address-cells": > >> + const: 1 > >> + > >> + "#size-cells": > >> + const: 1 > > > > ranges? The child addresses should be translateable I assume. > The addresses are not memory mapped on the CPU's address domain. They > are the SPMI addresses which can be accessed over SPMI controller. Doesn't have to be a CPU address. Are the child offsets within the range defined in the parent 'reg'? If so, then it should have 'ranges'. > > > >> + > >> +required: > >> + - compatible > >> + - reg > >> + > >> +patternProperties: > >> + "^.*@[0-9a-f]+$": > >> + type: object > >> + > >> + properties: > >> + reg: > >> + maxItems: 1 > >> + description: > >> + Offset and size in bytes within the storage device. > >> + > >> + bits: > > > > Needs a type reference. > Yes. I will add a reference in the next patch set. > > > >> + maxItems: 1 > >> + items: > >> + items: > >> + - minimum: 0 > >> + maximum: 7 > >> + description: > >> + Offset in bit within the address range specified by > >> reg. > >> + - minimum: 1 > > > > max is 7? > I don't think it is limited to 7 as it is the size within the address > range specified by reg. If the address range is more than a byte size > can be more. Then why is the maximum offset 7? Rob