From patchwork Fri Aug 2 07:33:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072749 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 010CB912 for ; Fri, 2 Aug 2019 07:34:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFBD8287C2 for ; Fri, 2 Aug 2019 07:34:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D309F287D1; Fri, 2 Aug 2019 07:34:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 828D1287C2 for ; Fri, 2 Aug 2019 07:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389735AbfHBHei (ORCPT ); Fri, 2 Aug 2019 03:34:38 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:28820 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727656AbfHBHeh (ORCPT ); Fri, 2 Aug 2019 03:34:37 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="22931916" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 02 Aug 2019 16:34:36 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A61B64007528; Fri, 2 Aug 2019 16:34:32 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 01/12] dt-bindings: display: renesas: lvds: RZ/G2E needs renesas,companion too Date: Fri, 2 Aug 2019 08:33:58 +0100 Message-Id: <1564731249-22671-2-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Document RZ/G2E support for property renesas,companion. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart --- Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt index c6a196d..dece79e 100644 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt @@ -49,9 +49,9 @@ Each port shall have a single endpoint. Optional properties: - renesas,companion : phandle to the companion LVDS encoder. This property is - mandatory for the first LVDS encoder on D3 and E3 SoCs, and shall point to - the second encoder to be used as a companion in dual-link mode. It shall not - be set for any other LVDS encoder. + mandatory for the first LVDS encoder on R-Car D3, R-Car E3, and RZ/G2E SoCs, + and shall point to the second encoder to be used as a companion in dual-link + mode. It shall not be set for any other LVDS encoder. Example: From patchwork Fri Aug 2 07:33:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072757 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5564917E0 for ; Fri, 2 Aug 2019 07:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E429287C9 for ; Fri, 2 Aug 2019 07:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31E74287C2; Fri, 2 Aug 2019 07:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9434287C9 for ; Fri, 2 Aug 2019 07:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389763AbfHBHeo (ORCPT ); Fri, 2 Aug 2019 03:34:44 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:17475 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727656AbfHBHeo (ORCPT ); Fri, 2 Aug 2019 03:34:44 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151124" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:34:41 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 47DFA4007528; Fri, 2 Aug 2019 16:34:38 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 02/12] dt-bindings: display: renesas: lvds: Document renesas,swap-data Date: Fri, 2 Aug 2019 08:33:59 +0100 Message-Id: <1564731249-22671-3-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP R-Car D3, R-Car E3, and RZ/G2E support dual-link mode. In such a mode, the first LVDS encoder emits even data, and the second LVDS encoder emits odd data. This patch documents property renesas,swap-data, used to swap even and odd data around. Signed-off-by: Fabrizio Castro --- Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt index dece79e..8980179 100644 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt @@ -52,6 +52,11 @@ Optional properties: mandatory for the first LVDS encoder on R-Car D3, R-Car E3, and RZ/G2E SoCs, and shall point to the second encoder to be used as a companion in dual-link mode. It shall not be set for any other LVDS encoder. +- renesas,swap-data : when in dual-link mode, the first LVDS encoder normally + emits even data, and the second LVDS encoder emits odd data. When property + renesas,swap-data is specified, the data emitted by the two encoders will be + swapped around. This property can only be used in conjunction with property + renesas,companion. Example: From patchwork Fri Aug 2 07:34:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072751 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0E651398 for ; Fri, 2 Aug 2019 07:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97693287C9 for ; Fri, 2 Aug 2019 07:34:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87EB9287C2; Fri, 2 Aug 2019 07:34:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17148287C2 for ; Fri, 2 Aug 2019 07:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389808AbfHBHet (ORCPT ); Fri, 2 Aug 2019 03:34:49 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:17475 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHet (ORCPT ); Fri, 2 Aug 2019 03:34:49 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151144" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:34:47 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id C8BF140078B4; Fri, 2 Aug 2019 16:34:43 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: Fabrizio Castro , Sam Ravnborg , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH/RFC 03/12] dt-bindings: panel: lvds: Add dual-link LVDS display support Date: Fri, 2 Aug 2019 08:34:00 +0100 Message-Id: <1564731249-22671-4-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Dual-link LVDS displays have two ports, therefore document this with the bindings. Signed-off-by: Fabrizio Castro --- .../bindings/display/panel/panel-lvds.txt | 91 ++++++++++++++++------ 1 file changed, 67 insertions(+), 24 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/panel-lvds.txt b/Documentation/devicetree/bindings/display/panel/panel-lvds.txt index 250850a..07795441 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-lvds.txt +++ b/Documentation/devicetree/bindings/display/panel/panel-lvds.txt @@ -41,7 +41,8 @@ Required nodes: - panel-timing: See panel-common.txt. - ports: See panel-common.txt. These bindings require a single port subnode - corresponding to the panel LVDS input. + (for a single link display) or two port subnodes (for a dual link display) + corresponding to the panel LVDS input(s). LVDS data mappings are defined as follows. @@ -92,30 +93,72 @@ CTL3: 0 Example ------- -panel { - compatible = "mitsubishi,aa121td01", "panel-lvds"; - - width-mm = <261>; - height-mm = <163>; - - data-mapping = "jeida-24"; - - panel-timing { - /* 1280x800 @60Hz */ - clock-frequency = <71000000>; - hactive = <1280>; - vactive = <800>; - hsync-len = <70>; - hfront-porch = <20>; - hback-porch = <70>; - vsync-len = <5>; - vfront-porch = <3>; - vback-porch = <15>; +Single port: + panel { + compatible = "mitsubishi,aa121td01", "panel-lvds"; + + width-mm = <261>; + height-mm = <163>; + + data-mapping = "jeida-24"; + + panel-timing { + /* 1280x800 @60Hz */ + clock-frequency = <71000000>; + hactive = <1280>; + vactive = <800>; + hsync-len = <70>; + hfront-porch = <20>; + hback-porch = <70>; + vsync-len = <5>; + vfront-porch = <3>; + vback-porch = <15>; + }; + + port { + panel_in: endpoint { + remote-endpoint = <&lvds_encoder>; + }; + }; }; - port { - panel_in: endpoint { - remote-endpoint = <&lvds_encoder>; +Two ports: + panel { + compatible = "advantech,idk-2121wr", "panel-lvds"; + + width-mm = <476>; + height-mm = <268>; + + data-mapping = "vesa-24"; + + panel-timing { + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hsync-len = <44>; + hfront-porch = <88>; + hback-porch = <148>; + vfront-porch = <4>; + vback-porch = <36>; + vsync-len = <5>; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds0_panel_in: endpoint { + remote-endpoint = <&lvds0_out>; + }; + }; + + port@1 { + reg = <1>; + lvds1_panel_in: endpoint { + remote-endpoint = <&lvds1_out>; + }; + }; }; }; -}; From patchwork Fri Aug 2 07:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072753 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 866041398 for ; Fri, 2 Aug 2019 07:35:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71497287C9 for ; Fri, 2 Aug 2019 07:35:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65196287D2; Fri, 2 Aug 2019 07:35:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0257F287C9 for ; Fri, 2 Aug 2019 07:34:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389833AbfHBHez (ORCPT ); Fri, 2 Aug 2019 03:34:55 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:17475 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHey (ORCPT ); Fri, 2 Aug 2019 03:34:54 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151155" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:34:53 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 5C9F44007528; Fri, 2 Aug 2019 16:34:49 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland Cc: Fabrizio Castro , Sam Ravnborg , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH/RFC 04/12] dt-bindings: display: Add bindings for Advantech IDK-2121WR Date: Fri, 2 Aug 2019 08:34:01 +0100 Message-Id: <1564731249-22671-5-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This panel is handled through the generic lvds-panel bindings, so only needs its additional compatible specified. Some panel specific documentation can be found here: https://buy.advantech.eu/Displays/Embedded-LCD-Kits-High-Brightness/model-IDK-2121WR-K2FHA2E.htm Signed-off-by: Fabrizio Castro --- .../display/panel/advantech,idk-2121wr.txt | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.txt diff --git a/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.txt b/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.txt new file mode 100644 index 0000000..70b15b6 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.txt @@ -0,0 +1,62 @@ +Advantech Co., Ltd. IDK-2121WR 21.5" LVDS panel +=============================================== + +Required properties: +- compatible: should be "advantech,idk-2121wr" followed by "panel-lvds" + +This binding is compatible with the lvds-panel binding, which is specified +in panel-lvds.txt in this directory. + +Example +------- + + panel { + compatible = "advantech,idk-2121wr", "panel-lvds"; + + width-mm = <476>; + height-mm = <268>; + + data-mapping = "vesa-24"; + + panel-timing { + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hsync-len = <44>; + hfront-porch = <88>; + hback-porch = <148>; + vfront-porch = <4>; + vback-porch = <36>; + vsync-len = <5>; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds0_panel_in: endpoint { + remote-endpoint = <&lvds0_out>; + }; + }; + + port@1 { + reg = <1>; + lvds1_panel_in: endpoint { + remote-endpoint = <&lvds1_out>; + }; + }; + }; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm5 0 50000>; + + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + + power-supply = <®_12p0v>; + enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; + }; From patchwork Fri Aug 2 07:34:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072755 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34560912 for ; Fri, 2 Aug 2019 07:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D4F3287D1 for ; Fri, 2 Aug 2019 07:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D1C2287C2; Fri, 2 Aug 2019 07:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9600287C2 for ; Fri, 2 Aug 2019 07:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389860AbfHBHfA (ORCPT ); Fri, 2 Aug 2019 03:35:00 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:17475 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHe7 (ORCPT ); Fri, 2 Aug 2019 03:34:59 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151164" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:34:58 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 72C0840078B4; Fri, 2 Aug 2019 16:34:55 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 05/12] drm: rcar-du: lvds: Add data swap support Date: Fri, 2 Aug 2019 08:34:02 +0100 Message-Id: <1564731249-22671-6-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When in vertical stripe mode of operation, there is the option of swapping even data and odd data on the two LVDS interfaces used to drive the video output. Add data swap support by exposing a new DT property named "renesas,swap-data". Signed-off-by: Fabrizio Castro --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c index 3aeaf9e..c306fab 100644 --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c @@ -69,6 +69,7 @@ struct rcar_lvds { struct drm_bridge *companion; bool dual_link; + bool stripe_swap_data; }; #define bridge_to_rcar_lvds(bridge) \ @@ -439,12 +440,16 @@ static void rcar_lvds_enable(struct drm_bridge *bridge) rcar_lvds_write(lvds, LVDCHCR, lvdhcr); if (lvds->info->quirks & RCAR_LVDS_QUIRK_DUAL_LINK) { - /* - * Configure vertical stripe based on the mode of operation of - * the connected device. - */ - rcar_lvds_write(lvds, LVDSTRIPE, - lvds->dual_link ? LVDSTRIPE_ST_ON : 0); + u32 lvdstripe = 0; + + if (lvds->dual_link) + /* + * Configure vertical stripe based on the mode of + * operation of the connected device. + */ + lvdstripe = LVDSTRIPE_ST_ON | (lvds->stripe_swap_data ? + LVDSTRIPE_ST_SWAP : 0); + rcar_lvds_write(lvds, LVDSTRIPE, lvdstripe); } /* @@ -770,8 +775,12 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) } } - if (lvds->dual_link) + if (lvds->dual_link) { + lvds->stripe_swap_data = of_property_read_bool( + lvds->dev->of_node, + "renesas,swap-data"); ret = rcar_lvds_parse_dt_companion(lvds); + } done: of_node_put(local_output); From patchwork Fri Aug 2 07:34:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072759 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94A6C912 for ; Fri, 2 Aug 2019 07:35:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FF49287C2 for ; Fri, 2 Aug 2019 07:35:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73CBA287D1; Fri, 2 Aug 2019 07:35:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 189C4287C2 for ; Fri, 2 Aug 2019 07:35:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732639AbfHBHfF (ORCPT ); Fri, 2 Aug 2019 03:35:05 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:12517 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHfF (ORCPT ); Fri, 2 Aug 2019 03:35:05 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="22931978" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:03 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 308E94007528; Fri, 2 Aug 2019 16:34:59 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 06/12] drm: rcar-du: lvds: Do not look at ports for identifying bridges Date: Fri, 2 Aug 2019 08:34:03 +0100 Message-Id: <1564731249-22671-7-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We may be connected to a dual LVDS display, therefore checking if node != remote_input for identifying bridges is not going to work anymore. We could try to match the ports on the remote end to the LVDS encoders, however the companion LVDS encoder instance doesn't hold a reference to the primary LVDS encoder instance. We know we could be connected to either a bridge, or a panel, therefore look through the registered bridges and panels, until we have a match. Signed-off-by: Fabrizio Castro --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c index c306fab..2d54ae5 100644 --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c @@ -711,10 +711,7 @@ static int rcar_lvds_parse_dt_companion(struct rcar_lvds *lvds) static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) { struct device_node *local_output = NULL; - struct device_node *remote_input = NULL; struct device_node *remote = NULL; - struct device_node *node; - bool is_bridge = false; int ret = 0; local_output = of_graph_get_endpoint_by_regs(lvds->dev->of_node, 1, 0); @@ -742,27 +739,8 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) goto done; } - remote_input = of_graph_get_remote_endpoint(local_output); - - for_each_endpoint_of_node(remote, node) { - if (node != remote_input) { - /* - * We've found one endpoint other than the input, this - * must be a bridge. - */ - is_bridge = true; - of_node_put(node); - break; - } - } - - if (is_bridge) { - lvds->next_bridge = of_drm_find_bridge(remote); - if (!lvds->next_bridge) { - ret = -EPROBE_DEFER; - goto done; - } - + lvds->next_bridge = of_drm_find_bridge(remote); + if (lvds->next_bridge) { if (lvds->info->quirks & RCAR_LVDS_QUIRK_DUAL_LINK) lvds->dual_link = lvds->next_bridge->timings ? lvds->next_bridge->timings->dual_link @@ -770,7 +748,7 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) } else { lvds->panel = of_drm_find_panel(remote); if (IS_ERR(lvds->panel)) { - ret = PTR_ERR(lvds->panel); + ret = -EPROBE_DEFER; goto done; } } @@ -784,7 +762,6 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) done: of_node_put(local_output); - of_node_put(remote_input); of_node_put(remote); switch (ret) { From patchwork Fri Aug 2 07:34:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072761 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52B2B912 for ; Fri, 2 Aug 2019 07:35:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E4CE287C9 for ; Fri, 2 Aug 2019 07:35:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32247287D2; Fri, 2 Aug 2019 07:35:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2D64287C9 for ; Fri, 2 Aug 2019 07:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389908AbfHBHfJ (ORCPT ); Fri, 2 Aug 2019 03:35:09 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:51999 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHfI (ORCPT ); Fri, 2 Aug 2019 03:35:08 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151184" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:07 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id F3F184007528; Fri, 2 Aug 2019 16:35:04 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 07/12] drm: rcar-du: lvds: Add support for dual link panels Date: Fri, 2 Aug 2019 08:34:04 +0100 Message-Id: <1564731249-22671-8-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the display comes with two ports, assume it supports dual link. Signed-off-by: Fabrizio Castro --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c index 2d54ae5..97c51c2 100644 --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c @@ -751,6 +751,9 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds) ret = -EPROBE_DEFER; goto done; } + if (lvds->info->quirks & RCAR_LVDS_QUIRK_DUAL_LINK) + lvds->dual_link = of_graph_get_endpoint_count(remote) + == 2; } if (lvds->dual_link) { From patchwork Fri Aug 2 07:34:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072763 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11645912 for ; Fri, 2 Aug 2019 07:35:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F17A2287C9 for ; Fri, 2 Aug 2019 07:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E55CA287D2; Fri, 2 Aug 2019 07:35:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C36E287C9 for ; Fri, 2 Aug 2019 07:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389928AbfHBHfO (ORCPT ); Fri, 2 Aug 2019 03:35:14 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:20347 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHfN (ORCPT ); Fri, 2 Aug 2019 03:35:13 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="22931998" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:12 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 58AB740078B4; Fri, 2 Aug 2019 16:35:09 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 08/12] drm: rcar-du: lvds: Fix bridge_to_rcar_lvds Date: Fri, 2 Aug 2019 08:34:05 +0100 Message-Id: <1564731249-22671-9-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using name "bridge" for macro bridge_to_rcar_lvds argument doesn't work when the pointer name used by the caller is not "bridge". Rename the argument to "bridge_ptr" to allow for any pointer name. Fixes: c6a27fa41fab ("drm: rcar-du: Convert LVDS encoder code to bridge driver") Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c index 97c51c2..edd63f5 100644 --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c @@ -72,8 +72,8 @@ struct rcar_lvds { bool stripe_swap_data; }; -#define bridge_to_rcar_lvds(bridge) \ - container_of(bridge, struct rcar_lvds, bridge) +#define bridge_to_rcar_lvds(bridge_ptr) \ + container_of(bridge_ptr, struct rcar_lvds, bridge) #define connector_to_rcar_lvds(connector) \ container_of(connector, struct rcar_lvds, connector) From patchwork Fri Aug 2 07:34:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072765 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C7FFB1398 for ; Fri, 2 Aug 2019 07:35:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2F8D287C9 for ; Fri, 2 Aug 2019 07:35:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A74EE287D2; Fri, 2 Aug 2019 07:35:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C22C287C9 for ; Fri, 2 Aug 2019 07:35:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389945AbfHBHfS (ORCPT ); Fri, 2 Aug 2019 03:35:18 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:19836 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHfS (ORCPT ); Fri, 2 Aug 2019 03:35:18 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151206" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:16 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 0EA3840078B4; Fri, 2 Aug 2019 16:35:13 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , David Airlie , Daniel Vetter Cc: Fabrizio Castro , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman , Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 09/12] drm: rcar-du: lvds: Fix companion's mode Date: Fri, 2 Aug 2019 08:34:06 +0100 Message-Id: <1564731249-22671-10-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The companion encoder needs to be told to use the same mode as the primary encoder. Fixes: e9e8798ab7b8 ("drm: rcar-du: lvds: Add support for dual-link mode") Signed-off-by: Fabrizio Castro --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c index edd63f5..7944ae9 100644 --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c @@ -415,8 +415,12 @@ static void rcar_lvds_enable(struct drm_bridge *bridge) return; /* Enable the companion LVDS encoder in dual-link mode. */ - if (lvds->dual_link && lvds->companion) + if (lvds->dual_link && lvds->companion) { + struct rcar_lvds *companion_lvds = bridge_to_rcar_lvds( + lvds->companion); + companion_lvds->mode = lvds->mode; lvds->companion->funcs->enable(lvds->companion); + } /* * Hardcode the channels and control signals routing for now. From patchwork Fri Aug 2 07:34:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072767 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31FC81398 for ; Fri, 2 Aug 2019 07:35:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C9B5287C2 for ; Fri, 2 Aug 2019 07:35:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FA62287D2; Fri, 2 Aug 2019 07:35:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDD38287C2 for ; Fri, 2 Aug 2019 07:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389966AbfHBHfX (ORCPT ); Fri, 2 Aug 2019 03:35:23 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:16167 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHfX (ORCPT ); Fri, 2 Aug 2019 03:35:23 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="22932011" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:21 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 071A240078B5; Fri, 2 Aug 2019 16:35:18 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Rob Herring , Mark Rutland Cc: Fabrizio Castro , Simon Horman , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Geert Uytterhoeven , Chris Paterson , Biju Das Subject: [PATCH/RFC 10/12] arm64: dts: renesas: r8a774c0: Point LVDS0 to its companion LVDS1 Date: Fri, 2 Aug 2019 08:34:07 +0100 Message-Id: <1564731249-22671-11-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the new renesas,companion property to the LVDS0 node to point to the companion LVDS encoder LVDS1. Based on similar work from Laurent Pinchart for the r8a7799[05]. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven --- arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi index e7b5bf2..b36d3b08 100644 --- a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi @@ -1844,6 +1844,8 @@ resets = <&cpg 727>; status = "disabled"; + renesas,companion = <&lvds1>; + ports { #address-cells = <1>; #size-cells = <0>; From patchwork Fri Aug 2 07:34:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072769 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3589912 for ; Fri, 2 Aug 2019 07:35:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEBB1287C2 for ; Fri, 2 Aug 2019 07:35:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B10AE287D2; Fri, 2 Aug 2019 07:35:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51334287C2 for ; Fri, 2 Aug 2019 07:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387790AbfHBHf2 (ORCPT ); Fri, 2 Aug 2019 03:35:28 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:16167 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389759AbfHBHf1 (ORCPT ); Fri, 2 Aug 2019 03:35:27 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="22932017" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:26 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 9379E4007528; Fri, 2 Aug 2019 16:35:23 +0900 (JST) From: Fabrizio Castro To: Geert Uytterhoeven , Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Rob Herring , Mark Rutland Cc: Fabrizio Castro , Simon Horman , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Chris Paterson , Biju Das , ebiharaml@si-linux.co.jp Subject: [PATCH/RFC 11/12] arm64: dts: renesas: cat874: Add definition for 12V regulator Date: Fri, 2 Aug 2019 08:34:08 +0100 Message-Id: <1564731249-22671-12-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Power rail "D12.0V" comes straight from the power barrel connector, and it's used in both main board and sub board. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven --- arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts index 46a77ee..651383c 100644 --- a/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts +++ b/arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts @@ -65,6 +65,15 @@ reg = <0x0 0x48000000 0x0 0x78000000>; }; + reg_12p0v: regulator-12p0v { + compatible = "regulator-fixed"; + regulator-name = "D12.0V"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-boot-on; + regulator-always-on; + }; + sound: sound { compatible = "simple-audio-card"; From patchwork Fri Aug 2 07:34:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 11072771 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 009041398 for ; Fri, 2 Aug 2019 07:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE38E287C2 for ; Fri, 2 Aug 2019 07:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0A472871C; Fri, 2 Aug 2019 07:35:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 600932871C for ; Fri, 2 Aug 2019 07:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387536AbfHBHfd (ORCPT ); Fri, 2 Aug 2019 03:35:33 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:6202 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733123AbfHBHfd (ORCPT ); Fri, 2 Aug 2019 03:35:33 -0400 X-IronPort-AV: E=Sophos;i="5.64,337,1559487600"; d="scan'208";a="23151225" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 02 Aug 2019 16:35:31 +0900 Received: from fabrizio-dev.ree.adwin.renesas.com (unknown [10.226.36.196]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 262CA4007528; Fri, 2 Aug 2019 16:35:27 +0900 (JST) From: Fabrizio Castro To: Laurent Pinchart , Kieran Bingham , Jacopo Mondi , Rob Herring , Mark Rutland Cc: Fabrizio Castro , Simon Horman , Magnus Damm , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Geert Uytterhoeven , Chris Paterson , Biju Das , ebiharaml@si-linux.co.jp Subject: [PATCH/RFC 12/12] arm64: dts: renesas: Add EK874 board with idk-2121wr display support Date: Fri, 2 Aug 2019 08:34:09 +0100 Message-Id: <1564731249-22671-13-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1564731249-22671-1-git-send-email-fabrizio.castro@bp.renesas.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The EK874 is advertised as compatible with panel IDK-2121WR from Advantech, however the panel isn't sold alongside the board. A new dts, adding everything that's required to get the panel to to work with the EK874, is the most convenient way to support the EK874 when it's connected to the IDK-2121WR. Signed-off-by: Fabrizio Castro --- arch/arm64/boot/dts/renesas/Makefile | 3 +- .../boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts | 112 +++++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile index 42b74c2..ce48478 100644 --- a/arch/arm64/boot/dts/renesas/Makefile +++ b/arch/arm64/boot/dts/renesas/Makefile @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_R8A774A1) += r8a774a1-hihope-rzg2m.dtb dtb-$(CONFIG_ARCH_R8A774A1) += r8a774a1-hihope-rzg2m-ex.dtb -dtb-$(CONFIG_ARCH_R8A774C0) += r8a774c0-cat874.dtb r8a774c0-ek874.dtb +dtb-$(CONFIG_ARCH_R8A774C0) += r8a774c0-cat874.dtb r8a774c0-ek874.dtb \ + r8a774c0-ek874-idk-2121wr.dtb dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-x.dtb r8a7795-h3ulcb.dtb dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-h3ulcb-kf.dtb dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-xs.dtb diff --git a/arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts b/arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts new file mode 100644 index 0000000..d989998 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dts @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the Silicon Linux RZ/G2E evaluation kit (EK874), + * connected to an Advantech IDK-2121WR 21.5" LVDS panel + * + * Copyright (C) 2019 Renesas Electronics Corp. + */ + +#include "r8a774c0-ek874.dts" + +/ { + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm5 0 50000>; + + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + + power-supply = <®_12p0v>; + enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; + }; + + panel-lvds { + compatible = "advantech,idk-2121wr", "panel-lvds"; + + width-mm = <476>; + height-mm = <268>; + + data-mapping = "vesa-24"; + + panel-timing { + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hsync-len = <44>; + hfront-porch = <88>; + hback-porch = <148>; + vfront-porch = <4>; + vback-porch = <36>; + vsync-len = <5>; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds0_panel_in: endpoint { + remote-endpoint = <&lvds0_out>; + }; + }; + + port@1 { + reg = <1>; + lvds1_panel_in: endpoint { + remote-endpoint = <&lvds1_out>; + }; + }; + }; + }; +}; + +&gpio0 { + lvds-connector-en-gpio{ + gpio-hog; + gpios = <17 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "lvds-connector-en-gpio"; + }; +}; + +&lvds0 { + renesas,swap-data; + + ports { + port@1 { + lvds0_out: endpoint { + remote-endpoint = <&lvds0_panel_in>; + }; + }; + }; +}; + +&lvds1 { + status = "okay"; + + clocks = <&cpg CPG_MOD 727>, <&x13_clk>, <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + + ports { + port@1 { + lvds1_out: endpoint { + remote-endpoint = <&lvds1_panel_in>; + }; + }; + }; +}; + +&pfc { + pwm5_pins: pwm5 { + groups = "pwm5_a"; + function = "pwm5"; + }; +}; + +&pwm5 { + pinctrl-0 = <&pwm5_pins>; + pinctrl-names = "default"; + + status = "okay"; +};