Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp147510imm; Fri, 21 Sep 2018 11:50:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ/MVgfa3Ax8rU4F2C6iYeEyjf/T0x8a2xKpyRbfiDxIsSwE+JWYY8aT+LLLNXjHA3ZwQNT X-Received: by 2002:a65:620d:: with SMTP id d13-v6mr42547803pgv.273.1537555812434; Fri, 21 Sep 2018 11:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537555812; cv=none; d=google.com; s=arc-20160816; b=fEMw1WKGHNhx8YmhDKFsuBxt+oWyNXm24eF1vsKVmhf7+1vAbF4RRE+udAXb06xDlh asxhc5bl03GodUKS/H5Mj9+IPA9dUNWvPqBh5WurDpIsF+tKWqxv8zWTQWCJPTtqDY8l 1pwDFxUvtm3kzJ6oUvjRaijosEFLmyl99AM26iZGkEcKO1gLtln5IrPTVlH3UiE2dvcm hArwbPtodve7CmvPyIuO3TMPR3nj4r228JeiTsHGHxNvgZM46B9loAG8IZuJw1cw0fNX NwoSQGze9M0+BazTgoCMxv6LY61YMyKZukw12bzHNg01A125xHh0D2Oc9wtFekktHQqT xgCQ== 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=daSwPJoBLFxU3Hw4bXbtpBZBo8Tk+a7yjKoCE+I60Ew=; b=cElhMCxFowNE3H+6DBorLD1Q419TctSGCyJ+XrY9SBiejY/PyhzJkgAbnwHtmot2xB CIXmGZlQVlq8bm4mLVicbms2ulXnipyh1Phkhro8sDVYL95pcNGid+J2rCqRtL6g3omt N99UWAwPDjc5Jqkod2d2pSPrdDa5MOoMs4xJv59oc2esAjZMufg25+Jg8UCylN5vICv1 ID/Lh0FccP8KD7Xq2bOMaGJ4DxDljdd2diR2lg29RI3oY5kbCFuSX0XQHJ6JKTPGuD0p HMgLO4ORtDmuGRnPyGidz2DFtTYVfoG6+yu4r+0SKe+6pTbhimgmnxD5OnhtsXoWgH8A VsMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZcmBLwh+; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si27477049pld.244.2018.09.21.11.49.56; Fri, 21 Sep 2018 11:50:12 -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=@chromium.org header.s=google header.b=ZcmBLwh+; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391294AbeIVAis (ORCPT + 99 others); Fri, 21 Sep 2018 20:38:48 -0400 Received: from mail-vk1-f195.google.com ([209.85.221.195]:34061 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391285AbeIVAir (ORCPT ); Fri, 21 Sep 2018 20:38:47 -0400 Received: by mail-vk1-f195.google.com with SMTP id s10-v6so321982vkh.1 for ; Fri, 21 Sep 2018 11:48:37 -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=daSwPJoBLFxU3Hw4bXbtpBZBo8Tk+a7yjKoCE+I60Ew=; b=ZcmBLwh+fpOHB7yFD5E+dWOCybcsV1s7MDhUBBs7VZXVqjsFlGduQ9jefC3R2wibb+ OKM9J7+hiS8n3qtG4KII+IUBwL2pYwb981gK95dxxGK32ImuBDaWw0c60qrJfoO5Dzfb SV/bXVBtzxgUH3+hfgltb2B94bHc++MgAFQF8= 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=daSwPJoBLFxU3Hw4bXbtpBZBo8Tk+a7yjKoCE+I60Ew=; b=AoZYQUenO/ieCIvuUFlyimswVModxjEuzz4Ivg58lTmk+LDfWm3At5fF/XjLT713Em GwCfL5n9zLxEx6sfB5emaDe6IYpJxf12rRBwYniVCt4VzHeJA3RryUTjVDPNZye+vKSH suLSPMiCPQp9k/2myk3LELpLsuht27v0PFJ2K/H1jgK8w3NFPe8IY5NdHstmgLglV/a1 ro2tfZrvCeIRXmzAhPRzsbAmKmu3+QC2rP8amSN3si+UYkm1rOb37QxSUKH1qyJH0hVw 2mxWerHhQHqnM1yMgoHdSniZZIq5ifzTahuQJ7Vr0/s6pGU4kHnu+9trOgDQWZXntoqg frag== X-Gm-Message-State: APzg51ASAjTV6W6oGeM4CthRTwQFuSAAAv8cCHClBn4lCmueO3RtrHI1 M75Mzh64B/ThAjXgTx9CxmUUYl6GJiA= X-Received: by 2002:a1f:d507:: with SMTP id m7-v6mr12365738vkg.40.1537555716947; Fri, 21 Sep 2018 11:48:36 -0700 (PDT) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com. [209.85.217.52]) by smtp.gmail.com with ESMTPSA id e185-v6sm4457072vkd.15.2018.09.21.11.48.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 11:48:36 -0700 (PDT) Received: by mail-vs1-f52.google.com with SMTP id y11-v6so5240653vso.5 for ; Fri, 21 Sep 2018 11:48:35 -0700 (PDT) X-Received: by 2002:a67:8391:: with SMTP id f139-v6mr13978740vsd.6.1537555715438; Fri, 21 Sep 2018 11:48:35 -0700 (PDT) MIME-Version: 1.0 References: <20180920224055.164856-1-ryandcase@chromium.org> <153755105782.119890.8484594239463905156@swboyd.mtv.corp.google.com> <153755522409.119890.5471037050114193@swboyd.mtv.corp.google.com> In-Reply-To: <153755522409.119890.5471037050114193@swboyd.mtv.corp.google.com> From: Doug Anderson Date: Fri, 21 Sep 2018 11:48:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: spi: Qualcomm Quad SPI(QSPI) documentation To: Stephen Boyd Cc: Mark Brown , ryandcase@chromium.org, boris.brezillon@bootlin.com, linux-arm-msm , Girish Mahadevan , devicetree@vger.kernel.org, LKML , linux-spi , Rob Herring , Mark Rutland 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 Stephen On Fri, Sep 21, 2018 at 11:40 AM Stephen Boyd wrote: > > Quoting Doug Anderson (2018-09-21 10:40:14) > > Hi, > > > > On Fri, Sep 21, 2018 at 10:31 AM Stephen Boyd wrote: > > > > > > Quoting Ryan Case (2018-09-20 15:40:54) > > > > diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt > > > > new file mode 100644 > > > > index 000000000000..ecfb1e2bd520 > > > > --- /dev/null > > > > +++ b/Documentation/devicetree/bindings/spi/qcom,spi-qcom-qspi.txt > > > > @@ -0,0 +1,36 @@ > > > > +Qualcomm Quad Serial Peripheral Interface (QSPI) > > > > + > > > > +The QSPI controller allows SPI protocol communication in single, dual, or quad > > > > +wire transmission modes for read/write access to slaves such as NOR flash. > > > > + > > > > +Required properties: > > > > +- compatible: Should contain: > > > > + "qcom,sdm845-qspi" > > > > > > Does someone have a more generic compatible string that can be added > > > here to indicate the type of quad SPI controller this is? I really doubt > > > this is a one-off hardware block for the specific SDM845 SoC. > > > > The compatible string used to be "qcom,qspi-v1". ...but Rob Herring > > requested [1] "an SoC specific compatible string". While we could do > > a compatible string like: > > > > "qcom,sdm845-qspi", "qcom,qspi-v1". > > > > I'm curious if that buys us anything. From all my previous experience > > with device tree it is fine to name a compatible string for a > > component based on the first SoC that used it. If we later find that > > this is also used in an "msm1234" we could always later do the > > compatible string for that device as: > > > > "qcom, msm1234-qspi", "qcom,sdm845-qspi" > > > > ...and we don't need to try to come up with a generic name. > > Obviously, though, I'll cede to whatever Rob says here though. > > > > It seems that everybody has misunderstood my email. Let me try to > clarify. > > I'm not saying to replace the sdm845 qspi compatible with a generic one. > I'm recommending that a generic one is added in addition to the SoC > specific one. That way, we get to put the generic compatible string in > the driver and not need to update the driver compatible string array > each time a new SoC comes out with a new compatible string. > > If it turns out later that we need to handle some bug in that specific > SoC compatible string then we're good to go and we can handle it by > matching the more specific SoC version compatible. I don't think I misunderstood. I was suggesting that I believe that the device tree way is to use the first SoC as the generic one. In other words to support sdm845 and msm1234, we do: A) on sdm845: "qcom,sdm845-qspi" on msm1234 (later): "qcom, msm1234-qspi", "qcom,sdm845-qspi" What you are suggesting (I think) is: B) on sdm845: "qcom,sdm845-qspi", "qcom,qspi-v1" on msm1234 (later): "qcom, msm1234-qspi", "qcom,qspi-v1" If Rob likes B) better then it's fine with me, it was just my understanding that A) was the suggested way to do things (even if it is decidedly non-symmetric). NOTE: Even with A) there's no need to update the driver for msm1234 since it has the fallback to sdm845. -Doug