[PATCH 3/4] spi: mediatek: add mtk_spi_compatible support

2021-03-21 Thread Leilk Liu
this patch adds max_fifo_size and must_rx compat support. Signed-off-by: Leilk Liu --- drivers/spi/spi-slave-mt27xx.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c index

[PATCH 4/4] spi: mediatek: add mt8195 spi slave support

2021-03-21 Thread Leilk Liu
this patch adds mt8195 spi slave compatible support. Signed-off-by: Leilk Liu --- drivers/spi/spi-slave-mt27xx.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c index 7e6fadc88cef..f199a6c4738a 100644 --- a/drivers/spi

[PATCH 0/4] Add Mediatek MT8195 SPI driver support

2021-03-21 Thread Leilk Liu
This series are based on spi/for-next, and provide 4 patches to add MT8195 spi support. Leilk Liu (4): spi: update spi master bindings for MT8195 SoC spi: update spi slave bindings for MT8195 SoC spi: mediatek: add mtk_spi_compatible support spi: mediatek: add mt8195 spi slave support

[PATCH 2/4] spi: update spi slave bindings for MT8195 SoC

2021-03-21 Thread Leilk Liu
Add a DT binding documentation for the MT8195 soc. Signed-off-by: Leilk Liu --- Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt b/Documentation/devicetree/bindings/spi/spi

[PATCH 1/4] spi: update spi master bindings for MT8195 SoC

2021-03-21 Thread Leilk Liu
Add a DT binding documentation for the MT8195 soc. Signed-off-by: leilk.liu --- Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi-mt65xx.txt in

Re: [PATCH] spi: mediatek: Re-license MTK SPI driver as Dual MIT/GPL

2021-03-03 Thread Leilk Liu
On Wed, 2021-03-03 at 08:18 +0100, Greg Kroah-Hartman wrote: > On Wed, Mar 03, 2021 at 10:56:36AM +0800, Leilk Liu wrote: > > From: "leilk.liu" > > > > It is wanted to use MTK spi bus driver with GPL-2.0 or MIT license. > > But now it is only licensed as GPL-

[PATCH 0/3] spi: add set_cs_timing support for HW/SW CS mode

2021-02-06 Thread Leilk Liu
Some controllers only have one HW CS, if support multiple devices, other devices need to use SW CS. This patch adds the support of both HW and SW CS via cs_gpio. leilk.liu (3): spi: add power control when set_cs_timing spi: support CS timing for HW & SW mode spi: mediatek: add set_cs_timing

[PATCH] spi: mediatek: add SPI_LSB_FIRST support

2019-06-04 Thread Leilk Liu
this patch add SPI_LSB_FIRST feature support. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 15 ++- include/linux/platform_data/spi-mt65xx.h |2 -- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi

[PATCH] dt-bindings: spi: spi-mt65xx: add support for MT8516

2019-04-17 Thread Leilk Liu
Add binding documentation of spi-mt65xx for MT8516 SOC. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi

[PATCH v3] spi: mediatek: Add bindings for mediatek MT7629 soc platform

2018-11-27 Thread Leilk Liu
This patch adds a DT binding documentation for the MT7629 soc. Signed-off-by: Leilk Liu --- v3: remove cover-letter. v2: remove "mediatek,mt7629-spi" compatible according Matthias's advice. v1: This series are based on 4.20-rc1 and provide two patches to support mt7629 IC. ---

[PATCH v2 1/1] spi: mediatek: Add bindings for mediatek MT7629 soc platform

2018-11-26 Thread Leilk Liu
This patch adds a DT binding documentation for the MT7629 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi

[PATCH v2 0/1] add SPI driver support for mt7629

2018-11-26 Thread Leilk Liu
>From cf719ac350c36cb58e2013b58f73ad04f6981384 Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Tue, 27 Nov 2018 10:18:30 +0800 Subject: [PATCH v2 0/1] add SPI driver support for mt7629 v2: remove "mediatek,mt7629-spi" compatible according Matthias's advice. v1: This series are

[PATCH 0/2] add SPI driver support for mt7629

2018-11-20 Thread Leilk Liu
>From 51ab18abe1ad0f8ef0bc88696d956431f3e01f3f Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Tue, 20 Nov 2018 16:34:22 +0800 Subject: [PATCH 0/2] add SPI driver support for mt7629 This series are based on 4.20-rc1 and provide two patches to support mt7629 IC. Leilk Liu (2): spi: media

