linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel
Date: Mon, 6 Feb 2017 13:13:19 +0100	[thread overview]
Message-ID: <8096d309-d341-a3ba-8ddb-096a13967f64@tronnes.org> (raw)
In-Reply-To: <20170206105037.sxtx5o3tocfqq7tq@lukather>


Den 06.02.2017 11.50, skrev Maxime Ripard:
> Hi Noralf,
>
> On Fri, Feb 03, 2017 at 07:53:58PM +0100, Noralf Trønnes wrote:
>> Den 03.02.2017 10.59, skrev Maxime Ripard:
>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>> ---
>>>    drivers/gpu/drm/panel/Kconfig                  |   4 +-
>>>    drivers/gpu/drm/panel/Makefile                 |   1 +-
>>>    drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 435 ++++++++++++++++++-
>>>    3 files changed, 440 insertions(+), 0 deletions(-)
>>>    create mode 100644 drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>>>
>>> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
>>> index 62aba976e744..d07b996a07b8 100644
>>> --- a/drivers/gpu/drm/panel/Kconfig
>>> +++ b/drivers/gpu/drm/panel/Kconfig
>>> @@ -81,4 +81,8 @@ config DRM_PANEL_SHARP_LS043T1LE01
>>>    	  Say Y here if you want to enable support for Sharp LS043T1LE01 qHD
>>>    	  (540x960) DSI panel as found on the Qualcomm APQ8074 Dragonboard
>>> +config DRM_PANEL_SITRONIX_ST7789V
>>> +	tristate "Sitronx ST7789V panel"
>>> +	depends on OF && SPI
>>> +
>>>    endmenu
>>> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
>>> index a5c7ec0236e0..41b245d39984 100644
>>> --- a/drivers/gpu/drm/panel/Makefile
>>> +++ b/drivers/gpu/drm/panel/Makefile
>>> @@ -6,3 +6,4 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o
>>>    obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o
>>>    obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o
>>>    obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o
>>> +obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o
>>> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>>> new file mode 100644
>>> index 000000000000..aab817b55aa6
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>>> @@ -0,0 +1,435 @@
>>> +/*
>>> + * Copyright (C) 2017 Free Electrons
>>> + *
>>> + * This program is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU General Public License version
>>> + * 2 as published by the Free Software Foundation.
>>> + */
>>> +
>>> +#include <drm/drmP.h>
>>> +#include <drm/drm_panel.h>
>>> +
>>> +#include <linux/gpio/consumer.h>
>>> +#include <linux/spi/spi.h>
>>> +
>>> +#define ST7789V_SLPIN_CMD		0x10
>>> +
>>> +#define ST7789V_SLPOUT_CMD		0x11
>>> +
>>> +#define ST7789V_INVON_CMD		0x21
>>> +
>>> +#define ST7789V_DISPOFF_CMD		0x28
>>> +
>>> +#define ST7789V_DISPON_CMD		0x29
>>> +
>>> +#define ST7789V_MADCTL_CMD		0x36
>>> +
>>> +#define ST7789V_COLMOD_CMD		0x3a
>> You can use these from include/video/mipi_display.h:
>>
>>          MIPI_DCS_ENTER_SLEEP_MODE       = 0x10,
>>          MIPI_DCS_EXIT_SLEEP_MODE        = 0x11,
>>          MIPI_DCS_ENTER_INVERT_MODE      = 0x21,
>>          MIPI_DCS_SET_DISPLAY_OFF        = 0x28,
>>          MIPI_DCS_SET_DISPLAY_ON         = 0x29,
>>          MIPI_DCS_SET_ADDRESS_MODE       = 0x36,
>>          MIPI_DCS_SET_PIXEL_FORMAT       = 0x3A,
> I don't know, that controller cannot do MIPI DSI at all, and we would
> have to define all the other commands anyway.

MIPI DCS commands can be sent over both Display Serial Interface (DSI)
and in your case Display Bus Interface (DBI) (not quite sure if the
Control Interface can be outside of DBI). So Display Command Set (DCS)
is not specific to the interface, but to the controller.

It's up to you if you want to use them though.


Noralf.

  reply	other threads:[~2017-02-06 12:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03  9:59 [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Maxime Ripard
2017-02-03  9:59 ` [PATCH 1/2] dt-bindings: display: panel: Add bindings for the Sitronix ST7789V panel Maxime Ripard
2017-02-06 13:05   ` Thierry Reding
2017-02-07 15:44     ` Maxime Ripard
2017-02-07 16:42       ` Thierry Reding
2017-02-03  9:59 ` [PATCH 2/2] drm/panel: Add driver for sitronix " Maxime Ripard
2017-02-03 18:53   ` Noralf Trønnes
2017-02-06 10:50     ` Maxime Ripard
2017-02-06 12:13       ` Noralf Trønnes [this message]
2017-02-06 12:25         ` Thierry Reding
2017-02-06 13:26   ` Thierry Reding
2017-02-07 15:53     ` Maxime Ripard
2017-02-03  9:59 ` [PATCH v3 1/2] dt-bindings: gpu: Add Mali Utgard bindings Maxime Ripard
2017-02-03  9:59   ` [PATCH v3 2/2] ARM: sun8i: dt: Add mali node Maxime Ripard
2017-02-03 18:48 ` [PATCH 0/2] drm/panel: Add support for the Sitronix ST7789V Noralf Trønnes
2017-02-06 10:39   ` Maxime Ripard
2017-02-06 11:29     ` Noralf Trønnes
2017-02-07 15:34       ` Maxime Ripard
2017-02-07 16:46         ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8096d309-d341-a3ba-8ddb-096a13967f64@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).