Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1874747imm; Thu, 21 Jun 2018 03:58:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJRzjztSMOCgYo3eSYEUodELXQVNRbEVLAlNWqwqLW3Liyxok6IQ3Z4oGscr5D579dd4OM5 X-Received: by 2002:a63:3c07:: with SMTP id j7-v6mr21857179pga.440.1529578683662; Thu, 21 Jun 2018 03:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529578683; cv=none; d=google.com; s=arc-20160816; b=cIEMUW0WG5VO17L63GSVYvTjylrbJX2igF8w00PpYQS+W/m14UHnUnGkx5ZQzgiuW0 +g9OtvfNZB6txdmxFAqRQFd5Mcy+zFCvanymhuqiBgjawhf9RKQWXQexOQrLilcEFJbG UBWtY5bn2O9WxB9J6Pl1s7xAo3UaXg61OVEyp7AsXzQM074LAzaBIVQdx9GlnAYntTKn jSH3NkE0qIdiwncv0ss+QCxROzS56OVFni1pDMyx1kKjedov7mbZGktGYrH1rJiATuKI rYwgRHKi7fhg44ihMGRDQCtlOglhaPZHfTiVzsLQN+nEZUUn3Wv+mTPHOwvyL+WyyfE0 G3Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature :arc-authentication-results; bh=jU9ggecRmLkohCgXGqXNxsjAZgBTgwebKbsIuldTQok=; b=yyGI43hVzA890mvtj4AQq2qwhX1oH8Urcp50nscqicW9gMLwy6ECQePklm8tJwbP0E rXNKLtvJucZBOGa1844tXPgS9rat+gwkMsKKSeqRnBeH2Qy0QwDvVklAIDARE65jTyFp YNuidag3N1b7NRgeClliJfUNCmjBN7/HKgxFIP6A2hMBhrjzmKbmbwnfDuZmuMZgwH1X TxFZkrg0PIanG5/fYbWqGk9mp/mP70E4AtaR9+b9YEnTjptPc9h+mMuP0LzLYUM1O2y5 Epd7SzvUZblXB9yVGF0TgkMCGe3zXtzOkyI8b6149MdGOaeGx0PQ2jW+hrFrcbizvDTn 2xPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nFnVD51D; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2-v6si4265042pfh.327.2018.06.21.03.57.41; Thu, 21 Jun 2018 03:58:03 -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=@gmail.com header.s=20161025 header.b=nFnVD51D; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754480AbeFUK45 (ORCPT + 99 others); Thu, 21 Jun 2018 06:56:57 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:38636 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754190AbeFUK4z (ORCPT ); Thu, 21 Jun 2018 06:56:55 -0400 Received: by mail-lf0-f65.google.com with SMTP id i83-v6so4109149lfh.5; Thu, 21 Jun 2018 03:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=jU9ggecRmLkohCgXGqXNxsjAZgBTgwebKbsIuldTQok=; b=nFnVD51DUXupLNoXA1M73OrVaiUa9bCxwHfnZhraTCgzZQhxRXoic+HWlBplbZQORq A8B/G5GrT4OlyAO4fhTdaIhFxZ1w4T7ewdX3h45K0TJjzsxUwUVRicuJJKRkVu/rRUw+ 4B9gY77BvE7IOdAkIbxxC1zomehSIjH7GxTvFoPA5hlIVNEX53ZD87L971K3gGK9dxaU SpfnACkWea6fVfZ36prCbBIVuJmSXIXLa60c3xPFaJ2grwpe1JiJCiC9TjoYb9FmuXbb 3AEw2Cxjiw/fjgz8/a5sM8YDwJJrury07rEkXEuOJ7VZcdeJXngcynp1+brl7ncU31Bj tPNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=jU9ggecRmLkohCgXGqXNxsjAZgBTgwebKbsIuldTQok=; b=An0vL6DAPuuNxv7lLQAFTJhIoxbp8Z1tZYEOfWHR3gN8Btjl4OWd740R2LPpLniIgt aAnR2+V3knDeTEAEy8i83nEZQz58mVbc72nCHgyOs0Aw5BBGqOg0ncbgTH3lgzVYhFah 1QjXAV40zbHVCu9Lww1tcybTMNpBdc6fTgQdGdoStSAXEJ8vL4Dyj3aWBERW6y7W9reO kIevdwMPIyq2DtdqB+LwqGC4Cio3Hsc5FTgGNNNMXSkFKdUDtYuWL0lz7dR4ISybyvzL vVxt4op32mElsEmDExWp2QyQxRnM7buwA32/DFg2AN8JdqOnN4IznIdT5+tM3BybJYcX Ul5w== X-Gm-Message-State: APt69E2cBmWXGS8GWlUjnhC7JBbVSoQJwhgBwg3Ts4wgSA5B7NE66wSM DlzIgLcTxz8cGRu4NtcMEA== X-Received: by 2002:a19:20c1:: with SMTP id g184-v6mr16060503lfg.96.1529578613156; Thu, 21 Jun 2018 03:56:53 -0700 (PDT) Received: from [192.168.0.4] (89-64-25-103.dynamic.chello.pl. [89.64.25.103]) by smtp.gmail.com with ESMTPSA id t197-v6sm203232lfe.32.2018.06.21.03.56.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 03:56:52 -0700 (PDT) From: Piotr Bugalski X-Google-Original-From: Piotr Bugalski Date: Thu, 21 Jun 2018 12:56:50 +0200 (CEST) To: Boris Brezillon cc: Piotr Bugalski , Mark Brown , linux-spi@vger.kernel.org, David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Mark Rutland , Nicolas Ferre , Alexandre Belloni , Cyrille Pitchen , Tudor Ambarus , Piotr Bugalski Subject: Re: [RFC PATCH 2/2] dt-bindings: spi: QuadSPI driver for Atmel SAMA5D2 documentation In-Reply-To: <20180620164741.2a8da424@bbrezillon> Message-ID: References: <20180618162124.21749-1-bugalski.piotr@gmail.com> <20180618162124.21749-3-bugalski.piotr@gmail.com> <20180620164741.2a8da424@bbrezillon> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Boris, On Wed, 20 Jun 2018, Boris Brezillon wrote: > Hi Piotr, > > On Mon, 18 Jun 2018 18:21:24 +0200 > Piotr Bugalski wrote: > >> Documentation for DT-binding change. >> >> Suggested-by: Boris Brezillon > > I'm pretty sure I didn't make a single suggestion about the DT > bindings you use here ;-). > Ok, I misunderstood a bit your idea, but I think from next release this field will be in good place. So it was just prepared for the future ;-) >> Signed-off-by: Piotr Bugalski >> >> --- >> .../devicetree/bindings/spi/spi_atmel-qspi.txt | 41 ++++++++++++++++++++++ >> 1 file changed, 41 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/spi/spi_atmel-qspi.txt > > I'll comment on this aspect in more details when replying to the cover > letter, but I think you should re-use the bindings defined in > Documentation/devicetree/bindings/mtd/atmel-quadspi.txt (IOW, move the > existing file to the Documentation/devicetree/bindings/spi directory). > > It's the same HW block, and just because you develop a new driver to > replace the old one doesn't mean you should have 2 different bindings in > parallel. I'll change it in next version. > >> >> diff --git a/Documentation/devicetree/bindings/spi/spi_atmel-qspi.txt b/Documentation/devicetree/bindings/spi/spi_atmel-qspi.txt >> new file mode 100644 >> index 000000000000..d52b534c9c2b >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/spi/spi_atmel-qspi.txt >> @@ -0,0 +1,41 @@ >> +* Atmel Quad Serial Peripheral Interface (QSPI) >> + >> +Required properties: >> +- compatible: Should be "atmel,sama5d2-spi-qspi". >> +- reg: Should contain the locations and lengths of the base registers >> + and the mapped memory. >> +- reg-names: Should contain the resource reg names: >> + - qspi_base: configuration register address space >> + - qspi_mmap: memory mapped address space >> +- interrupts: Should contain the interrupt for the device. >> +- clocks: The phandle of the clock needed by the QSPI controller. >> +- #address-cells: Should be <1>. >> +- #size-cells: Should be <0>. >> + >> +Example: >> + >> +qspi1: spi@f0024000 { >> + compatible = "atmel,sama5d2-spi-qspi"; >> + reg = <0xf0024000 0x100>, <0xd8000000 0x08000000>; >> + reg-names = "qspi_base", "qspi_mmap"; >> + interrupts = <53 IRQ_TYPE_LEVEL_HIGH 7>; >> + clocks = <&qspi1_clk>; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pinctrl_qspi1_default>; >> + status = "okay"; >> + >> + flash@0 { >> + #address-cells = <1>; >> + #size-cells = <1>; >> + compatible = "winbond,w25m02gv", "spi-nand"; > > "winbond,w25m02gv" is undocumented and unnecessary since SPI NANDs are > automatically detected. Also, maybe you should declare a SPI NOR in the > example since SPI NAND support has not yet been merged. > I was mainly focusing on NAND-flash with QSPI inteface so I took example from tested configuration. Next time I'll use NOR-flash. >> + reg = <0>; >> + spi-max-frequency = <83000000>; >> + spi-rx-bus-width = <4>; >> + spi-tx-bus-width = <4>; >> + >> + ... >> + }; >> +}; >> + > > Regards, > > Boris > Thanks, Piotr