From patchwork Wed Aug 19 11:46:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11723607 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 5902714F6 for ; Wed, 19 Aug 2020 11:47:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32C3220885 for ; Wed, 19 Aug 2020 11:47:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WqzG9qbO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XPoNKr4U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32C3220885 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IGlPovvCD/LEjK20+ZapeWuPDgRe5924uKqOaA0Rvz0=; b=WqzG9qbOSRj9zNLpwqYgsAmQV q8Lku5wcc9g5SiRh6y7y8OO/VZzKMCuek9bNqE8l5S1wYV3BaooW0EOFutPGUSwXf3w2/C0jUT6Kl CA99kBRIQgS16RseQqgBFKmpXYS+L6h9Rh6OXYSn70AduwcAevzYUTyZTIDYnZpz7j6X1p8K1Vkzm L77CY9oDiKwbjEhpQ4QhJHpkhhsUlEC7l8itr2K1+k5GAjFPKl9QNmblXYZN3Vi1QlEmHRXXlg4ic 9yuDf++Ui9nZ9sqeoyVLHQ08qsZkxF/ptsFW7uhTzhsD1At/yIcOTSdhpL3jebK8nG2OgXiToszEA C2i5S8L7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8MYR-00048O-Se; Wed, 19 Aug 2020 11:46:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8MXx-0003su-4i for linux-arm-kernel@lists.infradead.org; Wed, 19 Aug 2020 11:46:32 +0000 Received: from mail.kernel.org (ip5f5ad5a3.dynamic.kabel-deutschland.de [95.90.213.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 04C6A22D6D; Wed, 19 Aug 2020 11:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597837584; bh=0s3pmtILVSiuI77kiYarCgl3FUbdNZSJJENxk4HNs1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XPoNKr4UNTqnAzpnnXX0ra1UVzx27ph7DOeQ7Lxg7GLPBzAJk+TZgZwglUIovjO2C Ox4rol4IoNMRrIBPrZttvUxhNAQeUcTpgYcArKxrbQqhv+FTLNfCzOp3uPn61YI22K D9se5drVv7bB9w8L2f0tMtFoW2knYrdC4sR1YRZo= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1k8MXt-00EucG-PZ; Wed, 19 Aug 2020 13:46:21 +0200 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Subject: [PATCH 49/49] dt: display: Add binds for the DPE and DSI controller for Kirin 960/970 Date: Wed, 19 Aug 2020 13:46:17 +0200 Message-Id: <6471642f74779fecfc9d5e990d90f9475d8b32d4.1597833138.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200819_074625_404948_C050DA9C X-CRM114-Status: GOOD ( 20.70 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jesper Dangaard Brouer , Daniel Borkmann , Manivannan Sadhasivam , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, John Fastabend , linuxarm@huawei.com, dri-devel , Alexei Starovoitov , David Airlie , Rob Herring , John Stultz , Wei Xu , Daniel Vetter , netdev@vger.kernel.org, mauro.chehab@huawei.com, Jakub Kicinski , bpf@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add a description of the bindings used by Kirin 960/970 Display Serial Interface (DSI) controller and by its Display Engine (DPE). Signed-off-by: Mauro Carvalho Chehab --- .../display/hisilicon,hi3660-dpe.yaml | 99 +++++++++++++++++ .../display/hisilicon,hi3660-dsi.yaml | 102 ++++++++++++++++++ .../boot/dts/hisilicon/hikey970-drm.dtsi | 4 +- 3 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml create mode 100644 Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml diff --git a/Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml b/Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml new file mode 100644 index 000000000000..074997354417 --- /dev/null +++ b/Documentation/devicetree/bindings/display/hisilicon,hi3660-dpe.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/hisilicon,hi3660-dpe.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon SPMI controller + +maintainers: + - Mauro Carvalho Chehab + +description: | + The HiSilicon Display Engine (DPE) s the display controller which grab + image data from memory, do composition, do post image processing, + generate RGB timing stream and transfer to DSI. + +properties: + $nodename: + pattern: "dpe@[0-9a-f]+" + + compatible: + enum: + - hisilicon,kirin960-dpe + - hisilicon,kirin970-dpe + + reg: + minItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 1 + description: Clocks used by the ISP and by the display + + clock-names: + description: Names for the clock lines + + dma-coherent: true + + port: + type: object + description: A port node pointing to the display output endpoint. + + + iommu-info: + type: object + description: IOMMU address and size to be used by GPU + + properties: + start-addr: + const: start address for IOMMU + size: + const: size of the mapped region + +examples: + - | + dpe: dpe@e8600000 { + compatible = "hisilicon,kirin970-dpe"; + memory-region = <&drm_dma_reserved>; + reg = <0 0xE8600000 0 0xC0000>, + <0 0xFFF35000 0 0x1000>, + <0 0xFFF0A000 0 0x1000>, + <0 0xE8A09000 0 0x1000>, + <0 0xE86C0000 0 0x10000>, + <0 0xFFF31000 0 0x1000>, + <0 0xE87FF000 0 0x1000>; + + interrupts = <0 245 4>; + + clocks = <&media1_crg HI3670_ACLK_GATE_DSS>, + <&media1_crg HI3670_PCLK_GATE_DSS>, + <&media1_crg HI3670_CLK_GATE_EDC0>, + <&media1_crg HI3670_CLK_GATE_LDI0>, + <&media1_crg HI3670_CLK_GATE_DSS_AXI_MM>, + <&media1_crg HI3670_PCLK_GATE_MMBUF>, + <&crg_ctrl HI3670_PCLK_GATE_PCTRL>; + + clock-names = "aclk_dss", + "pclk_dss", + "clk_edc0", + "clk_ldi0", + "clk_dss_axi_mm", + "pclk_mmbuf", + "pclk_pctrl"; + + dma-coherent; + + port { + dpe_out: endpoint { + remote-endpoint = <&dsi_in>; + }; + }; + + iommu_info { + start-addr = <0x8000>; + size = <0xbfff8000>; + }; + }; diff --git a/Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml b/Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml new file mode 100644 index 000000000000..2265267fc53d --- /dev/null +++ b/Documentation/devicetree/bindings/display/hisilicon,hi3660-dsi.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/hisilicon,hi3660-dsi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon SPMI controller + +maintainers: + - Mauro Carvalho Chehab + +description: | + The HiSilicon Display Serial Interface (DSI) Host Controller for + Kirin 960 and 970 resides in the middle of display controller and + an external HDMI converter or panel. + +properties: + $nodename: + pattern: "dsi@[0-9a-f]+" + + compatible: + enum: + - hisilicon,kirin960-dsi + - hisilicon,kirin970-dsi + + reg: + minItems: 1 + maxItems: 4 + + clocks: + minItems: 1 + maxItems: 8 + description: Clocks used by the ISP and by the display. + + clock-names: + description: Names for the clock lines. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + mux-gpio: + description: GPIO used by the mux. + + ports: + type: object + description: Display input and output ports. + +examples: + - | + dsi: dsi@e8601000 { + compatible = "hisilicon,kirin970-dsi"; + reg = <0 0xE8601000 0 0x7F000>, + <0 0xFFF35000 0 0x1000>, + <0 0xE8A09000 0 0x1000>; + + clocks = <&crg_ctrl HI3670_CLK_GATE_TXDPHY0_REF>, + <&crg_ctrl HI3670_CLK_GATE_TXDPHY1_REF>, + <&crg_ctrl HI3670_CLK_GATE_TXDPHY0_CFG>, + <&crg_ctrl HI3670_CLK_GATE_TXDPHY1_CFG>, + <&crg_ctrl HI3670_PCLK_GATE_DSI0>, + <&crg_ctrl HI3670_PCLK_GATE_DSI1>; + clock-names = "clk_txdphy0_ref", + "clk_txdphy1_ref", + "clk_txdphy0_cfg", + "clk_txdphy1_cfg", + "pclk_dsi0", + "pclk_dsi1"; + + #address-cells = <1>; + #size-cells = <0>; + mux-gpio = <&gpio25 7 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + remote-endpoint = <&dpe_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + dsi_out0: endpoint@0 { + reg = <0>; + remote-endpoint = <&adv7533_in>; + }; + + dsi_out1: endpoint@1 { + reg = <1>; + remote-endpoint = <&panel0_in>; + }; + }; + }; diff --git a/arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi b/arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi index 503c7c9425c8..5758d7d181e5 100644 --- a/arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hikey970-drm.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 / { - dpe: dpe@E8600000 { + dpe: dpe@e8600000 { compatible = "hisilicon,kirin970-dpe"; memory-region = <&drm_dma_reserved>; // DSS, PERI_CRG, SCTRL, PCTRL, NOC_DSS_Service_Target, PMCTRL, MEDIA_CRG @@ -44,7 +44,7 @@ iommu_info { }; }; - dsi: dsi@E8601000 { + dsi: dsi@e8601000 { compatible = "hisilicon,kirin970-dsi"; reg = <0 0xE8601000 0 0x7F000>, <0 0xFFF35000 0 0x1000>,