This patch adds dtsi node of spi for mt2701.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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
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
This patch adds spi support for mt2701 IC.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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-mt
This patch adds a DT binding documentation for the MT2701 soc.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
.../devicetree/bindings/spi/spi-mt65xx.txt |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/spi-mt65
This patch merge all identical compat into on mtk_common_compat
and used for all compatible soc.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
drivers/spi/spi-mt65xx.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi-mt65
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 <leilk@mediatek.com>
---
drivers/spi/spi-mt65xx.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
This patch revises failure flow while pm_runtime_enable().
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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 6
It's not need to re-read and re-write SPI_CMD_REG, so remove it.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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/d
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 <leilk@mediatek.com>
---
.../devicetree/bindings/spi/spi-mt65xx.txt |2 +-
1 file changed, 1 insertion(+), 1 deletio
This patch updates document devicetree bindings
to fix syntax error.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
.../devicetree/bindings/spi/spi-mt65xx.txt |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/s
This patch revises failure flow while pm_runtime_enable().
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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 6
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
This patch updates document devicetree bindings
to support multiple devices.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bi
ces on other group
will also be selected.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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-mt65x
controller_data is related with device, so move to master->setup
function.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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
This patch support multiple devices for MT8173 board.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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/bo
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 <leilk@mediatek.com>
---
drivers/spi/spi-mt65xx.c | 59 +---
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
controller_data is related with device, so move to master->setup
function.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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
This patch update document devicetree bindings to
support multiple devices.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindin
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 <leilk@mediatek.com>
---
drivers/spi/spi-mt65xx.c | 59 +---
ces on other group
will also be selected.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
drivers/spi/spi-mt65xx.c | 65 ++--
1 file changed, 52 insertions(+), 13 deletions(-)
mode change 100755 => 100644 drivers/spi/spi-mt65xx.c
diff --g
This patch support multiple devices for MT8173.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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/me
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 <leilk@mediatek.
From: Leilk Liu <leilk@mediatek.com>
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) (clo
This patch updates spi bindings, fixs clock usage description.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
Documentation/devicetree/bindings/spi/spi-mt65xx.txt | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindin
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 <leilk@mediatek.com>
---
dri
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 <leilk@mediatek.com>
---
drivers/spi/spi-mt65xx.c | 1 -
1 file changed, 1 de
This patch adds MT8173 spi bus controllers into device tree.
Signed-off-by: Leilk Liu <leilk@mediatek.com>
---
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
enable pause interrupt should use SPI_CMD_PAUSE_IE MACRO,
so fix it.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
From: Leilk Liu leilk@mediatek.com
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
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 leilk@mediatek.com
---
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
This patch adds PM clk_prepare_enable fail flow.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
This patch replaces *_time name in mtk_spi_prepare_transfer().
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
this patch replaces int with u32, deletes TAB, and defines
MTK_SPI_PAUSE_INT_STATUS marco.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
drivers/spi/spi-mt65xx.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi
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
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 leilk@mediatek.com
---
drivers/spi/spi-mt65xx.c | 38 ++--
include
This patch removes SPI_CMD_*_OFFSET defines, and uses the BIT(x)
defines instead.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
drivers/spi/spi-mt65xx.c | 37 -
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/drivers/spi/spi-mt65xx.c b
The quirks are true/false, so define these as bool.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
This patch revises littery coding style according to comments.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
drivers/spi/spi-mt65xx.c | 52
1 file changed, 30 insertions(+), 22 deletions(-)
diff --git a/drivers/spi/spi-mt65xx.c b/drivers
This patch fixes incorrect endian usage, removes redundant
clock in prepare_hardware/unprepare_hardware and revises
coding styles.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
Change in this patch:
1. fix incorrect endian usage on big-endian system.
2. delete redundant clock in prepare
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 leilk@mediatek.com
---
drivers/spi/spi-mt65xx.c | 43
include
clock in prepare_hardware/unprepare_hardware is redundant
with pm_runtime, so remove them.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
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
This patch revises mediatek spi driver coding styles.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
This patch adds MT8173 spi bus controllers into device tree.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
writel() already does a cpu_to_le32 conversion, so
remove cpu_to_le32().
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
unsigned int [unsigned] val
got restricted __le32 [usertype] noident
Signed-off-by: Leilk Liu leilk@mediatek.com
---
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
. support fifo mode function.
2. support any non-prime length transfer in dma mode.
3. use interrupt to handle scatterlist.
4. fix review comment.
Change in v2:
1. Remove spi bitbang framwork, use can_dma() and transfer_one().
2. Add PM functions.
3. Fix Mark Brown review comment.
Leilk Liu (3
Signed-off-by: Leilk Liu leilk@mediatek.com
---
Change in this patch:
1. change this patch title.
2. change MTK SPI device to MTK SPI controller.
3. pad-select is a vendor property, so change it to mediatek,pad-select.
4. modify the property of clock and clock name.
5. explain what the pad
This patch adds MT8173 spi bus controllers into device tree.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
Change in this patch:
1. pad-select is a vendor property, so change it to mediatek,pad-select.
2. modify the property of clocks and clock-names.
---
arch/arm64/boot/dts/mediatek
This patch adds basic spi bus for MT8173.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
Change in this patch:
1. change pad-select to mediatek,pad-select.
2. modify clk relevant implement.
---
drivers/spi/Kconfig | 9 +
drivers/spi/Makefile | 1
On Tue, 2015-08-04 at 18:42 +0100, Mark Brown wrote:
On Wed, Jul 29, 2015 at 07:04:32PM +0800, Leilk Liu wrote:
Signed-off-by: Leilk Liu leilk@mediatek.com
Please use subject lines reflecting the style for the subsystem so
people can spot if patches are relevant to them.
OK, I
Hi Jonas,
On Thu, 2015-07-30 at 21:27 +0200, Jonas Gorski wrote:
Hi,
On Wed, Jul 29, 2015 at 1:04 PM, Leilk Liu leilk@mediatek.com wrote:
Signed-off-by: Leilk Liu leilk@mediatek.com
---
.../devicetree/bindings/spi/spi-mt65xx.txt | 38
++
1 file
On Thu, 2015-07-30 at 21:29 +0200, Jonas Gorski wrote:
Hi,
On Wed, Jul 29, 2015 at 1:04 PM, Leilk Liu leilk@mediatek.com wrote:
Change in v4:
1. fix Mark Brown review comment.
You should say what you actually fixed/changed, not just that you
changed something. Also the individual
. Add PM functions.
3. Fix Mark Brown review comment.
Leilk Liu (3):
dt-binding: spi: Mediatek: Document devicetree bindings for spi bus
spi: mediatek: Add spi bus for Mediatek MT8173
arm64: dts: Add spi bus dts
.../devicetree/bindings/spi/spi-mt65xx.txt | 38 ++
arch/arm64/boot/dts
This patch adds basic spi bus for MT8173.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
drivers/spi/Kconfig | 9 +
drivers/spi/Makefile | 1 +
drivers/spi/spi-mt65xx.c | 732 +++
include/linux
This patch adds MT8173 spi bus controllers into device tree.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 23 +++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
b/arch/arm64/boot/dts
Signed-off-by: Leilk Liu leilk@mediatek.com
---
.../devicetree/bindings/spi/spi-mt65xx.txt | 38 ++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-mt65xx.txt
diff --git a/Documentation/devicetree/bindings/spi/spi
On Fri, 2015-07-24 at 18:49 +0100, Mark Brown wrote:
On Thu, Jul 23, 2015 at 05:10:42PM +0800, Leilk Liu wrote:
This basically seems fine but there's a couple of issues that should be
relatively easy to fix:
+ mdata-cur_transfer = xfer;
+ mtk_spi_prepare_transfer(master, xfer
On Fri, 2015-07-24 at 18:34 +0100, Mark Brown wrote:
On Thu, Jul 23, 2015 at 05:10:41PM +0800, Leilk Liu wrote:
Change-Id: I6cadbf2e51d2cc4eacd518a24d5a9a1da93d4db5
Signed-off-by: Leilk Liu leilk@mediatek.com
Please don't include noise like Change-Id in upstream commits and please
use
This patch adds basic spi bus for MT8173.
Change-Id: I52a48526105f3de49f6253d1ffb449759a2a8140
Signed-off-by: Leilk Liu leilk@mediatek.com
---
drivers/spi/Kconfig | 9 +
drivers/spi/Makefile | 1 +
drivers/spi/spi-mt65xx.c | 817
Change-Id: I6cadbf2e51d2cc4eacd518a24d5a9a1da93d4db5
Signed-off-by: Leilk Liu leilk@mediatek.com
---
.../devicetree/bindings/spi/spi-mt65xx.txt | 38 ++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-mt65xx.txt
diff
This patch adds MT8173 spi bus controllers into device tree.
Change-Id: I70edf3e4a366d856499dc855b53d726ce4668a39
Signed-off-by: Leilk Liu leilk@mediatek.com
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 23 +++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64
Change in v3:
1. support fifo mode function.
2. support any non-prime length transfer in dma mode.
3. use interrupt to handle scatterlist.
4. fix review comment.
Leilk Liu (4):
spi: support spi without dma channel to use can_dma()
dt-bindings: ARM: Mediatek: Document devicetree bindings
For spi without dma channel and use can_dma(), it can
use master-dev for struct device.
Change-Id: I5b320e1742767c2ea4368410fb49c6679e28af6b
Signed-off-by: Leilk Liu leilk@mediatek.com
---
drivers/spi/spi.c | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff
Hello Daniel,
On Wed, 2015-07-01 at 12:06 +0800, Daniel Kurtz wrote:
Hi Leilk,
Please see comments inline...
On Mon, Jun 29, 2015 at 9:04 PM, Leilk Liu leilk@mediatek.com wrote:
This patch adds basic spi bus for MT8173.
Signed-off-by: Leilk Liu leilk@mediatek.com
Signed-off
Hi Alexey,
+config SPI_MT65XX
+ tristate MediaTek SPI controller
+ depends on ARCH_MEDIATEK || COMPILE_TEST
+ help
+ This selects the MediaTek(R) SPI bus driver.
+ If you want to use MediaTek(R) SPI interface,
+ say Y or M here.If you are
+
+- pad-select: should specify spi pad used, only required for MT8173.
+ This value should be 0~3.
+
+Example:
+
+- SoC Specific Portion:
+spi: spi@1100a000 {
+ compatible = mediatek,mt8173-spi;
+ reg = 0 0x1100a000 0 0x1000;
+ interrupts = GIC_SPI
This patch adds basic spi bus for MT8173.
Signed-off-by: Leilk Liu leilk@mediatek.com
Signed-off-by: Eddie Huang eddie.hu...@mediatek.com
---
drivers/spi/Kconfig | 9 +
drivers/spi/Makefile | 1 +
drivers/spi/spi-mt65xx.c | 656 +++
3
This patch adds MT8173 spi bus controllers into device tree.
Signed-off-by: Leilk Liu leilk@mediatek.com
---
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 9 +
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
b/arch/arm64/boot/dts/mediatek/mt8173
For spi without dma channel and use can_dma(), it can
use master-dev for struct device.
Signed-off-by: Leilk Liu leilk@mediatek.com
Signed-off-by: Eddie Huang eddie.hu...@mediatek.com
---
drivers/spi/spi.c | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff
need
to enable RX.
Some workarounds are done in SPI driver code base on v4.1-rc1.
Change in v2:
1. Remove spi bitbang framwork, use can_dma() and transfer_one().
2. Add PM functions.
3. Fix Mark Brown review comment.
Leilk Liu (4):
spi: support spi without dma channel to use can_dma()
dt
Signed-off-by: Leilk Liu leilk@mediatek.com
---
.../devicetree/bindings/spi/spi-mt65xx.txt | 32 ++
1 file changed, 32 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/spi-mt65xx.txt
diff --git a/Documentation/devicetree/bindings/spi/spi
74 matches
Mail list logo