Message ID | 20230222165514.684729-1-suijingfeng@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;chinmaygameti@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <suijingfeng@loongson.cn> To: Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Krzysztof Kozlowski <krzk@kernel.org>, suijingfeng <suijingfeng@loongson.cn> 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 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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?= |
Series |
[1/2] Mips: ls2k1000: dts: add the display controller device node
|
|
Commit Message
Sui Jingfeng
Feb. 22, 2023, 4:55 p.m. UTC
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 <suijingfeng@loongson.cn>
---
.../boot/dts/loongson/loongson64-2k1000.dtsi | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
Comments
On 22/02/2023 17:55, suijingfeng wrote: > 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 <suijingfeng@loongson.cn> > --- > .../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>; NAK. Test your code against the bindings you send. It's the same patchset. You basically send something which the same moment is incorrect. Best regards, Krzysztof
Hi, On 2023/2/23 02:32, Krzysztof Kozlowski wrote: > On 22/02/2023 17:55, suijingfeng wrote: >> 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 <suijingfeng@loongson.cn> >> --- >> .../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>; > NAK. Err :(, please give me a chance to explain > Test your code against the bindings you send. I can guarantee to you that I test may code more than twice. The code used to testing is listed at link [1]. This patchset mainly used to illustrate how we made the driver in [1] usable on our SoC platform. > It's the same > patchset. You basically send something which the same moment is incorrect. Loongson display controller IP has been integrated in both Loongson North Bridge chipset(ls7a1000 and ls7a2000) and Loongson SoCs(ls2k1000 and ls2k2000 etc), it even has been included in Loongson BMC(ls2k0500 bmc) products. When use this driver on Loongson embedded platform(say ls2k2000, ls2k1000 and ls2k0500) , the PMON/Uboot firmware(my company using pmon most of time) will pass a DT to the kernel. Different boards will pass different DTs. But when using this driver on Loongson server and PC platform( ls3c5000/ls3a5000+ls7a1000/ls7a2000), there will no DT supplied. The firmware and kernel side developer of Loongson choose ACPI+UEFI for such platform, more discussion can be found at [2]. Therefore, on such a situation we decide to send the patch at separate patchset. It is not like the arm and risc-v, as the binding would not be always exits. If we put those patches into a same patchset, some reviewers would suggest us to revise our code. To a form that the code *ALWAYS* probed from the DT, this is not desired. Besides, the driver code + dt support is petty large, separate it is more easy to review and manage. Finally, Thanks your kindly guiding and valuable reviews. [1] https://patchwork.freedesktop.org/patch/523409/?series=113566&rev=4 [2] https://lkml.org/lkml/2022/7/15/135 > Best regards, > Krzysztof
On 23/02/2023 04:19, Sui jingfeng wrote: > Hi, > > On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >> On 22/02/2023 17:55, suijingfeng wrote: >>> 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 <suijingfeng@loongson.cn> >>> --- >>> .../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>; >> NAK. > Err :(, please give me a chance to explain >> Test your code against the bindings you send. > > I can guarantee to you that I test may code more than twice. The code > used to testing is listed at link [1]. I wrote - test against the bindings. I don't believe that it was tested. Please paste the output of the testing (dtbs_check). > > This patchset mainly used to illustrate how we made the driver in [1] > usable on our SoC platform. > >> It's the same >> patchset. You basically send something which the same moment is incorrect. > > Loongson display controller IP has been integrated in both Loongson > North Bridge chipset(ls7a1000 and ls7a2000) and Loongson SoCs(ls2k1000 > and ls2k2000 etc), it even has been included in Loongson BMC(ls2k0500 bmc) > products. I don't understand how your reply here is relevant to incorrect bindings or incorrect DTS according to bindings. Best regards, Krzysztof
On 23/02/2023 08:58, Krzysztof Kozlowski wrote: > On 23/02/2023 04:19, Sui jingfeng wrote: >> Hi, >> >> On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >>> On 22/02/2023 17:55, suijingfeng wrote: >>>> 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 <suijingfeng@loongson.cn> >>>> --- >>>> .../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>; >>> NAK. >> Err :(, please give me a chance to explain >>> Test your code against the bindings you send. >> >> I can guarantee to you that I test may code more than twice. The code >> used to testing is listed at link [1]. > > I wrote - test against the bindings. I don't believe that it was tested. > Please paste the output of the testing (dtbs_check). OTOH, dtschema has some hickups on loongsoon DTS, so I doubt you could even test it. Anyway, where is above property memory-region described in the bindings? Best regards, Krzysztof
On 2023/2/23 16:05, Krzysztof Kozlowski wrote: > On 23/02/2023 08:58, Krzysztof Kozlowski wrote: >> On 23/02/2023 04:19, Sui jingfeng wrote: >>> Hi, >>> >>> On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >>>> On 22/02/2023 17:55, suijingfeng wrote: >>>>> 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 <suijingfeng@loongson.cn> >>>>> --- >>>>> .../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>; >>>> NAK. >>> Err :(, please give me a chance to explain >>>> Test your code against the bindings you send. >>> I can guarantee to you that I test may code more than twice. The code >>> used to testing is listed at link [1]. >> I wrote - test against the bindings. I don't believe that it was tested. >> Please paste the output of the testing (dtbs_check). > OTOH, dtschema has some hickups on loongsoon DTS, so I doubt you could > even test it. Anyway, where is above property memory-region described in > the bindings? Yes, you are right. I forget to write memory-region property. but the code provided in loongson64-2k1000.dtsi is correct. I do run dt_binding_check, the results seems good. there are some problem when make dtbs_check, but it seems not relevant to me. please give me more time to figure it out, i will reply to you later. > Best regards, > Krzysztof
On 23/02/2023 09:21, suijingfeng wrote: > > On 2023/2/23 16:05, Krzysztof Kozlowski wrote: >> On 23/02/2023 08:58, Krzysztof Kozlowski wrote: >>> On 23/02/2023 04:19, Sui jingfeng wrote: >>>> Hi, >>>> >>>> On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >>>>> On 22/02/2023 17:55, suijingfeng wrote: >>>>>> 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 <suijingfeng@loongson.cn> >>>>>> --- >>>>>> .../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>; >>>>> NAK. >>>> Err :(, please give me a chance to explain >>>>> Test your code against the bindings you send. >>>> I can guarantee to you that I test may code more than twice. The code >>>> used to testing is listed at link [1]. >>> I wrote - test against the bindings. I don't believe that it was tested. >>> Please paste the output of the testing (dtbs_check). >> OTOH, dtschema has some hickups on loongsoon DTS, so I doubt you could >> even test it. Anyway, where is above property memory-region described in >> the bindings? > > Yes, you are right. I forget to write memory-region property. > > but the code provided in loongson64-2k1000.dtsi is correct. > > I do run dt_binding_check, the results seems good. dt_binding_check checks the binding. We talk about your DTS. > > there are some problem when make dtbs_check, but it seems not relevant > to me. Yeah, the dtbs_check hash troubles with interrupt cells and it does not give reasonable warning message. Best regards, Krzysztof
On 2023/2/23 15:58, Krzysztof Kozlowski wrote: > On 23/02/2023 04:19, Sui jingfeng wrote: >> Hi, >> >> On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >>> On 22/02/2023 17:55, suijingfeng wrote: >>>> 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 <suijingfeng@loongson.cn> >>>> --- >>>> .../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>; >>> NAK. >> Err :(, please give me a chance to explain >>> Test your code against the bindings you send. >> I can guarantee to you that I test may code more than twice. The code >> used to testing is listed at link [1]. > I wrote - test against the bindings. I don't believe that it was tested. > Please paste the output of the testing (dtbs_check). I *do* run the test against the bindings and the test result say nothing. I reset my modify today made, then re-run the test again. I'm telling the truth: the test result say nothing. I paste the log at below: make -j$(nproc) ARCH=loongarch CROSS_COMPILE=loongarch64-unknown-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/loongson/loongson,display-controller.yaml DTEX Documentation/devicetree/bindings/display/loongson/loongson,display-controller.example.dts DTC_CHK Documentation/devicetree/bindings/display/loongson/loongson,display-controller.example.dtb I remember, if there anything wrong, rob's test robot will complain. let's wait and witness. >> This patchset mainly used to illustrate how we made the driver in [1] >> usable on our SoC platform. >> >>> It's the same >>> patchset. You basically send something which the same moment is incorrect. >> Loongson display controller IP has been integrated in both Loongson >> North Bridge chipset(ls7a1000 and ls7a2000) and Loongson SoCs(ls2k1000 >> and ls2k2000 etc), it even has been included in Loongson BMC(ls2k0500 bmc) >> products. > I don't understand how your reply here is relevant to incorrect bindings > or incorrect DTS according to bindings. Ok, now I know that you refer to the bindings. I'm a newbie at DT bindings, but i will correct all of the problem you mentioned. It takes a few time, thanks for your valuable advice. > > Best regards, > Krzysztof
On 23/02/2023 09:40, suijingfeng wrote: > > On 2023/2/23 15:58, Krzysztof Kozlowski wrote: >> On 23/02/2023 04:19, Sui jingfeng wrote: >>> Hi, >>> >>> On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >>>> On 22/02/2023 17:55, suijingfeng wrote: >>>>> 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 <suijingfeng@loongson.cn> >>>>> --- >>>>> .../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>; >>>> NAK. >>> Err :(, please give me a chance to explain >>>> Test your code against the bindings you send. >>> I can guarantee to you that I test may code more than twice. The code >>> used to testing is listed at link [1]. >> I wrote - test against the bindings. I don't believe that it was tested. >> Please paste the output of the testing (dtbs_check). ^^^^^^^^^^^^ Do you see this ----------^^^^? But you pasted: > > I *do* run the test against the bindings and the test result say nothing. > > I reset my modify today made, then re-run the test again. > > I'm telling the truth: the test result say nothing. I paste the log at > below: > > make -j$(nproc) ARCH=loongarch > CROSS_COMPILE=loongarch64-unknown-linux-gnu- dt_binding_check This -------------------------------------------^^^^^^^^^^^^ Best regards, Krzysztof
On 2023/2/23 16:59, Krzysztof Kozlowski wrote: > On 23/02/2023 09:40, suijingfeng wrote: >> On 2023/2/23 15:58, Krzysztof Kozlowski wrote: >>> On 23/02/2023 04:19, Sui jingfeng wrote: >>>> Hi, >>>> >>>> On 2023/2/23 02:32, Krzysztof Kozlowski wrote: >>>>> On 22/02/2023 17:55, suijingfeng wrote: >>>>>> 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 <suijingfeng@loongson.cn> >>>>>> --- >>>>>> .../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>; >>>>> NAK. >>>> Err :(, please give me a chance to explain >>>>> Test your code against the bindings you send. >>>> I can guarantee to you that I test may code more than twice. The code >>>> used to testing is listed at link [1]. >>> I wrote - test against the bindings. I don't believe that it was tested. >>> Please paste the output of the testing (dtbs_check). > ^^^^^^^^^^^^ > Do you see this ----------^^^^? > > But you pasted: > >> I *do* run the test against the bindings and the test result say nothing. >> >> I reset my modify today made, then re-run the test again. >> >> I'm telling the truth: the test result say nothing. I paste the log at >> below: >> >> make -j$(nproc) ARCH=loongarch >> CROSS_COMPILE=loongarch64-unknown-linux-gnu- dt_binding_check > This -------------------------------------------^^^^^^^^^^^^ Yes, I see it. I means I have tested all of them as the instruction[1]! the test log just say nothing. I re-run it again and all passed. [1] https://www.kernel.org/doc/html/v5.9/devicetree/writing-schema.html#:~:text=The%20DT%20schema%20project%20can%20be%20installed%20with,they%20are%20in%20your%20PATH%20%28~%2F.local%2Fbin%20by%20default%29. > > Best regards, > Krzysztof
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",