All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Mason Yang <masonccyang@mxic.com.tw>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	christophe.kerello@st.com, juliensu@mxic.com.tw,
	bbrezillon@kernel.org, marcel.ziswiler@toradex.com,
	lee.jones@linaro.org, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, linux-spi@vger.kernel.org,
	marek.vasut@gmail.com, paul.burton@mips.com, broonie@kernel.org,
	geert@linux-m68k.org, stefan@agner.ch,
	linux-mtd@lists.infradead.org, richard@nod.at,
	liang.yang@amlogic.com, computersforpeace@gmail.com,
	dwmw2@infradead.org, zhengxunli@mxic.com.tw
Subject: Re: [PATCH 4/7] dt-bindings: mfd: Document Macronix MX25F0A controller bindings
Date: Mon, 1 Apr 2019 19:52:35 +0200	[thread overview]
Message-ID: <20190401193431.3e8788a0@xps13> (raw)
In-Reply-To: <1553768318-23149-5-git-send-email-masonccyang@mxic.com.tw>

Hi Mason,

Mason Yang <masonccyang@mxic.com.tw> 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 <masonccyang@mxic.com.tw>
> ---
>  .../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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Mason Yang <masonccyang@mxic.com.tw>
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
Date: Mon, 1 Apr 2019 19:52:35 +0200	[thread overview]
Message-ID: <20190401193431.3e8788a0@xps13> (raw)
In-Reply-To: <1553768318-23149-5-git-send-email-masonccyang@mxic.com.tw>

Hi Mason,

Mason Yang <masonccyang@mxic.com.tw> 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 <masonccyang@mxic.com.tw>
> ---
>  .../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

  reply	other threads:[~2019-04-01 17:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 10:18 [PATCH 0/7] Add Macronix MX25F0A MFD driver and NAND function Mason Yang
2019-03-28 10:18 ` Mason Yang
2019-03-28 10:18 ` [PATCH 1/7] mfd: Add Macronix MX25F0A MFD controller driver Mason Yang
2019-03-28 10:18   ` Mason Yang
2019-03-28 10:18 ` [PATCH 2/7] mtd: rawnand: Add Macronix MX25F0A NAND " Mason Yang
2019-03-28 10:18   ` Mason Yang
2019-03-28 10:18 ` [PATCH 3/7] spi: Patch Macronix MX25F0A SPI " Mason Yang
2019-03-28 10:18   ` Mason Yang
2019-04-01  7:51   ` Mark Brown
2019-04-01  7:51     ` Mark Brown
2019-04-01  8:03     ` masonccyang
2019-03-28 10:18 ` [PATCH 4/7] dt-bindings: mfd: Document Macronix MX25F0A controller bindings Mason Yang
2019-03-28 10:18   ` Mason Yang
2019-04-01 17:52   ` Miquel Raynal [this message]
2019-04-01 17:52     ` Miquel Raynal
2019-04-02  6:04     ` masonccyang
2019-04-03 11:51   ` Lee Jones
2019-04-03 11:51     ` Lee Jones
2019-04-08  1:23     ` masonccyang
2019-03-28 10:18 ` [PATCH 5/7] spi: Add direct mapping mode for Macronix SPI controller Mason Yang
2019-03-28 10:18   ` Mason Yang
2019-03-28 10:18 ` [PATCH 6/7] mtd: rawnand: Add Macronix NAND read retry and randomizer support Mason Yang
2019-03-28 10:18   ` Mason Yang
2019-03-28 10:18 ` [PATCH 7/7] mtd: rawnand: Add Macronix NAND block protection driver Mason Yang
2019-03-28 10:18   ` Mason Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190401193431.3e8788a0@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=broonie@kernel.org \
    --cc=christophe.kerello@st.com \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=geert@linux-m68k.org \
    --cc=juliensu@mxic.com.tw \
    --cc=lee.jones@linaro.org \
    --cc=liang.yang@amlogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marek.vasut@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=masonccyang@mxic.com.tw \
    --cc=paul.burton@mips.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=stefan@agner.ch \
    --cc=zhengxunli@mxic.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.