[PATCH 2/2] spi: mediatek: add spi support for mt7629 IC

2018-11-20 Thread Leilk Liu
this patch add support for mt7629 IC. Change-Id: Icb8ced408ebd1340fb0340592b91f24740d07e1e Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 9ee1fe9..0cce6f0 100644 --- a

[PATCH 1/2] spi: mediatek: Add bindings for mediatek MT7629 soc platform

2018-11-20 Thread Leilk Liu
This patch adds a DT binding documentation for the MT7629 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi

[PATCH 1/2] spi: mediatek: Add bindings for mediatek MT8183 soc platform

2018-10-31 Thread Leilk Liu
This patch adds a DT binding documentation for the MT8183 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi

add SPI driver support for mt8183

2018-10-31 Thread Leilk Liu
>From 44b1c34bc19d9bfdc736664439c0530fbb2c75b8 Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Thu, 1 Nov 2018 11:48:20 +0800 Subject: [PATCH 0/2] add SPI driver support for mt8183 This series are based on 4.19-rc1 and provide two patches to support mt8183 IC. Leilk Liu (2): spi: mediatek:

[PATCH 2/2] spi: mediatek: add spi support for mt8183 IC

2018-10-31 Thread Leilk Liu
this patch add support for mt8183 IC. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 0c2867d..9ee1fe9 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi

[PATCH] spi: mediatek: use correct mata->xfer_len when in fifo transfer

2018-10-31 Thread Leilk Liu
when xfer_len is greater than 64 bytes and use fifo mode to transfer, the actual length from the third time is mata->xfer_len but not len in mtk_spi_interrupt(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH v5 2/3] spi: mediatek: add spi slave for Mediatek MT2712

2018-09-28 Thread Leilk Liu
This patch adds basic spi slave for MT2712. Signed-off-by: Leilk Liu --- drivers/spi/Kconfig| 10 + drivers/spi/Makefile |1 + drivers/spi/spi-slave-mt27xx.c | 554 3 files changed, 565 insertions(+) create mode 100644

[PATCH v5 0/3] Add Mediatek SPI slave driver

2018-09-28 Thread Leilk Liu
>From 5479c692171dc52990290d88c505c074fa4db7d4 Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Fri, 28 Sep 2018 18:37:40 +0800 Subject: [PATCH v5 0/3] Add Mediatek SPI slave driver v5: 1. Fix typos in bindings file. v4: 1. Fix Mark Brown review comment about kconfig & driver. v3: 1.

[PATCH v5 1/3] spi: mediatek: add bindings for Mediatek MT2712 soc platform

2018-09-28 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-slave-mt27xx.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt diff --git

[PATCH v5 3/3] arm64: dts: Add spi slave dts

2018-09-28 Thread Leilk Liu
This patch adds MT2712 spi slave into device tree. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index 75cc0f7

[PATCH v4 2/3] spi: mediatek: add spi slave for Mediatek MT2712

2018-09-24 Thread Leilk Liu
This patch adds basic spi slave for MT2712. Signed-off-by: Leilk Liu --- drivers/spi/Kconfig| 10 + drivers/spi/Makefile |1 + drivers/spi/spi-slave-mt27xx.c | 554 3 files changed, 565 insertions(+) create mode 100644

[PATCH v4 0/3] Add Mediatek SPI slave driver

2018-09-24 Thread Leilk Liu
>From 7f2423debd91771a1d3a5ca02cd3990f1417bcb8 Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Tue, 25 Sep 2018 10:11:44 +0800 Subject: Subject: [PATCH v4 0/3] Add Mediatek SPI slave driver v4: 1. Fix Mark Brown review comment about kconfig & driver. v3: 1. Fix Rob Herring review commen

[PATCH v4 1/3] spi: mediatek: add bindings for Mediatek MT2712 soc platform

2018-09-24 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-slave-mt27xx.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt diff --git

[PATCH v4 3/3] arm64: dts: Add spi slave dts

2018-09-24 Thread Leilk Liu
This patch adds MT2712 spi slave into device tree. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index 75cc0f7

[PATCH v3 0/3] Add Mediatek SPI slave driver

