dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC
PATCH 1/3 dt-bindings: mtd: mtk-quadspi: update bindings for MT7629 SoC
This updates bindings for the MT7629 SPI-NOR controller.
---
Changes since v1: add a Reviewed-by tag.
--- Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/mtk-quadspi.txt +2 -1
@@ -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
Signature · 1 line
1.9.1
PATCH 2/3 mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting
From: Guochun Mao <[email protected]>
SNOR_HWCAPS_READ is a basic read mode for both flash and controller, it should be supported, so add the capcity for mtk-quadspi.
---
Changes since v1: none.
--- drivers/mtd/spi-nor/mtk-quadspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/spi-nor/mtk-quadspi.c +2 -1
@@ -431,7 +431,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 , };
Signature · 1 line
1.9.1
PATCH 3/3 mtd: spi-nor: mtk-quadspi: rename config to a common one
In reply to Ryder LeeThe quadspi is a generic communication interface which could be shared with other MediaTek SoCs. Hence rename it to a common one.
---
Changes since v1: rebase to v5.0-rc1.
--- drivers/mtd/spi-nor/Kconfig | 16 ++++++++-------- drivers/mtd/spi-nor/Makefile | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/mtd/spi-nor/Kconfig +8 -8
@@ -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
@@ -68,6 +60,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
drivers/mtd/spi-nor/Makefile +1 -1
@@ -3,7 +3,7 @@ obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o obj-$(CONFIG_SPI_ASPEED_SMC) += aspeed-smc.o obj-$(CONFIG_SPI_CADENCE_QUADSPI) += cadence-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
Signature · 1 line
1.9.1
Re: [PATCH v1 2/3] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting
In reply to Ryder LeeHi, Ryder,
Quoted 4 lines · Ryder Lee
From: Guochun Mao <[email protected]>
SNOR_HWCAPS_READis a basic read mode for both flash and controller, it should be supported, so add the capcity for mtk-quadspi.
Since I couldn't find a datasheet for mt8173, I tend to share your assumption - SNOR_HWCAPS_READ should be supported by this controller. However, it's always better to test it and not rely on assumptions. You can test it by forcing the mask to have just SNOR_HWCAPS_READ | SNOR_HWCAPS_PP set. Or you already tested it?
You have a typo in capcity. Maybe substitute it with capability or "add this flag to spi_nor_hwcaps mask"
Quoted 2 lines
Signed-off-by Guochun Mao <[email protected]>
You should add your SoB tag, because you are sending a patch that is not yours.
Cheers,
ta
Quoted 21 lines
---
Changes since v1: none.--- drivers/mtd/spi-nor/mtk-quadspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mtd/spi-nor/mtk-quadspi.c +2
-1@@ -431,7 +431,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 , };
Re: [PATCH v1 3/3] mtd: spi-nor: mtk-quadspi: rename config to a common one
In reply to Ryder LeeHi, Ryder,
Quoted 6 lines · 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 <[email protected]>---
Changes since v1: rebase to v5.0-rc1.
The patch doesn't apply on v5.0-rc1 or rc2.
Quoted 25 lines
--- drivers/mtd/spi-nor/Kconfig | 16 ++++++++-------- drivers/mtd/spi-nor/Makefile | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)drivers/mtd/spi-nor/Kconfig +0
-8@@ -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
drivers/mtd/spi-nor/Kconfig config SPI_NXP_SPIFI · line 63
Quoted 4 lines
drivers/mtd/spi-nor/Kconfig +1
-0@@ -68,6 +60,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
Since you are moving the config into the file, would you mind to put your config in an alphabetical order?
Thanks,
ta
Quoted 24 lines
drivers/mtd/spi-nor/Kconfig +7
-0+ 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 tristatedrivers/mtd/spi-nor/Makefile +1
-1@@ -3,7 +3,7 @@ obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o obj-$(CONFIG_SPI_ASPEED_SMC) += aspeed-smc.o obj-$(CONFIG_SPI_CADENCE_QUADSPI) += cadence-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
Re: [PATCH v1 2/3] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting
In reply to [email protected]Quoted 5 lines · On Tue, 2019-01-15 at 06:59 +0000, [email protected] wrote:
Hi, Ryder,
Quoted 2 lines · Ryder Lee
From: Guochun Mao <[email protected]>
Quoted 7 lines
Quoted 2 lines
SNOR_HWCAPS_READis a basic read mode for both flash and controller, it should be supported, so add the capcity for mtk-quadspi.Since I couldn't find a datasheet for mt8173, I tend to share your assumption -
SNOR_HWCAPS_READshould be supported by this controller. However, it's always better to test it and not rely on assumptions. You can test it by forcing the mask to have justSNOR_HWCAPS_READ|SNOR_HWCAPS_PPset. Or you already tested it?
Our IPs all support SNOR_HWCAPS_READ, Ryedr and I have test it.
Quoted 3 lines
You have a typo in capcity. Maybe substitute it with capability or "add this flag to
spi_nor_hwcapsmask"
Ok, we'll correct it next version.
Thanks.
Guochun
Quoted 15 lines
Quoted 3 lines
Signed-off-by Guochun Mao <[email protected]>You should add your SoB tag, because you are sending a patch that is not yours.
Cheers,
taQuoted 6 lines
---
Changes since v1: none.--- drivers/mtd/spi-nor/mtk-quadspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 15 lines
Quoted 6 lines
drivers/mtd/spi-nor/mtk-quadspi.c +0
-0drivers/mtd/spi-nor/mtk-quadspi.c static int mtk_nor_init(struct mtk_nor *mtk_nor, · line 438
Quoted 9 lines
drivers/mtd/spi-nor/mtk-quadspi.c +2
-1@@ -431,7 +431,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 , };
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH v1 3/3] mtd: spi-nor: mtk-quadspi: rename config to a common one
In reply to [email protected]Quoted 39 lines · On Tue, 2019-01-15 at 07:34 +0000, [email protected] wrote:
Hi, Ryder,
Quoted 6 lines · 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 <[email protected]>---
Changes since v1: rebase to v5.0-rc1.The patch doesn't apply on v5.0-rc1 or rc2.
Quoted 28 lines
--- drivers/mtd/spi-nor/Kconfig | 16 ++++++++-------- drivers/mtd/spi-nor/Makefile | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)drivers/mtd/spi-nor/Kconfig +0
-8@@ -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@@ -68,6 +60,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.
Quoted 7 lines
drivers/mtd/spi-nor/Kconfig config SPI_NXP_SPIFI · line 63
Quoted 1 line
drivers/mtd/spi-nor/Kconfig +1
-0+config SPI_MTK_QUADSPISince you are moving the config into the file, would you mind to put your config in an alphabetical order?
Thanks,
ta
Okay, I will send a new one to fix them.
Thanks,
Ryder
Quoted 24 lines
Quoted 24 lines
drivers/mtd/spi-nor/Kconfig +7
-0+ 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 tristatedrivers/mtd/spi-nor/Makefile +1
-1@@ -3,7 +3,7 @@ obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o obj-$(CONFIG_SPI_ASPEED_SMC) += aspeed-smc.o obj-$(CONFIG_SPI_CADENCE_QUADSPI) += cadence-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