From: Rob Herring <robh@kernel.org>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: devicetree@vger.kernel.org, Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
open list <linux-kernel@vger.kernel.org>,
linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
linux-mtd@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mediatek@lists.infradead.org,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/4] dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
Date: Tue, 3 Mar 2020 16:47:06 -0600 [thread overview]
Message-ID: <20200303224706.GA22867@bogus> (raw)
In-Reply-To: <20200228043636.559915-4-gch981213@gmail.com>
On Fri, Feb 28, 2020 at 12:36:35PM +0800, Chuanhong Guo wrote:
> spi-mtk-nor is a driver to replace mtk-quadspi and they have almost
> the same device-tree bindings. Reuse this binding documentation and
> convert it for new driver:
>
> 1. "Mediatek SoCs" -> "Mediatek ARM SoCs" because MTK MIPS SoCs
> use different controllers.
> 2. document "interrupts" as a required property because it's
> available on all SoCs with this controller and new driver takes
> advantages of it. It's implemented as optional only to maintain
> backward compatibility.
> 3. replace binding example with a mt7629 one because this is the
> only one I know the interrupt assignment.
That doesn't really matter. It would be less churn without that change
and examples are just examples.
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> ---
> Change since v1:
> none
>
> .../mtk-quadspi.txt => spi/spi-mtk-nor.txt} | 34 ++++++++-----------
> 1 file changed, 15 insertions(+), 19 deletions(-)
> rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (62%)
>
> diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> similarity index 62%
> rename from Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> rename to Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> index a12e3b5c495d..829da480b9a9 100644
> --- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> @@ -1,4 +1,4 @@
> -* Serial NOR flash controller for MediaTek SoCs
> +* SPI NOR flash controller for MediaTek ARM SoCs
>
> Required properties:
> - compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
> @@ -13,6 +13,7 @@ Required properties:
> "mediatek,mt7629-nor", "mediatek,mt8173-nor"
> "mediatek,mt8173-nor"
> - reg: physical base address and length of the controller's register
> +- interrupts: Interrupt number used by the controller.
> - clocks: the phandle of the clocks needed by the nor controller
> - clock-names: the names of the clocks
> the clocks should be named "spi" and "sf". "spi" is used for spi bus,
> @@ -22,29 +23,24 @@ Required properties:
> - #address-cells: should be <1>
> - #size-cells: should be <0>
>
> -The SPI flash must be a child of the nor_flash node and must have a
> -compatible property. Also see jedec,spi-nor.txt.
> -
> -Required properties:
> -- compatible: May include a device-specific string consisting of the manufacturer
> - and name of the chip. Must also include "jedec,spi-nor" for any
> - SPI NOR flash that can be identified by the JEDEC READ ID opcode (0x9F).
> -- reg : Chip-Select number
> +There should be only one spi slave device following generic spi bindings.
> +It's not recommended to use this controller for devices other than SPI NOR
> +flash due to limited transfer capability of this controller.
>
> Example:
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/clock/mt7629-clk.h>
>
> -nor_flash: spi@1100d000 {
> - compatible = "mediatek,mt8173-nor";
> - reg = <0 0x1100d000 0 0xe0>;
> - clocks = <&pericfg CLK_PERI_SPI>,
> - <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
> +spi_nor: spi@11014000 {
> + compatible = "mediatek,mt7629-nor",
> + "mediatek,mt8173-nor";
> + reg = <0x11014000 0xe0>;
> + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&pericfg CLK_PERI_FLASH_PD>,
> + <&topckgen CLK_TOP_FLASH_SEL>;
> clock-names = "spi", "sf";
> #address-cells = <1>;
> #size-cells = <0>;
> -
> - flash@0 {
> - compatible = "jedec,spi-nor";
> - reg = <0>;
> - };
Better to leave this in the example IMO.
Rob
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: devicetree@vger.kernel.org, Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
open list <linux-kernel@vger.kernel.org>,
linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
linux-mtd@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mediatek@lists.infradead.org,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/4] dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
Date: Tue, 3 Mar 2020 16:47:06 -0600 [thread overview]
Message-ID: <20200303224706.GA22867@bogus> (raw)
In-Reply-To: <20200228043636.559915-4-gch981213@gmail.com>
On Fri, Feb 28, 2020 at 12:36:35PM +0800, Chuanhong Guo wrote:
> spi-mtk-nor is a driver to replace mtk-quadspi and they have almost
> the same device-tree bindings. Reuse this binding documentation and
> convert it for new driver:
>
> 1. "Mediatek SoCs" -> "Mediatek ARM SoCs" because MTK MIPS SoCs
> use different controllers.
> 2. document "interrupts" as a required property because it's
> available on all SoCs with this controller and new driver takes
> advantages of it. It's implemented as optional only to maintain
> backward compatibility.
> 3. replace binding example with a mt7629 one because this is the
> only one I know the interrupt assignment.
That doesn't really matter. It would be less churn without that change
and examples are just examples.
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> ---
> Change since v1:
> none
>
> .../mtk-quadspi.txt => spi/spi-mtk-nor.txt} | 34 ++++++++-----------
> 1 file changed, 15 insertions(+), 19 deletions(-)
> rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (62%)
>
> diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> similarity index 62%
> rename from Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> rename to Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> index a12e3b5c495d..829da480b9a9 100644
> --- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> @@ -1,4 +1,4 @@
> -* Serial NOR flash controller for MediaTek SoCs
> +* SPI NOR flash controller for MediaTek ARM SoCs
>
> Required properties:
> - compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
> @@ -13,6 +13,7 @@ Required properties:
> "mediatek,mt7629-nor", "mediatek,mt8173-nor"
> "mediatek,mt8173-nor"
> - reg: physical base address and length of the controller's register
> +- interrupts: Interrupt number used by the controller.
> - clocks: the phandle of the clocks needed by the nor controller
> - clock-names: the names of the clocks
> the clocks should be named "spi" and "sf". "spi" is used for spi bus,
> @@ -22,29 +23,24 @@ Required properties:
> - #address-cells: should be <1>
> - #size-cells: should be <0>
>
> -The SPI flash must be a child of the nor_flash node and must have a
> -compatible property. Also see jedec,spi-nor.txt.
> -
> -Required properties:
> -- compatible: May include a device-specific string consisting of the manufacturer
> - and name of the chip. Must also include "jedec,spi-nor" for any
> - SPI NOR flash that can be identified by the JEDEC READ ID opcode (0x9F).
> -- reg : Chip-Select number
> +There should be only one spi slave device following generic spi bindings.
> +It's not recommended to use this controller for devices other than SPI NOR
> +flash due to limited transfer capability of this controller.
>
> Example:
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/clock/mt7629-clk.h>
>
> -nor_flash: spi@1100d000 {
> - compatible = "mediatek,mt8173-nor";
> - reg = <0 0x1100d000 0 0xe0>;
> - clocks = <&pericfg CLK_PERI_SPI>,
> - <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
> +spi_nor: spi@11014000 {
> + compatible = "mediatek,mt7629-nor",
> + "mediatek,mt8173-nor";
> + reg = <0x11014000 0xe0>;
> + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&pericfg CLK_PERI_FLASH_PD>,
> + <&topckgen CLK_TOP_FLASH_SEL>;
> clock-names = "spi", "sf";
> #address-cells = <1>;
> #size-cells = <0>;
> -
> - flash@0 {
> - compatible = "jedec,spi-nor";
> - reg = <0>;
> - };
Better to leave this in the example IMO.
Rob
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Chuanhong Guo <gch981213-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Miquel Raynal
<miquel.raynal-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
Richard Weinberger <richard-/L3Ra7n9ekc@public.gmane.org>,
Vignesh Raghavendra <vigneshr-l0cyMroinI0@public.gmane.org>,
Matthias Brugger
<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Tudor Ambarus
<tudor.ambarus-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2 3/4] dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
Date: Tue, 3 Mar 2020 16:47:06 -0600 [thread overview]
Message-ID: <20200303224706.GA22867@bogus> (raw)
In-Reply-To: <20200228043636.559915-4-gch981213-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Fri, Feb 28, 2020 at 12:36:35PM +0800, Chuanhong Guo wrote:
> spi-mtk-nor is a driver to replace mtk-quadspi and they have almost
> the same device-tree bindings. Reuse this binding documentation and
> convert it for new driver:
>
> 1. "Mediatek SoCs" -> "Mediatek ARM SoCs" because MTK MIPS SoCs
> use different controllers.
> 2. document "interrupts" as a required property because it's
> available on all SoCs with this controller and new driver takes
> advantages of it. It's implemented as optional only to maintain
> backward compatibility.
> 3. replace binding example with a mt7629 one because this is the
> only one I know the interrupt assignment.
That doesn't really matter. It would be less churn without that change
and examples are just examples.
>
> Signed-off-by: Chuanhong Guo <gch981213-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> Change since v1:
> none
>
> .../mtk-quadspi.txt => spi/spi-mtk-nor.txt} | 34 ++++++++-----------
> 1 file changed, 15 insertions(+), 19 deletions(-)
> rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (62%)
>
> diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> similarity index 62%
> rename from Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> rename to Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> index a12e3b5c495d..829da480b9a9 100644
> --- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> @@ -1,4 +1,4 @@
> -* Serial NOR flash controller for MediaTek SoCs
> +* SPI NOR flash controller for MediaTek ARM SoCs
>
> Required properties:
> - compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
> @@ -13,6 +13,7 @@ Required properties:
> "mediatek,mt7629-nor", "mediatek,mt8173-nor"
> "mediatek,mt8173-nor"
> - reg: physical base address and length of the controller's register
> +- interrupts: Interrupt number used by the controller.
> - clocks: the phandle of the clocks needed by the nor controller
> - clock-names: the names of the clocks
> the clocks should be named "spi" and "sf". "spi" is used for spi bus,
> @@ -22,29 +23,24 @@ Required properties:
> - #address-cells: should be <1>
> - #size-cells: should be <0>
>
> -The SPI flash must be a child of the nor_flash node and must have a
> -compatible property. Also see jedec,spi-nor.txt.
> -
> -Required properties:
> -- compatible: May include a device-specific string consisting of the manufacturer
> - and name of the chip. Must also include "jedec,spi-nor" for any
> - SPI NOR flash that can be identified by the JEDEC READ ID opcode (0x9F).
> -- reg : Chip-Select number
> +There should be only one spi slave device following generic spi bindings.
> +It's not recommended to use this controller for devices other than SPI NOR
> +flash due to limited transfer capability of this controller.
>
> Example:
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/clock/mt7629-clk.h>
>
> -nor_flash: spi@1100d000 {
> - compatible = "mediatek,mt8173-nor";
> - reg = <0 0x1100d000 0 0xe0>;
> - clocks = <&pericfg CLK_PERI_SPI>,
> - <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
> +spi_nor: spi@11014000 {
> + compatible = "mediatek,mt7629-nor",
> + "mediatek,mt8173-nor";
> + reg = <0x11014000 0xe0>;
> + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&pericfg CLK_PERI_FLASH_PD>,
> + <&topckgen CLK_TOP_FLASH_SEL>;
> clock-names = "spi", "sf";
> #address-cells = <1>;
> #size-cells = <0>;
> -
> - flash@0 {
> - compatible = "jedec,spi-nor";
> - reg = <0>;
> - };
Better to leave this in the example IMO.
Rob
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: devicetree@vger.kernel.org, Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
open list <linux-kernel@vger.kernel.org>,
linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
linux-mtd@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-mediatek@lists.infradead.org,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/4] dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
Date: Tue, 3 Mar 2020 16:47:06 -0600 [thread overview]
Message-ID: <20200303224706.GA22867@bogus> (raw)
In-Reply-To: <20200228043636.559915-4-gch981213@gmail.com>
On Fri, Feb 28, 2020 at 12:36:35PM +0800, Chuanhong Guo wrote:
> spi-mtk-nor is a driver to replace mtk-quadspi and they have almost
> the same device-tree bindings. Reuse this binding documentation and
> convert it for new driver:
>
> 1. "Mediatek SoCs" -> "Mediatek ARM SoCs" because MTK MIPS SoCs
> use different controllers.
> 2. document "interrupts" as a required property because it's
> available on all SoCs with this controller and new driver takes
> advantages of it. It's implemented as optional only to maintain
> backward compatibility.
> 3. replace binding example with a mt7629 one because this is the
> only one I know the interrupt assignment.
That doesn't really matter. It would be less churn without that change
and examples are just examples.
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> ---
> Change since v1:
> none
>
> .../mtk-quadspi.txt => spi/spi-mtk-nor.txt} | 34 ++++++++-----------
> 1 file changed, 15 insertions(+), 19 deletions(-)
> rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (62%)
>
> diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> similarity index 62%
> rename from Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> rename to Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> index a12e3b5c495d..829da480b9a9 100644
> --- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> @@ -1,4 +1,4 @@
> -* Serial NOR flash controller for MediaTek SoCs
> +* SPI NOR flash controller for MediaTek ARM SoCs
>
> Required properties:
> - compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
> @@ -13,6 +13,7 @@ Required properties:
> "mediatek,mt7629-nor", "mediatek,mt8173-nor"
> "mediatek,mt8173-nor"
> - reg: physical base address and length of the controller's register
> +- interrupts: Interrupt number used by the controller.
> - clocks: the phandle of the clocks needed by the nor controller
> - clock-names: the names of the clocks
> the clocks should be named "spi" and "sf". "spi" is used for spi bus,
> @@ -22,29 +23,24 @@ Required properties:
> - #address-cells: should be <1>
> - #size-cells: should be <0>
>
> -The SPI flash must be a child of the nor_flash node and must have a
> -compatible property. Also see jedec,spi-nor.txt.
> -
> -Required properties:
> -- compatible: May include a device-specific string consisting of the manufacturer
> - and name of the chip. Must also include "jedec,spi-nor" for any
> - SPI NOR flash that can be identified by the JEDEC READ ID opcode (0x9F).
> -- reg : Chip-Select number
> +There should be only one spi slave device following generic spi bindings.
> +It's not recommended to use this controller for devices other than SPI NOR
> +flash due to limited transfer capability of this controller.
>
> Example:
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/clock/mt7629-clk.h>
>
> -nor_flash: spi@1100d000 {
> - compatible = "mediatek,mt8173-nor";
> - reg = <0 0x1100d000 0 0xe0>;
> - clocks = <&pericfg CLK_PERI_SPI>,
> - <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
> +spi_nor: spi@11014000 {
> + compatible = "mediatek,mt7629-nor",
> + "mediatek,mt8173-nor";
> + reg = <0x11014000 0xe0>;
> + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&pericfg CLK_PERI_FLASH_PD>,
> + <&topckgen CLK_TOP_FLASH_SEL>;
> clock-names = "spi", "sf";
> #address-cells = <1>;
> #size-cells = <0>;
> -
> - flash@0 {
> - compatible = "jedec,spi-nor";
> - reg = <0>;
> - };
Better to leave this in the example IMO.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Chuanhong Guo <gch981213@gmail.com>
Cc: linux-mediatek@lists.infradead.org, linux-spi@vger.kernel.org,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Mark Brown <broonie@kernel.org>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/4] dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor
Date: Tue, 3 Mar 2020 16:47:06 -0600 [thread overview]
Message-ID: <20200303224706.GA22867@bogus> (raw)
In-Reply-To: <20200228043636.559915-4-gch981213@gmail.com>
On Fri, Feb 28, 2020 at 12:36:35PM +0800, Chuanhong Guo wrote:
> spi-mtk-nor is a driver to replace mtk-quadspi and they have almost
> the same device-tree bindings. Reuse this binding documentation and
> convert it for new driver:
>
> 1. "Mediatek SoCs" -> "Mediatek ARM SoCs" because MTK MIPS SoCs
> use different controllers.
> 2. document "interrupts" as a required property because it's
> available on all SoCs with this controller and new driver takes
> advantages of it. It's implemented as optional only to maintain
> backward compatibility.
> 3. replace binding example with a mt7629 one because this is the
> only one I know the interrupt assignment.
That doesn't really matter. It would be less churn without that change
and examples are just examples.
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
> ---
> Change since v1:
> none
>
> .../mtk-quadspi.txt => spi/spi-mtk-nor.txt} | 34 ++++++++-----------
> 1 file changed, 15 insertions(+), 19 deletions(-)
> rename Documentation/devicetree/bindings/{mtd/mtk-quadspi.txt => spi/spi-mtk-nor.txt} (62%)
>
> diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> similarity index 62%
> rename from Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> rename to Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> index a12e3b5c495d..829da480b9a9 100644
> --- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-mtk-nor.txt
> @@ -1,4 +1,4 @@
> -* Serial NOR flash controller for MediaTek SoCs
> +* SPI NOR flash controller for MediaTek ARM SoCs
>
> Required properties:
> - compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
> @@ -13,6 +13,7 @@ Required properties:
> "mediatek,mt7629-nor", "mediatek,mt8173-nor"
> "mediatek,mt8173-nor"
> - reg: physical base address and length of the controller's register
> +- interrupts: Interrupt number used by the controller.
> - clocks: the phandle of the clocks needed by the nor controller
> - clock-names: the names of the clocks
> the clocks should be named "spi" and "sf". "spi" is used for spi bus,
> @@ -22,29 +23,24 @@ Required properties:
> - #address-cells: should be <1>
> - #size-cells: should be <0>
>
> -The SPI flash must be a child of the nor_flash node and must have a
> -compatible property. Also see jedec,spi-nor.txt.
> -
> -Required properties:
> -- compatible: May include a device-specific string consisting of the manufacturer
> - and name of the chip. Must also include "jedec,spi-nor" for any
> - SPI NOR flash that can be identified by the JEDEC READ ID opcode (0x9F).
> -- reg : Chip-Select number
> +There should be only one spi slave device following generic spi bindings.
> +It's not recommended to use this controller for devices other than SPI NOR
> +flash due to limited transfer capability of this controller.
>
> Example:
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/clock/mt7629-clk.h>
>
> -nor_flash: spi@1100d000 {
> - compatible = "mediatek,mt8173-nor";
> - reg = <0 0x1100d000 0 0xe0>;
> - clocks = <&pericfg CLK_PERI_SPI>,
> - <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
> +spi_nor: spi@11014000 {
> + compatible = "mediatek,mt7629-nor",
> + "mediatek,mt8173-nor";
> + reg = <0x11014000 0xe0>;
> + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_LOW>;
> + clocks = <&pericfg CLK_PERI_FLASH_PD>,
> + <&topckgen CLK_TOP_FLASH_SEL>;
> clock-names = "spi", "sf";
> #address-cells = <1>;
> #size-cells = <0>;
> -
> - flash@0 {
> - compatible = "jedec,spi-nor";
> - reg = <0>;
> - };
Better to leave this in the example IMO.
Rob
next prev parent reply other threads:[~2020-03-03 22:47 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 4:36 [PATCH v2 0/4] rewrite mtk-quadspi spi-nor driver with spi-mem Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` [PATCH v2 1/4] spi: make spi-max-frequency optional Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` [PATCH v2 2/4] spi: add support for mediatek spi-nor controller Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` [PATCH v2 3/4] dt-bindings: convert mtk-quadspi binding doc for spi-mtk-nor Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-03-03 22:47 ` Rob Herring [this message]
2020-03-03 22:47 ` Rob Herring
2020-03-03 22:47 ` Rob Herring
2020-03-03 22:47 ` Rob Herring
2020-03-03 22:47 ` Rob Herring
2020-03-06 8:38 ` Chuanhong Guo
2020-03-06 8:38 ` Chuanhong Guo
2020-03-06 8:38 ` Chuanhong Guo
2020-03-06 8:38 ` Chuanhong Guo
2020-02-28 4:36 ` [PATCH v2 4/4] mtd: spi-nor: remove mtk-quadspi driver Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
2020-02-28 4:36 ` Chuanhong Guo
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=20200303224706.GA22867@bogus \
--to=robh@kernel.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gch981213@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/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.