linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC
@ 2018-11-15  6:26 Ryder Lee
  2018-11-15  6:26 ` [PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ryder Lee @ 2018-11-15  6:26 UTC (permalink / raw)
  To: Marek Vasut, Brian Norris, Boris Brezillon
  Cc: Rob Herring, linux-mtd, Weijie Gao, Roy Luo, Guochun Mao,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	Ryder Lee

This updates bindings for MT7629 pwm controller.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
index 991728c..4a2885b 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
@@ -6,6 +6,7 @@ Required properties:
    - "mediatek,mt7622-pwm": found on mt7622 SoC.
    - "mediatek,mt7623-pwm": found on mt7623 SoC.
    - "mediatek,mt7628-pwm": found on mt7628 SoC.
+   - "mediatek,mt7629-pwm": found on mt7629 SoC.
  - reg: physical base address and length of the controller's registers.
  - #pwm-cells: must be 2. See pwm.txt in this directory for a description of
    the cell format.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions
  2018-11-15  6:26 [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
@ 2018-11-15  6:26 ` Ryder Lee
  2018-11-15  6:26 ` [PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting Ryder Lee
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Ryder Lee @ 2018-11-15  6:26 UTC (permalink / raw)
  To: Marek Vasut, Brian Norris, Boris Brezillon
  Cc: Rob Herring, linux-mtd, Weijie Gao, Roy Luo, Guochun Mao,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

From: Guochun Mao <guochun.mao@mediatek.com>

Replace mtd_device_register with mtd_device_parse_register for
parsing partitions.
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] 6+ messages in thread

* [PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting
  2018-11-15  6:26 [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
  2018-11-15  6:26 ` [PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
@ 2018-11-15  6:26 ` Ryder Lee
  2018-11-15  6:26 ` [PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one Ryder Lee
  2018-11-15  6:35 ` [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
  3 siblings, 0 replies; 6+ messages in thread
From: Ryder Lee @ 2018-11-15  6:26 UTC (permalink / raw)
  To: Marek Vasut, Brian Norris, Boris Brezillon
  Cc: Rob Herring, linux-mtd, Weijie Gao, Roy Luo, Guochun Mao,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

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] 6+ messages in thread

* [PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one
  2018-11-15  6:26 [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
  2018-11-15  6:26 ` [PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
  2018-11-15  6:26 ` [PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting Ryder Lee
@ 2018-11-15  6:26 ` Ryder Lee
  2018-11-15  6:35 ` [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
  3 siblings, 0 replies; 6+ messages in thread
From: Ryder Lee @ 2018-11-15  6:26 UTC (permalink / raw)
  To: Marek Vasut, Brian Norris, Boris Brezillon
  Cc: Rob Herring, linux-mtd, Weijie Gao, Roy Luo, Guochun Mao,
	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] 6+ messages in thread

* Re: [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC
  2018-11-15  6:26 [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
                   ` (2 preceding siblings ...)
  2018-11-15  6:26 ` [PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one Ryder Lee
@ 2018-11-15  6:35 ` Ryder Lee
  2018-11-15 16:43   ` Matthias Brugger
  3 siblings, 1 reply; 6+ messages in thread
From: Ryder Lee @ 2018-11-15  6:35 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Brian Norris, Boris Brezillon, Rob Herring, linux-mtd,
	Weijie Gao, Roy Luo, Guochun Mao, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Thu, 2018-11-15 at 14:26 +0800, Ryder Lee wrote:
> This updates bindings for MT7629 pwm controller.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
> index 991728c..4a2885b 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
> @@ -6,6 +6,7 @@ Required properties:
>     - "mediatek,mt7622-pwm": found on mt7622 SoC.
>     - "mediatek,mt7623-pwm": found on mt7623 SoC.
>     - "mediatek,mt7628-pwm": found on mt7628 SoC.
> +   - "mediatek,mt7629-pwm": found on mt7629 SoC.
>   - reg: physical base address and length of the controller's registers.
>   - #pwm-cells: must be 2. See pwm.txt in this directory for a description of
>     the cell format.

Please ignore this PWM patch. Sorry for the inconvenience :(

Ryder


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC
  2018-11-15  6:35 ` [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
@ 2018-11-15 16:43   ` Matthias Brugger
  0 siblings, 0 replies; 6+ messages in thread
From: Matthias Brugger @ 2018-11-15 16:43 UTC (permalink / raw)
  To: Ryder Lee, Marek Vasut
  Cc: devicetree, Guochun Mao, Roy Luo, Weijie Gao, linux-kernel,
	Boris Brezillon, Rob Herring, linux-mtd, linux-mediatek,
	Brian Norris, linux-arm-kernel



On 15/11/2018 07:35, Ryder Lee wrote:
> On Thu, 2018-11-15 at 14:26 +0800, Ryder Lee wrote:
>> This updates bindings for MT7629 pwm controller.
>>
>> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
>> ---
>>  Documentation/devicetree/bindings/pwm/pwm-mediatek.txt | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>> index 991728c..4a2885b 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-mediatek.txt
>> @@ -6,6 +6,7 @@ Required properties:
>>     - "mediatek,mt7622-pwm": found on mt7622 SoC.
>>     - "mediatek,mt7623-pwm": found on mt7623 SoC.
>>     - "mediatek,mt7628-pwm": found on mt7628 SoC.
>> +   - "mediatek,mt7629-pwm": found on mt7629 SoC.
>>   - reg: physical base address and length of the controller's registers.
>>   - #pwm-cells: must be 2. See pwm.txt in this directory for a description of
>>     the cell format.
> 
> Please ignore this PWM patch. Sorry for the inconvenience :(
> 

Right, this would at least need a fallback compatible :)

Regards,
Matthias

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-15 16:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15  6:26 [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
2018-11-15  6:26 ` [PATCH 2/4] mtd: spi-nor: mtk-quadspi: use ofpart for parsing partitions Ryder Lee
2018-11-15  6:26 ` [PATCH 3/4] mtd: spi-nor: mtk-quadspi: add SNOR_HWCAPS_READ for capcity setting Ryder Lee
2018-11-15  6:26 ` [PATCH 4/4] mtd: spi-nor: mtk-quadspi: rename config to a common one Ryder Lee
2018-11-15  6:35 ` [PATCH 1/4] dt-bindings: pwm: update bindings for MT7629 SoC Ryder Lee
2018-11-15 16:43   ` Matthias Brugger

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).