This updates bindings for MT7629 pwm controller.
Signed-off-by: Ryder Lee <[email protected]>
---
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
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.
Signed-off-by: Guochun Mao <[email protected]>
Tested-by: Ryder Lee <[email protected]>
---
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
From: Guochun Mao <[email protected]>
Replace mtd_device_register with mtd_device_parse_register for
parsing partitions.
Add ofpart support.
Signed-off-by: Guochun Mao <[email protected]>
Tested-by: Ryder Lee <[email protected]>
---
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
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]>
---
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
On Thu, 2018-11-15 at 14:26 +0800, Ryder Lee wrote:
> This updates bindings for MT7629 pwm controller.
>
> Signed-off-by: Ryder Lee <[email protected]>
> ---
> 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
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 <[email protected]>
>> ---
>> 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