From patchwork Wed Dec 29 19:31:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12701102 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED387C433EF for ; Wed, 29 Dec 2021 19:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbhL2Tbn (ORCPT ); Wed, 29 Dec 2021 14:31:43 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:35538 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbhL2Tbm (ORCPT ); Wed, 29 Dec 2021 14:31:42 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 18979464; Wed, 29 Dec 2021 20:31:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640806301; bh=DI/RGTpnR8cvi5weHg5ipQwKCg/FQUnv5rleojLFl7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AcMrhjztRKVGLICB0VB2pYHmGjCoMLG/Z34htJfgzP5BzKfi/Gx/5eG3CS5OGI8Ho cLHOZlzq/vhRm3ahuMve259iD+mETZHoNW0+E2L7UDqFTIO4z9irajU681wtFkvDmk F7oK0ufkYrfN9H3XQQJJJmccC4zi1DIhS1bURSL0= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: devicetree@vger.kernel.org, Rob Herring , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Chris Paterson Subject: [PATCH v2 1/3] arm64: dts: renesas: Prepare AA1024XD12 panel .dtsi for overlay support Date: Wed, 29 Dec 2021 21:31:33 +0200 Message-Id: <20211229193135.28767-2-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211229193135.28767-1-laurent.pinchart+renesas@ideasonboard.com> References: <20211229193135.28767-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The Mitsubishi AA1024XD12 panel can be used for R-Car Gen2 and Gen3 boards as an optional external panel. It is described in the arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi file as a direct child of the DT root node. This allows including r8a77xx-aa104xd12-panel.dtsi in board device trees, with other minor modifications, to enable the panel. This is however not how external components should be modelled. Instead of modifying the board device tree to enable the panel, it should be compiled as a DT overlay, to be loaded by the boot loader. Prepare the r8a77xx-aa104xd12-panel.dtsi file for this usage by declaring a panel node only, without hardcoding its path. Overlay sources can then include r8a77xx-aa104xd12-panel.dtsi where appropriate. This change doesn't cause any regression as r8a77xx-aa104xd12-panel.dtsi is currently unused. As overlay support for this panel has only been tested with Gen3 hardware, and Gen2 support will require more development, move the file to arch/arm64/boot/dts/renesas/. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham --- .../arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi | 39 ------------------- .../boot/dts/renesas/panel-aa104xd12.dtsi | 30 ++++++++++++++ 2 files changed, 30 insertions(+), 39 deletions(-) delete mode 100644 arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi create mode 100644 arch/arm64/boot/dts/renesas/panel-aa104xd12.dtsi diff --git a/arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi b/arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi deleted file mode 100644 index 79fce67ebb1c..000000000000 --- a/arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Common file for the AA104XD12 panel connected to Renesas R-Car boards - * - * Copyright (C) 2014 Renesas Electronics Corp. - */ - -/ { - panel { - compatible = "mitsubishi,aa104xd12", "panel-lvds"; - - width-mm = <210>; - height-mm = <158>; - data-mapping = "jeida-18"; - - panel-timing { - /* 1024x768 @65Hz */ - clock-frequency = <65000000>; - hactive = <1024>; - vactive = <768>; - hsync-len = <136>; - hfront-porch = <20>; - hback-porch = <160>; - vfront-porch = <3>; - vback-porch = <29>; - vsync-len = <6>; - }; - - port { - panel_in: endpoint { - remote-endpoint = <&lvds_connector>; - }; - }; - }; -}; - -&lvds_connector { - remote-endpoint = <&panel_in>; -}; diff --git a/arch/arm64/boot/dts/renesas/panel-aa104xd12.dtsi b/arch/arm64/boot/dts/renesas/panel-aa104xd12.dtsi new file mode 100644 index 000000000000..6e9f447d8fe1 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/panel-aa104xd12.dtsi @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Common file for the AA104XD12 panel connected to Renesas R-Car Gen3 boards. + * + * Copyright (C) 2021 Renesas Electronics Corp. + */ + +panel { + compatible = "mitsubishi,aa104xd12", "panel-lvds"; + + width-mm = <210>; + height-mm = <158>; + data-mapping = "jeida-18"; + + panel-timing { + /* 1024x768 @65Hz */ + clock-frequency = <65000000>; + hactive = <1024>; + vactive = <768>; + hsync-len = <136>; + hfront-porch = <20>; + hback-porch = <160>; + vfront-porch = <3>; + vback-porch = <29>; + vsync-len = <6>; + }; + + port { + }; +}; From patchwork Wed Dec 29 19:31:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12701104 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA159C4332F for ; Wed, 29 Dec 2021 19:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbhL2Tbo (ORCPT ); Wed, 29 Dec 2021 14:31:44 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:35546 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbhL2Tbo (ORCPT ); Wed, 29 Dec 2021 14:31:44 -0500 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CAF0AD6E; Wed, 29 Dec 2021 20:31:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640806302; bh=j5F+jshhKVzS4Efk6nKvo3Y17oi8E1PlSNG58UIr9BI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eXuWUseoEx8LcpqvwbH4OMPd9MBx5QToPjbIyHlJQ8xLa777OQY/hvCLCxhHDmlvc ZnL6low/8af31ulMK8trFbccvCXtIKcQe6i1YUnZicAVe5hKwpyiup5PS+OISQ65hX x1UcesvwHaaOph0ua3F5ImOrVMjE8lsh91Mo1vBE= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: devicetree@vger.kernel.org, Rob Herring , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Chris Paterson Subject: [PATCH v2 2/3] arm64: dts: renesas: Add panel overlay for Salvator-X(S) boards Date: Wed, 29 Dec 2021 21:31:34 +0200 Message-Id: <20211229193135.28767-3-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211229193135.28767-1-laurent.pinchart+renesas@ideasonboard.com> References: <20211229193135.28767-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The Salvator-X and Salvator-XS boards support an optional LVDS panel. One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT overlay. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham --- Changes since v1: - Create endpoint in lvds0 port@1 --- arch/arm64/boot/dts/renesas/Makefile | 2 ++ .../dts/renesas/salvator-panel-aa104xd12.dts | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile index d1c5c21d8d14..982ca3e0e86f 100644 --- a/arch/arm64/boot/dts/renesas/Makefile +++ b/arch/arm64/boot/dts/renesas/Makefile @@ -74,3 +74,5 @@ dtb-$(CONFIG_ARCH_R8A77961) += r8a779m3-ulcb-kf.dtb dtb-$(CONFIG_ARCH_R8A77965) += r8a779m5-salvator-xs.dtb dtb-$(CONFIG_ARCH_R9A07G044) += r9a07g044l2-smarc.dtb + +dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo diff --git a/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts new file mode 100644 index 000000000000..c83a30adc6ad --- /dev/null +++ b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree overlay for the AA104XD12 panel connected to LVDS0 on a + * Salvator-X or Salvator-XS board + * + * Copyright 2021 Ideas on Board Oy + */ + +/dts-v1/; +/plugin/; + +&{/} { +#include "panel-aa104xd12.dtsi" +}; + +&{/panel} { + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&lvds0_out>; + }; + }; +}; + +&lvds0 { + status = "okay"; + + ports { + port@1 { + lvds0_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +}; From patchwork Wed Dec 29 19:31:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12701105 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1082C433F5 for ; Wed, 29 Dec 2021 19:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230429AbhL2Tbp (ORCPT ); Wed, 29 Dec 2021 14:31:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbhL2Tbo (ORCPT ); Wed, 29 Dec 2021 14:31:44 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6726EC061574; Wed, 29 Dec 2021 11:31:44 -0800 (PST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A792D89; Wed, 29 Dec 2021 20:31:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640806303; bh=r7xTCDf6/ZwoGKEoQxRT5ywOUWRFaFv6tvLd43H5DhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BcIlyHsm6m5ERi3b9ahNHYzJRjooTfjXLkH37JxSZ60JjXwICBYF4Z/gI0BSiqHbu GgAwhDtr6a/VSy1uw8y+9lW/DJTGrujGZsMwWSwuAJwryCpTw9mCkswTtqI9j8C1a9 gw+0had/m3+tEGJozWOsK7X+/WVTNh9COshibAds= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: devicetree@vger.kernel.org, Rob Herring , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Chris Paterson Subject: [PATCH v2 3/3] arm64: dts: renesas: Add panel overlay for Draak and Ebisu boards Date: Wed, 29 Dec 2021 21:31:35 +0200 Message-Id: <20211229193135.28767-4-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211229193135.28767-1-laurent.pinchart+renesas@ideasonboard.com> References: <20211229193135.28767-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The Draak and Ebisu boards support an optional LVDS panel. One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT overlay. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Kieran Bingham --- Changes since v1: - Create endpoint in lvds1 port@1 --- arch/arm64/boot/dts/renesas/Makefile | 1 + .../renesas/draak-ebisu-panel-aa104xd12.dts | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/draak-ebisu-panel-aa104xd12.dts diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile index 982ca3e0e86f..5e831bd33828 100644 --- a/arch/arm64/boot/dts/renesas/Makefile +++ b/arch/arm64/boot/dts/renesas/Makefile @@ -76,3 +76,4 @@ dtb-$(CONFIG_ARCH_R8A77965) += r8a779m5-salvator-xs.dtb dtb-$(CONFIG_ARCH_R9A07G044) += r9a07g044l2-smarc.dtb dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo +dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo diff --git a/arch/arm64/boot/dts/renesas/draak-ebisu-panel-aa104xd12.dts b/arch/arm64/boot/dts/renesas/draak-ebisu-panel-aa104xd12.dts new file mode 100644 index 000000000000..258f8668ca36 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/draak-ebisu-panel-aa104xd12.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree overlay for the AA104XD12 panel connected to LVDS1 on a Draak or + * Ebisu board + * + * Copyright 2021 Ideas on Board Oy + */ + +/dts-v1/; +/plugin/; + +&{/} { +#include "panel-aa104xd12.dtsi" +}; + +&{/panel} { + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&lvds1_out>; + }; + }; +}; + +&lvds1 { + status = "okay"; + + ports { + port@1 { + lvds1_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +};