mbox series

[0/4] SPI 3WIRE fixes and highz turnaround

Message ID 20180903215035.17265-1-linus.walleij@linaro.org
Headers show
Series SPI 3WIRE fixes and highz turnaround | expand

Message

Linus Walleij Sept. 3, 2018, 9:50 p.m. UTC
During review of the TPO TPG110 driver[1] it was noted that the
protocol used is a variant of SPI 3WIRE[2] and the panel should
be a SPI child device.[3]

While trying to repurpose the driver to use the brand new
3WIRE support in SPI, I ran into a few rough edges (patches
1 & 2). If these are OK with Lorenzo they can probably be
applied as-is.

Then I had to add support for the special "high impedance
turn-around cycle" to the SPI core and the GPIO bit-banging
driver to be able to support the panel.

It is now working fine and I have patches to use the panel
as an SPI child device, but these patches are needed to
get it going.

References:
[1]:
https://lists.freedesktop.org/archives/dri-devel/2018-July/181848.html
[2]:
http://aitendo3.sakura.ne.jp/aitendo_data/product_img/lcd/tft/T43P00/TPG110%20Customer%20Spec_0.6.pdf
[3]:
https://lists.freedesktop.org/archives/dri-devel/2018-July/181993.html

Linus Walleij (4):
  spi: core: Allow both TX and RX transfers in 3WIRE
  spi: gpio: Fix reading for 3WIRE
  spi: Add a DT binding for high impedance turnaround
  spi: gpio: Support 3WIRE high impedance turn-around

 .../devicetree/bindings/spi/spi-bus.txt       |  4 ++
 drivers/spi/spi-gpio.c                        | 41 +++++++++++++++----
 drivers/spi/spi.c                             | 17 ++++++--
 include/linux/spi/spi.h                       |  1 +
 4 files changed, 52 insertions(+), 11 deletions(-)

-- 
2.17.1

Comments

Geert Uytterhoeven Sept. 4, 2018, 7:41 a.m. UTC | #1
Hi Linus,

On Mon, Sep 3, 2018 at 11:51 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> Some devices such as the TPO TPG110 display panel require

> a "high impedance turnaround", in effect a clock cycle after


Oh, you do use turnaround ;-)
So far for consistency...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Lorenzo Bianconi Sept. 4, 2018, 7:50 a.m. UTC | #2
On Sep 03, Linus Walleij wrote:
> Some devices such as the TPO TPG110 display panel require

> a "high impedance turnaround", in effect a clock cycle after

> switching the line from output to input mode.

> 

> Support this in the GPIO driver to begin with. Other driver

> may implement it if they can, it is unclear if this can

> be achieved with anything else than GPIO bit-banging.

> 

> Cc: Andrzej Hajda <a.hajda@samsung.com>

> Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  drivers/spi/spi-gpio.c  | 24 +++++++++++++++++++++---

>  drivers/spi/spi.c       |  2 ++

>  include/linux/spi/spi.h |  1 +

>  3 files changed, 24 insertions(+), 3 deletions(-)

> 


Acked-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>