From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751994AbdBFMN1 (ORCPT ); Mon, 6 Feb 2017 07:13:27 -0500 Received: from smtp.domeneshop.no ([194.63.252.55]:49091 "EHLO smtp.domeneshop.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbdBFMNZ (ORCPT ); Mon, 6 Feb 2017 07:13:25 -0500 Subject: Re: [PATCH 2/2] drm/panel: Add driver for sitronix ST7789V panel To: Maxime Ripard References: <8194211279dd2d1b1c2e88a3c17d154c356bbbc7.1486115846.git-series.maxime.ripard@free-electrons.com> <6c4db243-59fc-f7a4-96e0-8fefef253bac@tronnes.org> <20170206105037.sxtx5o3tocfqq7tq@lukather> Cc: Rob Herring , Mark Rutland , Thierry Reding , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Message-ID: <8096d309-d341-a3ba-8ddb-096a13967f64@tronnes.org> Date: Mon, 6 Feb 2017 13:13:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170206105037.sxtx5o3tocfqq7tq@lukather> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> --- >>> 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 >>> +#include >>> + >>> +#include >>> +#include >>> + >>> +#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.