* [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC
@ 2018-11-29 6:29 Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ryder Lee @ 2018-11-29 6:29 UTC (permalink / raw)
To: Marek Vasut, Brian Norris, Boris Brezillon
Cc: Rob Herring, Weijie Gao, linux-mtd, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Ryder Lee
This updates bindings for the MT7629 SPI-NOR controller.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
index 56d3668..a12e3b5 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
@@ -1,4 +1,4 @@
-* Serial NOR flash controller for MTK MT81xx (and similar)
+* Serial NOR flash controller for MediaTek SoCs
Required properties:
- compatible: For mt8173, compatible should be "mediatek,mt8173-nor",
@@ -10,6 +10,7 @@ Required properties:
"mediatek,mt2712-nor", "mediatek,mt8173-nor"
"mediatek,mt7622-nor", "mediatek,mt8173-nor"
"mediatek,mt7623-nor", "mediatek,mt8173-nor"
+ "mediatek,mt7629-nor", "mediatek,mt8173-nor"
"mediatek,mt8173-nor"
- reg: physical base address and length of the controller's register
- clocks: the phandle of the clocks needed by the nor controller
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions
2018-11-29 6:29 [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Ryder Lee
@ 2018-11-29 6:29 ` Ryder Lee
2018-12-06 14:36 ` Boris Brezillon
2018-11-29 6:29 ` [RESEND PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting Ryder Lee
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Ryder Lee @ 2018-11-29 6:29 UTC (permalink / raw)
To: Marek Vasut, Brian Norris, Boris Brezillon
Cc: Rob Herring, Weijie Gao, linux-mtd, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Guochun Mao
From: Guochun Mao <guochun.mao@mediatek.com>
Replace mtd_device_register with mtd_device_parse_register for
parsing partitions and add ofpart support.
Signed-off-by: Guochun Mao <guochun.mao@mediatek.com>
Tested-by: Ryder Lee <ryder.lee@mediatek.com>
---
drivers/mtd/spi-nor/mtk-quadspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
index 5442993..2278677 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -118,6 +118,8 @@ struct mtk_nor {
struct clk *nor_clk;
};
+static const char * const probes[] = { "ofpart", NULL };
+
static void mtk_nor_set_read_mode(struct mtk_nor *mtk_nor)
{
struct spi_nor *nor = &mtk_nor->nor;
@@ -457,7 +459,7 @@ static int mtk_nor_init(struct mtk_nor *mtk_nor,
if (ret)
return ret;
- return mtd_device_register(&nor->mtd, NULL, 0);
+ return mtd_device_parse_register(&nor->mtd, probes, NULL, NULL, 0);
}
static int mtk_nor_drv_probe(struct platform_device *pdev)
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting
2018-11-29 6:29 [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
@ 2018-11-29 6:29 ` Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one Ryder Lee
2018-12-11 22:45 ` [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Rob Herring
3 siblings, 0 replies; 7+ messages in thread
From: Ryder Lee @ 2018-11-29 6:29 UTC (permalink / raw)
To: Marek Vasut, Brian Norris, Boris Brezillon
Cc: Rob Herring, Weijie Gao, linux-mtd, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Guochun Mao
From: Guochun Mao <guochun.mao@mediatek.com>
SNOR_HWCAPS_READ is a basic read mode for both flash and controller,
it should be supported, so add the capcity for mtk-quadspi.
Signed-off-by: Guochun Mao <guochun.mao@mediatek.com>
Tested-by: Ryder Lee <ryder.lee@mediatek.com>
---
drivers/mtd/spi-nor/mtk-quadspi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
index 2278677..c198fd2 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -433,7 +433,8 @@ static int mtk_nor_init(struct mtk_nor *mtk_nor,
struct device_node *flash_node)
{
const struct spi_nor_hwcaps hwcaps = {
- .mask = SNOR_HWCAPS_READ_FAST |
+ .mask = SNOR_HWCAPS_READ |
+ SNOR_HWCAPS_READ_FAST |
SNOR_HWCAPS_READ_1_1_2 |
SNOR_HWCAPS_PP,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one
2018-11-29 6:29 [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting Ryder Lee
@ 2018-11-29 6:29 ` Ryder Lee
2018-12-11 22:45 ` [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Rob Herring
3 siblings, 0 replies; 7+ messages in thread
From: Ryder Lee @ 2018-11-29 6:29 UTC (permalink / raw)
To: Marek Vasut, Brian Norris, Boris Brezillon
Cc: Rob Herring, Weijie Gao, linux-mtd, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Ryder Lee
The quadspi is a generic communication interface which could be shared
with other MediaTek SoCs. Hence rename it to a common one.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
drivers/mtd/spi-nor/Kconfig | 16 ++++++++--------
drivers/mtd/spi-nor/Makefile | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
index 6cc9c92..2062611 100644
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -7,14 +7,6 @@ menuconfig MTD_SPI_NOR
if MTD_SPI_NOR
-config MTD_MT81xx_NOR
- tristate "Mediatek MT81xx SPI NOR flash controller"
- depends on HAS_IOMEM
- help
- This enables access to SPI NOR flash, using MT81xx SPI NOR flash
- controller. This controller does not support generic SPI BUS, it only
- supports SPI NOR Flash.
-
config MTD_SPI_NOR_USE_4K_SECTORS
bool "Use small 4096 B erase sectors"
default y
@@ -86,6 +78,14 @@ config SPI_NXP_SPIFI
Flash. Enable this option if you have a device with a SPIFI
controller and want to access the Flash as a mtd device.
+config SPI_MTK_QUADSPI
+ tristate "MediaTek Quad SPI controller"
+ depends on HAS_IOMEM
+ help
+ This enables support for the Quad SPI controller in master mode.
+ This controller does not support generic SPI. It only supports
+ SPI NOR.
+
config SPI_INTEL_SPI
tristate
diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile
index f4c61d2..7f4b6f6 100644
--- a/drivers/mtd/spi-nor/Makefile
+++ b/drivers/mtd/spi-nor/Makefile
@@ -5,7 +5,7 @@ obj-$(CONFIG_SPI_ATMEL_QUADSPI) += atmel-quadspi.o
obj-$(CONFIG_SPI_CADENCE_QUADSPI) += cadence-quadspi.o
obj-$(CONFIG_SPI_FSL_QUADSPI) += fsl-quadspi.o
obj-$(CONFIG_SPI_HISI_SFC) += hisi-sfc.o
-obj-$(CONFIG_MTD_MT81xx_NOR) += mtk-quadspi.o
+obj-$(CONFIG_SPI_MTK_QUADSPI) += mtk-quadspi.o
obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o
obj-$(CONFIG_SPI_INTEL_SPI) += intel-spi.o
obj-$(CONFIG_SPI_INTEL_SPI_PCI) += intel-spi-pci.o
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions
2018-11-29 6:29 ` [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
@ 2018-12-06 14:36 ` Boris Brezillon
2018-12-07 5:43 ` Guochun Mao
0 siblings, 1 reply; 7+ messages in thread
From: Boris Brezillon @ 2018-12-06 14:36 UTC (permalink / raw)
To: Ryder Lee
Cc: Marek Vasut, Brian Norris, Rob Herring, Weijie Gao, linux-mtd,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Guochun Mao
On Thu, 29 Nov 2018 14:29:54 +0800
Ryder Lee <ryder.lee@mediatek.com> wrote:
> From: Guochun Mao <guochun.mao@mediatek.com>
>
> Replace mtd_device_register with mtd_device_parse_register for
> parsing partitions and add ofpart support.
What's the problem with the default partition parser table [1]?
[1]https://elixir.bootlin.com/linux/latest/source/drivers/mtd/mtdpart.c#L793
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions
2018-12-06 14:36 ` Boris Brezillon
@ 2018-12-07 5:43 ` Guochun Mao
0 siblings, 0 replies; 7+ messages in thread
From: Guochun Mao @ 2018-12-07 5:43 UTC (permalink / raw)
To: Boris Brezillon
Cc: Ryder Lee, Marek Vasut, Brian Norris, Rob Herring, Weijie Gao,
linux-mtd, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Thu, 2018-12-06 at 15:36 +0100, Boris Brezillon wrote:
> On Thu, 29 Nov 2018 14:29:54 +0800
> Ryder Lee <ryder.lee@mediatek.com> wrote:
>
> > From: Guochun Mao <guochun.mao@mediatek.com>
> >
> > Replace mtd_device_register with mtd_device_parse_register for
> > parsing partitions and add ofpart support.
>
> What's the problem with the default partition parser table [1]?
>
> [1]https://elixir.bootlin.com/linux/latest/source/drivers/mtd/mtdpart.c#L793
No problem here.
This patch can be dropped.
Please help review others.
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC
2018-11-29 6:29 [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Ryder Lee
` (2 preceding siblings ...)
2018-11-29 6:29 ` [RESEND PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one Ryder Lee
@ 2018-12-11 22:45 ` Rob Herring
3 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2018-12-11 22:45 UTC (permalink / raw)
To: Ryder Lee
Cc: Marek Vasut, Brian Norris, Boris Brezillon, Weijie Gao,
linux-mtd, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Ryder Lee
On Thu, 29 Nov 2018 14:29:53 +0800, Ryder Lee wrote:
> This updates bindings for the MT7629 SPI-NOR controller.
>
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
> Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-11 22:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-29 6:29 [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
2018-12-06 14:36 ` Boris Brezillon
2018-12-07 5:43 ` Guochun Mao
2018-11-29 6:29 ` [RESEND PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting Ryder Lee
2018-11-29 6:29 ` [RESEND PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one Ryder Lee
2018-12-11 22:45 ` [RESEND PATCH 1/4] dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).