From patchwork Wed Feb 22 16:55:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13149352 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC6F8C61DA4 for ; Wed, 22 Feb 2023 17:03:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3AAD810E086; Wed, 22 Feb 2023 17:03:41 +0000 (UTC) X-Greylist: delayed 497 seconds by postgrey-1.36 at gabe; Wed, 22 Feb 2023 17:03:37 UTC Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by gabe.freedesktop.org (Postfix) with ESMTP id BB1C910E086 for ; Wed, 22 Feb 2023 17:03:37 +0000 (UTC) Received: from loongson.cn (unknown [10.20.42.133]) by gateway (Coremail) with SMTP id _____8AxJDT0SPZjdqYDAA--.1952S3; Thu, 23 Feb 2023 00:55:16 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.133]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxTL7ySPZjRes4AA--.38394S2; Thu, 23 Feb 2023 00:55:14 +0800 (CST) From: suijingfeng To: Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Thomas Bogendoerfer , Krzysztof Kozlowski , suijingfeng Subject: [PATCH 1/2] Mips: ls2k1000: dts: add the display controller device node Date: Thu, 23 Feb 2023 00:55:13 +0800 Message-Id: <20230222165514.684729-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxTL7ySPZjRes4AA--.38394S2 X-CM-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6I8E87Iv67AKxV WUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07je pB-UUUUU= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The display controller is a pci device, it's pci vendor id is 0x0014, it's pci device id is 0x7a06. Signed-off-by: suijingfeng --- .../boot/dts/loongson/loongson64-2k1000.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi index 8143a61111e3..a528af3977d9 100644 --- a/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi +++ b/arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi @@ -31,6 +31,18 @@ memory@200000 { <0x00000001 0x10000000 0x00000001 0xb0000000>; /* 6912 MB at 4352MB */ }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + display_reserved: framebuffer@30000000 { + compatible = "shared-dma-pool"; + reg = <0x0 0x30000000 0x0 0x04000000>; /* 64M */ + linux,cma-default; + }; + }; + cpu_clk: cpu_clk { #clock-cells = <0>; compatible = "fixed-clock"; @@ -198,6 +210,15 @@ sata@8,0 { interrupt-parent = <&liointc0>; }; + display-controller@6,0 { + compatible = "loongson,ls2k1000-dc"; + + reg = <0x3000 0x0 0x0 0x0 0x0>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&liointc0>; + memory-region = <&display_reserved>; + }; + pci_bridge@9,0 { compatible = "pci0014,7a19.0", "pci0014,7a19", From patchwork Wed Feb 22 16:55:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 13149353 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A96E8C61DA4 for ; Wed, 22 Feb 2023 17:03:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EF7F10E184; Wed, 22 Feb 2023 17:03:41 +0000 (UTC) Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by gabe.freedesktop.org (Postfix) with ESMTP id BB7BE10E184 for ; Wed, 22 Feb 2023 17:03:37 +0000 (UTC) Received: from loongson.cn (unknown [10.20.42.133]) by gateway (Coremail) with SMTP id _____8Cxhdj0SPZjfaYDAA--.1894S3; Thu, 23 Feb 2023 00:55:16 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.133]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxTL7ySPZjRes4AA--.38394S3; Thu, 23 Feb 2023 00:55:15 +0800 (CST) From: suijingfeng To: Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Herring , Thomas Bogendoerfer , Krzysztof Kozlowski , suijingfeng Subject: [PATCH 2/2] dt-bindings: display: Add Loongson display controller Date: Thu, 23 Feb 2023 00:55:14 +0800 Message-Id: <20230222165514.684729-2-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222165514.684729-1-suijingfeng@loongson.cn> References: <20230222165514.684729-1-suijingfeng@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxTL7ySPZjRes4AA--.38394S3 X-CM-SenderInfo: xvxlyxpqjiv03j6o00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iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIY CTnIWIevJa73UjIFyTuYvjxUxhiSDUUUU X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch add a trival DT usages for loongson display controller found in LS2k1000 SoC. Signed-off-by: suijingfeng --- .../loongson/loongson,display-controller.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml diff --git a/Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml b/Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml new file mode 100644 index 000000000000..98b78f449a80 --- /dev/null +++ b/Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/loongson/loongson,display-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson Display Controller Device Tree Bindings + +maintainers: + - Sui Jingfeng + +description: |+ + + The display controller is a PCI device, it has two display pipe. + For the DC in LS2K1000 each way has a DVO output interface which + provide RGB888 signals, vertical & horizontal synchronisations + and the pixel clock. Each CRTC is able to support 1920x1080@60Hz, + the maximum resolution is 2048x2048 according to the hardware spec. + +properties: + $nodename: + pattern: "^display-controller@[0-9a-f],[0-9a-f]$" + + compatible: + oneOf: + - items: + - enum: + - loongson,ls2k1000-dc + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + bus { + + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <2>; + + display-controller@6,0 { + compatible = "loongson,ls2k1000-dc"; + reg = <0x3000 0x0 0x0 0x0 0x0>; + interrupts = <28 IRQ_TYPE_LEVEL_LOW>; + }; + }; + +...