Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp518041yba; Mon, 1 Apr 2019 10:54:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqymhDUw8qtXQE+utSstw46FppXMLMRj8LPuO4bEPomLwmRPTlxVDx3OGLz4OstqNfeKjVlY X-Received: by 2002:a17:902:6b8c:: with SMTP id p12mr66660761plk.282.1554141288609; Mon, 01 Apr 2019 10:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554141288; cv=none; d=google.com; s=arc-20160816; b=nrebmyo+e8aa4nJfhu14URQSud8CWKQuJKJXmKM3fD2OkcAlxxH+1aXwG9Pikn9jvG cpcFfKlr9T9bVBmQja1MgXj+K8usin/OARAj6mm9iGvu581bOpdXoCznPEi19t+8Sz/4 cvT7AlqVvxgIquHLjVYlrI8YWYDQHePGYsvWgPEN3V0eQgsz/qGrsCeYu8vT5x2IEg+r 4/1Z2jD7eZKKTuDUF/TTnkTi0RdPCNpkTc6XI0OsQLLyVAN+pFOH1TNZ1pVgJK6U86FQ kmdwivgap7Ekfv3+2CDiuiqsSup4TkMu1yxSsHdnubWJkjDTvW0Cm+e/vmzTh3U5X0Vr HIkQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=1mm7gCXU+n7XRSOSc9XlBWFdOfZjJtZxdoUzxb5+CXg=; b=dm5fonHSzdEU1Zo3HMoIX1njWaTF4Fkfl4z2QCb4ow8bsk1/YlJB8mF8G6dcOWRvY1 UmC1rIyugXWchz1NwlkFmDU25eBIJHwFETYF/CIulX7KT4QzIi4rztog+ynt9QfXFPBi mUc/mXJ00W1GXHs2/n9DQVApguIHXAIzbmSzlHUMCuuuzTW8F7hpk8dGQhgJZ/xAfv25 WlewCPoF9r+nSm8d4NtBDnFzmB1+Ie+JVcLZCZI+2He7Npt0Ze+woBbJC5Oq1BcwTkf7 09VKmIfKfr8DjMQVI05otrqYnN9jinPoaVYMYrc2T05kjzYpW5E+HJ+Na91YQ9nnc1pM BsqA== 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 v79si9025243pgb.56.2019.04.01.10.54.33; Mon, 01 Apr 2019 10:54:48 -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 S1732840AbfDARwx convert rfc822-to-8bit (ORCPT + 99 others); Mon, 1 Apr 2019 13:52:53 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:53315 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732545AbfDARww (ORCPT ); Mon, 1 Apr 2019 13:52:52 -0400 X-Originating-IP: 81.185.163.178 Received: from xps13 (178.163.185.81.rev.sfr.net [81.185.163.178]) (Authenticated sender: miquel.raynal@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id BECECC000A; Mon, 1 Apr 2019 17:52:40 +0000 (UTC) Date: Mon, 1 Apr 2019 19:52:35 +0200 From: Miquel Raynal To: Mason Yang Cc: broonie@kernel.org, marek.vasut@gmail.com, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, bbrezillon@kernel.org, dwmw2@infradead.org, lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, computersforpeace@gmail.com, paul.burton@mips.com, stefan@agner.ch, christophe.kerello@st.com, liang.yang@amlogic.com, geert@linux-m68k.org, devicetree@vger.kernel.org, marcel.ziswiler@toradex.com, linux-mtd@lists.infradead.org, richard@nod.at, juliensu@mxic.com.tw, zhengxunli@mxic.com.tw Subject: Re: [PATCH 4/7] dt-bindings: mfd: Document Macronix MX25F0A controller bindings Message-ID: <20190401193431.3e8788a0@xps13> In-Reply-To: <1553768318-23149-5-git-send-email-masonccyang@mxic.com.tw> References: <1553768318-23149-1-git-send-email-masonccyang@mxic.com.tw> <1553768318-23149-5-git-send-email-masonccyang@mxic.com.tw> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mason, Mason Yang wrote on Thu, 28 Mar 2019 18:18:35 +0800: > Document the bindings used by the Macronix MX25F0A MFD controller. > > Signed-off-by: Mason Yang > --- > .../devicetree/bindings/mfd/mxic-mx25f0a.txt | 66 ++++++++++++++++++++++ > 1 file changed, 66 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/mxic-mx25f0a.txt > > diff --git a/Documentation/devicetree/bindings/mfd/mxic-mx25f0a.txt b/Documentation/devicetree/bindings/mfd/mxic-mx25f0a.txt > new file mode 100644 > index 0000000..53b4839 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/mxic-mx25f0a.txt > @@ -0,0 +1,66 @@ > +Macronix MX25F0A Multi-Function Device Tree Bindings > +---------------------------------------------------- > + > +MX25F0A is a MultiFunction Device with SPI and raw NAND, which > +supports either spi host controller or raw nand controller. > + > +Required properties: > +- compatible: should be "mxic,mx25f0a-mfd" Should probably be "mxic,mx25f0a" > +- #address-cells: should be 1 > +- #size-cells: should be 0 > +- reg: should contain 2 entries, one for the registers and one for the direct > + mapping area in SPI mode. > +- reg-names: should contain "regs" and "dirmap" > +- interrupts: interrupt line connected to this MFD controller > + > +Required nodes: > + - spi : > + Node for configuring the SPI controller driver. > + Required properties: > + - compatible = "mxicy,mx25f0a-spi"; > + - clock-names: should contain "ps_clk", "send_clk" and > + "send_dly_clk" > + - clocks: should contain 3 entries for the "ps_clk", "send_clk" > + and "send_dly_clk" clocks > + > +- nand : > + Node for configuring the raw nand controller driver. > + Required properties: > + - compatible = "mxicy,mx25f0a-nand-ctlr"; > + - nand-ecc-mode = "soft"; > + - nand-ecc-algo = "bch"; You can have only one node at a time. You can add a mxic,mode property being either "spi-controller" or "nand-controller". > + > +Example: > + > + mxic: mx25f0a-mfd@43c30000 { > + compatible = "mxic,mx25f0a-mfd"; > + reg = <0x43c30000 0x10000>, <0xa0000000 0x4000000>; > + reg-names = "regs", "dirmap"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* either spi or nand */ > + spi { > + compatible = "mxicy,mx25f0a-spi"; > + clocks = <&clkwizard 0>, <&clkwizard 1>, <&clkc 15>; > + clock-names = "send_clk", "send_dly_clk", "ps_clk"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + flash@0 { > + compatible = "jedec,spi-nor"; > + reg = <0>; > + spi-max-frequency = <25000000>; > + spi-tx-bus-width = <4>; > + spi-rx-bus-width = <4>; > + }; > + }; > + > + nand { > + compatible = "mxicy,mx25f0a-nand-ctlr"; > + nand-ecc-mode = "soft"; > + nand-ecc-algo = "bch"; > + nand-ecc-step-size = <512>; > + nand-ecc-strength = <8>; Are you sure you want soft correction? (I have not checked the driver yet). For hw correction, I prefer to drop the two step-size/strength properties. These values will be derived depending on the chip's requirements. Thanks, Miquèl