From patchwork Wed Oct 11 11:23:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824357 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBsbl6Pxdz9sNr for ; Wed, 11 Oct 2017 22:45:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755556AbdJKLoj (ORCPT ); Wed, 11 Oct 2017 07:44:39 -0400 Received: from smtprelay08.ispgateway.de ([134.119.228.98]:48001 "EHLO smtprelay08.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752846AbdJKLnF (ORCPT ); Wed, 11 Oct 2017 07:43:05 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay08.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPh-0002ok-Uv; Wed, 11 Oct 2017 13:43:01 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPh-0007u6-G1; Wed, 11 Oct 2017 13:43:01 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 3/9] drm/panel: simple: make it possible to override LCD bus format Date: Wed, 11 Oct 2017 13:23:35 +0200 Message-Id: <1507721021-28174-4-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The baseboards for the Ka-Ro electronics series of i.MX modules use a 24bit LCD interface, no matter what LCD bus width the SoC on the module provides and what the LCD panel expects. LCDs with 6bit per color will ignore the 2 LSBs of each color lane, and modules using a SoC that provides only 6bit per color, drive the display information on the 6 MSBs of each color lane and tie the 2 LSBs of each color lane to GND. Thus, no matter what combination of LCD and SoC is used, the LCD port can be used without shuffling bit lanes by always configuring the LCD output to 24bit mode. Add a function to handle certain quirks of the LCD interface to the panel driver to be able to override the bus format specified in a panel's display_mode. Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/simple-panel.txt | 2 ++ drivers/gpu/drm/panel/panel-simple.c | 40 +++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt index 1341bbf..e2308c3 100644 --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt @@ -7,6 +7,8 @@ Optional properties: - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - enable-gpios: GPIO pin to enable or disable the panel - backlight: phandle of the backlight device attached to the panel +- bus-format-override: override the bus_format setting of the panel's + display_mode settings Example: diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index fde9c41..f356a7b 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -87,6 +87,8 @@ struct panel_simple { struct i2c_adapter *ddc; struct gpio_desc *enable_gpio; + + u32 bus_fmt_override; }; #define SP_DISPLAY_MODE(freq, ha, hfp, hs, hbp, va, vfp, vs, vbp, vr, flgs) { \ @@ -165,7 +167,11 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) connector->display_info.bpc = panel->desc->bpc; connector->display_info.width_mm = panel->desc->size.width; connector->display_info.height_mm = panel->desc->size.height; - if (panel->desc->bus_format) + + if (panel->bus_fmt_override) + drm_display_info_set_bus_formats(&connector->display_info, + &panel->bus_fmt_override, 1); + else if (panel->desc->bus_format) drm_display_info_set_bus_formats(&connector->display_info, &panel->desc->bus_format, 1); connector->display_info.bus_flags = panel->desc->bus_flags; @@ -298,6 +304,34 @@ static int panel_simple_get_timings(struct drm_panel *panel, return p->desc->num_timings; } +static inline int panel_simple_check_quirks(struct device *dev, + struct panel_simple *p) +{ + const char *bus_fmt; + + if (of_property_read_string(dev->of_node, "bus-format-override", + &bus_fmt) == 0) { + if (strcmp(bus_fmt, "rgb24") == 0) + p->bus_fmt_override = MEDIA_BUS_FMT_RGB888_1X24; + else if (strcmp(bus_fmt, "rgb666") == 0) + p->bus_fmt_override = MEDIA_BUS_FMT_RGB666_1X18; + else if (strcmp(bus_fmt, "rgb565") == 0) + p->bus_fmt_override = MEDIA_BUS_FMT_RGB565_1X16; + else if (strcmp(bus_fmt, "spwg-18") == 0) + p->bus_fmt_override = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG; + else if (strcmp(bus_fmt, "spwg-24") == 0) + p->bus_fmt_override = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG; + else if (strcmp(bus_fmt, "jeida-24") == 0) + p->bus_fmt_override = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA; + else + dev_err(dev, + "Unsupported bus-format-override value: '%s'\n", + bus_fmt); + return p->bus_fmt_override ? 0 : -EINVAL; + } + return 0; +} + static const struct drm_panel_funcs panel_simple_funcs = { .disable = panel_simple_disable, .unprepare = panel_simple_unprepare, @@ -353,6 +387,10 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) } } + err = panel_simple_check_quirks(dev, panel); + if (err) + goto free_ddc; + drm_panel_init(&panel->base); panel->base.dev = dev; panel->base.funcs = &panel_simple_funcs; From patchwork Wed Oct 11 11:23:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824353 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBsYS481Hz9sPt for ; Wed, 11 Oct 2017 22:43:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756981AbdJKLnG (ORCPT ); Wed, 11 Oct 2017 07:43:06 -0400 Received: from smtprelay05.ispgateway.de ([80.67.31.99]:11451 "EHLO smtprelay05.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751945AbdJKLnE (ORCPT ); Wed, 11 Oct 2017 07:43:04 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPi-0004jQ-6Z; Wed, 11 Oct 2017 13:43:02 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPh-0007uB-Ob; Wed, 11 Oct 2017 13:43:01 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 4/9] drm/panel: simple: add support for overriding the pixel clock polarity Date: Wed, 11 Oct 2017 13:23:36 +0200 Message-Id: <1507721021-28174-5-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Ka-Ro electronics MB7 baseboard has an on-board LCD->LVDS converter that requires a fixed pixelclk polarity, no matter what the panel's display_mode specifies. Add an option to override the pixelclk polarity defined in the panel's display_mode via DTB. Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/simple-panel.txt | 3 +++ drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt index e2308c3..dcaf9a7 100644 --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt @@ -9,6 +9,9 @@ Optional properties: - backlight: phandle of the backlight device attached to the panel - bus-format-override: override the bus_format setting of the panel's display_mode settings +- pixelclk-active: override the pixelclock polarity defined in the + panel's display_mode settings + Example: diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f356a7b..7bbb752 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -89,6 +89,12 @@ struct panel_simple { struct gpio_desc *enable_gpio; u32 bus_fmt_override; + u32 quirks; +}; + +enum { + PANEL_QUIRK_PIXDATA_NEGEDGE = BIT(0), + PANEL_QUIRK_PIXDATA_POSEDGE = BIT(1), }; #define SP_DISPLAY_MODE(freq, ha, hfp, hs, hbp, va, vfp, vs, vbp, vr, flgs) { \ @@ -110,6 +116,15 @@ static inline struct panel_simple *to_panel_simple(struct drm_panel *panel) return container_of(panel, struct panel_simple, base); } +static inline void panel_simple_apply_quirks(struct panel_simple *panel, + struct drm_display_info *info) +{ + if (panel->quirks & PANEL_QUIRK_PIXDATA_NEGEDGE) + info->bus_flags |= DRM_BUS_FLAG_PIXDATA_NEGEDGE; + if (panel->quirks & PANEL_QUIRK_PIXDATA_POSEDGE) + info->bus_flags |= DRM_BUS_FLAG_PIXDATA_POSEDGE; +} + static int panel_simple_get_fixed_modes(struct panel_simple *panel) { struct drm_connector *connector = panel->base.connector; @@ -175,6 +190,8 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) drm_display_info_set_bus_formats(&connector->display_info, &panel->desc->bus_format, 1); connector->display_info.bus_flags = panel->desc->bus_flags; + if (panel->quirks) + panel_simple_apply_quirks(panel, &connector->display_info); return num; } @@ -308,6 +325,7 @@ static inline int panel_simple_check_quirks(struct device *dev, struct panel_simple *p) { const char *bus_fmt; + u32 clkpol; if (of_property_read_string(dev->of_node, "bus-format-override", &bus_fmt) == 0) { @@ -329,6 +347,18 @@ static inline int panel_simple_check_quirks(struct device *dev, bus_fmt); return p->bus_fmt_override ? 0 : -EINVAL; } + + if (of_property_read_u32(dev->of_node, "pixelclk-active", + &clkpol) == 0) { + if (clkpol & ~1) { + dev_err(dev, + "Invalid value for pixelclk-active: '%u' (should be <0> or <1>)\n", + clkpol); + return -EINVAL; + } + p->quirks |= clkpol ? PANEL_QUIRK_PIXDATA_POSEDGE : + PANEL_QUIRK_PIXDATA_NEGEDGE; + } return 0; } From patchwork Wed Oct 11 11:23:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824356 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBsbD4Lt0z9sNr for ; Wed, 11 Oct 2017 22:44:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756981AbdJKLoi (ORCPT ); Wed, 11 Oct 2017 07:44:38 -0400 Received: from smtprelay07.ispgateway.de ([134.119.228.105]:22352 "EHLO smtprelay07.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755556AbdJKLnG (ORCPT ); Wed, 11 Oct 2017 07:43:06 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay07.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPi-0003ar-FM; Wed, 11 Oct 2017 13:43:02 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPi-0007uG-09; Wed, 11 Oct 2017 13:43:02 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 5/9] drm/panel: simple: add support for EDT ET0350 3.5" QVGA panel Date: Wed, 11 Oct 2017 13:23:37 +0200 Message-Id: <1507721021-28174-6-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/edt,et0350g0dh6.txt | 7 +++++++ drivers/gpu/drm/panel/panel-simple.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/edt,et0350g0dh6.txt diff --git a/Documentation/devicetree/bindings/display/panel/edt,et0350g0dh6.txt b/Documentation/devicetree/bindings/display/panel/edt,et0350g0dh6.txt new file mode 100644 index 0000000..5546221 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/edt,et0350g0dh6.txt @@ -0,0 +1,7 @@ +Emerging Display Technology Corp. 3.5" QVGA (320x240) TFT LCD panel + +Required properties: +- compatible: should be "edt,et0350g0dh6" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 7bbb752..f57b463 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -763,6 +763,22 @@ static const struct panel_desc chunghwa_claa101wb01 = { }, }; +static const struct drm_display_mode edt_et0350g0dh6_mode = + SP_DISPLAY_MODE(6500, 320, 20, 0, 68, 240, 4, 0, 18, 60, + DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC); + +static const struct panel_desc edt_et0350g0dh6 = { + .modes = &edt_et0350g0dh6_mode, + .num_modes = 1, + .bpc = 6, + .size = { + .width = 70, + .height = 53, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, +}; + static const struct drm_display_mode edt_et057090dhu_mode = SP_DISPLAY_MODE(25175, 640, 16, 30, 114, 480, 10, 3, 32, 60, DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC); @@ -1591,6 +1607,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "chunghwa,claa101wb01", .data = &chunghwa_claa101wb01 }, { + .compatible = "edt,et0350g0dh6", + .data = &edt_et0350g0dh6, + }, { .compatible = "edt,et057090dhu", .data = &edt_et057090dhu, }, { From patchwork Wed Oct 11 11:23:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824354 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBsZv3tqFz9sNr for ; Wed, 11 Oct 2017 22:44:23 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757045AbdJKLnI (ORCPT ); Wed, 11 Oct 2017 07:43:08 -0400 Received: from smtprelay03.ispgateway.de ([80.67.29.7]:15349 "EHLO smtprelay03.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752408AbdJKLnF (ORCPT ); Wed, 11 Oct 2017 07:43:05 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay03.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPi-0007xI-Lu; Wed, 11 Oct 2017 13:43:02 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPi-0007uL-95; Wed, 11 Oct 2017 13:43:02 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 6/9] drm/panel: simple: add support for EDT ET0430 4.3" HVGA panel Date: Wed, 11 Oct 2017 13:23:38 +0200 Message-Id: <1507721021-28174-7-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/edt,et0430g0dh6.txt | 7 +++++++ drivers/gpu/drm/panel/panel-simple.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/edt,et0430g0dh6.txt diff --git a/Documentation/devicetree/bindings/display/panel/edt,et0430g0dh6.txt b/Documentation/devicetree/bindings/display/panel/edt,et0430g0dh6.txt new file mode 100644 index 0000000..d1bdd1c --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/edt,et0430g0dh6.txt @@ -0,0 +1,7 @@ +Emerging Display Technology Corp. 4.3" HVGA (480x272) TFT LCD panel + +Required properties: +- compatible: should be "edt,et0430g0dh6" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index f57b463..0b8fd55 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -779,6 +779,22 @@ static const struct panel_desc edt_et0350g0dh6 = { .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, }; +static const struct drm_display_mode edt_et0430g0dh6_mode = + SP_DISPLAY_MODE(9000, 480, 2, 41, 2, 272, 2, 10, 2, 60, + DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC); + +static const struct panel_desc edt_et0430g0dh6 = { + .modes = &edt_et0430g0dh6_mode, + .num_modes = 1, + .bpc = 6, + .size = { + .width = 95, + .height = 54, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, +}; + static const struct drm_display_mode edt_et057090dhu_mode = SP_DISPLAY_MODE(25175, 640, 16, 30, 114, 480, 10, 3, 32, 60, DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC); @@ -1610,6 +1626,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "edt,et0350g0dh6", .data = &edt_et0350g0dh6, }, { + .compatible = "edt,et0430g0dh6", + .data = &edt_et0430g0dh6, + }, { .compatible = "edt,et057090dhu", .data = &edt_et057090dhu, }, { From patchwork Wed Oct 11 11:23:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824355 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBsbB381Cz9sNr for ; Wed, 11 Oct 2017 22:44:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751147AbdJKLoW (ORCPT ); Wed, 11 Oct 2017 07:44:22 -0400 Received: from smtprelay08.ispgateway.de ([134.119.228.98]:4236 "EHLO smtprelay08.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756849AbdJKLnH (ORCPT ); Wed, 11 Oct 2017 07:43:07 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay08.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPi-0002r7-Sq; Wed, 11 Oct 2017 13:43:02 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPi-0007uQ-FD; Wed, 11 Oct 2017 13:43:02 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 7/9] drm/panel: simple: add support for NLT NL12880 12.1" WXGA LVDS panel Date: Wed, 11 Oct 2017 13:23:39 +0200 Message-Id: <1507721021-28174-8-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/nlt,nl12880bc20.txt | 14 +++++++ drivers/gpu/drm/panel/panel-simple.c | 45 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/nlt,nl12880bc20.txt diff --git a/Documentation/devicetree/bindings/display/panel/nlt,nl12880bc20.txt b/Documentation/devicetree/bindings/display/panel/nlt,nl12880bc20.txt new file mode 100644 index 0000000..071b065 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/nlt,nl12880bc20.txt @@ -0,0 +1,14 @@ +NLT Technologies Ltd. NL12880BC20 12.1" WXGA LVDS panel + +Note: The output format of the display can be configured via two + control pins (FRC, MSL). Depending on the strapping of those + pins the appropriate 'compatible' string has to be used. + +Required properties: +- compatible: should be one of: + - "nlt,nl12880bc20-spwg-18" for SPWG (18bpp) FRC: Low or open, MSL: Low or open + - "nlt,nl12880bc20-spwg-24" for SPWG (24bpp) FRC: High, MSL: High + - "nlt,nl12880bc20-jeida" for JEIDA FRC: High, MSL: High + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 0b8fd55..52e0cb6 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1234,6 +1234,42 @@ static const struct panel_desc nlt_nl192108ac18_02d = { .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, }; +static const struct drm_display_mode nlt_nl12880bc20_mode = + SP_DISPLAY_MODE(71000, 1280, 50, 60, 50, 800, 5, 13, 5, 0, 0); + +static const struct panel_desc nlt_nl12880bc20_jeida = { + .modes = &nlt_nl12880bc20_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 261, + .height = 163, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, +}; + +static const struct panel_desc nlt_nl12880bc20_spwg_18 = { + .modes = &nlt_nl12880bc20_mode, + .num_modes = 1, + .bpc = 6, + .size = { + .width = 261, + .height = 163, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, +}; + +static const struct panel_desc nlt_nl12880bc20_spwg_24 = { + .modes = &nlt_nl12880bc20_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 261, + .height = 163, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, +}; + static const struct drm_display_mode nvd_9128_mode = SP_DISPLAY_MODE(29500, 800, 130, 98, 0, 480, 10, 50, 0, 0, 0); @@ -1707,6 +1743,15 @@ static const struct of_device_id platform_of_match[] = { .compatible = "nlt,nl192108ac18-02d", .data = &nlt_nl192108ac18_02d, }, { + .compatible = "nlt,nl12880bc20-jeida", + .data = &nlt_nl12880bc20_jeida, + }, { + .compatible = "nlt,nl12880bc20-spwg-18", + .data = &nlt_nl12880bc20_spwg_18, + }, { + .compatible = "nlt,nl12880bc20-spwg-24", + .data = &nlt_nl12880bc20_spwg_24, + }, { .compatible = "nvd,9128", .data = &nvd_9128, }, { From patchwork Wed Oct 11 11:23:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824359 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBscX2DXCz9sNr for ; Wed, 11 Oct 2017 22:45:48 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757292AbdJKLpi (ORCPT ); Wed, 11 Oct 2017 07:45:38 -0400 Received: from smtprelay05.ispgateway.de ([80.67.31.99]:11457 "EHLO smtprelay05.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751983AbdJKLnE (ORCPT ); Wed, 11 Oct 2017 07:43:04 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPj-0004mF-5T; Wed, 11 Oct 2017 13:43:03 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPi-0007uV-MT; Wed, 11 Oct 2017 13:43:02 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 8/9] drm/panel: simple: add support for EDT ETM0700G0EDH6 7" WVGA panel Date: Wed, 11 Oct 2017 13:23:40 +0200 Message-Id: <1507721021-28174-9-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This panel is the same as ETM0700g0DH6 with an inverted pixel clock. Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/edt,etm0700g0edh6.txt | 9 +++++++++ drivers/gpu/drm/panel/panel-simple.c | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/edt,etm0700g0edh6.txt diff --git a/Documentation/devicetree/bindings/display/panel/edt,etm0700g0edh6.txt b/Documentation/devicetree/bindings/display/panel/edt,etm0700g0edh6.txt new file mode 100644 index 0000000..e6e8ef5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/edt,etm0700g0edh6.txt @@ -0,0 +1,9 @@ +Emerging Display Technology Corp. ETM0700G0EDH6 7.0" WVGA TFT LCD panel + +Required properties: +- compatible: should be "edt,etm0700g0edh6" + +This panel is the same as ETM0700g0DH6 with and inverted pixel clock. + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 52e0cb6..d4d2a89 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -827,6 +827,18 @@ static const struct panel_desc edt_etm0700g0dh6 = { .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, }; +static const struct panel_desc edt_etm0700g0edh6 = { + .modes = &edt_etm0700g0dh6_mode, + .num_modes = 1, + .bpc = 6, + .size = { + .width = 152, + .height = 91, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, +}; + static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = SP_DISPLAY_MODE(32260, 800, 168, 64, 88, 480, 37, 2, 8, 60, 0); @@ -1674,6 +1686,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "edt,etm0700g0dh6", .data = &edt_etm0700g0dh6, }, { + .compatible = "edt,etm0700g0edh6", + .data = &edt_etm0700g0edh6, + }, { .compatible = "foxlink,fl500wvr00-a0t", .data = &foxlink_fl500wvr00_a0t, }, { From patchwork Wed Oct 11 11:23:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 824358 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yBsbv0FKdz9sNr for ; Wed, 11 Oct 2017 22:45:15 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757358AbdJKLoj (ORCPT ); Wed, 11 Oct 2017 07:44:39 -0400 Received: from smtprelay07.ispgateway.de ([134.119.228.105]:27101 "EHLO smtprelay07.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753009AbdJKLnF (ORCPT ); Wed, 11 Oct 2017 07:43:05 -0400 Received: from [89.1.81.74] (helo=ipc1.ka-ro) by smtprelay07.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) (envelope-from ) id 1e2FPj-0003d4-CK; Wed, 11 Oct 2017 13:43:03 +0200 Received: from lothar by ipc1.ka-ro with local (Exim 4.84_2 #2 (Debian)) id 1e2FPi-0007ua-UK; Wed, 11 Oct 2017 13:43:03 +0200 From: =?utf-8?q?Lothar_Wa=C3=9Fmann?= To: David Airlie , Mark Rutland , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Lothar_Wa=C3=9Fmann?= Subject: [PATCH 9/9] drm/panel: simple: add support for EDT ET1010G0DSA/ETML1010G0DKA 10.1" WXGA LVDS panels Date: Wed, 11 Oct 2017 13:23:41 +0200 Message-Id: <1507721021-28174-10-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> References: <1507721021-28174-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 X-Df-Sender: bHdAa2Fyby1lbGVjdHJvbmljcy5kZQ== Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds support for the Emerging Display Technologies Corporation 10.1" WXGA LVDS panel ET1010G0DSA (without a touch panel) and ETML1010G0DKA (with capacitive touch panel). Signed-off-by: Lothar Waßmann --- .../bindings/display/panel/edt,et1010g0dsa.txt | 7 +++++++ .../bindings/display/panel/edt,etml1010g0dka.txt | 9 +++++++++ drivers/gpu/drm/panel/panel-simple.c | 22 ++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/edt,et1010g0dsa.txt create mode 100644 Documentation/devicetree/bindings/display/panel/edt,etml1010g0dka.txt diff --git a/Documentation/devicetree/bindings/display/panel/edt,et1010g0dsa.txt b/Documentation/devicetree/bindings/display/panel/edt,et1010g0dsa.txt new file mode 100644 index 0000000..f76e070 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/edt,et1010g0dsa.txt @@ -0,0 +1,7 @@ +Emerging Display Technology Corp. ET1010G0DSA 10.1" WXGA TFT LVDS display panel + +Required properties: +- compatible: should be "edt,et1010g0dsa" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/display/panel/edt,etml1010g0dka.txt b/Documentation/devicetree/bindings/display/panel/edt,etml1010g0dka.txt new file mode 100644 index 0000000..1413ea9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/edt,etml1010g0dka.txt @@ -0,0 +1,9 @@ +Emerging Display Technology Corp. ETML1010G0DKA 10.1" WXGA TFT LVDS display panel + +Required properties: +- compatible: should be "edt,etml1010g0dka" + +This panel is the same as ET101G0DSA with an integrated capacitive multitouch panel. + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index d4d2a89..5154cb9 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -839,6 +839,22 @@ static const struct panel_desc edt_etm0700g0edh6 = { .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_POSEDGE, }; +static const struct drm_display_mode edt_et1010g0dsa_mode = + SP_DISPLAY_MODE(71100, 1280, 25, 80, 55, 800, 5, 2, 16, 60, + DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC); + +static const struct panel_desc edt_et1010g0dsa = { + .modes = &edt_et1010g0dsa_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 217, + .height = 136, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, + .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_NEGEDGE, +}; + static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = SP_DISPLAY_MODE(32260, 800, 168, 64, 88, 480, 37, 2, 8, 60, 0); @@ -1683,6 +1699,12 @@ static const struct of_device_id platform_of_match[] = { .compatible = "edt,et070080dh6", .data = &edt_etm0700g0dh6, }, { + .compatible = "edt,et1010g0dsa", + .data = &edt_et1010g0dsa, + }, { + .compatible = "edt,etml1010g0dka", + .data = &edt_et1010g0dsa, + }, { .compatible = "edt,etm0700g0dh6", .data = &edt_etm0700g0dh6, }, {