Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1361743imm; Tue, 5 Jun 2018 13:20:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLUK4l/xHX/oxcEayUQ8TraOsiNksHf5/CY4k1qoMybAzYEfCTiB8911l74IHTfIvDTvWmz X-Received: by 2002:a17:902:2805:: with SMTP id e5-v6mr106218plb.55.1528230036936; Tue, 05 Jun 2018 13:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528230036; cv=none; d=google.com; s=arc-20160816; b=s9VlRXskq284KCulHfSW4ZgJT66OYwTbC48A94AD2XTfZPR0GLQDOpmdhp/CBxssmm F4jN1QV4Ikuo+GnnRrMLBncgM6AXIR+cLOVem0O4S9L4u9Yam/TFogzsFaKN38iy1kZ2 nVtTYYxEfNjInv1/jvI+N1a/3jO4pfpbeiL1S4Xz060w7tcVmhJSU/1oSdIZeyBwoXSV wdiNAs5Wx/AVtoJ9ovvqykHWEhVabFdgMMymmvaeF2WMPjLBgm2Lr4XcBdCvvi0jAaII 6wKpIeLEYpDP2iJocLNeLi1+elo4u2xclGB6Y6UPk62mHrBFAU0wH/DaP+yG6/r5CDs8 xDig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=rQ2p/jrzJIG98tEQXHJ7Xm8O3JW5Pd2Z8jvt6J6x224=; b=wUlmRI0W1MKqjI8xGi0sHLdd1WF7x0I0LFdh33EEIQfbiH+9G2XjDN/jyjxaOHxdqj TKC1cl0zK4Qv0Hav8rxFHMxZWmS1txLIi6VZp1Q2JRzkfLy0AEpLxsaci6ENBF/81BpK 31TH7sFnI9tRFSId7mGQeirLMUoxV0ssbo3PVmbW9ShUQKF45gOFohQzSNwh4iUKngPq GNKtNF1aMA8aoEoBeSsakRcZfQxmIPEsXDSYdJn3dy/M6yV2t6+QiyUJ0NrCYLpU3vjK lUgB7zeVtuylcjPOPxaibxCGcEqx6x+cFV3DivhMpw/Uq7uDpk1advVEV+ZTobpHvB9F Sjnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VVCrvqBU; 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 c12-v6si12399414pll.75.2018.06.05.13.20.22; Tue, 05 Jun 2018 13:20:36 -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=VVCrvqBU; 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 S1752606AbeFEUTW (ORCPT + 99 others); Tue, 5 Jun 2018 16:19:22 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36896 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752305AbeFEUTT (ORCPT ); Tue, 5 Jun 2018 16:19:19 -0400 Received: by mail-wm0-f67.google.com with SMTP id r125-v6so7421660wmg.2; Tue, 05 Jun 2018 13:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rQ2p/jrzJIG98tEQXHJ7Xm8O3JW5Pd2Z8jvt6J6x224=; b=VVCrvqBULZhjJdPqZ8NHzBK8jIhRo82RfEAwd3CckE3sUoMvSnTfYDnH2O8Fqg/R7l 6p0AQ2hMbklzZFBwokveJtZOGbEBIrdH/yLXJyubbckU1yh1VSTAdoVm/g9k6o60fN2y m/TyDZfai7LcT3He3/yKzz4t1nOGc24SMAwgYr5ZlZT2a5yzxk0hUwvx8L8tTFKPc87J OyrtbCE5Q28MZBRQ15uubmfY/9wncbxwZSdwxRVZFwA/BHYFXxmJUecmxt/jtITCHL3d mA/eoYNxDV2z1NoT9vdXxaiVC1atZutxtpq7jkNFZYVfXE31K6obHdk8QOxtRl/jxLIl XWsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=rQ2p/jrzJIG98tEQXHJ7Xm8O3JW5Pd2Z8jvt6J6x224=; b=fDELpgYbXbRHTnELFGeZPvElIW2sQK7ZPHHmRmJnAwoh7/Y/HZ4x9ngT9NRhBXF70B 29bB1HalCdutcZYCxB4XKfbOA35AaJhH0Zecb/oOs/NyjDmSQOb2pn5qeDzgcXFBMait GvTvDcLnzjOdr3d9Upn1b3oX2l8OA6w+WDPeK+gl0LBEN8I5xViz4izFadTrf7/7qyZW urrVR60RwwxGyzlzkRk1lHDKBomkr6jYrPKGvtSYKoq5JaZoVRCTDvABueMkZweO9hLO 0JHmHxfJq+cAurALrJyafXGHzQWyYXl2kZEIC7imNghC7vfLG5/A56Zc6wiCjFaz6+f7 /33Q== X-Gm-Message-State: APt69E3Sgw7KNG+p8/oJOwu6r99uLGNknSKhlXv9LjauAA09Fzuq4D/z gSVj0ccF9iDEaHThpJ+knlBBbpE4 X-Received: by 2002:a1c:4a0a:: with SMTP id x10-v6mr347736wma.91.1528229957888; Tue, 05 Jun 2018 13:19:17 -0700 (PDT) Received: from [192.168.2.145] ([109.252.91.41]) by smtp.googlemail.com with ESMTPSA id r75-v6sm3647174wmg.31.2018.06.05.13.19.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 13:19:17 -0700 (PDT) Subject: Re: [PATCH v3 3/6] mtd: rawnand: tegra: add devicetree binding To: Boris Brezillon , Stefan Agner Cc: dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.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 References: <20180531221637.6017-1-stefan@agner.ch> <20180531221637.6017-4-stefan@agner.ch> <20180601093025.2817ff30@bbrezillon> From: Dmitry Osipenko Openpgp: preference=signencrypt Autocrypt: addr=digetx@gmail.com; prefer-encrypt=mutual; keydata= xsBNBFpX5TwBCADQhg+lBnTunWSPbP5I+rM9q6EKPm5fu2RbqyVAh/W3fRvLyghdb58Yrmjm KpDYUhBIZvAQoFLEL1IPAgJBtmPvemO1XUGPxfYNh/3BlcDFBAgERrI3BfA/6pk7SAFn8u84 p+J1TW4rrPYcusfs44abJrn8CH0GZKt2AZIsGbGQ79O2HHXKHr9V95ZEPWH5AR0UtL6wxg6o O56UNG3rIzSL5getRDQW3yCtjcqM44mz6GPhSE2sxNgqureAbnzvr4/93ndOHtQUXPzzTrYB z/WqLGhPdx5Ouzn0Q0kSVCQiqeExlcQ7i7aKRRrELz/5/IXbCo2O+53twlX8xOps9iMfABEB AAHNIkRtaXRyeSBPc2lwZW5rbyA8ZGlnZXR4QGdtYWlsL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hHFvIbv/p7jKH6OT 90FsgUSVbShh7SH5OzAcgqSy4kxuS1AHizWo6P3f9vei987LZWTyhuEuhJsOfivDsjKIq7qQ c5eR+JJtyLEA0Jt4cQGhpzHtWB0yB3XxXzHVa4QUp00BNVWyiJ/t9JHT4S5mdyLfcKm7ddc9 Message-ID: Date: Tue, 5 Jun 2018 23:19:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180601093025.2817ff30@bbrezillon> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.06.2018 10:30, Boris Brezillon wrote: > On Fri, 1 Jun 2018 00:16:34 +0200 > Stefan Agner wrote: > >> 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-tegra20-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" > > As discussed previously, I prefer "nvidia,tegra20-nand-controller" or > "nvidia,tegra20-nfc". > >> +- 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. Currently >> +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. Currently 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 correct >> + 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 { > > nand-controller@70008000 { > >> + compatible = "nvidia,tegra20-nand"; > > compatible = "nvidia,tegra20-nand-controller"; > > or > > compatible = "nvidia,tegra20-nfc"; > 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. >> + reg = <0x70008000 0x100>; >> + interrupts = ; >> + clocks = <&tegra_car TEGRA20_CLK_NDFLASH>; >> + clock-names = "nand"; >> + resets = <&tegra_car 13>; >> + reset-names = "nand"; >> + >> + nand-chip@0 { > > nand@0 { > >> + reg = <0>; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + nand-bus-width = <8>; >> + nand-on-flash-bbt; >> + nand-ecc-algo = "bch"; >> + nand-ecc-strength = <8>; >> + wp-gpios = <&gpio TEGRA_GPIO(S, 0) GPIO_ACTIVE_LOW>; >> + }; >> + }; > > With this addressed, > > Reviewed-by: Boris Brezillon >