Re: [linux-sunxi] [PATCH v3 10/13] spi: sunxi: merge sun4i and sun6i SPI driver

2016-06-13 Thread Julian Calaby
Hi Michal, On Tue, Jun 14, 2016 at 3:28 PM, Michal Suchanek wrote: > On 14 June 2016 at 06:47, Julian Calaby wrote: >> Hi Michal, >> >> On Tue, Jun 14, 2016 at 2:34 PM, Michal Suchanek wrote: >>> Hello, >>> >>> On 14 June 2016 at

[linux-sunxi] Re: [PATCH v3 00/13] sunxi spi fixes

2016-06-13 Thread Michal Suchanek
Hello, On 13 June 2016 at 21:57, Maxime Ripard wrote: > On Mon, Jun 13, 2016 at 05:46:48PM -, Michal Suchanek wrote: >> Hello, >> >> This is update of the sunxi spi patches that should give full-featured SPI >> driver. >> >> First three patches fix issues

Re: [linux-sunxi] [PATCH v3 11/13] dt: spi: sun4i: merge sun4i and sun6i binding doc

2016-06-13 Thread Julian Calaby
Hi Michal, On Tue, Jun 14, 2016 at 2:40 PM, Michal Suchanek wrote: > On 14 June 2016 at 01:45, Julian Calaby wrote: >> Hi Michal, >> >> On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: >>> Signed-off-by: Michal Suchanek

Re: [linux-sunxi] [PATCH v3 10/13] spi: sunxi: merge sun4i and sun6i SPI driver

2016-06-13 Thread Julian Calaby
Hi Michal, On Tue, Jun 14, 2016 at 2:34 PM, Michal Suchanek wrote: > Hello, > > On 14 June 2016 at 01:43, Julian Calaby wrote: >> Hi Michal, >> >> On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: >>> The drivers are very

Re: [linux-sunxi] [PATCH v3 07/13] spi: sunxi: rename constants to match between sun4i and sun6i

2016-06-13 Thread Michal Suchanek
Hello, On 14 June 2016 at 01:31, Julian Calaby wrote: > Hi Michal, > > On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: >> SUNXI_CTL_ -> SUNXI_TFR_CTL_ >> SUNXI_TFR_CTL_LMTF -> SUNXI_TFR_CTL_FBS > > I don't know these abbreviations, are they

Re: [linux-sunxi] [PATCH v3 10/13] spi: sunxi: merge sun4i and sun6i SPI driver

2016-06-13 Thread Michal Suchanek
Hello, On 14 June 2016 at 01:43, Julian Calaby wrote: > Hi Michal, > > On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: >> The drivers are very similar and share multiple flaws which needed >> separate fixes for both drivers. >> >>

Re: [linux-sunxi] [PATCH v3 11/13] dt: spi: sun4i: merge sun4i and sun6i binding doc

2016-06-13 Thread Julian Calaby
Hi Michal, On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: > Signed-off-by: Michal Suchanek > --- > .../devicetree/bindings/spi/spi-sun4i.txt | 21 ++- > .../devicetree/bindings/spi/spi-sun6i.txt | 24 >

Re: [linux-sunxi] [PATCH v3 10/13] spi: sunxi: merge sun4i and sun6i SPI driver

2016-06-13 Thread Julian Calaby
Hi Michal, On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: > The drivers are very similar and share multiple flaws which needed > separate fixes for both drivers. > > Signed-off-by: Michal Suchanek > --- > drivers/spi/Kconfig | 8 +- >

Re: [linux-sunxi] [PATCH v3 07/13] spi: sunxi: rename constants to match between sun4i and sun6i

2016-06-13 Thread Julian Calaby
Hi Michal, On Tue, Jun 14, 2016 at 3:46 AM, Michal Suchanek wrote: > SUNXI_CTL_ -> SUNXI_TFR_CTL_ > SUNXI_TFR_CTL_LMTF -> SUNXI_TFR_CTL_FBS I don't know these abbreviations, are they both referring to the same thing? > SUNXI_TFR_CTL_CS_ACTIVE_LOW -> SUNXI_TFR_CTL_SPOL It

[linux-sunxi] Re: [PATCH v3 00/13] sunxi spi fixes

