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: 13149351 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 5627FC64EC7 for ; Wed, 22 Feb 2023 16:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232276AbjBVQz0 (ORCPT ); Wed, 22 Feb 2023 11:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232410AbjBVQzX (ORCPT ); Wed, 22 Feb 2023 11:55:23 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14B7634016; Wed, 22 Feb 2023 08:55:18 -0800 (PST) Received: from loongson.cn (unknown [10.20.42.133]) by gateway (Coremail) with SMTP id _____8CxC9r0SPZjeKYDAA--.7809S3; 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 Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org 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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JFI_ Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJV WUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBI daVFxhVjvjDU0xZFpf9x07j5o7tUUUUU= Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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: 13149350 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 5ADFCC636D6 for ; Wed, 22 Feb 2023 16:55:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232349AbjBVQzZ (ORCPT ); Wed, 22 Feb 2023 11:55:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232399AbjBVQzX (ORCPT ); Wed, 22 Feb 2023 11:55:23 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1432D12BCA; Wed, 22 Feb 2023 08:55:18 -0800 (PST) Received: from loongson.cn (unknown [10.20.42.133]) by gateway (Coremail) with SMTP id _____8CxC9r0SPZjf6YDAA--.7811S3; 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 Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org 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 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8IcIk0rVWUJV WUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIY CTnIWIevJa73UjIFyTuYvjxU4Xo7DUUUU Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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>; + }; + }; + +...