Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4313382rdh; Tue, 28 Nov 2023 19:14:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkh7ss+wdeV0QY+lcBIwkCOS02tscgA9cXtccANbf9TvHKu+MSf+8JcueF2Xis43wUWqD9 X-Received: by 2002:a05:6a21:789a:b0:18c:2d2c:3c69 with SMTP id bf26-20020a056a21789a00b0018c2d2c3c69mr17630313pzc.62.1701227641540; Tue, 28 Nov 2023 19:14:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701227641; cv=none; d=google.com; s=arc-20160816; b=axkJJGIXsLVcYbpbau0kp0UUyjDU3hUoPb6HcZjqlgb5vap7X2LlxlUEUxrlREWEjT fiu9wgmlYx9divf6VYajJ8vNBJzEH1ZxvptmvBK9QlbrBrC8VuUWZjHrGeMOJoywZN+w AaYVFt90gOV0HBp7NrfO/lo4tyPi0kGJkVEtGKf+i05tNedPmymbKB5Lo1z2mGrbni4Q l75E+9wejgH76eI2AQoMrGDvCt/Bzhtt5rJKhrMyu9Gk1k1BBl3jXOFCtWO4CwnuBdx2 Fm6IK16PHWGsA//8H8ZjMVdjfPOygmAQNrsP6mMHmkSjwnSOJxDcsMtniuBxyLMwzRWS lAJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=dMa3godK4ferDh4JgBOsz+qUBY57KcAWHzY6GCqe5v0=; fh=cBvFGYzoiY0KenUTgmTtppz8m8ruDvQYaawGoY0+trA=; b=j9dDOKQEQyFgClnAraMf8FsUwpJ7aC8/exBuVK1fahfqxy15l3ut88vINCZwVBk1i2 YGft2mCw/lRFM8sDNHmPTCErs8Oj0+sjrM9bCYwbQNDEKw9YUcCLOZTG2xtBq7EiCtTe yzkjxe/BJXY2j+nm3+Daf6mPSM0RsV0ypM/fn8JXZdS/833t+CKlb2JPSZRhzLcTrT/m R4MHUl9WX3GPXL8O1ATjaR7u4ZHcjdstm/GrBkTit138q+Cnvq+S/2iVa4pH/0bmQ6va 8PAk1Qdn/4/TZW8rnEPn6cCg/FBBdkk3EfK/Ey1AKOAC7THiJfEDbyqcaXsHywoqJzmy rzTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d20-20020a17090ac25400b002850dc3a3c2si402443pjx.155.2023.11.28.19.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 19:14:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4BFF580C037E; Tue, 28 Nov 2023 19:13:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbjK2DNt (ORCPT + 99 others); Tue, 28 Nov 2023 22:13:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjK2DNs (ORCPT ); Tue, 28 Nov 2023 22:13:48 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78F831990; Tue, 28 Nov 2023 19:13:51 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 54B7D24E29D; Wed, 29 Nov 2023 11:13:28 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 29 Nov 2023 11:13:28 +0800 Received: from [192.168.1.115] (180.164.60.184) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 29 Nov 2023 11:13:27 +0800 Message-ID: <20502c84-c3af-4a60-9f5f-d8cc05743866@starfivetech.com> Date: Wed, 29 Nov 2023 11:13:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/6] dt-bindings: display: Add yamls for JH7110 display system Content-Language: en-US To: Krzysztof Kozlowski , "dri-devel@lists.freedesktop.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-media@vger.kernel.org" , "linaro-mm-sig@lists.linaro.org" CC: David Airlie , Daniel Vetter , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley , "Emil Renner Berthing" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Philipp Zabel , Sumit Semwal , "christian.koenig@amd.com" , Bjorn Andersson , Heiko Stuebner , Shawn Guo , Jagan Teki , Chris Morgan , Jack Zhu , "Shengyang Chen" , Changhuang Liang References: <20231025103957.3776-1-keith.zhao@starfivetech.com> <20231025103957.3776-2-keith.zhao@starfivetech.com> From: Keith Zhao In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [180.164.60.184] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 19:13:59 -0800 (PST) On 2023/10/25 20:50, Krzysztof Kozlowski wrote: > On 25/10/2023 12:39, Keith Zhao wrote: >> StarFive SoCs JH7110 display system: > > A nit, subject: drop second/last, redundant "yamls for". The > "dt-bindings" prefix is already stating that these are bindings, so > format is fixed. > >> lcd-controller bases verisilicon dc8200 IP, >> and hdmi bases Innosilicon IP. Add bindings for them. > > Please make it a proper sentences, with proper wrapping. > >> >> also update MAINTAINERS for dt-bindings > > Not a sentence, but also not really needed.ok I see. > >> >> about this patch, I tested the dtbs_check and dt_binding_check >> with the result pass. >> Based on the feedback of the previous version, the corresponding arrangement is made > > Not relevant, so not really suitable for commit msg. > >> >> Signed-off-by: Keith Zhao >> --- >> .../starfive/starfive,display-subsystem.yaml | 41 +++++++ >> .../starfive/starfive,jh7110-dc8200.yaml | 109 ++++++++++++++++++ >> .../starfive/starfive,jh7110-inno-hdmi.yaml | 85 ++++++++++++++ >> MAINTAINERS | 7 ++ >> 4 files changed, 242 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/display/starfive/starfive,display-subsystem.yaml >> create mode 100644 Documentation/devicetree/bindings/display/starfive/starfive,jh7110-dc8200.yaml >> create mode 100644 Documentation/devicetree/bindings/display/starfive/starfive,jh7110-inno-hdmi.yaml >> >> diff --git a/Documentation/devicetree/bindings/display/starfive/starfive,display-subsystem.yaml b/Documentation/devicetree/bindings/display/starfive/starfive,display-subsystem.yaml >> new file mode 100644 >> index 000000000..f45b97b08 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/starfive/starfive,display-subsystem.yaml >> @@ -0,0 +1,41 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/display/starfive/starfive,display-subsystem.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Starfive DRM master device > > What is DRM in hardware? I know Digital Rights Management, but then > subsystem seems wrong. If you mean Linux DRM, then Linux is not a > hardware, so drop all Linuxisms and describe hardware. ok , will only keep hardware describe in my next version > > >> + >> +maintainers: >> + - Keith Zhao >> + - ShengYang Chen >> + >> +description: >> + The Starfive DRM master device is a virtual device needed to list all > > Virtual device? Then not suitable for bindings, sorry. > >> + display controller or other display interface nodes that comprise the >> + graphics subsystem. >> + >> +properties: >> + compatible: >> + const: starfive,display-subsystem >> + >> + ports: >> + $ref: /schemas/types.yaml#/definitions/phandle-array > > No, ports is not phandle-array. ports is object, always. > >> + description: >> + Should contain a list of phandles pointing to display interface ports >> + of display controller devices. Display controller definitions as defined >> + in Documentation/devicetree/bindings/display/starfive/ >> + starfive,jh7110-dc8200.yaml > > Use standard graph ports, not some own, custom property. > > Anyway, entire binding should be dropped. You do not need it even. Hi Krzysztof: Virtual device is not suitable for bindings, matbe I need associate it with the real hardware. such as the top clocks & reset , irq , etc. Currently I configure them in another yaml file. Logically speaking, this is more suitable. Can adding the corresponding hardware description change its fate of being deleted? > >> + >> +required: >> + - compatible >> + - ports >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + display-subsystem { >> + compatible = "starfive,display-subsystem"; >> + ports = <&dc_out>; >> + }; >> diff --git a/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-dc8200.yaml b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-dc8200.yaml >> new file mode 100644 >> index 000000000..87051cddf >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-dc8200.yaml >> @@ -0,0 +1,109 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/display/starfive/starfive,jh7110-dc8200.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: StarFive display controller >> + >> +description: >> + The StarFive SoC uses the display controller based on Verisilicon IP >> + to transfer the image data from a video memory buffer to an external >> + LCD interface. >> + >> +maintainers: >> + - Keith Zhao >> + >> +properties: >> + compatible: >> + const: starfive,jh7110-dc8200 >> + >> + reg: >> + minItems: 1 >> + items: >> + - description: >> + host interface > > In one line. > - description: host interface > >> + - description: >> + display physical base address and length. > > Drop redundant parts: base address and length. Everything in reg for > MMIO would have it... > >> + >> + interrupts: >> + items: >> + - description: The interrupt will be generated when DC finish one frame >> + >> + clocks: >> + items: >> + - description: Clock for display system noc bus. >> + - description: Pixel clock for display channel 0. >> + - description: Pixel clock for display channel 1. >> + - description: Core clock for display controller. >> + - description: Clock for axi bus to access ddr. >> + - description: Clock for ahb bus to R/W the phy regs. >> + - description: External HDMI pixel clock. >> + - description: Parent clock for pixel clock >> + >> + clock-names: >> + items: >> + - const: noc_bus >> + - const: channel0 >> + - const: channel1 >> + - const: dc_core >> + - const: axi_core >> + - const: ahb >> + - const: hdmi_tx >> + - const: dc_parent >> + >> + resets: >> + items: >> + - description: Reset for axi bus. >> + - description: Reset for ahb bus. >> + - description: Core reset of display controller. >> + >> + reset-names: >> + items: >> + - const: axi >> + - const: ahb >> + - const: core >> + >> + port: >> + $ref: /schemas/graph.yaml#/properties/port >> + >> +required: >> + - compatible >> + - reg >> + - interrupts >> + - clocks >> + - clock-names >> + - resets >> + - reset-names >> + - port >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + dc8200: lcd-controller@29400000 { >> + compatible = "starfive,jh7110-dc8200"; >> + reg = <0x29400000 0x100>, <0x29400800 0x2000>; >> + interrupts = <95>; >> + clocks = <&syscrg 60>, >> + <&voutcrg 7>, >> + <&voutcrg 8>, >> + <&voutcrg 4>, >> + <&voutcrg 5>, >> + <&voutcrg 6>, >> + <&hdmitx0_pixelclk>, >> + <&voutcrg 1>; >> + clock-names = "noc_bus", "channel0", "channel1", >> + "dc_core", "axi_core", "ahb", >> + "hdmi_tx","dc_parent"; >> + resets = <&voutcrg 0>, <&voutcrg 1>, <&voutcrg 2>; >> + reset-names = "axi", "ahb", "core"; >> + dc_out: port { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + dc_out_hdmi: endpoint@0 { >> + reg = <0>; >> + remote-endpoint = <&hdmi_in_dc>; >> + }; >> + }; >> + }; >> diff --git a/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-inno-hdmi.yaml b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-inno-hdmi.yaml >> new file mode 100644 >> index 000000000..f6c473a10 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/display/starfive/starfive,jh7110-inno-hdmi.yaml >> @@ -0,0 +1,85 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/display/starfive/starfive,jh7110-inno-hdmi.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Starfive JH7110 HDMI controller >> + >> +description: >> + The StarFive JH7110 SoC uses the HDMI signal transmiter based on innosilicon IP >> + to generate HDMI signal from its input and transmit the signal to the screen. >> + >> +maintainers: >> + - Keith Zhao >> + >> +properties: >> + compatible: >> + const: "starfive,jh7110-inno-hdmi" > > It does not look like you tested the bindings, at least after quick > look. Please run `make dt_binding_check` (see > Documentation/devicetree/bindings/writing-schema.rst for instructions). > Maybe you need to update your dtschema and yamllint. > > Best regards, > Krzysztof >