Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1506405imm; Thu, 19 Jul 2018 02:58:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcjrZwTsfmCnsMClYg8Ju3v8Dwzz8R/YZN+SwEnEmDv+b7RiDseJ8boTgMpmuhmAhHmrMaE X-Received: by 2002:a63:e60c:: with SMTP id g12-v6mr9431541pgh.308.1531994333544; Thu, 19 Jul 2018 02:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531994333; cv=none; d=google.com; s=arc-20160816; b=a9pEABgh/mWhi39aolnLAdoGFL9G+/46/blRatWxZ+dHXt6lZYnTzBXPpiH20rHVbn 9olbihwtofZAyyKH78hSukiSHFt/KiRIvXGx/q+GJxNceHC5ItDe7MVbJf4TEAvucXAm El27elkx4IfuWZbNko4F1DHI5B5ROaTCXU1/gRcTGLRqMc4oE7PwI5zoV75klk4fxRtp U36i7i8X+ywycHgDco2Znlx6b2+cXRQLz6HZcu8nXSTzTaDCbCtMEt3VQ6RwICpr7qWt id82/MnwhQHMZr3q+aPfMP50vqYtIeK+HbIO5RGxA5fbpJyVK2GSl/LwD/hKaJxZogm2 AMYQ== 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 :arc-authentication-results; bh=9U6007mXyNle0e65eMxEi9XQid9SHCIczXKDizR7JLc=; b=UAfZaQIdtE7fH3SU8BoHPeJA4SjoNBRMeVAW4hdpjRjKlgJY123Mpzo818H+aS/XkR 79O0uA0VVncg2nHSQbE+9HZCkAwaW/MhXh0XBKVL2N4GO12cFJ+dGtbUJaXHM+XPPGOQ cqysHyOofKoVi6hj5jAvVuKpD8XEEVcTwGQHyLN6EZMBdhsSs1lWKC9LPtPPxEnPKxib 4qZ/IiZrkvKk1lIIGKlYRJxZIwHBlwgYvwviDfX87SThiabQcq2MCtsp/lrdr18Y8d1j WROgxswmi1APMpUT3XLP+YGkq0jBk3Dw86GPVhrMQk8XWk2FGfG9MGTc6lY2mi0+BQ2w xfMw== 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 o184-v6si5785001pga.520.2018.07.19.02.58.38; Thu, 19 Jul 2018 02:58:53 -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 S1727367AbeGSKk1 (ORCPT + 99 others); Thu, 19 Jul 2018 06:40:27 -0400 Received: from mail.bootlin.com ([62.4.15.54]:58992 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbeGSKk1 (ORCPT ); Thu, 19 Jul 2018 06:40:27 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 6D3A620876; Thu, 19 Jul 2018 11:58:03 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-27-161.w90-88.abo.wanadoo.fr [90.88.147.161]) by mail.bootlin.com (Postfix) with ESMTPSA id EEC44203EC; Thu, 19 Jul 2018 11:57:52 +0200 (CEST) Date: Thu, 19 Jul 2018 11:57:51 +0200 From: Boris Brezillon To: Yixun Lan Cc: , Liang Yang , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Carlo Caione , Kevin Hilman , Rob Herring , Jian Hu , , , , Subject: Re: [RFC PATCH v2 1/2] dt-bindings: nand: meson: add Amlogic NAND controller driver Message-ID: <20180719115751.34ff1a51@bbrezillon> In-Reply-To: <20180719094612.5833-2-yixun.lan@amlogic.com> References: <20180719094612.5833-1-yixun.lan@amlogic.com> <20180719094612.5833-2-yixun.lan@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 Thu, 19 Jul 2018 17:46:11 +0800 Yixun Lan 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 > --- > .../bindings/mtd/amlogic,meson-nand.txt | 95 +++++++++++++++++++ > 1 file changed, 95 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 000000000000..31f910dcd27a > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt > @@ -0,0 +1,95 @@ > +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 should document pinctrl-0 and pinctrl-names, not pins and nand_pins. > +- amlogic,mmc-syscon : Required for NAND clocks, it's shared with SD/eMMC > + controller port C Are you sure this is still needed, even after exposing MMC/NAND clks through the CCF? You forgot - #address-cells - #size-cells - reg - interrupts - > + > +Optional children nodes: > +Children nodes represent the available nand chips. > + > +Optional properties: > +- amlogic,nand-enable-scrambler: enable the NAND scrambler feature. > + - (absent) = scrambler is disabled > + - (present) = scrambler is enabled I keep thinking this is not needed if you have the NAND chip properly defined (NAND_NEED_SCRAMBLING flag set in chip->options). > + > + > +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>; I'd recommend not forcing a specific ECC config in the example. > + > + amlogic,nand-enable-scrambler; > + > + partition@0 { > + label = "boot"; > + reg = <0x00000000 0x00200000>; > + read-only; > + }; Blank line here. > + 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>; > + }; > + }; > + };