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: 60618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp691966wrd; Wed, 22 Feb 2023 09:07:23 -0800 (PST) X-Google-Smtp-Source: AK7set8jOZhCBpu/yQiCHRHeJMlz+fycLo2+SH8+rdIXieXgPohjN4M3dGqSh5fN3J8tVuXOOZAj X-Received: by 2002:aa7:955c:0:b0:593:91e4:99e2 with SMTP id w28-20020aa7955c000000b0059391e499e2mr9460064pfq.34.1677085643400; Wed, 22 Feb 2023 09:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677085643; cv=none; d=google.com; s=arc-20160816; b=UHr9x8rXlM4u5yGzhP0QTv+ePAsyurUu1P/+5kH0o0yOqY9pfXMnjHqlT667JVlKc/ 3gPmfW1SqKDq7fpBpkBipgtYwWs0Ai5L4KffTtKp7IUzJO4P3W3neDPkoMfm1V157Wkc GMrxRuJShonxcUTJPk/QfKRqYY9P7LlyzGz3SXKwQHtPSNkteO8IQiJq2xLltlCJezJ6 1I78rBxhSX9DMlxYT7ch9AhbPlxgcgJIZEPa3hQv12qyfbxbP6RT0WKEYTGhPpMMNiB6 OZy3cQfksejddKVYDsktXC3O8M9qtxFRmPi/MDtQdj1HxiOqEP3YA7o7dbU7BL2yIxAX 3uYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=cjEZ6+zJ+PaUsssW6R9d1OwaOMg3Md4Oh/tRPuwowZ4=; b=do8cOWUe+pncRLILz7DRgL4ih7vI/Rny0ziBHf9o9nCp+v2uyHoLwVGfsC4lkgFvd4 5xOht3gfjPFhV5Vd3+gczI8HQuxflONpAMvTq1kFt0gJ4jUGSFiWq1AvX4ILwQSao5Vj VwjQeYMpKRuVQinpjKTPYYrHzUXcUU6Cjv/e3uUdFGVnPhu4pV6OYS3O0xOaf33OZxWL rlhV7tMDCxTXVz6Nik4m4WYOwEDkW7ZoxMZErap6XH8YLtxBHRC5VIPDDKR3dVtkvzJj 1hGJDMQkuKH5Js72uLgtQSD5CwV/uBbFBzQt6/TMYYFv8hjTQfHYhXyTOEgUgUwUCbvr 9M3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a62d441000000b00591f06fa9d9si10514621pfl.277.2023.02.22.09.07.10; Wed, 22 Feb 2023 09:07:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232145AbjBVQz3 (ORCPT + 99 others); Wed, 22 Feb 2023 11:55:29 -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.34.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxTL7ySPZjRes4AA--.38394S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7ZrW5Kw47Gr1UWrykKryxGrg_yoW8GF4Up3 WDAay7Kr4rWF1Iqws5JFy8Jr4fZF95AF97GrsFyr1UWwn2v3Wqvr4fJF1ftF4aqrWUJa4j vF18GrWxKF1xCw7anT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bfxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4kS 14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAaw2 AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xF xVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWw C2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_ Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJV WUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBI daVFxhVjvjDU0xZFpf9x07j5o7tUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758551755699666491?= X-GMAIL-MSGID: =?utf-8?q?1758551755699666491?= 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: 60617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp691964wrd; Wed, 22 Feb 2023 09:07:23 -0800 (PST) X-Google-Smtp-Source: AK7set/58YsHYiraTO6El6/zYgI7P8acp+gTRK6x/zJ0UDPi8yHgDBkwCkt7qo4fAKcnJfEXNW/k X-Received: by 2002:aa7:970f:0:b0:5a8:aae8:1160 with SMTP id a15-20020aa7970f000000b005a8aae81160mr8209603pfg.20.1677085643189; Wed, 22 Feb 2023 09:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677085643; cv=none; d=google.com; s=arc-20160816; b=Y7A7TPDIDRxru4TZXlqvA75UHCBSYxPSujJ69B4Y/dovWzu2mHFNTiFYGO+3xWxuS/ u/ESalLZnTF+SQz+b0VJKEUUruhI8EmrjmF/SwxhMKDFft98JK8AaKZCDaGgTM9ozsBu BC4k0iqL8wmhys9UzsIjfxZQVHUqap9ZOmUpsYJq9oT3/EfVM84SBl0PU1zCcmwzKVUX 7UVOMtk6R4s1AK9evRy3WYiMMhS2garSZ2N+muNaVIiVTQwWGbTipRnkCxyM+T+YCMI5 Sk0rNg529peyulwZZZOGdpvzuUXByyMbNWXFzowpiX02B30OlXsjk/gRm0Z2a8vuhokK Y4oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=H1Fe7B1ApwcRh3sTfXG+fANUPG9e9+AO7AZQJr0MwC0=; b=pZq99U/uWrNwc95X5msH9Ltsl339EZFmkh6ozlxy7C3xmPlKjlBwRMdQVEpbs68nGy oLzYjXoy6/pbB6PcC5+CSIhLw8U9NXWYSB+hLOkHlYAReGeD9NKqeHJaLW2o7LZcUOHI sfKWe1Dr+3o5TfXxmkN9LR0x1P1TrYgIaPxWW5nEf+N297RuxYMEJqiFJ8A49oBCdAr5 03IVJ5S/pn0kZeod7DujUZxjG6PjeO31YPk92NhLOtccS6WuWPIQRlYoS/VnGMBvh9cU iopFA0A93Dmx3Ldi63hyQWkqrLe7j3L+VPzCsCe2c/0oR19QumA7IMrwigR06v3KxW1h s9rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x69-20020a628648000000b005a90ee7188fsi20799636pfd.49.2023.02.22.09.07.09; Wed, 22 Feb 2023 09:07:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232314AbjBVQz1 (ORCPT + 99 others); Wed, 22 Feb 2023 11:55:27 -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 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7tF48ur1DKF45Gw47XF4xWFg_yoW8uFW5pa nxCan7Gr4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UUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758551754950475126?= X-GMAIL-MSGID: =?utf-8?q?1758551754950475126?= 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>; + }; + }; + +...