[PATCH v3 5/6] spi: at91-usart: add driver for at91-usart as spi

2018-05-11 Thread Radu Pirea
This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI. The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave. Signed-off-by: Radu Pirea --- drivers/spi/Kconfig

[PATCH v3 2/6] mfd: at91-usart: added mfd driver for usart

2018-05-11 Thread Radu Pirea
This mfd driver is just a wrapper over atmel_serial driver and spi-at91-usart driver. Selection of one of the drivers is based on a property from device tree. If the property is not specified, the default driver is atmel_serial. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- d

[PATCH v3 2/6] mfd: at91-usart: added mfd driver for usart

2018-05-11 Thread Radu Pirea
This mfd driver is just a wrapper over atmel_serial driver and spi-at91-usart driver. Selection of one of the drivers is based on a property from device tree. If the property is not specified, the default driver is atmel_serial. Signed-off-by: Radu Pirea --- drivers/mfd/Kconfig

[PATCH v3 4/6] dt-bindings: add binding for at91-usart in spi mode

2018-05-11 Thread Radu Pirea
These are bindings for at91-usart IP in spi spi mode. There is no support for internal chip select. Only kind of chip selects available are gpio chip selects. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- .../bindings/spi/microchip,at91-usart-spi.txt | 28 +++

[PATCH v3 4/6] dt-bindings: add binding for at91-usart in spi mode

2018-05-11 Thread Radu Pirea
These are bindings for at91-usart IP in spi spi mode. There is no support for internal chip select. Only kind of chip selects available are gpio chip selects. Signed-off-by: Radu Pirea --- .../bindings/spi/microchip,at91-usart-spi.txt | 28 +++ 1 file changed, 28 insertions

[PATCH v3 1/6] MAINTAINERS: add at91 usart mfd driver

2018-05-11 Thread Radu Pirea
Added entry for at91 usart mfd driver. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e2a2fddbd19..ca06c6f58299 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9192,6 +9192,1

[PATCH v3 0/6] Driver for at91 usart in spi mode

2018-05-11 Thread Radu Pirea
driver child Changes in v3: - fixed spi slaves probing Radu Pirea (6): MAINTAINERS: add at91 usart mfd driver mfd: at91-usart: added mfd driver for usart MAINTAINERS: add at91 usart spi driver dt-bindings: add binding for at91-usart in spi mode spi: at91-usart: add driver for at91-usart

[PATCH v3 1/6] MAINTAINERS: add at91 usart mfd driver

2018-05-11 Thread Radu Pirea
Added entry for at91 usart mfd driver. Signed-off-by: Radu Pirea --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e2a2fddbd19..ca06c6f58299 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9192,6 +9192,13 @@ S: Supported F

[PATCH v3 0/6] Driver for at91 usart in spi mode

2018-05-11 Thread Radu Pirea
driver child Changes in v3: - fixed spi slaves probing Radu Pirea (6): MAINTAINERS: add at91 usart mfd driver mfd: at91-usart: added mfd driver for usart MAINTAINERS: add at91 usart spi driver dt-bindings: add binding for at91-usart in spi mode spi: at91-usart: add driver for at91-usart

[PATCH] mtd: spi-nor: add support for Microchip 25LC256

2018-05-04 Thread Radu Pirea
Added geometry description for Microchip 25LC256 memory. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/mtd/devices/m25p80.c | 3 +++ drivers/mtd/spi-nor/spi-nor.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/

[PATCH] mtd: spi-nor: add support for Microchip 25LC256

2018-05-04 Thread Radu Pirea
Added geometry description for Microchip 25LC256 memory. Signed-off-by: Radu Pirea --- drivers/mtd/devices/m25p80.c | 3 +++ drivers/mtd/spi-nor/spi-nor.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index a4e18f6aaa33

[PATCH v2 1/6] MAINTAINERS: add at91 usart mfd driver

2018-05-04 Thread Radu Pirea
Added entry for at91 usart mfd driver. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e2a2fddbd19..ca06c6f58299 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9192,6 +9192,1

[PATCH v2 1/6] MAINTAINERS: add at91 usart mfd driver

2018-05-04 Thread Radu Pirea
Added entry for at91 usart mfd driver. Signed-off-by: Radu Pirea --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e2a2fddbd19..ca06c6f58299 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9192,6 +9192,13 @@ S: Supported F

[PATCH v2 3/6] MAINTAINERS: add at91 usart spi driver

2018-05-04 Thread Radu Pirea
Added entry for at91 usart mfd driver. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ca06c6f58299..9243b9007966 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9199,6 +9199,1