2016-06-13 Thread Maxime Ripard
On Mon, Jun 13, 2016 at 05:46:48PM -, Michal Suchanek wrote: > Hello, > > This is update of the sunxi spi patches that should give full-featured SPI > driver. > > First three patches fix issues with the current driver and can be of use for > stable kernels so adding cc for those. > > I

[linux-sunxi] Re: [PATCH v3 04/13] spi: sunxi: expose maximum transfer size limit

2016-06-13 Thread Maxime Ripard
On Mon, Jun 13, 2016 at 05:46:50PM -, Michal Suchanek wrote: > The sun4i spi hardware can trasfer at most 63 bytes of data without DMA > support so report the limitation. Same for sun6i. > > Signed-off-by: Michal Suchanek Acked-by: Maxime Ripard

[linux-sunxi] Re: [PATCH v3 03/13] spi: sun4i: fix FIFO limit

2016-06-13 Thread Maxime Ripard
On Mon, Jun 13, 2016 at 05:46:49PM -, Michal Suchanek wrote: > When testing SPI without DMA I noticed that filling the FIFO on the > spi controller causes timeout. > > Always leave room for one byte in the FIFO. > > Signed-off-by: Michal Suchanek Acked-by: Maxime Ripard

[linux-sunxi] Re: [PATCH v3 02/13] spi: sunxi: fix transfer timeout

2016-06-13 Thread Maxime Ripard
On Mon, Jun 13, 2016 at 05:46:49PM -, Michal Suchanek wrote: > The trasfer timeout is fixed at 1000 ms. Reading a 4Mbyte flash over > 1MHz SPI bus takes way longer than that. Calculate the timeout from the > actual time the transfer is supposed to take and multiply by 2 for good > measure. >

[linux-sunxi] Re: [PATCH v3 01/13] spi: sunxi: set maximum and minimum speed of SPI master

2016-06-13 Thread Maxime Ripard
On Mon, Jun 13, 2016 at 05:46:49PM -, Michal Suchanek wrote: > The speed limits are unset in the sun4i and sun6i SPI drivers. > > The maximum speed of SPI master is used when maximum speed of SPI slave > is not specified. Also the __spi_validate function should check that > transfer speeds do

[linux-sunxi] [PATCH v3 12/13] spi: sunxi: remove CONFIG_SPI_SUN6I

2016-06-13 Thread Michal Suchanek
This is no longer used. Signed-off-by: Michal Suchanek --- arch/arm/configs/multi_v7_defconfig | 1 - arch/arm/configs/sunxi_defconfig| 1 - drivers/spi/Kconfig | 6 -- 3 files changed, 8 deletions(-) diff --git a/arch/arm/configs/multi_v7_defconfig

[linux-sunxi] [PATCH v3 13/13] spi: sun4i: add DMA support

2016-06-13 Thread Michal
From: Emilio López This patch adds support for 64 byte or bigger transfers on the sun4i SPI controller. Said transfers will be performed via DMA. Signed-off-by: Emilio López Signed-off-by: Michal Suchanek --- v2: - fallback to

[linux-sunxi] [PATCH v3 10/13] spi: sunxi: merge sun4i and sun6i SPI driver

2016-06-13 Thread Michal Suchanek
The drivers are very similar and share multiple flaws which needed separate fixes for both drivers. Signed-off-by: Michal Suchanek --- drivers/spi/Kconfig | 8 +- drivers/spi/Makefile| 1 - drivers/spi/spi-sun4i.c | 156 +++-- drivers/spi/spi-sun6i.c |

[linux-sunxi] [PATCH v3 07/13] spi: sunxi: rename constants to match between sun4i and sun6i

2016-06-13 Thread Michal Suchanek
SUNXI_CTL_ -> SUNXI_TFR_CTL_ SUNXI_TFR_CTL_LMTF -> SUNXI_TFR_CTL_FBS SUNXI_TFR_CTL_CS_ACTIVE_LOW -> SUNXI_TFR_CTL_SPOL and some SUNXI_???_CTL_ -> SUNXI_CTL_ for constants migrated to different registers between sun4i and sun6i No functional change. Signed-off-by: Michal Suchanek

[linux-sunxi] [PATCH v3 11/13] dt: spi: sun4i: merge sun4i and sun6i binding doc

