Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp663606imm; Wed, 6 Jun 2018 04:08:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKquJYDB6kD47Slj2ZK8vRK3/01tvMgWrBZDouoIOWyj50bgoS0Uis0E5c8HmQqAo/TjVjA X-Received: by 2002:a63:8848:: with SMTP id l69-v6mr2248272pgd.149.1528283300776; Wed, 06 Jun 2018 04:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528283300; cv=none; d=google.com; s=arc-20160816; b=AozPNUBsTGukqrIH99Jv+nbp4wEVdxUfeOF8g682gdXYJj/JnPKnOh+ZhdAzwb8y0q 1wZcXk5QgQ/x0qvEiUmVC6MNeg/1qMubhyzDbmw/+lde/4HnBEgeMN+4xOb4TlnAVrJp qMOO6JFKVe4ef875pXIRhu26Ww0+u6Zupu+fhIkXv+5Z+ZkQIhBQtf8HtIdv4bsBpQv/ Yv+KaRPLOm3G0CR4S9O11cU2ifMLHErIQWcxoe1jVZcdaGJTA1CglVdaQPFS/YIRdS2e 58UGDjmk/6GG38kn59hWTRgRZ9owZa+PWjrxhhQpQZffSW+0q2j4pkeK6ac9CUmXR4wO tPtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=aZAtlMG8XeMacEfcunsqaR4f4xSj0eUAMYcz4T4zwcc=; b=a2Gd1jK8VzmQSDAEd0DUndGI1u8GiMvkPEIn7kK2B+MNj71fxPTb+hSedd4ZUl8/0F iEWuWf0PCwm23JSduBBsZz6uMAhdZgsBQC8EMOul1wLlJRMHrymL5gTcDcqvOSKj2m5e alfc6Be+bheZ1+3xdfa0Zsud1Fr+mhRjOZwrpSmaJ8fwTXBCxyKclBbsyUD7Wm+mdWGm 53Dgbiq3d4gkxvYkl48l6+fGz7Kf2j8xWQE4twu79GaxZ6segMURyoz3sy/Nq6ktJERx aqHEtjtjQYSA8xeQZvbzojr5FpDX3aXmRkDgzk5UGVDXAzzHZs8wztZRWTD1aNuQDI2X ho9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SwcyN/sf; 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 q6-v6si41002881pgs.451.2018.06.06.04.08.06; Wed, 06 Jun 2018 04:08:20 -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=SwcyN/sf; 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 S1751864AbeFFLHl (ORCPT + 99 others); Wed, 6 Jun 2018 07:07:41 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:53622 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689AbeFFLHj (ORCPT ); Wed, 6 Jun 2018 07:07:39 -0400 Received: by mail-wm0-f67.google.com with SMTP id x6-v6so10682021wmc.3; Wed, 06 Jun 2018 04:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aZAtlMG8XeMacEfcunsqaR4f4xSj0eUAMYcz4T4zwcc=; b=SwcyN/sfy5qNumK8PlqNKgef+nFELdKqm2lLNkpg7zZoVn+g15K4UG07UmpQoZ3Dde 6NXcGv1h+G8Yzer39GNYpcbXanw429ZvqfTGWZffLDJTiCaQ24TWmvRgUM+s8OnJAlRh W8MzgwITlgaP5mKG2QPnWZ7qHH1ZNyeOgmAlIc0EehqsA0s7IV/cDJHyr93YyCPvxgNK GDjWwFERL6d+ZaQehUoGTONBqzAQmYUL22DszNfpbTEQanAceZtKrXhsyeWqfToMhoG4 g5LXGmjoKQDkkYDqYZq768MBpcA/FzQkxVBunRL8L80XYsNBO7NRzgTkPGeDaepk6f3P 6tyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aZAtlMG8XeMacEfcunsqaR4f4xSj0eUAMYcz4T4zwcc=; b=jy4ykbe2at/qNGX7/iLAZaP2BSEJOZZzPZOomnIY9b5hHSTwQQDzcoeBiWtTo24B4G rArcobuKRMpWkoUo0PyMeMbh/v8Ph4oPIAgiah7id9MOSdkdkJc0MWJ4KT2V6CcvcUBr uqMnwVRk46UoTO3RNlIYFsKxWNW4cDg1RGqkmn0woRAxu+VGUk5q9JZr/bhl50Y4+NeN 06LmConsjhmq2lqG+YlcSteLP0RrfMddf2I/xmvIdjVBm9R9wfBG2oGvYZCeEFOwf7t3 xBZrEqJOO1XDsAIifnp7rl490osng25o8AZNx/SaVlZ80WZIM3Vae4dG4LOjw2rI0TqA ywFw== X-Gm-Message-State: APt69E3eEzU0UJ5YJF9EvBS8PlGpdP8ZChK0zYBNtFYtJV3Vs1VX7nNf M6Sgzr5GyPnzvknOqMFfSAE= X-Received: by 2002:a1c:3c3:: with SMTP id 186-v6mr1565447wmd.140.1528283257819; Wed, 06 Jun 2018 04:07:37 -0700 (PDT) Received: from localhost (pD9E510DD.dip0.t-ipconnect.de. [217.229.16.221]) by smtp.gmail.com with ESMTPSA id 76-v6sm1480955wmj.0.2018.06.06.04.07.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Jun 2018 04:07:36 -0700 (PDT) Date: Wed, 6 Jun 2018 13:07:35 +0200 From: Thierry Reding To: Boris Brezillon Cc: Dmitry Osipenko , Stefan Agner , dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, benjamin.lindqvist@endian.se, pgaikwad@nvidia.com, dev@lynxeye.de, mirza.krak@gmail.com, richard@nod.at, pdeschrijver@nvidia.com, linux-kernel@vger.kernel.org, krzk@kernel.org, jonathanh@nvidia.com, devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, marcel@ziswiler.com, miquel.raynal@bootlin.com, linux-tegra@vger.kernel.org Subject: Re: [PATCH v3 3/6] mtd: rawnand: tegra: add devicetree binding Message-ID: <20180606110735.GM11810@ulmo> References: <20180531221637.6017-1-stefan@agner.ch> <20180531221637.6017-4-stefan@agner.ch> <20180601093025.2817ff30@bbrezillon> <20180606103903.GJ11810@ulmo> <20180606124540.46bfa00b@bbrezillon> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tDYGg60iReQ7u8wj" Content-Disposition: inline In-Reply-To: <20180606124540.46bfa00b@bbrezillon> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tDYGg60iReQ7u8wj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 06, 2018 at 12:45:40PM +0200, Boris Brezillon wrote: > Hi Thierry, >=20 > On Wed, 6 Jun 2018 12:39:03 +0200 > Thierry Reding wrote: >=20 > > On Tue, Jun 05, 2018 at 11:19:14PM +0300, Dmitry Osipenko wrote: > > > On 01.06.2018 10:30, Boris Brezillon wrote: =20 > > > > On Fri, 1 Jun 2018 00:16:34 +0200 > > > > Stefan Agner wrote: > > > > =20 > > > >> This adds the devicetree binding for the Tegra 2 NAND flash > > > >> controller. > > > >> > > > >> Signed-off-by: Lucas Stach > > > >> Signed-off-by: Stefan Agner > > > >> --- > > > >> .../bindings/mtd/nvidia-tegra20-nand.txt | 64 ++++++++++++++= +++++ > > > >> 1 file changed, 64 insertions(+) > > > >> create mode 100644 Documentation/devicetree/bindings/mtd/nvidia-t= egra20-nand.txt > > > >> > > > >> diff --git a/Documentation/devicetree/bindings/mtd/nvidia-tegra20-= nand.txt b/Documentation/devicetree/bindings/mtd/nvidia-tegra20-nand.txt > > > >> new file mode 100644 > > > >> index 000000000000..5cd984ef046b > > > >> --- /dev/null > > > >> +++ b/Documentation/devicetree/bindings/mtd/nvidia-tegra20-nand.txt > > > >> @@ -0,0 +1,64 @@ > > > >> +NVIDIA Tegra NAND Flash controller > > > >> + > > > >> +Required properties: > > > >> +- compatible: Must be one of: > > > >> + - "nvidia,tegra20-nand" =20 > > > >=20 > > > > As discussed previously, I prefer "nvidia,tegra20-nand-controller" = or > > > > "nvidia,tegra20-nfc". > > > > =20 > > > >> +- reg: MMIO address range > > > >> +- interrupts: interrupt output of the NFC controller > > > >> +- clocks: Must contain an entry for each entry in clock-names. > > > >> + See ../clocks/clock-bindings.txt for details. > > > >> +- clock-names: Must include the following entries: > > > >> + - nand > > > >> +- resets: Must contain an entry for each entry in reset-names. > > > >> + See ../reset/reset.txt for details. > > > >> +- reset-names: Must include the following entries: > > > >> + - nand > > > >> + > > > >> +Optional children nodes: > > > >> +Individual NAND chips are children of the NAND controller node. C= urrently > > > >> +only one NAND chip supported. > > > >> + > > > >> +Required children node properties: > > > >> +- reg: An integer ranging from 1 to 6 representing the CS line to= use. > > > >> + > > > >> +Optional children node properties: > > > >> +- nand-ecc-mode: String, operation mode of the NAND ecc mode. Cur= rently only > > > >> + "hw" is supported. > > > >> +- nand-ecc-algo: string, algorithm of NAND ECC. > > > >> + Supported values with "hw" ECC mode are: "rs", "bch". > > > >> +- nand-bus-width : See nand.txt > > > >> +- nand-on-flash-bbt: See nand.txt > > > >> +- nand-ecc-strength: integer representing the number of bits to c= orrect > > > >> + per ECC step (always 512). Supported strength using HW ECC > > > >> + modes are: > > > >> + - RS: 4, 6, 8 > > > >> + - BCH: 4, 8, 14, 16 > > > >> +- nand-ecc-maximize: See nand.txt > > > >> +- nand-is-boot-medium: Makes sure only ECC strengths supported by= the boot ROM > > > >> + are choosen. > > > >> +- wp-gpios: GPIO specifier for the write protect pin. > > > >> + > > > >> +Optional child node of NAND chip nodes: > > > >> +Partitions: see partition.txt > > > >> + > > > >> + Example: > > > >> + nand@70008000 { =20 > > > >=20 > > > > nand-controller@70008000 { > > > > =20 > > > >> + compatible =3D "nvidia,tegra20-nand"; =20 > > > >=20 > > > > compatible =3D "nvidia,tegra20-nand-controller"; > > > >=20 > > > > or > > > >=20 > > > > compatible =3D "nvidia,tegra20-nfc"; > > > > =20 > > >=20 > > > Maybe it's just me, but when I'm reading "nfc", my first association = is the > > > "Near Field Communication". Probably an explicit > > > "nvidia,tegra20-nand-controller" variant is more preferable. =20 >=20 > I also prefer nvidia,tegra20-nand-controller. >=20 > >=20 > > We don't really use a -controller suffix for any of the other > > controllers because it is kind of implied. "nfc" is also not something > > that is ever referred to in the technical documentation. > >=20 > > "nvidia,tegra20-nand" would be most consistent with all the rest of > > Tegra (c.f. "nvidia,tegra*-ahci", "nvidia,tegra*-pci", > > "nvidia,tegra*-hda", "nvidia,tegra*-gmi", ...). >=20 > People get confused about what this node represents when you just have > "nvidia,tegra20-nand", and then you start seeing NAND related props or > partition nodes being defined under the NAND controller node. > I really prefer to have the "-controller" prefix here to avoid such > confusions. Hmm... odd. I mean, the node is already called nand-controller@..., which makes it pretty obvious to me that this represents a controller rather than a NAND chip. Also, the placement of this in the DT hierarchy should make it pretty obvious that it is a controller since you can't just put a NAND chip directly on the CPU's address bus. In addition I think the nvidia,tegra* part already pretty strongly suggests that this is part of an SoC, so further implies "controller". Thierry --tDYGg60iReQ7u8wj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlsXwHcACgkQ3SOs138+ s6FQgRAAh5km0NFrhz9HfM9KO8p6TboIk0ytTifOYnO0szX8nB9auX5pI1ggN6aO vrMHkOHFAMLB34QkboVVVuINJun7FJpnz77Rm4/XV8tHvjn9s8r2gtVWZvnanBCc ykAZ4gjn2mxa4UvYD7kIIQimS59t2j6Ic+jV5ho4gC/6RK04Q415SbRjU0MaAoeG mUwzO9fMHhR0afQGtO8JrqeGKm67Qu40cvVgcpdUFAFEO50JWwG4YRZYBi2JweE4 N7YNR013a7P0Yet20f87hbuMLx958QNVRTneNUGsfDNLB0SdrBzPUqZk5e53y+Ot +tm/tiTQttIh3SjfcHudRX9y42IdAPRae91GqfJLKbfWstTCOzGai91V9lDStZpY 7ZAx7IjbQ96L0XqXu3ySW7gjBhmzNl69lGGfgqpeairYoiI9XdHEeW4Z4JlIWQBE wCb+pjWBgxGQmAaraaEUPRg54sVcLB132vlHfSM8Sac6mTF6ofUiC1Awuphikbdg 6g5SzX6Yi9TcQZdpQPwnio+lYlOY1RDIWkbz4kPhwCFxO6xLuM91/l8ws664Dtg6 +CdozIwWJQVL4mb2vkFaRCMBcx8IltkTMDgK+sPZ0TTNHyMi6ap2Ssd2NP8XDgsb HM1nAcynVy5r/1zsWtI+vD3QFYxZL7VRrGFxg3D1vFbsls7asvs= =Nfsx -----END PGP SIGNATURE----- --tDYGg60iReQ7u8wj--