Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6582314ybv; Wed, 12 Feb 2020 15:22:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyRSVCBI5NRITAAnjXRoDSh5MUWNMFiHdqS3WQZCMqMEMiun4edDe45MxoLL2VAh/z5skr1 X-Received: by 2002:aca:db56:: with SMTP id s83mr1063994oig.171.1581549725295; Wed, 12 Feb 2020 15:22:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581549725; cv=none; d=google.com; s=arc-20160816; b=SIc4WbBMQvYRGZc4OkwHsko/+6Xs/TMK8y4LBud+Qye64uthNxugs/rlCnMlULFfSV loniDWuXOqh+m/2+/kJyrDNGfFq2+7n/nJH4UrUUsQenCgYaaawdtBPTVwXrQOcOGab5 G6KSN9Ycn22RdnF6zpk/u4b4pCX9UJQ3RuNGGx86JBvY0gxKsRY6Eiy4O5po8Wleg8R6 KTa8IArOKCMfSNJ6mm+89wmGg1+MBdED6DLqnVDKCsZKvmNA4djrRA9Sq1sYauLSb1Ne QVQcxIfHFrbbOI5ulADXnXGkZI9+iBRGyP4BO2MDdBI62HTOU4LBJwzt2QcB9lw3Vxj2 77bg== 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=jlwJqZlmg2Pq8Yopr2kegkbYDEQUzThKQ0YhKQN2ALg=; b=qd91Sm1x5XGTLljgfUNrvGehpEW6QS8CiYfSq66dVBCja4gdqQBowu/ZXxl1/0pKKL x+3mCXbLAGHPC//GnNPCaJpT2VJCZ9cH3X7cPGMYT+G7dB2fgW1Psgxz67c9rNj7o60c zz6stUPiB6dZo7bWZVdwh8w+qj1syzAECgBIZHhoy4wPOCL07dr5gRoNGMK7h7JwW1uB Ntgu/eUPXApw6Cjmkbz9EZR1V/a/WCvLIqqRrWn9SsJABU3zNDX3aEUdnUD6Thh54X3w gPUn+kINmz9h62Caou6fSutVOPuTAuyQxmt7JIrLxs2nrFAYphFEhPGi4UHLlTl/Uf24 7HQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AemS5zWd; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f204si289398oia.43.2020.02.12.15.21.48; Wed, 12 Feb 2020 15:22:05 -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=@google.com header.s=20161025 header.b=AemS5zWd; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729223AbgBLXVY (ORCPT + 99 others); Wed, 12 Feb 2020 18:21:24 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:34732 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729103AbgBLXVY (ORCPT ); Wed, 12 Feb 2020 18:21:24 -0500 Received: by mail-vs1-f66.google.com with SMTP id g15so2731439vsf.1 for ; Wed, 12 Feb 2020 15:21:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jlwJqZlmg2Pq8Yopr2kegkbYDEQUzThKQ0YhKQN2ALg=; b=AemS5zWdhTduXMrNYr/OFdwikKA7Ff5sD01XNEAGdP7TT/DQcFDAED+SNbXyob/w0K ppbYsWNy9vNt+ToBU5peypNJ3KldRC/pt3mktLlJpFIMriLdauH5WojsuGRqh9LtlGGR 3372K7fHo8QKg3X+te3pYd/ul9ZKU3ip1YyDye6F5AIm9mXx+WT0mYPFofW9FAPbV5c/ HPvDA3GAKHAP4C8xm6uROrPlNFwxZ0tSE7YB7yue6Zj38gyWzpoC9RHZ/DxNfzDylJqc fe7KU8ugjP1/Pu9EzW0IpMr5InjEwpIAOmajVOPHoXsdh5irsAYwAWKdg6zE+1e5hfPf 7qGw== 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=jlwJqZlmg2Pq8Yopr2kegkbYDEQUzThKQ0YhKQN2ALg=; b=rKiLSZ3UJ3y9neD4o5XaC/W2HG3tqnhEGD1GbLGuKkPw/wCgFFHO9fgytKUvdxWDTx CmkhDC6egqqo8daAvhLz73B2f4S4TqXjB8Sfotx36f/qaG+WYzCQdzTgeV7+5n396ZHk bNeuTd1yr2gVwBN86RFHc1v/wUArr3th+u7ePEB4C8CDQbNvcN1zj85FWNflfXLEgfzr 1YJz0zs216UeF1gz75pB7A/DkfTtMaFnG+Turnp+IKV3+t9nq2sp4aP0wn9+/AtwMbK8 7tz0U20Dsd/bbAcypj95QdclmcSiFPqjk2DpUO8kkWHgQYBEMOA8YFtfbL3TmySC78hA oUAA== X-Gm-Message-State: APjAAAVFVOoe+hN8R4b3SBgirq4P/UY678zqbDox7McbGTXT1JCszf/f AaBv3OOHC0creWjMqxllkeOOrGxHUharreqpwjN1dw== X-Received: by 2002:a67:e342:: with SMTP id s2mr623210vsm.198.1581549682671; Wed, 12 Feb 2020 15:21:22 -0800 (PST) MIME-Version: 1.0 References: <1581434955-11087-1-git-send-email-vbadigan@codeaurora.org> <1e3f8fc3-dde9-5aaf-12a9-0eb0bc5ceb83@codeaurora.org> In-Reply-To: <1e3f8fc3-dde9-5aaf-12a9-0eb0bc5ceb83@codeaurora.org> From: Doug Anderson Date: Wed, 12 Feb 2020 15:21:10 -0800 Message-ID: Subject: Re: [PATCH V1] dt-bindings: mmc: sdhci-msm: Add CQE reg map To: Veerabhadrarao Badiganti Cc: Ulf Hansson , Adrian Hunter , Asutosh Das , Sahitya Tummala , Sayali Lokhande , cang@codeaurora.org, Ram Prakash Gupta , Linux MMC List , LKML , linux-arm-msm , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 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 Wed, Feb 12, 2020 at 4:00 AM Veerabhadrarao Badiganti wrote: > > > On 2/11/2020 10:12 PM, Doug Anderson wrote: > > Hi, > > > > On Tue, Feb 11, 2020 at 7:29 AM Veerabhadrarao Badiganti > > wrote: > >> CQE feature has been enabled on sdhci-msm. Add CQE reg map > >> that needs to be supplied for supporting CQE feature. > >> > >> Change-Id: I788c4bd5b7cbca16bc1030a410cc5550ed7204e1 > >> Signed-off-by: Veerabhadrarao Badiganti > >> --- > >> Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 5 +++++ > >> 1 file changed, 5 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > >> index 7ee639b..eaa0998 100644 > >> --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > >> +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > >> @@ -27,6 +27,11 @@ Required properties: > >> - reg: Base address and length of the register in the following order: > >> - Host controller register map (required) > >> - SD Core register map (required for msm-v4 and below) > >> + - CQE register map (Optional, needed only for eMMC and msm-v4.2 above) > > I did a quick search and it appears that SD cards implementing 6.0 of > > the spec can also use CQE. Is that correct? If so, maybe remove the > > part about "eMMC"? > On qcom platforms, only SDHC instance meant for eMMC has the CQE support. > So mentioned that its needed only for eMMC. Ah, got it. Maybe mention this in the bindings? Like "Optional, CQE is only implemented on controllers meant for eMMC and version v4.2 and above" > > Maybe also change "needed" to "useful" to make it clear that this > > entry isn't actually required for all msm-v4.2 controllers? > sure. > > > >> +- reg-names: When CQE register map is supplied, below reg-names are required > >> + - "hc_mem" for Host controller register map > >> + - "core_mem" for SD cpre regoster map > > s/regoster/register Oh, also s/cpre/core > >> + - "cqhci_mem" for CQE register map > > I'm at least slightly confused. You say that reg-names are there only > > if CQE register map is supplied. ...and that requires 4.2 and above. > > ...but "core_mem" is only there on 4.0 and below. So there should > > never be a "core_mem" entry? > core_mem is present till cqhci_mem is present on >=v4.2 > Say, for version v4.2 both are present; .... and for v5.0 only cqhci_mem > is present. > > Both hc reg-map and core reg-map are being accessed through index. > So no need to list the reg names 'hc_mem' & 'core_mem' in general. > > But coming to cqhci reg-map we can't access it with fixed index, since > its index varies between 1/2 > based on controller version. > > So we are accessing it through reg-names. Since reg-names has to be > associated with corresponding > reg maps, other two reg-names (hc_mem & core_mem) also need to br listed > when cqhci_mem is listed. > > That is the reason, I mentioned it like these are needed only cqe reg > map is supplied. > If it is creating confusion, i will remove that statement. Ah. I think I got confused! When I saw "msm-v4 and below" in the description of "SD Core register map", I assumed that means that "v4.2" didn't have it. Maybe would be less confusing to change to: - SD Core register map (required for controllers earlier than msm-v5) Then I think what you have can be fine. > > Trying to specify that sanely in free-form text seems like it's gonna > > be hard and not worth it. You should probably transition to yaml > > first? > > > > > > I will also note that Rob isn't a huge fan of "reg-names". In a > > different conversation I think you mentioned you had a reason for > > having it. I guess just be prepared to defend yourself against Rob if > > you feel strongly about keeping reg-names. > Sure. Its the same reason mentioned in above comment. OK. You've convinced me. It's still up to Rob but it seems like you have a good justification now that I understand it better.. ;-) I think you could send out a v2 with the small wording changes and maybe it would be landable, but you'd want to follow up rather soon with the yaml conversion. -Doug