2018-09-16 Thread Leilk Liu
>From 82bced99683343899dea4634452940b15d6374eb Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Mon, 17 Sep 2018 10:07:45 +0800 Subject: [PATCH v3 0/3] Add Mediatek SPI slave driver v3: 1. Fix Rob Herring review comment about bindings. 2. remove unused variables in driver. v2: 1. Fix Sean W

[PATCH v3 3/3] arm64: dts: Add spi slave dts

2018-09-16 Thread Leilk Liu
This patch adds MT2712 spi slave into device tree. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index 75cc0f7

[PATCH v3 2/3] spis: mediatek: add spi slave for Mediatek MT2712

2018-09-16 Thread Leilk Liu
This patchs add basic spi slave for MT2712. Signed-off-by: Leilk Liu --- drivers/spi/Kconfig|8 + drivers/spi/Makefile |1 + drivers/spi/spi-slave-mt27xx.c | 553 3 files changed, 562 insertions(+) create mode 100644

[PATCH v3 1/3] spis: mediatek: add bindings for Mediatek MT2712 soc platform

2018-09-16 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-slave-mt27xx.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt diff --git

[PATCH v2 2/3] spis: mediatek: add spi slave for Mediatek MT2712

2018-09-03 Thread Leilk Liu
This patchs add basic spi slave for MT2712. Signed-off-by: Leilk Liu --- drivers/spi/Kconfig|8 + drivers/spi/Makefile |1 + drivers/spi/spi-slave-mt27xx.c | 557 3 files changed, 566 insertions(+) create mode 100644

[PATCH v2 3/3] arm64: dts: Add spi slave dts

2018-09-03 Thread Leilk Liu
This patch adds MT2712 spi slave into device tree. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index 75cc0f7

[PATCH v2 1/3] spis: mediatek: add bindings for Mediatek MT2712 soc platform

2018-09-03 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-slave-mt27xx.txt | 35 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt diff --git

[PATCH v2 0/3] Add Mediatek SPI slave driver

2018-09-03 Thread Leilk Liu
>From c211d55c612b1fb43e3a5f137e8cacbd347beee5 Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Tue, 4 Sep 2018 09:38:00 +0800 Subject: [PATCH v2 0/3] Add Mediatek SPI slave driver v2: 1. Fix Sean Wang review comment. 2. remove unused register and offset define. 3. update bindings file w

[PATCH 3/3] arm64: dts: Add spi slave dts

2018-08-27 Thread Leilk Liu
This patch adds MT2712 spi slave into device tree. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index 75cc0f7

[PATCH 2/3] spis: mediatek: add spi slave for Mediatek MT2712

2018-08-27 Thread Leilk Liu
This patchs add basic spi slave for MT2712. Signed-off-by: Leilk Liu --- drivers/spi/Kconfig|8 + drivers/spi/Makefile |1 + drivers/spi/spi-slave-mt27xx.c | 613 3 files changed, 622 insertions(+) create mode 100644

[PATCH 1/3] spis: mediatek: add bindings for Mediatek MT2712 soc platform

2018-08-27 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-slave-mt27xx.txt | 39 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt diff --git

[PATCH 0/3] Add Mediatek SPI slave driver

2018-08-27 Thread Leilk Liu
>From 5ba1b2c0cd279255b49ecc8fa18c04ceb292a214 Mon Sep 17 00:00:00 2001 From: Leilk Liu Date: Tue, 28 Aug 2018 14:18:56 +0800 Subject: [PATCH 0/3] Add Mediatek SPI slave driver This series are based on 4.19-rc1 and provide three patches to add mediatek spi slave driver. Leilk Liu (3): s

[PATCH 2/2] spi: mediatek: add spi support for mt2712 IC

2017-06-20 Thread Leilk Liu
this patch add support for mt2712 IC. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index ec7755b..86bf456 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi

[PATCH 1/2] spi: mediatek: Add bindings for mediatek MT2712 soc platform

2017-06-20 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2712 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi

[PATCH 0/2] add mt2712 spi support

2017-06-20 Thread Leilk Liu
This series are based on 4.12-rc1 and provide 2 patches to support mt2712 IC. Change in this series: 1. update document to add mt2712; 2. add mt7622_compat. Leilk Liu (2): spi: mediatek: Add bindings for mediatek MT2712 soc platform spi: mediatek: add spi support for mt2712 IC