2016-06-13 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- .../devicetree/bindings/spi/spi-sun4i.txt | 21 ++- .../devicetree/bindings/spi/spi-sun6i.txt | 24 -- 2 files changed, 11 insertions(+), 34 deletions(-) delete mode 100644

[linux-sunxi] [PATCH v3 09/13] spi: sunxi: use register map

2016-06-13 Thread Michal Suchanek
The driver code uses the fact that several bits are set in one register to set them at once. Between hardware revisions these bits might migrate to different position or different register altogether but the logical bit groups that are used together end up in the same register. Signed-off-by:

[linux-sunxi] [PATCH v3 01/13] spi: sunxi: set maximum and minimum speed of SPI master

2016-06-13 Thread Michal Suchanek
The speed limits are unset in the sun4i and sun6i SPI drivers. The maximum speed of SPI master is used when maximum speed of SPI slave is not specified. Also the __spi_validate function should check that transfer speeds do not exceed the master limits. The user manual for A10 and A31 specifies

[linux-sunxi] [PATCH v3 08/13] spi: sunxi: synchronize whitespace, comments, struct

2016-06-13 Thread Michal Suchanek
Minimize differences between sun4i and sun6i driver without code changes. Signed-off-by: Michal Suchanek --- drivers/spi/spi-sun4i.c | 11 ++- drivers/spi/spi-sun6i.c | 8 +++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git

[linux-sunxi] [PATCH v3 05/13] spi: sun6i: update CS handling from spi-sun4i

2016-06-13 Thread Michal Suchanek
While trying to merge sun4i and sun6i spi drivers I noticed the sun4i driver seems to have more reasonable CS handling. Update sun6i to same. Signed-off-by: Michal Suchanek --- drivers/spi/spi-sun6i.c | 22 +++--- 1 file changed, 19 insertions(+), 3

[linux-sunxi] [PATCH v3 03/13] spi: sun4i: fix FIFO limit

2016-06-13 Thread Michal Suchanek
When testing SPI without DMA I noticed that filling the FIFO on the spi controller causes timeout. Always leave room for one byte in the FIFO. Signed-off-by: Michal Suchanek --- v2: use EMSGSIZE instead of EINVAL v3: fix comment style --- drivers/spi/spi-sun4i.c | 13

[linux-sunxi] [PATCH v3 00/13] sunxi spi fixes

2016-06-13 Thread Michal Suchanek
Hello, This is update of the sunxi spi patches that should give full-featured SPI driver. First three patches fix issues with the current driver and can be of use for stable kernels so adding cc for those. I merged the sun4i and sun6i driver because there several issues that need to be fixed in

[linux-sunxi] [PATCH] arm: sunxi: Add missing boot_media fields in the SPL header

2016-06-13 Thread Olliver Schinagl
Commit b19236fd1 ("sunxi: Increase SPL header size to 64 bytes to avoid code corruption") Added defines for MMC0 and SPI as boot identification. After verifying on an OLinuXino Lime2 with NAND and eMMC, the expected values have been confirmed and added to spl.h Signed-off-by: Olliver Schinagl

[linux-sunxi] Re: [PATCH 3/5] ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac

2016-06-13 Thread Chen-Yu Tsai
Hi Rob, On Thu, Jun 9, 2016 at 3:11 AM, Rob Herring wrote: > On Mon, Jun 06, 2016 at 08:10:54PM +0200, Corentin LABBE wrote: >> Le 06/06/2016 16:14, Rob Herring a écrit : >> > On Fri, Jun 03, 2016 at 11:56:28AM +0200, LABBE Corentin wrote: >> >> This patch adds documentation for

[linux-sunxi] Re: sun4i drm driver not working on q8 a13 tablet ?

2016-06-13 Thread Maxime Ripard
On Thu, Jun 09, 2016 at 10:34:40AM +0200, Hans de Goede wrote: > Hi, > > On 09-06-16 09:53, Maxime Ripard wrote: > >Hi Hans, > > > >On Sat, Jun 04, 2016 at 08:10:54PM +0200, Hans de Goede wrote: > >>Hi All, > >> > >>As part of testing that my "ARM: dts: sun5i: Move display blocks to >