Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1855187imm; Fri, 7 Sep 2018 07:12:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbJe04RlOu0Z6OVFmtUwm8FipZF/1zbbCwPkMZM7n5GkNZXym0DELjlJMxbteFvfD5tiq7L X-Received: by 2002:a17:902:bf0b:: with SMTP id bi11-v6mr8267011plb.76.1536329570040; Fri, 07 Sep 2018 07:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536329570; cv=none; d=google.com; s=arc-20160816; b=v78CSRxKvUDIT2Fkz9Jmwa98xlFmP3PFmLszlMfoQq3U5Jtq0Chw7FjjFZtHA2MTkG buWmSxxEB4lvMALAg1utTTtlTB6UvxQf2r7NA5wBKwJGGggkvOLN2iqNUeYRFERoaBdP ubdc/5hUGK+HdMTgcP8cYD6dXGY5tWmTawkwTnYm1JNpuJ9/oRBs13NTkq91o8G3pF1K 3dTcMfiNWWvL33IK4hjqqgVN7o4g01WFWdNsofDLVPI9+Go5FAwF2nbLXZPjW81y4ENl 0aTP5aUfHYETT3x1X72rcqCVlhJ4AKCmu1GtVUgVCXLuBmyrNQ02scQC3RAoLWQFqtKg y51Q== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=abjhCbXBmY6MSGOt2w23BulBJt45TBNSyy0WwrqL8+8=; b=aNhAAVJLwSILbGkkMJoy1B05XYu7MUPrn0YEvDVRZ1pNDdnRgry0rT3x12GkXY/MpI Vqv7B0QlfNoZS8t0ap1MPzDKfIpX8G3Bxyx/BDayO27TlgRrK+8H2DxIXnEcoWtQcn59 UaQiwerAgtl0elG5WOUJ4uVHD7S3/MWkgPB8u5ecnmy0+Om24dUQFxbbSumxbYQWPhQo 4eqS7odyjA3i9qj6KYvztkURAmtsrI6II9LMZPXLLGy/IGjUUXRXTt64O0wtaUQ2OzpS jiMGXY+tSGlKMWyDXH5adrVUEeG90yDfl4w/C9ThUCpTLGUY2bR+Q3sTG062+tGePPwI b1eg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si8427886pgh.557.2018.09.07.07.12.34; Fri, 07 Sep 2018 07:12:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728436AbeIGRA3 (ORCPT + 99 others); Fri, 7 Sep 2018 13:00:29 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40427 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbeIGRA3 (ORCPT ); Fri, 7 Sep 2018 13:00:29 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 6E6D520726; Fri, 7 Sep 2018 14:19:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-30-219.w90-88.abo.wanadoo.fr [90.88.15.219]) by mail.bootlin.com (Postfix) with ESMTPSA id E93B82071D; Fri, 7 Sep 2018 14:19:45 +0200 (CEST) Date: Fri, 7 Sep 2018 14:19:44 +0200 From: Boris Brezillon To: Jianxin Pan Cc: , Liang Yang , Yixun Lan , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Carlo Caione , Kevin Hilman , Rob Herring , Jian Hu , Hanjie Lin , Victor Wan , , , , Subject: Re: [RFC PATCH v3 1/2] dt-bindings: nand: meson: add Amlogic NAND controller driver Message-ID: <20180907141944.4dd4406b@bbrezillon> In-Reply-To: <1536317831-58056-2-git-send-email-jianxin.pan@amlogic.com> References: <1536317831-58056-1-git-send-email-jianxin.pan@amlogic.com> <1536317831-58056-2-git-send-email-jianxin.pan@amlogic.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 7 Sep 2018 18:57:10 +0800 Jianxin Pan wrote: > From: Liang Yang > > Add Amlogic NAND controller dt-bindings for Meson SoC, > Current this driver support GXBB/GXL/AXG platform. > > Signed-off-by: Liang Yang > Signed-off-by: Yixun Lan > --- > .../devicetree/bindings/mtd/amlogic,meson-nand.txt | 91 ++++++++++++++++++++++ > 1 file changed, 91 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt > > diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt > new file mode 100644 > index 0000000..655a778 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt > @@ -0,0 +1,91 @@ > +Amlogic NAND Flash Controller (NFC) for GXBB/GXL/AXG family SoCs > + > +This file documents the properties in addition to those available in > +the MTD NAND bindings. > + > +Required properties: > +- compatible : contains one of: > + - "amlogic,meson-gxl-nfc" > + - "amlogic,meson-axg-nfc" > +- clocks : > + A list of phandle + clock-specifier pairs for the clocks listed > + in clock-names. > + > +- clock-names: Should contain the following: > + "core" - NFC module gate clock > + "device" - device clock from eMMC sub clock controller > + > +- pins : Select pins which NFC need. > +- nand_pins: Detail NAND pins information. You mean pinctrl-names and pinctrl-0, right? Not sure it's necessary to document that, but if you do, please use the correct DT prop names. > +- amlogic,mmc-syscon : Required for NAND clocks, it's shared with SD/eMMC > + controller port C > + > +Optional children nodes: > +Children nodes represent the available nand chips. > + > + > + One too many blank lines here. > +Other properties: > +see Documentation/devicetree/bindings/mtd/nand.txt for generic bindings. > + > +Example demonstrate on AXG SoC: > + > + sd_emmc_c_clkc: mmc@7000 { > + compatible = "amlogic,meson-axg-mmc-clkc", "syscon"; > + reg = <0x0 0x7000 0x0 0x800>; > + status = "okay"; > + }; > + > + nand: nfc@7800 { > + compatible = "amlogic,meson-axg-nfc"; > + reg = <0x0 0x7800 0x0 0x100>; > + #address-cells = <1>; > + #size-cells = <0>; > + interrupts = ; > + status = "disabled"; > + > + clocks = <&clkc CLKID_SD_EMMC_C>, > + <&sd_emmc_c_clkc CLKID_MMC_DIV>; > + clock-names = "core", "device"; > + amlogic,mmc-syscon = <&sd_emmc_c_clkc>; > + > + status = "okay"; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&nand_pins>; > + > + nand@0 { > + reg = <0>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + nand-on-flash-bbt; > + nand-ecc-mode = "hw"; > + nand-ecc-strength = <8>; > + nand-ecc-step-size = <1024>; Drop nand-ecc- props. I guess you have a sensible default value and I prefer when ECC requirements are directly extracted during chip detection. Defining that in the DT is a bad habit. The only one that could make sense (assuming you support it) is nand-ecc-maximize. > + > + amlogic,nand-enable-scrambler; Please drop this property (it's not longer documented). > + > + partition@0 { > + label = "boot"; > + reg = <0x00000000 0x00200000>; > + read-only; > + }; > + partition@200000 { > + label = "env"; > + reg = <0x00200000 0x00400000>; > + }; > + partition@600000 { > + label = "system"; > + reg = <0x00600000 0x00a00000>; > + }; > + partition@1000000 { > + label = "rootfs"; > + reg = <0x01000000 0x03000000>; > + }; > + partition@4000000 { > + label = "media"; > + reg = <0x04000000 0x8000000>; > + }; No need to define the partitions in your example, especially since they should be placed in a partitions subnode with a "fixed-partitions" compat. > + }; > + };