From patchwork Mon Jun 3 15:35:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 56554 Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXozr-0002pZ-3f; Mon, 03 Jun 2019 15:35:39 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727677AbfFCPfV (ORCPT + 1 other); Mon, 3 Jun 2019 11:35:21 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:58182 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726717AbfFCPfV (ORCPT ); Mon, 3 Jun 2019 11:35:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1559576118; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=auqQoAWu6HJcQ9dAYh3x5JeoeNLaZ4+0Q+ur1G1yukU=; b=Xtv5XN9Vkv9B9Pb+eYYLPZ+956M049bKb78736GBz+ijiKqW29jCgbXNJbzjySfl9Yjnmg kcoFkjzSGBtA4f2qqagR4TAczQq9gJYzv77J/TYUcIdSqZmQ1yWexvSIMQ1vQtfzA9MDTB pFJgCyGSeOMR14zWntENnYodNq7z3UA= From: Paul Cercueil To: Thierry Reding , Sam Ravnborg , Mauro Carvalho Chehab , Hans Verkuil Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil , Rob Herring Subject: [PATCH v4 1/3] dt-bindings: display: Add GiantPlus GPM940B0 panel documentation Date: Mon, 3 Jun 2019 17:35:09 +0200 Message-Id: <20190603153511.24384-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The GPM940B0 is a 3.0" 320x240 24-bit TFT LCD panel. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring --- Notes: v2: New patch v3: Add Rob's ack v4: No change .../bindings/display/panel/giantplus,gpm940b0.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/giantplus,gpm940b0.txt diff --git a/Documentation/devicetree/bindings/display/panel/giantplus,gpm940b0.txt b/Documentation/devicetree/bindings/display/panel/giantplus,gpm940b0.txt new file mode 100644 index 000000000000..3dab52f92c26 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/giantplus,gpm940b0.txt @@ -0,0 +1,12 @@ +GiantPlus 3.0" (320x240 pixels) 24-bit TFT LCD panel + +Required properties: +- compatible: should be "giantplus,gpm940b0" +- power-supply: as specified in the base binding + +Optional properties: +- backlight: as specified in the base binding +- enable-gpios: as specified in the base binding + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. From patchwork Mon Jun 3 15:35:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 56552 Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXozl-0002pZ-M5; Mon, 03 Jun 2019 15:35:34 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728008AbfFCPfZ (ORCPT + 1 other); Mon, 3 Jun 2019 11:35:25 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:58212 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfFCPfX (ORCPT ); Mon, 3 Jun 2019 11:35:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1559576120; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7r5nkRsqjWYhBqtk66cNgvdETdf2nddmTlBNaVS+Hvw=; b=n8bhRenSLUwqZGKRST5uOAdZKmzDRc5PXo2s8jCW/xIXSZPP+3UrbJEDobxr7ZK97m9qay m8XvMNVabHubdQoqxdJoutIWKGfo1AdnjVlEfheehLdSXw+r3i2K645DRs+dwTD7mmS821 yWGohoQtlZ0rgj5WiJvHEpLrqSyMY+Y= From: Paul Cercueil To: Thierry Reding , Sam Ravnborg , Mauro Carvalho Chehab , Hans Verkuil Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil Subject: [PATCH v4 2/3] media: uapi: Add RGB bus format for the GiantPlus GPM940B0 panel Date: Mon, 3 Jun 2019 17:35:10 +0200 Message-Id: <20190603153511.24384-2-paul@crapouillou.net> In-Reply-To: <20190603153511.24384-1-paul@crapouillou.net> References: <20190603153511.24384-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The GiantPlus GPM940B0 is a 24-bit TFT panel where the RGB components are transferred sequentially on a 8-bit bus. Signed-off-by: Paul Cercueil --- Notes: v2: New patch v3: No change v4: Add only MEDIA_BUS_FMT_RGB888_3X8, as we don't have to care about endianness include/uapi/linux/media-bus-format.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 2a6b253cfb05..16c1fa2d89a4 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -34,7 +34,7 @@ #define MEDIA_BUS_FMT_FIXED 0x0001 -/* RGB - next is 0x101c */ +/* RGB - next is 0x101d */ #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 @@ -55,6 +55,7 @@ #define MEDIA_BUS_FMT_RGB888_1X24 0x100a #define MEDIA_BUS_FMT_RGB888_2X12_BE 0x100b #define MEDIA_BUS_FMT_RGB888_2X12_LE 0x100c +#define MEDIA_BUS_FMT_RGB888_3X8 0x101c #define MEDIA_BUS_FMT_RGB888_1X7X4_SPWG 0x1011 #define MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA 0x1012 #define MEDIA_BUS_FMT_ARGB8888_1X32 0x100d From patchwork Mon Jun 3 15:35:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 56553 Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hXozm-0002pZ-SQ; Mon, 03 Jun 2019 15:35:35 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727963AbfFCPfY (ORCPT + 1 other); Mon, 3 Jun 2019 11:35:24 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:58254 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726717AbfFCPfX (ORCPT ); Mon, 3 Jun 2019 11:35:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1559576121; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3rK/nnS6+itLqM9olBxKt3l4mVsf/DF5pToHX+j7u/c=; b=L+Mh4oLwF0s0fv/IaRPkUdpLXAdenlWhV13/WbRfH5gxIXJ+p9PJ9kIHaoG4rOo79XNfBv Gvrlata6T9kbRZlZRYfybovzc/Xs6X/vyxznbUe9y5IUN+WujdbZVRhHh3esRby52bBW/3 wbndYMlrPC3fHivLvCqUdTFqXZse2lA= From: Paul Cercueil To: Thierry Reding , Sam Ravnborg , Mauro Carvalho Chehab , Hans Verkuil Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me, Paul Cercueil , Artur Rojek Subject: [PATCH v4 3/3] drm/panel: simple: Add GiantPlus GPM940B0 panel support Date: Mon, 3 Jun 2019 17:35:11 +0200 Message-Id: <20190603153511.24384-3-paul@crapouillou.net> In-Reply-To: <20190603153511.24384-1-paul@crapouillou.net> References: <20190603153511.24384-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The GiantPlus GPM940B0 is a simple 3.0" 320x240 24-bit TFT panel. Signed-off-by: Paul Cercueil Tested-by: Artur Rojek --- Notes: v2: Change bus format to MEDIA_BUS_FMT_RGB888_3X8_BE v3: No change v4: Change bus format to MEDIA_BUS_FMT_RGB888_3X8 drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 5a93c4edf1e4..eec9a9efcc73 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1335,6 +1335,31 @@ static const struct panel_desc giantplus_gpg482739qs5 = { .bus_format = MEDIA_BUS_FMT_RGB888_1X24, }; +static const struct display_timing giantplus_gpm940b0_timing = { + .pixelclock = { 13500000, 27000000, 27500000 }, + .hactive = { 320, 320, 320 }, + .hfront_porch = { 14, 686, 718 }, + .hback_porch = { 50, 70, 255 }, + .hsync_len = { 1, 1, 1 }, + .vactive = { 240, 240, 240 }, + .vfront_porch = { 1, 1, 179 }, + .vback_porch = { 1, 21, 31 }, + .vsync_len = { 1, 1, 6 }, + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, +}; + +static const struct panel_desc giantplus_gpm940b0 = { + .timings = &giantplus_gpm940b0_timing, + .num_timings = 1, + .bpc = 8, + .size = { + .width = 60, + .height = 45, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_3X8, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, +}; + static const struct display_timing hannstar_hsd070pww1_timing = { .pixelclock = { 64300000, 71100000, 82000000 }, .hactive = { 1280, 1280, 1280 }, @@ -2882,6 +2907,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "giantplus,gpg482739qs5", .data = &giantplus_gpg482739qs5 + }, { + .compatible = "giantplus,gpm940b0", + .data = &giantplus_gpm940b0, }, { .compatible = "hannstar,hsd070pww1", .data = &hannstar_hsd070pww1,