signed.
Signed-off-by: Clark Wang
---
drivers/spi/spi-imx.c | 37 +
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 24ba7ab1b05d..01f27b4d7384 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/s
Enable 16/32 bits per word support for spi-imx slave mode.
It only support 8 bits per word in slave mode before.
Signed-off-by: Clark Wang
Reviewed-by: Haibo Chen
---
drivers/spi/spi-imx.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-imx.c
> -Original Message-
> From: Clark Wang
> Sent: Tuesday, April 6, 2021 19:33
> To: Aisheng Dong ; robh...@kernel.org;
> shawn...@kernel.org; s.ha...@pengutronix.de; feste...@gmail.com
> Cc: ker...@pengutronix.de; dl-linux-imx ; linux-
> i...@vger.kernel.org; devic
The next MTDR command should be filled before the last receive command is
fininshed. Otherwise, a NACK will be sent when the current MTDR command
is finished. It causes lpi2c cannot send the next chunk data
successfully.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
Add the missing lpi2c5 status property.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
arch/arm/boot/dts/imx7ulp.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi
index a6681836ca05..b16441e18231
Enable dma support for all lpi2c nodes.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
arch/arm/boot/dts/imx7ulp.dtsi | 8
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi
index 0c51fa79c0bc
Add eDMA receive and send mode support.
Support to read and write data larger than 256 bytes in one frame.
Signed-off-by: Clark Wang
Reviewed-by: Li Jun
---
V2 changes:
- change marco I2C_USE_PIO to DMA_ERR_I2C_USE_PIO. It is a error code defined
in this driver to
---
drivers/i2c/busses
Add i2c bus dma mode configuration example.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
.../devicetree/bindings/i2c/i2c-imx-lpi2c.yaml | 12
1 file changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
b
The clkhi and clklo ratio was not very precise before that can make the
time of START/STOP/HIGH LEVEL out of specification.
Therefore, the calculation of these times has been modified in this patch.
At the same time, the mode rate definition of i2c is corrected.
Signed-off-by: Clark Wang
Claim clkhi and clklo as integer type to avoid possible calculation
errors caused by data overflow.
Signed-off-by: Clark Wang
Reviewed-by: Fugang Duan
Reviewed-by: Dong Aisheng
---
V2 changes:
- No change. Has been reviewed by Dong Aisheng in V1.
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 4
Add i2c bus recovery configuration example.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
.../devicetree/bindings/i2c/i2c-imx-lpi2c.yaml | 14 ++
1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml
b
Switching the clock frequently will affect the data transmission
efficiency, and prolong the timeout to reduce autosuspend times for
lpi2c.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
Reviewed-by: Dong Aisheng
---
V2 changes:
- No change. Has been reviewed by Dong Aisheng in V1
Add bus recovery feature for LPI2C.
Need add gpio pinctrl, scl-gpios and sda-gpios configuration in dts.
Signed-off-by: Clark Wang
---
V2 changes:
- No change. Add dt-bindings in the next patch.
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 83 ++
1 file changed, 83
From: Gao Pan
add debug message when i2c peripheral clk rate is 0, then
directly return -EINVAL.
Signed-off-by: Clark Wang
Signed-off-by: Gao Pan
Reviewed-by: Andy Duan
---
V2 changes:
- Add my signed-off.
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 5 +
1 file changed, 5 insertions
From: Fugang Duan
Manage irq resource request/release in runtime pm to save irq domain's
power.
Signed-off-by: Frank Li
Signed-off-by: Fugang Duan
Signed-off-by: Clark Wang
Reviewed-by: Frank Li
---
V2 changes:
- Change to use request_irq/free_irq.
---
drivers/i2c/busses/i2c-imx-lp
Combined interrupt number may cause unexcepted irq event when using DMA
and too many interrupts will be generated.
So change all i2c interrupts number to non-combined for
imx8qxp/8qm/8dxl.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
arch/arm64/boot/dts/freescale/imx8
The lpi2c driver has add the missing ipg clock.
So add the ipg clock here for all lpi2c nodes.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
.../arm64/boot/dts/freescale/imx8-ss-dma.dtsi | 24 ---
1 file changed, 16 insertions(+), 8 deletions(-)
diff
Add the missing lpi2c4/5 nodes for imx7ulp.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
arch/arm/boot/dts/imx7ulp.dtsi | 31 +--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot
The lpi2c driver has add the missing ipg clock.
So add the ipg clock here for all lpi2c nodes.
Signed-off-by: Clark Wang
---
V2 changes:
- New patch added in V2
---
arch/arm/boot/dts/imx7ulp.dtsi | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts
The lpi2c IP needs two clks: ipg clk and per clk. The old lpi2c
driver missed ipg clk. This patch adds ipg clk for lpi2c driver.
Signed-off-by: Gao Pan
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
V2 changes:
- Merge two clocks' prepare funtions to lpi2c_imx_clocks_pr
From: Gao Pan
A NACK flag in ISR means i2c bus error. In such codition,
there is no need to do read/write operation. It's better
to return ISR directly and then stop i2c transfer.
Signed-off-by: Gao Pan
Signed-off-by: Clark Wang
Reviewed-by: Dong Aisheng
---
V2 changes:
- No change
n PIO mode.
Clark Wang (14):
i2c: imx-lpi2c: add ipg clk for lpi2c driver
ARM: dts: imx7ulp: add the missing lpi2c ipg clock
ARM: dts: imx7ulp: add the missing lpi2c nodes
ARM64: dts: imx8: add the missing lpi2c ipg clock
ARM64: dts: imx8: change i2c irq number to non-combined
i2c: imx-
> -Original Message-
> From: Clark Wang
> Sent: Friday, March 19, 2021 14:16
> To: Aisheng Dong ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
> -Original Message-
> From: Wolfram Sang
> Sent: Friday, March 19, 2021 13:39
> To: Clark Wang
> Cc: Aisheng Dong ; shawn...@kernel.org;
> s.ha...@pengutronix.de; ker...@pengutronix.de; feste...@gmail.com;
> dl-linux-imx ; sumit.sem...@linaro.org;
> christi
> -Original Message-
> From: Aisheng Dong
> Sent: Friday, March 19, 2021 13:15
> To: Clark Wang ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
> -Original Message-
> From: Aisheng Dong
> Sent: Friday, March 19, 2021 12:57
> To: Clark Wang ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
> -Original Message-
> From: Aisheng Dong
> Sent: Friday, March 19, 2021 12:54
> To: Clark Wang ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
> -Original Message-
> From: Aisheng Dong
> Sent: Friday, March 19, 2021 12:46
> To: Clark Wang ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
> -Original Message-
> From: Aisheng Dong
> Sent: Friday, March 19, 2021 12:40
> To: Clark Wang ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
> -Original Message-
> From: Aisheng Dong
> Sent: Friday, March 19, 2021 12:40
> To: Clark Wang ; shawn...@kernel.org;
> s.ha...@pengutronix.de
> Cc: ker...@pengutronix.de; feste...@gmail.com; dl-linux-imx i...@nxp.com>; sumit.sem...@linaro.org; christian.ko
Add eDMA receive and send mode support.
Support to read and write data larger than 256 bytes in one frame.
Signed-off-by: Clark Wang
Reviewed-by: Li Jun
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 291 -
1 file changed, 289 insertions(+), 2 deletions(-)
diff --git a
Claim clkhi and clklo as integer type to avoid possible calculation
errors caused by data overflow.
Reviewed-by: Fugang Duan
Signed-off-by: Clark Wang
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx
-off-by: Clark Wang
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 27 ++-
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c
b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 7216a393095d..5dbe85126f24 100644
--- a/drivers/i2c/busses/i2c
Add bus recovery feature for LPI2C.
Need add gpio pinctrl, scl-gpios and sda-gpios configuration in dts.
Signed-off-by: Clark Wang
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 83 ++
1 file changed, 83 insertions(+)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c
b
Switching the clock frequently will affect the data transmission
efficiency, and prolong the timeout to reduce autosuspend times for
lpi2c.
Acked-by: Fugang Duan
Signed-off-by: Clark Wang
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
From: Fugang Duan
Manage irq resource request/release in runtime pm to save irq domain's
power.
Signed-off-by: Frank Li
Signed-off-by: Fugang Duan
Reviewed-by: Frank Li
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 26 ++
1 file changed, 14 insertions(+), 12 deletions(-)
From: Gao Pan
use subsys_initcall for i2c driver to improve i2c driver probe priority
Signed-off-by: Gao Pan
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c
b/drivers/i2c/busses/i2c-imx-
From: Gao Pan
add debug message when i2c peripheral clk rate is 0, then
directly return -EINVAL.
Signed-off-by: Gao Pan
Reviewed-by: Andy Duan
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c
b
From: Fugang Duan
- Add runtime pm support to dynamicly manage the clock.
- Put the suspend to suspend_noirq.
- Call .pm_runtime_force_suspend() to force runtime pm suspended
in .suspend_noirq().
Signed-off-by: Fugang Duan
Signed-off-by: Gao Pan
Reviewed-by: Anson Huang
---
drivers/i2c/bus
From: Gao Pan
A NACK flag in ISR means i2c bus error. In such codition,
there is no need to do read/write operation. It's better
to return ISR directly and then stop i2c transfer.
Signed-off-by: Gao Pan
Signed-off-by: Clark Wang
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 12 +++---
The lpi2c IP needs two clks: ipg clk and per clk. The old lpi2c
driver missed ipg clk. This patch adds ipg clk for lpi2c driver.
Signed-off-by: Gao Pan
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
drivers/i2c/busses/i2c-imx-lpi2c.c | 28 +---
1 file changed, 21
clk
Best Regards,
Clark Wang
drivers/i2c/busses/i2c-imx-lpi2c.c | 536 +
1 file changed, 478 insertions(+), 58 deletions(-)
--
2.25.1
for !CONFIG_PM
You may try the latest upstream driver again.
I also fix a warning dump issue with CONFIG_PM enabled. It is under reviewed.
So that, this driver can work well in both cases.
Thanks!
Best Regards,
Clark Wang
> -Original Message-
> From: Nikita Shubin
> Sen
already disabled
[ 129.384005] WARNING: CPU: 1 PID: 33 at drivers/clk/clk.c:952
clk_core_disable+0xa4/0xb0
So add the get noresume function before set active.
Fixes: 43b6bf406cd0 spi: imx: fix runtime pm support for !CONFIG_PM
Signed-off-by: Clark Wang
---
drivers/spi/spi-imx.c | 1 +
1 file changed
> -Original Message-
> From: Mark Brown
> Sent: Monday, July 27, 2020 19:11
> To: Clark Wang
> Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [EXT] Re: [PATCH V2 1/4] spi: lpspi: Fix kernel warning dump when
> probe fail after calling spi
Enable runtime pm support for spi-imx driver.
Signed-off-by: Clark Wang
---
drivers/spi/spi-imx.c | 121 ++
1 file changed, 88 insertions(+), 33 deletions(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index fdc25f549378..38a5f1304cec
The cs-gpio is initailized by spi_get_gpio_descs() now. Remove the
chipselect.
Signed-off-by: Clark Wang
---
Changes:
V2:
- New patch added in the v2 patchset.
---
drivers/spi/spi-fsl-lpspi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl
Add "fsl,spi-only-use-cs1-sel" to fit i.MX8DXL-EVK.
Spi common code does not support use of CS signals discontinuously.
It only uses CS1 without using CS0. So, add this property to re-config
chipselect value.
Signed-off-by: Clark Wang
---
Changes:
V2:
- New patch added in the v
SPI common code does not support using CS discontinuously for now.
However, i.MX8DXL-EVK only uses CS1 without CS0. Therefore, add a flag
is_only_cs1 to set the correct TCR[PCS].
Signed-off-by: Clark Wang
---
Changes:
V2:
- No changes.
---
drivers/spi/spi-fsl-lpspi.c | 11 ---
1 file
Hi,
This patchset mainly fixes some recently discovered problems about CS for
LPSPI module on i.MX8DXLEVK.
Add the dt-bindings description for the new property.
Clark Wang (4):
spi: lpspi: Fix kernel warning dump when probe fail after calling
spi_register
spi: lpspi: remove unused
2.312927] ---[ end trace 58abcdfae01bd3c7 ]---
So put this function at the end of the probe sequence.
Signed-off-by: Clark Wang
---
Changes:
V2:
- redo the patch base on the new code.
---
drivers/spi/spi-fsl-lpspi.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
SPI common code does not support using CS discontinuously for now.
However, i.MX8DXL-EVK only uses CS1 without CS0. Therefore, add a flag
is_only_cs1 to set the correct TCR[PCS].
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 11 ---
1 file changed, 8 insertions(+), 3
Call the put function after probe successfully. Otherwise, the lpspi
module will keep active status until the first spi transfer called.
Disable runtime pm when probe fails. There is no need to active runtime
pm after probe failed.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 7
2.312927] ---[ end trace 58abcdfae01bd3c7 ]---
So put this function at the end of the probe sequence.
Meanwhile, in order to keep the multi-CS working, add
"fsl,spi-num-chipselects" check.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 24 +---
From: Fabrice Goucem
If SPI is probed before the GPIO driver, it may miss the cs-gpio
configuration in dtb.
Add defer probe handler to wait GPIO driver probe.
Signed-off-by: Fabrice Goucem
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 5 +
1 file changed, 5 insertions
Hi,
This series mainly fixes some recently discovered problems about CS for
LPSPI module.
And two patches to improve the reliability of the driver.
Regards,
Clark
Clark Wang (4):
spi: lpspi: fix the imbalance of runtime pm function call
spi: lpspi: add NULL check when probe device
spi
Add a NULL check for device node and lpspi_platform_info when lpspi
device probe.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index a1555bbc5e5a..ca43d93adf30 100644
Hi Mark,
These three patches do some code clean up works and fix a problem
when use multi SS in PIO mode.
Clark Wang (3):
spi: lpspi: add NULL check when probe device
spi: lpspi: add multi SS support in PIO mode
spi: lpspi: remove fsl_lpspi->chipselect
drivers/spi/spi-fsl-lpspi.c |
Add "fsl,spi-num-chipselects" check to support multi SS function in PIO
mode.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
drivers/spi/spi-fsl-lpspi.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/s
Replace fsl_lpspi->chipselect by controller->cs_gpios. Clean up the
code.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
drivers/spi/spi-fsl-lpspi.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-l
Add a NULL check for device node and lpspi_platform_info when lpspi
device probe.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
drivers/spi/spi-fsl-lpspi.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index
Add the missing complete operations for dma_completion to fix the
problem of blocking at the wait_for_completion_interruptible()
function when use spi_slave_abort().
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff
auses the value of FSR_RXCOUNT cannot
reflect whether there is still data not sent timely. So do this
judgement by FSR_TXCOUNT.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/sp
Add a error info when set a speed which greater than half of per-clk of
spi module.
The minimum SCK period is 2 cycles(CCR[SCKDIV]). So the maximum transfer
speed is half of spi per-clk.
Signed-off-by: Clark Wang
---
V2:
- No change. Resend for applying.
---
drivers/spi/spi-fsl-lpspi.c | 16
Add introductions of clocks and clock-names strings.
Signed-off-by: Clark Wang
---
V2:
- Add this DT-bindings string in this version.
---
.../devicetree/bindings/spi/spi-fsl-lpspi.txt | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Documentation
From: Han Xu
Enable the runtime power management for lpspi module.
Do some adaptation work from kernel 4.9 to 4.14.
Signed-off-by: Clark Wang
Signed-off-by: Han Xu
Reviewed-by: Frank Li
---
V2:
- Fix the comment format.
---
drivers/spi/spi-fsl-lpspi.c | 117
Use the default implementation of transfer_one_msg/chipselect/setup
functions in spi core to implement cs-gpio control.
Use fsl_lpspi_prepare_message to init the cs_gpio pin.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
V2:
- use core way to implement cs-gpio control. Removed the
eries). In order to reach the maximum speed which is
mentioned in datasheet, the load of connect wires between master and
slave should be less than 15pF.
Each patch in this patchset should base on the previous one when applied.
Thank you!
Clark Wang (7):
spi: lpspi: Add i.
Delete the extra space.
Signed-off-by: Clark Wang
---
V2:
- add this patch in this version
---
drivers/spi/spi-fsl-lpspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 2ac3ac5ea50a..1860f066f838 100644
--- a
speed in slave mode is 15MHz(imx7ulp),
22MHz(8qm/qxp). In order to reach the maximum speed which is mentioned
in datasheet, the load of connect wires between master and slave
should be less than 15pF.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
V2:
- replace a if judgement by
The spi_transfer *t will be used in one transfer whatever. If t is NULL,
there has no need to try sending data, so add an error return here.
Signed-off-by: Clark Wang
Acked-by: Fugang Duan
---
V2:
- add this patch in this version
---
drivers/spi/spi-fsl-lpspi.c | 7 +--
1 file changed, 5
Add both ipg and per clock for lpspi to support i.MX8QM/QXP boards.
Signed-off-by: Clark Wang
---
V2:
- No change. But add DT-bindings string at the next patch.
---
drivers/spi/spi-fsl-lpspi.c | 52 +
1 file changed, 41 insertions(+), 11 deletions(-)
diff
maximum transfer speed in slave mode is 15MHz(i.MX7ULP),
22MHz(i.MX8 series).
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 318 ++--
1 file changed, 306 insertions(+), 12 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl
Add a error info when set a speed which greater than half of per-clk of
spi module.
The minimum SCK period is 2 cycles(CCR[SCKDIV]). So the maximum transfer
speed is half of spi per-clk.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 16 +---
1 file changed, 13
o one byte of whole data. This will
cause the transfer ending early.
This patch add a register reading in isr function, it might lead to a
slight decrease in the max transmission speed in PIO mode.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 9 +
1 file changed, 9
Add both ipg and per clock for lpspi to support i.MX8QM/QXP boards.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 52 +
1 file changed, 41 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
Add cs-gpio feature for LPSPI.
The cs line will be controlled in fsl_lpspi_transfe_one_msg() function.
Still support using the mode without cs-gpio. It depends on if attribute
cs-gpio has been configured in dts file.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 89
From: Han Xu
Enable the runtime power management for lpspi module.
Do some adaptation work from kernel 4.9 to 4.14.
Signed-off-by: Clark Wang
Signed-off-by: Han Xu
Reviewed-by: Frank Li
---
drivers/spi/spi-fsl-lpspi.c | 117
1 file
Hz(i.MX8 series).
Clark Wang (8):
spi: lpspi: Add i.MX8 boards support for lpspi
spi: lpspi: enable runtime pm for lpspi
spi: lpspi: Improve the stability of lpspi data transmission
spi: lpspi: Fix wrong transmission when don't use CONT
spi: lpspi: Fix CLK pin becomes low before one t
fsl_lpspi_txfifo_empty(), so remove it.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 61 -
1 file changed, 20 insertions(+), 41 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 3e935db5ff02..f32a2e0d7ae1 100644
Remove Reset operation in fsl_lpspi_config(). This RST may cause both CLK
and CS pins go from high to low level under cs-gpio mode.
Add fsl_lpspi_reset() function after one message transfer to clear all
flags in use.
Signed-off-by: Clark Wang
Reviewed-by: Fugang Duan
---
drivers/spi/spi-fsl
> -Original Message-
> From: Mark Brown
> Sent: Tuesday, December 11, 2018 22:28
> To: Clark Wang
> Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] spi: lpspi: enable runtime pm for lpspi
>
> On Tue, Dec 04, 2018 at 06:19:48AM
> -Original Message-
> From: Mark Brown
> Sent: Tuesday, December 11, 2018 22:26
> To: Clark Wang
> Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] spi: lpspi: Add cs-gpio support
>
> On Tue, Dec 04, 2018 at 06:24:59AM
Hi Mark,
These five patches are based on patch series spi: lpspi: Add Slave Mode support
for LPSPI. For the patch series make a big change, should I hold these five
patches until the patch series are applied in your git branch?
Thanks for your patience.
Regards,
Clark Wang
> -Origi
structure of slave mode
will cause confusion.
When Geert Uytterhoeven add the slave support for spi, he had done " Generalize
SPI 'master' to 'controller'" step, too. The commit ID is
8caab75fd2c2a92667cbb1cd315720bede3feaa9.
Thank you.
Regards,
Clark Wang
> -
Configure watermark to change with the length of the sent data.
Support LPSPI sending message shorter than tx/rxfifosize.
Signed-off-by: Clark Wang
---
Change log:
V2/V3:
- No change.
---
drivers/spi/spi-fsl-lpspi.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git
Add introductions of interrupt-parent and spi-slave.
Signed-off-by: Clark Wang
---
Change log:
V2:
- No change.
V3:
- Keep the description of "fsl,imx8qxp-spi" in spi-fsl-lpspi.txt.
---
Documentation/devicetree/bindings/spi/spi-fsl-lpspi.txt | 4
1 file changed, 4 insertion
ection:
GND, SCK, MISO(to MISO of slave), MOSI(to MOSI of slave), SCS
Signed-off-by: Clark Wang
---
Change log:
V2:
- No change.
V3:
- Add more detailed description in commit message.
---
drivers/spi/spi-fsl-lpspi.c | 107 ++--
1 file changed, 79 insertions(
In order to enable the slave mode and make the code more readable,
replace all related structure names and object names which is
named "master" with "controller".
Signed-off-by: Clark Wang
---
Change log:
V2/V3:
- No change.
---
drivers/spi/
pi" in spi-fsl-lpspi.txt in the
fourth patch.
Clark Wang (4):
spi: lpspi: Replace all "master" with "controller"
spi: lpspi: Add slave mode support
spi: lpspi: Let watermark change with send data length
doc: lpspi: Document DT bindings for LPSPI slave mode
.../device
cs-gpio has been configured in dts file.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 79 -
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index a7d01b79827b..c6fe3f94de19
Remove Reset operation in fsl_lpspi_config(). This RST may cause both CLK
and CS pins go from high to low level under cs-gpio mode.
Add fsl_lpspi_reset() function after one message transfer to clear all
flags in use.
Signed-off-by: Clark Wang
Reviewed-by: Fugang Duan
---
drivers/spi/spi-fsl
fsl_lpspi_txfifo_empty(), so remove it.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 61 -
1 file changed, 20 insertions(+), 41 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 3e935db5ff02..f32a2e0d7ae1 100644
From: Han Xu
Enable the runtime power management for lpspi module.
Signed-off-by: Han Xu
Reviewed-by: Frank Li
---
drivers/spi/spi-fsl-lpspi.c | 117
1 file changed, 92 insertions(+), 25 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.
Add both ipg and per clock for lpspi to support i.MX8QM/QXP boards.
Signed-off-by: Clark Wang
---
drivers/spi/spi-fsl-lpspi.c | 52 +
1 file changed, 41 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
Add slave mode support to the fsl-lpspi driver, only in PIO mode.
For now, there are some limitations for slave mode transmission, which
have been mentioned in cover-letter.
Signed-off-by: Clark Wang
---
Change log:
V2:
- No change.
---
drivers/spi/spi-fsl-lpspi.c | 107
Remove "fsl,imx8qxp-spi", it does not exist in spi-fsl-lpspi.c driver
for now.
Add introductions of interrupt-parent and spi-slave.
Signed-off-by: Clark Wang
---
Documentation/devicetree/bindings/spi/spi-fsl-lpspi.txt | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
di
ave Mode.
Wire connection:
GND, SCK, MISO(to MISO of slave), MOSI(to MOSI of slave), SCS
Change log:
V2:
- Split last version patch into 3 patches, and add the doc update.
Clark Wang (4):
spi: lpspi: Replace all "master" with "controller"
spi: lpspi: Add slave mode suppor
In order to enable the slave mode and make the code more readable,
replace all related structure names and object names which is
named "master" with "controller".
Signed-off-by: Clark Wang
---
Change log:
V2:
- No change.
---
drivers/spi/
Configure watermark to change with the length of the sent data.
Support LPSPI sending message shorter than tx/rxfifosize.
Signed-off-by: Clark Wang
---
Change log:
V2:
- No change.
---
drivers/spi/spi-fsl-lpspi.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a
1 - 100 of 112 matches
Mail list logo