[PATCH v3 2/2] spi: mediatek: add spi support for mt7622 IC

2017-06-11 Thread Leilk Liu
this patch add support for mt7622 IC. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index eae73b5..ec7755b 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi

[PATCH v3 1/2] spi: mediatek: adjust register to enhance time accuracy

2017-06-11 Thread Leilk Liu
this patch adjust register to enhance time accuracy. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 45 ++ include/linux/platform_data/spi-mt65xx.h |2 ++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi

[PATCH v3 0/2] add mt7622 spi support

2017-06-11 Thread Leilk Liu
mt7622_compat. Leilk Liu (2): spi: mediatek: adjust register to enhance time accuracy spi: mediatek: add spi support for mt7622 IC drivers/spi/spi-mt65xx.c | 54 +++--- include/linux/platform_data/spi-mt65xx.h |2 ++ 2 files changed, 51 insertions(+), 5

[PATCH v2 1/2] spi: mediatek: adjust register to enhance time accuracy

2017-06-09 Thread Leilk Liu
this patch adjust register to enhance time accuracy. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 45 ++ include/linux/platform_data/spi-mt65xx.h |2 ++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi

[PATCH v2 2/2] spi: mediatek: add spi support for mt7622 IC

2017-06-09 Thread Leilk Liu
this patch add support for mt7622 IC. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index eae73b5..4bf6495 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi

[PATCH v2 0/2] add mt7622 spi support

2017-06-09 Thread Leilk Liu
This series are based on 4.12-rc1 and provide 2 patches to support mt7622 IC. Change in v2: 1. rename patch title; 2. use enhance_timing to instead of adjust_reg. Change in v1: 1. update document to add mt7622; 2. add adjust register define support; 3. add mt7622_compat. Leilk Liu (2): spi

[PATCH 1/3] dt-bindings: spi: mediatek: Add bindings for mediatek MT7622 soc platform

2017-06-02 Thread Leilk Liu
This patch adds a DT binding documentation for the MT7622 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation/devicetree/bindings/spi/spi

[PATCH 3/3] spi: mediatek: add compatible support for mt7622 IC

2017-06-02 Thread Leilk Liu
this patch add compatible support for mt7622 IC. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 3d7cd2d..ebc4b1a 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers

[PATCH 2/3] spi: mediatek: support adjust register define

2017-06-02 Thread Leilk Liu
this patch adds support for adjust register design. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 45 ++ include/linux/platform_data/spi-mt65xx.h |2 ++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi

[PATCH 0/3] add mt7622 spi support

2017-06-02 Thread Leilk Liu
This series are based on 4.12-rc1 and provide 4 patches to support mt7622 IC. Change in this series: 1. update document to add mt7622; 2. add adjust register define support; 3. add mt7622_compat. Leilk Liu (3): dt-bindings: spi: mediatek: Add bindings for mediatek MT7622 soc platform spi

[PATCH 2/4] spi: mediatek: Add spi support for mt2701 IC

2015-12-30 Thread Leilk Liu
This patch adds spi support for mt2701 IC. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 3573c09..fe95f3f 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi

[PATCH 3/4] dts: mt2701: add spi dts for mt2701

2015-12-30 Thread Leilk Liu
This patch adds dtsi node of spi for mt2701. Signed-off-by: Leilk Liu --- arch/arm/boot/dts/mt2701.dtsi | 39 +++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi index bd88ae9..9ccd1f0 100644

[PATCH 1/4] spi: mediatek: merge all identical compat to mtk_common_compat

2015-12-30 Thread Leilk Liu
This patch merge all identical compat into on mtk_common_compat and used for all compatible soc. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index

[PATCH 4/4] Document: spi: Add bindings for mediatek MT2701 soc platform

2015-12-30 Thread Leilk Liu
This patch adds a DT binding documentation for the MT2701 soc. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation

[PATCH 0/4] SPI: support mt2701 IC

2015-12-30 Thread Leilk Liu
This series are based on 4.4-rc1 and provide 4 patches to support mt2701 spi HW. Change in this series: 1. merge all identical compat to mtk_common_compat; 2. Add spi support for mt2701 IC; 3. add spi dts for mt2701; 4. Add bindings for mediatek MT2701 soc platform. Leilk Liu (4): spi