[PATCH v2 3/6] MAINTAINERS: add at91 usart spi driver

2018-05-04 Thread Radu Pirea
Added entry for at91 usart mfd driver. Signed-off-by: Radu Pirea --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ca06c6f58299..9243b9007966 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9199,6 +9199,13 @@ S: Supported F

[PATCH v2 6/6] tty/serial: atmel: changed the driver to work under at91-usart mfd

2018-05-04 Thread Radu Pirea
This patch modifies the place where resources and device tree properties are searched. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/tty/serial/Kconfig| 1 + drivers/tty/serial/atmel_serial.c | 29 +++-- 2 files changed, 16 insertions(

[PATCH v2 6/6] tty/serial: atmel: changed the driver to work under at91-usart mfd

2018-05-04 Thread Radu Pirea
This patch modifies the place where resources and device tree properties are searched. Signed-off-by: Radu Pirea --- drivers/tty/serial/Kconfig| 1 + drivers/tty/serial/atmel_serial.c | 29 +++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git

[PATCH v2 5/6] spi: at91-usart: add driver for at91-usart as spi

2018-05-04 Thread Radu Pirea
This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI. The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave. Signed-off-by: Radu Pirea <radu.pi...@microchip.

[PATCH v2 5/6] spi: at91-usart: add driver for at91-usart as spi

2018-05-04 Thread Radu Pirea
This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI. The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave. Signed-off-by: Radu Pirea --- drivers/spi/Kconfig

[PATCH v2 4/6] dt-bindings: add binding for at91-usart in spi mode

2018-05-04 Thread Radu Pirea
These are bindings for at91-usart IP in spi spi mode. There is no support for internal chip select. Only kind of chip selects available are gpio chip selects. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- .../bindings/spi/microchip,at91-usart-spi.txt | 28 +++

[PATCH v2 4/6] dt-bindings: add binding for at91-usart in spi mode

2018-05-04 Thread Radu Pirea
These are bindings for at91-usart IP in spi spi mode. There is no support for internal chip select. Only kind of chip selects available are gpio chip selects. Signed-off-by: Radu Pirea --- .../bindings/spi/microchip,at91-usart-spi.txt | 28 +++ 1 file changed, 28 insertions

[PATCH v2 2/6] mfd: at91-usart: added mfd driver for usart

2018-05-04 Thread Radu Pirea
This mfd driver is just a wrapper over atmel_serial driver and spi-at91-usart driver. Selection of one of the drivers is based on a property from device tree. If the property is not specified, the default driver is atmel_serial. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- d

[PATCH v2 2/6] mfd: at91-usart: added mfd driver for usart

2018-05-04 Thread Radu Pirea
This mfd driver is just a wrapper over atmel_serial driver and spi-at91-usart driver. Selection of one of the drivers is based on a property from device tree. If the property is not specified, the default driver is atmel_serial. Signed-off-by: Radu Pirea --- drivers/mfd/Kconfig

[PATCH v2 0/6] Driver for at91 usart in spi mode

2018-05-04 Thread Radu Pirea
driver child Radu Pirea (6): MAINTAINERS: add at91 usart mfd driver mfd: at91-usart: added mfd driver for usart MAINTAINERS: add at91 usart spi driver dt-bindings: add binding for at91-usart in spi mode spi: at91-usart: add driver for at91-usart as spi tty/serial: atmel: changed the driver

[PATCH v2 0/6] Driver for at91 usart in spi mode

2018-05-04 Thread Radu Pirea
driver child Radu Pirea (6): MAINTAINERS: add at91 usart mfd driver mfd: at91-usart: added mfd driver for usart MAINTAINERS: add at91 usart spi driver dt-bindings: add binding for at91-usart in spi mode spi: at91-usart: add driver for at91-usart as spi tty/serial: atmel: changed the driver

Re: [PATCH 2/3] dt-bindings: add binding for at91-usart in spi mode

2018-04-19 Thread Radu Pirea
On Tue, 2018-04-17 at 12:03 +0100, Mark Brown wrote: > On Fri, Apr 13, 2018 at 08:12:51PM +0200, Alexandre Belloni wrote: > > On 13/04/2018 19:12:54+0200, Nicolas Ferre wrote: > > > This layout of the hardware is completely different from the > > > USART one and > > > it seems to makes sense to

Re: [PATCH 2/3] dt-bindings: add binding for at91-usart in spi mode

2018-04-19 Thread Radu Pirea
On Tue, 2018-04-17 at 12:03 +0100, Mark Brown wrote: > On Fri, Apr 13, 2018 at 08:12:51PM +0200, Alexandre Belloni wrote: > > On 13/04/2018 19:12:54+0200, Nicolas Ferre wrote: > > > This layout of the hardware is completely different from the > > > USART one and > > > it seems to makes sense to

[PATCH 0/3] Driver for AT91 USART in SPI mode

2018-04-13 Thread Radu Pirea
issues. Radu Pirea (3): MAINTAINERS: add usart spi driver dt-bindings: add binding for at91-usart in spi mode spi: at91-usart: add driver for at91-usart as spi .../bindings/spi/microchip,at91-usart-spi.txt | 24 + MAINTAINERS | 7 + drivers/spi/Kconfig

[PATCH 0/3] Driver for AT91 USART in SPI mode

2018-04-13 Thread Radu Pirea
issues. Radu Pirea (3): MAINTAINERS: add usart spi driver dt-bindings: add binding for at91-usart in spi mode spi: at91-usart: add driver for at91-usart as spi .../bindings/spi/microchip,at91-usart-spi.txt | 24 + MAINTAINERS | 7 + drivers/spi/Kconfig

[PATCH 2/3] dt-bindings: add binding for at91-usart in spi mode

2018-04-13 Thread Radu Pirea
These are bindings for at91-usart IP in spi spi mode. There is no support for internal chip select. Only kind of chip selects available are gpio chip selects. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- .../bindings/spi/microchip,at91-usart-spi.txt | 24 +++

[PATCH 2/3] dt-bindings: add binding for at91-usart in spi mode

2018-04-13 Thread Radu Pirea
These are bindings for at91-usart IP in spi spi mode. There is no support for internal chip select. Only kind of chip selects available are gpio chip selects. Signed-off-by: Radu Pirea --- .../bindings/spi/microchip,at91-usart-spi.txt | 24 +++ 1 file changed, 24 insertions

[PATCH 1/3] MAINTAINERS: add usart spi driver

2018-04-13 Thread Radu Pirea
Add entry for at91 usart spi driver. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e2a2fddbd19..8f80d0e30573 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9192,6 +9192,1

[PATCH 3/3] spi: at91-usart: add driver for at91-usart as spi

2018-04-13 Thread Radu Pirea
This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI. The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave. Signed-off-by: Radu Pirea <radu.pi...@microchip.

[PATCH 1/3] MAINTAINERS: add usart spi driver

2018-04-13 Thread Radu Pirea
Add entry for at91 usart spi driver. Signed-off-by: Radu Pirea --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e2a2fddbd19..8f80d0e30573 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9192,6 +9192,13 @@ S: Supported F

[PATCH 3/3] spi: at91-usart: add driver for at91-usart as spi

2018-04-13 Thread Radu Pirea
This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI. The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave. Signed-off-by: Radu Pirea --- drivers/spi/Kconfig

[PATCH] spi-nor: Add support for Atmel Dataflash memories

2018-02-28 Thread Radu Pirea
This patch add support in spi-nor for allmost all dataflash memories supported by old mtd_dataflash driver. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/mtd/spi-nor/spi-nor.c | 150 +- include/linux/mtd/spi-nor.h | 10 +++ 2

[PATCH] spi-nor: Add support for Atmel Dataflash memories

2018-02-28 Thread Radu Pirea
This patch add support in spi-nor for allmost all dataflash memories supported by old mtd_dataflash driver. Signed-off-by: Radu Pirea --- drivers/mtd/spi-nor/spi-nor.c | 150 +- include/linux/mtd/spi-nor.h | 10 +++ 2 files changed, 158 insertions

[PATCH v3] spi: atmel: Implements transfers with bounce buffer

2017-12-19 Thread Radu Pirea
reverted "spi: atmel: fix corrupted data issue on SAM9 family SoCs"(7094576ccdc3acfe1e06a1e2ab547add375baf7f). Signed-off-by: Radu Pirea <radu.pi...@microchip.com> Acked-by: Nicolas Ferre <nicolas.fe...@microchip.com> --- Changes v3: -rebased on top of spi: atmel: fixed

[PATCH v3] spi: atmel: Implements transfers with bounce buffer

2017-12-19 Thread Radu Pirea
reverted "spi: atmel: fix corrupted data issue on SAM9 family SoCs"(7094576ccdc3acfe1e06a1e2ab547add375baf7f). Signed-off-by: Radu Pirea Acked-by: Nicolas Ferre --- Changes v3: -rebased on top of spi: atmel: fixed spin_lock usage inside atmel_spi_remove -rerun checkpatch.pl and

[PATCH] spi: atmel: fixed spin_lock usage inside atmel_spi_remove

2017-12-15 Thread Radu Pirea
can't be inside a spin_lock. Reported-by: Jia-Ju Bai <baijiaju1...@gmail.com> Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/spi/spi-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index f95d

[PATCH] spi: atmel: fixed spin_lock usage inside atmel_spi_remove

2017-12-15 Thread Radu Pirea
can't be inside a spin_lock. Reported-by: Jia-Ju Bai Signed-off-by: Radu Pirea --- drivers/spi/spi-atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index f95da36..6694709 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers

[PATCH v2] spi: atmel: Implements transfers with bounce buffer

2017-12-12 Thread Radu Pirea
reverted "spi: atmel: fix corrupted data issue on SAM9 family SoCs"(7094576ccdc3acfe1e06a1e2ab547add375baf7f). Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- Please ignore the previous version. I messed up with file names. drivers/spi/s

[PATCH v2] spi: atmel: Implements transfers with bounce buffer

2017-12-12 Thread Radu Pirea
reverted "spi: atmel: fix corrupted data issue on SAM9 family SoCs"(7094576ccdc3acfe1e06a1e2ab547add375baf7f). Signed-off-by: Radu Pirea --- Please ignore the previous version. I messed up with file names. drivers/spi/spi-atmel.c | 113 +++---

[PATCH v2] spi: atmel: bounce buffer spi

2017-12-12 Thread Radu Pirea
Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/spi/spi-atmel.c | 112 +++- 1 file changed, 82 insertions(+), 30 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index f95da36..59b59ae 100644 --- a/d

[PATCH v2] spi: atmel: bounce buffer spi

2017-12-12 Thread Radu Pirea
Signed-off-by: Radu Pirea --- drivers/spi/spi-atmel.c | 112 +++- 1 file changed, 82 insertions(+), 30 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index f95da36..59b59ae 100644 --- a/drivers/spi/spi-atmel.c +++ b

[RFC PATCH 0/2] Enable DMA transfers for SAM9 and fix cache aliasing

2017-11-15 Thread Radu Pirea
iew this is the best and most simple approach. I based these patches on Russell King idea https://lkml.org/lkml/2017/6/23/509 I welcome any feedback about this solution. Thanks. Radu Pirea (2): Revert "spi: atmel: fix corrupted data issue on SAM9 family SoCs" spi: atmel: Fix DMA t

[RFC PATCH 0/2] Enable DMA transfers for SAM9 and fix cache aliasing

2017-11-15 Thread Radu Pirea
iew this is the best and most simple approach. I based these patches on Russell King idea https://lkml.org/lkml/2017/6/23/509 I welcome any feedback about this solution. Thanks. Radu Pirea (2): Revert "spi: atmel: fix corrupted data issue on SAM9 family SoCs" spi: atmel: Fix DMA t

[RFC PATCH 2/2] spi: atmel: Fix DMA transfers data corruption

2017-11-15 Thread Radu Pirea
If the cache model is VIVT, DMA data transfers may not be valid and to ensure the validity of the data cache must be flushed and invalidated. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/spi/spi-atmel.c | 20 1 file changed, 20 insertions(+) diff

[RFC PATCH 2/2] spi: atmel: Fix DMA transfers data corruption

2017-11-15 Thread Radu Pirea
If the cache model is VIVT, DMA data transfers may not be valid and to ensure the validity of the data cache must be flushed and invalidated. Signed-off-by: Radu Pirea --- drivers/spi/spi-atmel.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/spi/spi-atmel.c b

[RFC PATCH 1/2] Revert "spi: atmel: fix corrupted data issue on SAM9 family SoCs"

2017-11-15 Thread Radu Pirea
This reverts commit 7094576ccdc3acfe1e06a1e2ab547add375baf7f. A better fix was found and DMA for SAM9 SoCs must be enabled. Signed-off-by: Radu Pirea <radu.pi...@microchip.com> --- drivers/spi/spi-atmel.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff

[RFC PATCH 1/2] Revert "spi: atmel: fix corrupted data issue on SAM9 family SoCs"

2017-11-15 Thread Radu Pirea
This reverts commit 7094576ccdc3acfe1e06a1e2ab547add375baf7f. A better fix was found and DMA for SAM9 SoCs must be enabled. Signed-off-by: Radu Pirea --- drivers/spi/spi-atmel.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/spi/spi-atmel.c

<    1   2   3