Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp829437ybg; Fri, 12 Jun 2020 16:18:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5JcbbzkyaYWMZpkrAPO99vL1ADCZBk2B4r2FniuatVHCqH1h2NjbN5mWJTb9SRhdzIH4k X-Received: by 2002:a17:906:e115:: with SMTP id gj21mr14799992ejb.528.1592003891825; Fri, 12 Jun 2020 16:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592003891; cv=none; d=google.com; s=arc-20160816; b=Cvj/TrtjEvK3dcfmpWfcF9kfsqfhxvnSdWR2zVl2D5bnbkc1UJR9py2T4Xk9jzCuzD PUe6wbkQz4SBvuL5pYqbfZA6H0wbB/2cgMh9lKiq5sMOem+MFkeejsihXdEukoFwjFyt sw9hq9fQ/ep3C0T+VC67GI73CmzBTXnUWhNlO1ydy+gBR+6Gyh74DS+xzhq92U2CQHZ6 roaSyzRwfGiyUoV5yyj2c8j+E+113/WZbzaw+Syaw2GfMadqnDBUgyWX8s4siBRL4EDz 2amuC5Y2gI3x/pnVWx45vR+e3qnJX9JoxxqMulf2lzZXnBfK1/Fo5sh98Tajsop24iFe q/3g== 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=oq8VMZuaXGbd2S6QZmKfGmJLPLEtlVINersNYu3Hmq0=; b=FQjGogIGqbBMxKeyh4d0irk0sDclae2K+XWGbfikR0MyY+OuiC7oPZFAyagKOYEOWo etFojP/vNKskuOy6j+GI2Pfaq8xz9Al5ka2s22b8e6EBxC/p5cMdLvv5fGOF/FdQotxp N97OKCw0RXbILJayLvm8ryVv1p1ZA2X6gnFK6DsayA32bSBYVKKV3T/qdkRM6xIVf1BX fRL2WjpGVr227tsi6waiEum78mxaSY8/pcRnOnxoEAQSsdQZyAzVB3ATfIMMfG3/54m5 XOf804GAxyOujhmnsJXL8j9UEWgN2e6WogcWsgOXW7rpur9gAVsO1cuyyb/i+TdkQ4w9 /P1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MiFMCE9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si4139152edr.589.2020.06.12.16.17.47; Fri, 12 Jun 2020 16:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MiFMCE9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbgFLXPs (ORCPT + 99 others); Fri, 12 Jun 2020 19:15:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbgFLXPp (ORCPT ); Fri, 12 Jun 2020 19:15:45 -0400 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE9B3C08C5C1 for ; Fri, 12 Jun 2020 16:15:43 -0700 (PDT) Received: by mail-ua1-x942.google.com with SMTP id c15so3764689uar.9 for ; Fri, 12 Jun 2020 16:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oq8VMZuaXGbd2S6QZmKfGmJLPLEtlVINersNYu3Hmq0=; b=MiFMCE9QLz1s7wRwKCXByIZ2xd4K1DO67RKgkjq+lAP7DTtPvpc/G2vBsgSkuDtKa4 FwuG6iEAswE2oH+ZdM9YAuSFSl8c5HLxdf8lFHa6MAa5hxg4xLBQc2iWcDe8EDJA5S5k RQB+M2lLyrChdz5hHyuTmUQ1NGV/zdHBXAStQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oq8VMZuaXGbd2S6QZmKfGmJLPLEtlVINersNYu3Hmq0=; b=MKnBFnK7Dqt1DC3DPECGuG/HLv5bGN781CBULdGMNRc1JtLKbZNoSQI21yai105rsU jOdK7UuAG/8sLRsWiMwRDRD1/pmFmSL0tMqNVWyIL21O5QeuVE41vuPYq1EceLEiPo3v 0VGQ90c+Rz/5myArbMReSRSTmVu07xJ1NiPOdMDCG1A3dSfhinyRn5vOddb9OiHRhVc4 p5B52JXBW3dLA4nh/rgX3s1Zv3ic3nDZZbzbW0CCMqAbi5u9mGOzTBlIGut3e5FCNTv+ 3LIoPkiduSMGTtSase5GWcx29QPsoarWy/LFJhNvFtVv+5KL0BFS22vf97+dItWLr8lB hoYQ== X-Gm-Message-State: AOAM530fOHTN+HWBfVlnPfKFuG3+ar1gx87h1NtXKOkqfyKVQs2uuRQ0 RJ86qOnyrYT0iTPCk+pD5BIshGj6v9U= X-Received: by 2002:a9f:37e1:: with SMTP id q88mr10960307uaq.125.1592003742625; Fri, 12 Jun 2020 16:15:42 -0700 (PDT) Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com. [209.85.217.42]) by smtp.gmail.com with ESMTPSA id c7sm1061257uan.12.2020.06.12.16.15.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jun 2020 16:15:41 -0700 (PDT) Received: by mail-vs1-f42.google.com with SMTP id o2so6258831vsr.0 for ; Fri, 12 Jun 2020 16:15:41 -0700 (PDT) X-Received: by 2002:a67:e445:: with SMTP id n5mr13169309vsm.73.1592003741235; Fri, 12 Jun 2020 16:15:41 -0700 (PDT) MIME-Version: 1.0 References: <1591868882-16553-1-git-send-email-rbokka@codeaurora.org> <1591868882-16553-2-git-send-email-rbokka@codeaurora.org> In-Reply-To: From: Doug Anderson Date: Fri, 12 Jun 2020 16:15:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC v2 1/3] dt-bindings: nvmem: Add devicetree bindings for qfprom-efuse To: Ravi Kumar Bokka Cc: Srinivas Kandagatla , Rob Herring , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rajendra Nayak , Sai Prakash Ranjan , dhavalp@codeaurora.org, mturney@codeaurora.org, sparate@codeaurora.org, mkurumel@codeaurora.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 Hi, On Fri, Jun 12, 2020 at 2:59 PM Doug Anderson wrote: > > Hi, > > On Thu, Jun 11, 2020 at 2:49 AM Ravi Kumar Bokka wrote: > > > > This patch adds dt-bindings document for qfprom-efuse controller. > > > > Signed-off-by: Ravi Kumar Bokka > > --- > > .../devicetree/bindings/nvmem/qfprom.yaml | 52 ++++++++++++++++++++++ > > 1 file changed, 52 insertions(+) > > Overall comment: I reviewed your v1 series and so I'm obviously > interested in your series. Please CC me on future versions. > > I would also note that, since this is relevant to Qualcomm SoCs that > you probably should be CCing "linux-arm-msm@vger.kernel.org" on your > series. > > > > create mode 100644 Documentation/devicetree/bindings/nvmem/qfprom.yaml > > > > diff --git a/Documentation/devicetree/bindings/nvmem/qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qfprom.yaml > > new file mode 100644 > > index 0000000..7c8fc31 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/nvmem/qfprom.yaml > > @@ -0,0 +1,52 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/nvmem/qfprom.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Qualcomm Technologies Inc, QFPROM Efuse bindings > > + > > +maintainers: > > + - Ravi Kumar Bokka > > + > > +allOf: > > + - $ref: "nvmem.yaml#" > > + > > +properties: > > + compatible: > > + enum: > > + - qcom,qfprom > > As per discussion in patch #1, I believe SoC compatible should be here > too in case it is ever needed. This is standard practice for dts > files for IP blocks embedded in an SoC. AKA, this should be: > > items: > - enum: > - qcom,apq8064-qfprom > - qcom,apq8084-qfprom > - qcom,msm8974-qfprom > - qcom,msm8916-qfprom > - qcom,msm8996-qfprom > - qcom,msm8998-qfprom > - qcom,qcs404-qfprom > - qcom,sc7180-qfprom > - qcom,sdm845-qfprom > - const: qcom,qfprom > > NOTE: old SoCs won't have both of these and thus they will get flagged > with "dtbs_check", but I believe that's fine (Rob can correct me if > I'm wrong). The code should still work OK if the SoC isn't there but > it would be good to fix old dts files to have the SoC specific string > too. > > > > + > > + reg: > > + maxItems: 3 > > Please address feedback feedback on v1. If you disagree with my > feedback it's OK to say so (I make no claims of being always right), > but silently ignoring my feedback and sending the next version doesn't > make me feel like it's a good use of my time to keep reviewing your > series. Specifically I suggested that you actually add descriptions > rather than just putting "maxItems: 3". > > With all that has been discussed, I think the current best thing to > put there is: > > # If the QFPROM is read-only OS image then only the corrected region > # needs to be provided. If the QFPROM is writable then all 3 regions > # must be provided. > oneOf: > - items: > - description: The start of the corrected region. > - items: > - description: The start of the raw region. > - description: The start of the config region. > - description: The start of the corrected region. To address some of Srinivas's comments, I think you should actually add the 4th range in here too: - description: The start of the security control region. That allows you to read 0x6000 and get the major/minor/step properly. I will also note that as I've started reviewing the driver code it'll probably make everyone's life easiest if you keep the "corrected" region first, even if it's not numerically first. I've updated my FIXUP patch again. I might notice more comments as I review the driver more, but we'll see... -Doug