From patchwork Tue Jul 28 10:43:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11688995 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9989114DD for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F4A72070B for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="bzAfl/xM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F4A72070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5037+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id HvvMYY4521763xNup822HxAu; Tue, 28 Jul 2020 04:52:28 -0700 X-Received: from relmlie5.idc.renesas.com (relmlie5.idc.renesas.com [210.160.252.171]) by mx.groups.io with SMTP id smtpd.web10.9634.1595933018234767330 for ; Tue, 28 Jul 2020 03:43:38 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53245244" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:37 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id E639140041B6; Tue, 28 Jul 2020 19:43:35 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 2/9] of: add node name compare helper functions Date: Tue, 28 Jul 2020 11:43:23 +0100 Message-Id: <20200728104330.6182-3-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: AQwOa8Ddjxnm1hOp8Tnj8LrUx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937148; bh=XAQynf/4wfzeakTNC0xYQNXqpXWXfUcKHNDbU1JkP8I=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=bzAfl/xMRyN29UgX6mh8fTu/ibQxHs8vK65UljjMJXVwLFqi4UTRnDSjamzMDgwJZDU 9Wy1+98AHIutua7GMnyYlBghYXAdhV5NZtxsuL7bV/Tw1evHh+3ib9N7+e9pazmFB1kTb fRlj89uxt7v2jVaqFQsOt2reOvr8CBQeUFU= From: Rob Herring commit f42b0e18f2e5cf34f73ef1b6327b49040b307a33 upstream. In preparation to remove device_node.name pointer, add helper functions for node name comparisons which are a common pattern throughout the kernel. Cc: Frank Rowand Signed-off-by: Rob Herring Signed-off-by: Biju Das --- drivers/of/base.c | 22 ++++++++++++++++++++++ include/linux/of.h | 13 +++++++++++++ 2 files changed, 35 insertions(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index 164eb1306661..b02f4b272e5b 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -54,6 +54,28 @@ DEFINE_MUTEX(of_mutex); */ DEFINE_RAW_SPINLOCK(devtree_lock); +bool of_node_name_eq(const struct device_node *np, const char *name) +{ + const char *node_name; + size_t len; + + if (!np) + return false; + + node_name = kbasename(np->full_name); + len = strchrnul(node_name, '@') - node_name; + + return (strlen(name) == len) && (strncmp(node_name, name, len) == 0); +} + +bool of_node_name_prefix(const struct device_node *np, const char *prefix) +{ + if (!np) + return false; + + return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0; +} + int of_n_addr_cells(struct device_node *np) { const __be32 *ip; diff --git a/include/linux/of.h b/include/linux/of.h index a09b9fb8e67d..1bef273a1909 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -231,6 +231,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) +extern bool of_node_name_eq(const struct device_node *np, const char *name); +extern bool of_node_name_prefix(const struct device_node *np, const char *prefix); + static inline const char *of_node_full_name(const struct device_node *np) { return np ? np->full_name : ""; @@ -397,6 +400,16 @@ static inline struct device_node *to_of_node(struct fwnode_handle *fwnode) return NULL; } +static inline bool of_node_name_eq(const struct device_node *np, const char *name) +{ + return false; +} + +static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix) +{ + return false; +} + static inline const char* of_node_full_name(const struct device_node *np) { return ""; From patchwork Tue Jul 28 10:43:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11688993 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95C0A175A for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F10A2070A for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="VUhgDVLB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F10A2070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5034+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id 4qaYYY4521763xPo4ad29izU; Tue, 28 Jul 2020 04:52:28 -0700 X-Received: from relmlie6.idc.renesas.com (relmlie6.idc.renesas.com [210.160.252.172]) by mx.groups.io with SMTP id smtpd.web12.9579.1595933019852967366 for ; Tue, 28 Jul 2020 03:43:40 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53033314" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:39 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id D279040062A4; Tue, 28 Jul 2020 19:43:37 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 3/9] dt-bindings: display: Add bindings for EDT panel Date: Tue, 28 Jul 2020 11:43:24 +0100 Message-Id: <20200728104330.6182-4-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: aFNwG9d9tRsvbnnCkrfA1Q8px4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937148; bh=IxQy2mh2Vx8RUlk1oBXhaPE4qeQxjK+OWDZHeaLOojs=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=VUhgDVLB2d0Zw/EZ+JslkUOyMeOMRc5uFeDoUyPqwuMmCVJcALmSpj3ot2BYR65ymhi eJjrg4T3SjPuni6XYi2VUVpLgzRQF3NmOec02zt74iHQBBvZWuCI2y9PhKNEh1LD/pIMm sBy3zjfGEJHyKwBghtHQRpKfTh0deWvwI5E= Document the Emerging Display Technology Corp. (EDT) ETM043080DH6-GP display, which is a 480x272 4.3" TFT display with capacitive touchscreen. This patch is based on the upstream commit c752affbadb05b619 ("dt-bindings: display: Add bindings for EDT panel"). Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar --- .../bindings/display/panel/edt,etm043080dh6gp.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/edt,etm043080dh6gp.txt diff --git a/Documentation/devicetree/bindings/display/panel/edt,etm043080dh6gp.txt b/Documentation/devicetree/bindings/display/panel/edt,etm043080dh6gp.txt new file mode 100644 index 000000000000..c837e0bfb1a9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/edt,etm043080dh6gp.txt @@ -0,0 +1,9 @@ +Emerging Display Technology Corp. ETM043080DH6-GP 4.3" WQVGA TFT LCD panel + +Required properties: +- compatible: should be "edt,etm043080dh6gp" + +ETM043080DH6-GP is 480x272 TFT Display with capacitive touchscreen. + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. From patchwork Tue Jul 28 10:43:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11689003 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4839017E8 for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 230742074F for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="WPuu4te3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 230742074F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5038+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id XlGWYY4521763xGtfUdZ7sEn; Tue, 28 Jul 2020 04:52:28 -0700 X-Received: from relmlie6.idc.renesas.com (relmlie6.idc.renesas.com []) by mx.groups.io with SMTP id smtpd.web12.9579.1595933019852967366 for ; Tue, 28 Jul 2020 03:43:41 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53033318" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:41 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A84E040062A4; Tue, 28 Jul 2020 19:43:39 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 4/9] drm/panel: simple: Add EDT panel support Date: Tue, 28 Jul 2020 11:43:25 +0100 Message-Id: <20200728104330.6182-5-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: lKam14l1NlDh0BBMr8BnJW88x4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937148; bh=RG8eM90lmsvtH7v1xCXh9wMeaiidczXD4adcgO+LufU=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=WPuu4te3hIR2ndQD8CqS9p2hiTfgRrgXd5e7tZK7ZFrC4WP75HEjzZ8gxWt0lhYS+t9 a22EoDGxs0Utx4osQzwSS1bVeFuKlqXFpqgQtRHT+8mTpeOb8JtSpvLF4cU/95uDVIDD4 Jz+1Plr4sLJSpILjQH4TS/gGff1ZWln/TcI= From: Marian-Cristian Rotariu commit 82d57a590f51eb86e1ad0f24db257739ce0bfd74 upstream. EDT ET043080DH6-GP is a 4.3" WQVGA 480x272 RGB LCD panel used on the iWave Generic SODIMM Development Platform. Changes in v2: -added mandatory .connector_type field -changed the .bus_format MEDIA_BUS_FMT_RGB666_1X18 Signed-off-by: Marian-Cristian Rotariu Reviewed-by: Lad Prabhakar Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1580386118-22895-3-git-send-email-marian-cristian.rotariu.rb@bp.renesas.com Signed-off-by: Biju Das [Removed connector type. Supporting the same requires framework changes] --- drivers/gpu/drm/panel/panel-simple.c | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index ecad4d7c6cd1..2b2a2f3da9a4 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -614,6 +614,36 @@ static const struct panel_desc chunghwa_claa101wb01 = { }, }; +static const struct drm_display_mode edt_etm043080dh6gp_mode = { + .clock = 10870, + .hdisplay = 480, + .hsync_start = 480 + 8, + .hsync_end = 480 + 8 + 4, + .htotal = 480 + 8 + 4 + 41, + + /* + * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while + * fb_align + */ + + .vdisplay = 288, + .vsync_start = 288 + 2, + .vsync_end = 288 + 2 + 4, + .vtotal = 288 + 2 + 4 + 10, + .vrefresh = 60, +}; + +static const struct panel_desc edt_etm043080dh6gp = { + .modes = &edt_etm043080dh6gp_mode, + .num_modes = 1, + .bpc = 8, + .size = { + .width = 100, + .height = 65, + }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, +}; + static const struct drm_display_mode edt_et057090dhu_mode = { .clock = 25175, .hdisplay = 640, @@ -1129,6 +1159,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "chunghwa,claa101wb01", .data = &chunghwa_claa101wb01 + }, { + .compatible = "edt,etm043080dh6gp", + .data = &edt_etm043080dh6gp, }, { .compatible = "edt,et057090dhu", .data = &edt_et057090dhu, From patchwork Tue Jul 28 10:43:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11689005 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7FAAE6C1 for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5AD3E2070A for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="jV3qLJEu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AD3E2070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5039+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id w8kZYY4521763xENG2EMh6SL; Tue, 28 Jul 2020 04:52:29 -0700 X-Received: from relmlie6.idc.renesas.com (relmlie6.idc.renesas.com []) by mx.groups.io with SMTP id smtpd.web12.9579.1595933019852967366 for ; Tue, 28 Jul 2020 03:43:43 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53033321" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:43 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9A6E140062A4; Tue, 28 Jul 2020 19:43:41 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 5/9] drm: rcar-du: Support panels connected directly to the DPAD outputs Date: Tue, 28 Jul 2020 11:43:26 +0100 Message-Id: <20200728104330.6182-6-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: PgPYjCxMrFhvVGtqTZRHQeXyx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937149; bh=R13qCpUObxvFyBS2esL6ab5zAM3Pv7OfroMrw4Mw2LM=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=jV3qLJEuZgyWCJvlU0IuEVeorwlzDE8lxSx7cGwjDtO+bEPG/2GaiP9LMtd+FhGhx4C yJZiviYpC9zuY7hixRiFMy69Qd9YagNpvmH/NIIYO3z/A0lD8HyRIyYyMrXu2JSQoqtSn nF+2T5XLcH1DA/MNV99lU3n4DY4N0ns5P9M= The DPAD outputs can be connected directly to a panel. To support this use case, detect whether the entities connected to the DU DPAD outputs are panels based on the number of ports of their DT node, and retrieve the corresponding type of DRM objects. This patch is based on the commit 73eb5476df72 ("Support panels connected directly to the DPAD outputs") and commit 56c5dd00f8db ("drm/rcar-du: Split LVDS encoder and connector") Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar --- drivers/gpu/drm/rcar-du/Makefile | 1 + drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 36 ++++++++ drivers/gpu/drm/rcar-du/rcar_du_rgbcon.c | 105 ++++++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_rgbcon.h | 22 +++++ 4 files changed, 164 insertions(+) create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_rgbcon.c create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_rgbcon.h diff --git a/drivers/gpu/drm/rcar-du/Makefile b/drivers/gpu/drm/rcar-du/Makefile index 05de1c4097af..51b7ccc66cb7 100644 --- a/drivers/gpu/drm/rcar-du/Makefile +++ b/drivers/gpu/drm/rcar-du/Makefile @@ -4,6 +4,7 @@ rcar-du-drm-y := rcar_du_crtc.o \ rcar_du_group.o \ rcar_du_kms.o \ rcar_du_lvdscon.o \ + rcar_du_rgbcon.o \ rcar_du_plane.o \ rcar_du_vgacon.o diff --git a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c index d0ae1e8009c6..c407fd4c98ce 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_encoder.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_encoder.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "rcar_du_drv.h" #include "rcar_du_encoder.h" @@ -23,6 +24,7 @@ #include "rcar_du_hdmienc.h" #include "rcar_du_kms.h" #include "rcar_du_lvdscon.h" +#include "rcar_du_rgbcon.h" #include "rcar_du_lvdsenc.h" #include "rcar_du_vgacon.h" @@ -42,6 +44,26 @@ rcar_du_connector_best_encoder(struct drm_connector *connector) * Encoder */ +static unsigned int rcar_du_encoder_count_ports(struct device_node *node) +{ + struct device_node *ports; + struct device_node *port; + unsigned int num_ports = 0; + + ports = of_get_child_by_name(node, "ports"); + if (!ports) + ports = of_node_get(node); + + for_each_child_of_node(ports, port) { + if (of_node_name_eq(port, "port")) + num_ports++; + } + + of_node_put(ports); + + return num_ports; +} + static void rcar_du_encoder_disable(struct drm_encoder *encoder) { struct rcar_du_encoder *renc = to_rcar_encoder(encoder); @@ -127,6 +149,7 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, { struct rcar_du_encoder *renc; struct drm_encoder *encoder; + struct drm_panel *panel; unsigned int encoder_type; int ret; @@ -193,6 +216,19 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, ret = rcar_du_hdmi_connector_init(rcdu, renc); break; + case DRM_MODE_ENCODER_NONE: + if ((output == RCAR_DU_OUTPUT_DPAD0 || + output == RCAR_DU_OUTPUT_DPAD1) && + rcar_du_encoder_count_ports(con_node) == 1) { + panel = of_drm_find_panel(con_node); + if (!panel) + ret = -EPROBE_DEFER; + else + ret = rcar_du_rgb_connector_init(rcdu, renc, + panel); + } + break; + default: ret = -EINVAL; break; diff --git a/drivers/gpu/drm/rcar-du/rcar_du_rgbcon.c b/drivers/gpu/drm/rcar-du/rcar_du_rgbcon.c new file mode 100644 index 000000000000..f62073e65f03 --- /dev/null +++ b/drivers/gpu/drm/rcar-du/rcar_du_rgbcon.c @@ -0,0 +1,105 @@ +/* + * rcar_du_rgbcon.c -- R-Car Display Unit RGB Connector + * + * Copyright (C) 2013-2020 Renesas Electronics Corporation + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include + +#include "rcar_du_drv.h" +#include "rcar_du_encoder.h" +#include "rcar_du_kms.h" +#include "rcar_du_rgbcon.h" + +struct rcar_du_rgb_connector { + struct rcar_du_connector connector; + struct drm_panel *drmpanel; +}; + +#define to_rcar_rgb_connector(c) \ + container_of(c, struct rcar_du_rgb_connector, connector.connector) + +static int rcar_du_rgb_connector_get_modes(struct drm_connector *connector) +{ + struct rcar_du_rgb_connector *rgbcon = + to_rcar_rgb_connector(connector); + + return drm_panel_get_modes(rgbcon->drmpanel); +} + +static const struct drm_connector_helper_funcs connector_helper_funcs = { + .get_modes = rcar_du_rgb_connector_get_modes, + .best_encoder = rcar_du_connector_best_encoder, +}; + +static enum drm_connector_status +rcar_du_rgb_connector_detect(struct drm_connector *connector, bool force) +{ + return connector_status_connected; +} + +static void rcar_du_rgb_connector_destroy(struct drm_connector *connector) +{ + struct rcar_du_rgb_connector *rgbcon = + to_rcar_rgb_connector(connector); + + drm_panel_detach(rgbcon->drmpanel); + drm_connector_cleanup(connector); +} + +static const struct drm_connector_funcs connector_funcs = { + .dpms = drm_atomic_helper_connector_dpms, + .reset = drm_atomic_helper_connector_reset, + .detect = rcar_du_rgb_connector_detect, + .fill_modes = drm_helper_probe_single_connector_modes, + .destroy = rcar_du_rgb_connector_destroy, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, +}; + +int rcar_du_rgb_connector_init(struct rcar_du_device *rcdu, + struct rcar_du_encoder *renc, + struct drm_panel *drmpanel) +{ + struct drm_encoder *encoder = rcar_encoder_to_drm_encoder(renc); + struct rcar_du_rgb_connector *rgbcon; + struct drm_connector *connector; + int ret; + + rgbcon = devm_kzalloc(rcdu->dev, sizeof(*rgbcon), GFP_KERNEL); + if (!rgbcon) + return -ENOMEM; + + rgbcon->drmpanel = drmpanel; + connector = &rgbcon->connector.connector; + ret = drm_connector_init(rcdu->ddev, connector, &connector_funcs, + DRM_MODE_CONNECTOR_DPI); + if (ret < 0) + return ret; + + drm_connector_helper_add(connector, &connector_helper_funcs); + + connector->dpms = DRM_MODE_DPMS_OFF; + drm_object_property_set_value(&connector->base, + rcdu->ddev->mode_config.dpms_property, + DRM_MODE_DPMS_OFF); + + ret = drm_mode_connector_attach_encoder(connector, encoder); + if (ret < 0) + return ret; + + drm_panel_attach(rgbcon->drmpanel, connector); + rgbcon->connector.encoder = renc; + + return 0; +} diff --git a/drivers/gpu/drm/rcar-du/rcar_du_rgbcon.h b/drivers/gpu/drm/rcar-du/rcar_du_rgbcon.h new file mode 100644 index 000000000000..b3bfad52f589 --- /dev/null +++ b/drivers/gpu/drm/rcar-du/rcar_du_rgbcon.h @@ -0,0 +1,22 @@ +/* + * rcar_du_rgbcon.h -- R-Car Display Unit RGB Connector + * + * Copyright (C) 2013-2020 Renesas Electronics Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef __RCAR_DU_RGBCON_H__ +#define __RCAR_DU_RGBCON_H__ + +struct rcar_du_device; +struct rcar_du_encoder; + +int rcar_du_rgb_connector_init(struct rcar_du_device *rcdu, + struct rcar_du_encoder *renc, + struct drm_panel *drmpanel); + +#endif /* __RCAR_DU_RGBCON_H__ */ From patchwork Tue Jul 28 10:43:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11689001 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3635614E3 for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10A2D2070A for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="Ccah3dMn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10A2D2070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5035+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id 4NpOYY4521763xERPK2LJaHe; Tue, 28 Jul 2020 04:52:28 -0700 X-Received: from relmlie5.idc.renesas.com (relmlie5.idc.renesas.com [210.160.252.171]) by mx.groups.io with SMTP id smtpd.web12.9581.1595933025628482315 for ; Tue, 28 Jul 2020 03:43:45 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53245253" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:45 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 8F87840041B6; Tue, 28 Jul 2020 19:43:43 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 6/9] drm: rcar-du: Use the DRM panel API Date: Tue, 28 Jul 2020 11:43:27 +0100 Message-Id: <20200728104330.6182-7-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: 0PHTjWjQkIQRDmz5hiSOfJfwx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937148; bh=5bL8Pgwx8xdQVq3fN4fviVKVe9CpPbNlY0SWQRGARdo=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Ccah3dMnsyPQbPpvPgdzPQQRyeMcPgCy9aWsUXAIHF1UBqRl9XNmMGOd8ILmsIYdizK C+XnahFPE5j1dxz7EBGnRFIQdbCfrkTQh3xq7MRjyeftj5OmCZTcxQV3xnkTaxjTXp+Kr 4Q2otiIjoAtAB8JoVK0nd8GltKoD5MSu9MU= From: Laurent Pinchart commit bf7149f34241dcd6c95ea76b2b5ab4ff33f1c9b9 upstream. Instead of parsing the panel device tree node manually, use the panel API to delegate panel handling to a panel driver. Signed-off-by: Laurent Pinchart Signed-off-by: Biju Das [Removed all other changes except Kconfig. This config is required for building simple panel driver] --- drivers/gpu/drm/rcar-du/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig index d4e0a39568f6..4261a302e051 100644 --- a/drivers/gpu/drm/rcar-du/Kconfig +++ b/drivers/gpu/drm/rcar-du/Kconfig @@ -21,6 +21,7 @@ config DRM_RCAR_HDMI config DRM_RCAR_LVDS bool "R-Car DU LVDS Encoder Support" depends on DRM_RCAR_DU + select DRM_PANEL depends on ARCH_R8A7790 || ARCH_R8A7791 || COMPILE_TEST help Enable support for the R-Car Display Unit embedded LVDS encoders From patchwork Tue Jul 28 10:43:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11688991 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A3F514E3 for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66E2B2070A for ; Tue, 28 Jul 2020 11:52:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="MWt5C2zW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66E2B2070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5036+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id vE0EYY4521763xu5kHJ3Tgz1; Tue, 28 Jul 2020 04:52:27 -0700 X-Received: from relmlie5.idc.renesas.com (relmlie5.idc.renesas.com []) by mx.groups.io with SMTP id smtpd.web12.9581.1595933025628482315 for ; Tue, 28 Jul 2020 03:43:47 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53245259" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:46 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 79F9A40062A4; Tue, 28 Jul 2020 19:43:45 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 7/9] ARM: shmobile: defconfig: Enable frame buffer console for armadillo800eva Date: Tue, 28 Jul 2020 11:43:28 +0100 Message-Id: <20200728104330.6182-8-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: PnxKcTFuF7N0pIbe8ZhGhMU2x4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937147; bh=/rerUUq86PE3kFgXxJudSl92Xfv4n8uBmVnn94oUEEk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=MWt5C2zW8KC46S8R5dx6CyO4wE4l1dIYdcIKK9YRDfZSMrcA4o8ZowLO5j49fdJAOlJ acYIh8SW6b1j5+GKLTKI0be8PNToTAHQN/Bnq/xF/696ubBIuW8X2HpW+9TsknF8h4Wt9 JaJW0Lg9xA5PON1YB0f5xY6gKYAbi+BdI28= From: Geert Uytterhoeven commit af48156ff3a1762989627fba7c56e77743fc0fdc upstream. Enabling the frame buffer device on armadillo800eva requires the board staging code. Also enable the frame buffer, so you will actually see output during boot. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman Signed-off-by: Biju Das [Removed staging related configs] --- arch/arm/configs/shmobile_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig index 9e48febd5956..f21de1bec37c 100644 --- a/arch/arm/configs/shmobile_defconfig +++ b/arch/arm/configs/shmobile_defconfig @@ -161,6 +161,7 @@ CONFIG_FB_SH_MOBILE_MERAM=y # CONFIG_BACKLIGHT_GENERIC is not set CONFIG_BACKLIGHT_PWM=y CONFIG_BACKLIGHT_AS3711=y +CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y From patchwork Tue Jul 28 10:43:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11688999 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E325017CA for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC8412074F for ; Tue, 28 Jul 2020 11:52:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="VqGjVJih" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC8412074F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5031+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id R215YY4521763xav5TJEbAsc; Tue, 28 Jul 2020 04:52:28 -0700 X-Received: from relmlie5.idc.renesas.com (relmlie5.idc.renesas.com []) by mx.groups.io with SMTP id smtpd.web12.9581.1595933025628482315 for ; Tue, 28 Jul 2020 03:43:49 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53245264" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:48 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 4D92740041B6; Tue, 28 Jul 2020 19:43:47 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 8/9] ARM: shmobile: defconfig: Enable support for panels from EDT Date: Tue, 28 Jul 2020 11:43:29 +0100 Message-Id: <20200728104330.6182-9-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: wgk2q2GbWks84uDQcSEtdOZpx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937148; bh=dgtSCtihbkK0TX2i1L5XGC4hv8bzRJ9WgGvqhZDYREc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=VqGjVJihz/S/ViIAbbsfVKuflb2cp6DNPacINVyeap3iEEE4+eLshZ9IjM4tgNuNOR+ pNXDNUsKTsYngSMQhREDGpSp1/zXqHeqyLQgBjd36LKVGIva/EOc7bkSg0S6Ju+3WrEJb yhvYplydVhKmbhxaVIQmxOOKaZrs85SE04A= From: Fabrizio Castro commit a630a6121bef3e9598482a49eda6b1fa715385d6 upstream. The iwg20d comes with an LCD panel from Emerging Display Technologies Corporation (EDT), therefore enable what's required to support it. Signed-off-by: Fabrizio Castro Acked-by: Laurent Pinchart Link: https://lore.kernel.org/r/1573660292-10629-12-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Biju Das [Removed DRM_LVDS_CODEC configuration] --- arch/arm/configs/shmobile_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig index f21de1bec37c..151fad5c0b8d 100644 --- a/arch/arm/configs/shmobile_defconfig +++ b/arch/arm/configs/shmobile_defconfig @@ -98,6 +98,7 @@ CONFIG_INPUT_EVDEV=y CONFIG_KEYBOARD_GPIO=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y CONFIG_TOUCHSCREEN_ST1232=y CONFIG_INPUT_MISC=y CONFIG_INPUT_ADXL34X=y @@ -155,6 +156,7 @@ CONFIG_DRM_I2C_ADV7511=y CONFIG_DRM_RCAR_DU=y CONFIG_DRM_RCAR_HDMI=y CONFIG_DRM_RCAR_LVDS=y +CONFIG_DRM_PANEL_SIMPLE=y CONFIG_FB_SH_MOBILE_LCDC=y CONFIG_FB_SH_MOBILE_MERAM=y # CONFIG_LCD_CLASS_DEVICE is not set From patchwork Tue Jul 28 10:43:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 11689007 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90F10175A for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BD0D2074F for ; Tue, 28 Jul 2020 11:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="TcYnZcAs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BD0D2074F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+5040+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id nhzyYY4521763xluPyYM6YHN; Tue, 28 Jul 2020 04:52:29 -0700 X-Received: from relmlie6.idc.renesas.com (relmlie6.idc.renesas.com [210.160.252.172]) by mx.groups.io with SMTP id smtpd.web11.9344.1595933031369313843 for ; Tue, 28 Jul 2020 03:43:51 -0700 X-IronPort-AV: E=Sophos;i="5.75,406,1589209200"; d="scan'208";a="53033337" X-Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 28 Jul 2020 19:43:50 +0900 X-Received: from localhost.localdomain (unknown [172.29.51.253]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3615840062A4; Tue, 28 Jul 2020 19:43:49 +0900 (JST) From: Biju Das To: cip-dev@lists.cip-project.org, Nobuhiro Iwamatsu , Pavel Machek Cc: Chris Paterson , Biju Das , Prabhakar Mahadev Lad Subject: [cip-dev] [PATCH 4.4.y-cip 9/9] ARM: dts: iwg22d-sodimm: Enable LCD panel Date: Tue, 28 Jul 2020 11:43:30 +0100 Message-Id: <20200728104330.6182-10-biju.das.jz@bp.renesas.com> In-Reply-To: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> References: <20200728104330.6182-1-biju.das.jz@bp.renesas.com> Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: 8eowcdaC7Yq4KqadwPztf4iMx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1595937149; bh=crhFBU+VIpGzflUlZ4uhgc0FWaD4YHCKwYUJGjZkArI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=TcYnZcAsDBbBzhtt9djG3Tq7CXmey30POw+Zq6++R/sjNwNvJSeVIHFTOjYPRRyN4cY jDtEdD+5zDAbdVWc6gGdjIysLn4MK1wYgcZox4skeKDXDJ4seBSs3Mn48OlusfjhocSls VVJk2I3l6md4BSjjKqrz5yru/J6fctqJwOg= From: Marian-Cristian Rotariu commit 7f61dff1ed915c44845d6865d295853b1c39b6d7 upstream. On the Generic SODIMM Development Platform there is an RGB LCD panel directly connected to the DU output. It uses the TPU0 as backlight, one GPIO pull-up configuration for power enable, R[2:7], G[2:7], B[2:7], VSYNC, HSYNC, DU0_DISP and, DU0_CLK as inputs. There is no encoder between the DU and the panel, therefore the default connector driver is used. The two variants of the iW-G22D should be mutually exclusive, therefore this patch also disables the RGB LCD display when the HDMI extension board is used. Signed-off-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1583239490-8837-1-git-send-email-marian-cristian.rotariu.rb@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Biju Das [Removed enable-active-high property to make backlight to work on 4.4.] --- .../dts/r8a7745-iwg22d-sodimm-dbhd-ca.dts | 6 ++ arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts | 59 +++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm-dbhd-ca.dts b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm-dbhd-ca.dts index 654d28b629e5..b01405fc1b49 100644 --- a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm-dbhd-ca.dts +++ b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm-dbhd-ca.dts @@ -109,6 +109,12 @@ }; }; +&lcd_panel { + status = "disabled"; + + /delete-node/ port; +}; + &pfc { can1_pins: can1 { groups = "can1_data_b"; diff --git a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts index 94e9088f6b40..1e331d1e414b 100644 --- a/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts +++ b/arch/arm/boot/dts/r8a7745-iwg22d-sodimm.dts @@ -33,6 +33,7 @@ /dts-v1/; #include "r8a7745-iwg22m.dtsi" +#include / { model = "iWave Systems RainboW-G22D-SODIMM board based on RZ/G1E"; @@ -82,6 +83,48 @@ states = <3300000 1 1800000 0>; }; + + vccq_panel: regulator-vccq-panel { + compatible = "regulator-fixed"; + regulator-name = "Panel VccQ"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio1 13 GPIO_ACTIVE_LOW>; + }; + + backlight_lcd: backlight { + compatible = "pwm-backlight"; + pwms = <&tpu 3 5000000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <7>; + }; + + lcd_panel: lcd { + compatible = "edt,etm043080dh6gp"; + power-supply = <&vccq_panel>; + backlight = <&backlight_lcd>; + + port { + lcd_in: endpoint { + remote-endpoint = <&du_out_rgb0>; + }; + }; + }; +}; + +&du { + pinctrl-0 = <&du0_pins>; + pinctrl-names = "default"; + + status = "okay"; + + ports { + port@0 { + endpoint { + remote-endpoint = <&lcd_in>; + }; + }; + }; }; &can0 { @@ -117,11 +160,21 @@ }; &pfc { + backlight_pins: backlight { + groups = "tpu_to3_c"; + function = "tpu"; + }; + can0_pins: can0 { groups = "can0_data"; function = "can0"; }; + du0_pins: du0 { + groups = "du0_rgb666", "du0_sync", "du0_disp", "du0_clk0_out"; + function = "du0"; + }; + hscif1_pins: hscif1 { groups = "hscif1_data", "hscif1_ctrl"; function = "hscif1"; @@ -233,6 +286,12 @@ shared-pin; }; +&tpu { + pinctrl-0 = <&backlight_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + &usbphy { status = "okay"; };