[PATCH v3] spi: mediatek: revise mtk_spi_probe() failure flow

2015-11-25 Thread Leilk Liu
mtk_spi_probe() calls pm_runtime_enable(), after pm_runtime_enable() is called, it should call pm_runtime_disable() in the failure flow. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi

[PATCH v2] spi: mediatek: revise mtk_spi_probe() failure flow

2015-11-23 Thread Leilk Liu
This patch revises failure flow while pm_runtime_enable(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 6c1a96e..00a36da 100644 --- a/drivers

[PATCH 2/4] spi: mediatek: remove unrequired description

2015-11-19 Thread Leilk Liu
cs-gpios isn't required with patch "spi: mediatek: single device does not require cs_gpios", so modify the description. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documenta

[PATCH 4/4] spi: mediatek: revise mtk_spi_probe() failure flow

2015-11-19 Thread Leilk Liu
This patch revises failure flow while pm_runtime_enable(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 6c1a96e..00a36da 100644 --- a/drivers

[PATCH 3/4] spi: mediatek: remove needless pair of writel()/readl()

2015-11-19 Thread Leilk Liu
It's not need to re-read and re-write SPI_CMD_REG, so remove it. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 7840067..6c1a96e 100644 --- a/drivers/spi/spi-mt65xx.c

[PATCH 1/4] spi: mediatek: update document devicetree bindings to fix syntax error

2015-11-19 Thread Leilk Liu
This patch updates document devicetree bindings to fix syntax error. Signed-off-by: Leilk Liu --- .../devicetree/bindings/spi/spi-mt65xx.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b/Documentation

[PATCH v2 5/5] arm64: dts: mt8173: spi bus dts support multiple devices

2015-10-26 Thread Leilk Liu
This patch support multiple devices for MT8173 board. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index

[PATCH v2 3/5] spi: mediatek: handle controller_data in mtk_spi_setup

2015-10-26 Thread Leilk Liu
controller_data is related with device, so move to master->setup function. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 7bd84c8..4066

[PATCH v2 1/5] dt-binding: spi: Mediatek: Update document devicetree bindings to support multiple devices

2015-10-26 Thread Leilk Liu
This patch updates document devicetree bindings to support multiple devices. Signed-off-by: Leilk Liu --- Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b

[PATCH v2 4/5] spi: mediatek: mt8173 spi multiple devices support

2015-10-26 Thread Leilk Liu
vices on other group will also be selected. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 65 ++-- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 406695a..563954a 1006

[PATCH v2 2/5] spi: mediatek: remove mtk_spi_config

2015-10-26 Thread Leilk Liu
mtk_spi_config() and mtk_spi_prepare_message() both initialize spi register, so remove mtk_spi_config() and init all register in mtk_spi_prepare_message(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 59 +--- 1 file changed, 26 insertions

[PATCH v2 0/5] mt8173 spi multiple devices support

2015-10-26 Thread Leilk Liu
controller_data to master->setup; 4. add mt8173 spi multiple devices support; 5. update dts to add cs-gpio and modify cs pin to gpio function. Leilk Liu (5): dt-binding: spi: Mediatek: Update document devicetree bindings to support multiple devices spi: mediatek: remove mtk_spi_config spi: media

[PATCH 2/5] spi: mediatek: remove mtk_spi_config

2015-10-13 Thread Leilk Liu
mtk_spi_config() and mtk_spi_prepare_message() both initialize spi register, so remove mtk_spi_config() and init all register in mtk_spi_prepare_message(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 59 +--- 1 file changed, 26 insertions

[PATCH 3/5] spi: mediatek: handle controller_data in mtk_spi_setup

2015-10-13 Thread Leilk Liu
controller_data is related with device, so move to master->setup function. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 7bd84c8..4066

[PATCH 5/5] arm64: dts: spi bus dts support multiple devices

2015-10-13 Thread Leilk Liu
This patch support multiple devices for MT8173. Signed-off-by: Leilk Liu --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index 04b38ed

[PATCH 0/5] mt8173 spi multiple devices support

2015-10-13 Thread Leilk Liu
cs-gpio and modify cs pin to gpio function. Leilk Liu (5): dt-binding: spi: Mediatek: Update document devicetree bindings to support multiple devices spi: mediatek: remove mtk_spi_config spi: mediatek: handle controller_data in mtk_spi_setup spi: mediatek: mt8173 spi multiple devi

[PATCH 1/5] dt-binding: spi: Mediatek: Update document devicetree bindings to support multiple devices

2015-10-13 Thread Leilk Liu
This patch update document devicetree bindings to support multiple devices. Signed-off-by: Leilk Liu --- Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b

[PATCH 4/5] spi: mediatek: mt8173 spi multiple devices support

2015-10-13 Thread Leilk Liu
vices on other group will also be selected. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 65 ++-- 1 file changed, 52 insertions(+), 13 deletions(-) mode change 100755 => 100644 drivers/spi/spi-mt65xx.c diff --git a/drivers/spi/spi

[PATCH] spi: mediatek: fix spi cs polarity error

2015-09-07 Thread Leilk Liu
Mediatek spi HW can't set cs inactive(keep cs high) directly. Instead, it supplies pause mode to do it indirectly. If driver unsets SPI_CMD_PAUSE_MODE in CMD_REG, it also needs to reset internal state machine to let cs inactive at once. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c

[PATCH v7] arm64: dts: Add spi bus dts

2015-08-31 Thread Leilk Liu
This patch adds MT8173 spi bus controllers into device tree. Signed-off-by: Leilk Liu --- Change in this patch: 1. fix spi clock flow usage error. --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 18 ++ arch/arm64/boot/dts/mediatek/mt8173.dtsi| 13 + 2 files

[PATCH 2/3] spi: mediatek: fix spi clock usage error

2015-08-31 Thread Leilk Liu
spi clock manages flow: CLK_TOP_SYSPLL3_D2 ---> CLK_TOP_SPI_SEL ---> CLK_PERI_SPI0 (source clock) (clock mux) (clock gate) spi driver should choose source clock by clock mux, then enable clock gate. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.

[PATCH 1/3] spi: mediatek: remove clk_disable_unprepare()

2015-08-31 Thread Leilk Liu
This patch removes clk_disable_unprepare() in mtk_spi_remove(). clk_disable_prepare/unprepare must be balance, spi-clk is disabled in mtk_spi_probe, so not needs to disable again. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers

[PATCH 0/3] Fix Mediatek SPI bus driver clock usage error

2015-08-31 Thread Leilk Liu
From: Leilk Liu This series are based on 4.2-rc1 and provide three patches to fix mediatek spi driver clock usage error. spi clock manages flow: CLK_TOP_SYSPLL3_D2 ---> CLK_TOP_SPI_SEL ---> CLK_PERI_SPI0 (source clock) (clock mux) (clock gate) spi driver should

[PATCH 3/3] spi: Mediatek: Document devicetree bindings update for spi bus

2015-08-31 Thread Leilk Liu
This patch updates spi bindings, fixs clock usage description. Signed-off-by: Leilk Liu --- Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-mt65xx.txt b

[PATCH] spi: mediatek: fix SPI_CMD_PAUSE_IE macro error

2015-08-27 Thread Leilk Liu
enable pause interrupt should use SPI_CMD_PAUSE_IE MACRO, so fix it. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index eaadc7e..d882261 100644 --- a/drivers/spi/spi

[PATCH v3 2/4] spi: mediatek: replace int with u32, delete TAB and define MTK_SPI_PAUSE_INT_STATUS marco

2015-08-23 Thread Leilk Liu
this patch replaces int with u32, deletes TAB, and defines MTK_SPI_PAUSE_INT_STATUS marco. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index

[PATCH v3 3/4] spi: mediatek: add PM clk_prepare_enable fail flow

2015-08-23 Thread Leilk Liu
This patch adds PM clk_prepare_enable fail flow. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index f81618c..e14f583 100644 --- a/drivers/spi/spi

[PATCH v3 4/4] spi: mediatek: replace *_time name

2015-08-23 Thread Leilk Liu
This patch replaces *_time name in mtk_spi_prepare_transfer(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index e14f583..eaadc7e 100644 --- a

[PATCHi v3 0/4] Fixup mediatek spi driver

2015-08-23 Thread Leilk Liu
From: Leilk Liu This series are based on 4.2-rc1 and provide four patches to fix mediatek spi driver. Change in v3: 1. The follow patches are applied, so remove them from series: - spi: mediatek: fix spi incorrect endian usage - spi: medaitek: revise quirks compatibility style - spi

[PATCH v3 1/4] spi: mediatek: add linux/io.h include file

2015-08-23 Thread Leilk Liu
mediatek spi driver uses readl/writel, so add linux/io.h, even so it's implicitly imported by spi/spi.h Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 43c1dd5..fe4eda3 1

[PATCH v2 3/4] spi: mediatek: use BIT() to instead of SPI_CMD_*_OFFSET

2015-08-20 Thread Leilk Liu
This patch removes SPI_CMD_*_OFFSET defines, and uses the BIT(x) defines instead. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c

[PATCH v2 2/4] spi: medaitek: revise quirks compatibility style

2015-08-20 Thread Leilk Liu
The quirks are true/false, so define these as bool. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 79286c8..4fa4332 100644 --- a

[PATCH v2 4/4] spi: mediatek: revise coding style

2015-08-20 Thread Leilk Liu
This patch revises littery coding style according to comments. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 52 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index

[PATCH v2 1/4] spi: mediatek: fix spi incorrect endian usage

2015-08-20 Thread Leilk Liu
TX_ENDIAN/RX_ENDIAN bits define whether to reverse the endian order of the data DMA from/to memory. The endian order should keep the same with cpu endian. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 38 ++-- include/linux/platform_data/spi

[PATCH v2 0/4] Fixup mediatek spi driver

2015-08-20 Thread Leilk Liu
This series are based on 4.2-rc1 and provide four patches to fix mediatek spi driver. Change in v2: 1. The patch "spi: mediatek: remove redundant clock in prepare_hardware/unprepare_hardware" is applied, so remove it from series. 2. fix incorrect endian usage to support little-endian and big

[PATCH 0/3] Fixup mediatek spi driver

2015-08-18 Thread Leilk Liu
Change in this patch: 1. revise coding styles. 2. delete redundant clock in prepare/unprepare_hardware. 3. fix incorrect endian usage on big-endian system. Leilk Liu (3): spi: mediatek: revise coding style spi: mediatek: remove redundant clock in prepare_hardware/unprepare_hardware spi

[PATCH 2/3] spi: mediatek: remove redundant clock in prepare_hardware/unprepare_hardware

2015-08-18 Thread Leilk Liu
clock in prepare_hardware/unprepare_hardware is redundant with pm_runtime, so remove them. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 814bca4..1c2b215

[PATCH 1/3] spi: mediatek: revise coding style

2015-08-18 Thread Leilk Liu
This patch revises mediatek spi driver coding styles. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 125 --- 1 file changed, 65 insertions(+), 60 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index c467ce0

[PATCH 3/3] spi: mediatek: fix spi incorrect endian usage

2015-08-18 Thread Leilk Liu
TX_ENDIAN/RX_ENDIAN bits define whether to reverse the endian order of the data DMA from/to memory. The endian order should keep the same with cpu endian. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 43 include/linux/platform_data/spi

[PATCH] spi: mediatek: fix spi incorrect endian usage and remove redundant clock

2015-08-18 Thread Leilk Liu
This patch fixes incorrect endian usage, removes redundant clock in prepare_hardware/unprepare_hardware and revises coding styles. Signed-off-by: Leilk Liu --- Change in this patch: 1. fix incorrect endian usage on big-endian system. 2. delete redundant clock in prepare/unprepare_hardware. 3

[PATCH v6] arm64: dts: Add spi bus dts

2015-08-16 Thread Leilk Liu
This patch adds MT8173 spi bus controllers into device tree. Signed-off-by: Leilk Liu --- Change in this patch: pinctl and pad-select fields are board specific, so move to mt8173-evb.dtsi, and status = "okay". --- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 18 ++

[PATCH] spi: Mediatek: fixup cpu_to_le32 incorrect usage

2015-08-13 Thread Leilk Liu
writel() already does a cpu_to_le32 conversion, so remove cpu_to_le32(). Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index ae645fa..519f50c 100644 --- a

[PATCH] spi: Mediatek: fix endian warnings

2015-08-11 Thread Leilk Liu
int [unsigned] val got restricted __le32 [usertype] Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 4676b01..ae645fa 100644 --- a/drivers/spi/spi

  1   2   >