Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4142366rwl; Tue, 28 Mar 2023 03:18:23 -0700 (PDT) X-Google-Smtp-Source: AKy350akGDt89VwcjQT6EeuhuuzC5wqAqhfhpZbdJyCfPtne5vDkiGAkVGFVjs2eWhPduQaJWx9V X-Received: by 2002:a17:906:3a45:b0:88a:cbd1:e663 with SMTP id a5-20020a1709063a4500b0088acbd1e663mr16353706ejf.6.1679998702934; Tue, 28 Mar 2023 03:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679998702; cv=none; d=google.com; s=arc-20160816; b=z5lu2FNDpAZm912gPuWw6pV1un0JrslV8lkeI7FLWW3CHKatVkzo/kYbgriJP+wJVn erXMl6QKrOLusV8rDQobWXQHNAJ+tKOalEbeGhH1Zv3q5/5ybxyqwvWvLkb4v7WaLtce zA+pb/LdvrlOKc8nkDiSoHvFhYPeTUb4/bcXQJLiMNMnYH4UeprvquiLrKZrIk/iIJAJ ACcZFCKGqVgw0i8AYHWDfCJBfh5XU1QFReclc3qOhL/EJgbG6i4erYkJ4UxM4kBXhhwx 5sXsPdkoDDJhT9qRxqZMWQ5wrUtIps80mlWfoC+gGwX+ev1QQAuugY5+daNMaWCWBNOA Bm5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ur6uKN85TYQWLvCxVJ2c6x3zzJWUhaZqRctpfFiWUIw=; b=CH8Mdo7ws/8Ca6XCMXPsRG/cMIa4ki0Le/iAP3LtIAQvACV/+RxgPsYE+/kI0WviiP uFPEcc4Dju1BPXLdzeMILqw35g6JxgZnJGJkmxXPcIzLz5kVczljT+Qq/MBqol25GRef CKfF5Ogyy9MnTXVpCfMBMx/GnCg3KqexijPJ9mYHZaToDqRsywl1gGBEWcz7a0SfDjE9 dRLR4JdSNfD+mfxJ/3rVrWJyEB4mizoHtjp29TXckh2dpfrs+OwCsOr61SO+4xjcfUzh GVjPp28ddBSh1KJftomPekvVgziiSAP2cfN7s/0RCbBRPLyeoga+DGd8AiHWLur0oGN0 MX/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jMVlny30; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h17-20020a17090634d100b008d89608d4a2si28653398ejb.204.2023.03.28.03.17.58; Tue, 28 Mar 2023 03:18:22 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=jMVlny30; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230452AbjC1KNT (ORCPT + 99 others); Tue, 28 Mar 2023 06:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229971AbjC1KNP (ORCPT ); Tue, 28 Mar 2023 06:13:15 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD1B46E97 for ; Tue, 28 Mar 2023 03:12:54 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id h14so6859580pgj.7 for ; Tue, 28 Mar 2023 03:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679998374; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ur6uKN85TYQWLvCxVJ2c6x3zzJWUhaZqRctpfFiWUIw=; b=jMVlny30ljZY/tcBflSVwe7xsuCk1ZeRa8ALY7gPYkfVb1fk3X/qS20c7qeNCwedo8 9fiMHOM1EmovhkAcm1B90c9lq3ijj7SE+2HntzSi8o7fNqelTbWHeSaKXhx8a3SbC23L B3nr5bKH0OlufphI3VzSGZqK/YQJuw504YuT0K4IneZbcXkUocTqRJciPmfe8ARDEzTR 8j2aN8JQNZd3qBNZlpSfeJeD3j+hgUIhSUk1UDjMHEyCLLCT64sYQZn2QzOayHSQfzYi vgzAQifxhoSr5QRskxbasBfNmluk69H7SVvuPqVVfDysWz66UMivERFjTNbT2pGqBSTg dqLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679998374; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ur6uKN85TYQWLvCxVJ2c6x3zzJWUhaZqRctpfFiWUIw=; b=jK4ggKMUsssSL+ar4ygndDg9S+t1UEbfkJP3A/ksK/QjYSRrbYZMWYN6cZpM8JjSD2 EdiCsFFlyKbhW7tJCcBRI2jZ9QailkrreH449WegFWU0JUK9NWndGJNxsdSbF+JQsR0b P+8a+cOnX1BwOVM99l8y7K+1j9UBk/JONY4m1HyrIohjkHGkXjxXChSj1/aHdyFpWu1L d2Rat8xCxDZnZnzqGwoy5+haV+kzA0nUs8SXUtpMhHfIFbf5iGLyVjp88WpGYZQ92cYd QgG/2frxuezvbFaWF3L74ySb6XuPqBlizATjwoHiF2P9gElXmrd8gkFt9tLSjNpD+nuv bV5A== X-Gm-Message-State: AAQBX9c68ZE39MGsAhmBiC8EMzJPyMqtEEZGL6CazyaH5n1rUjVF3jDb Dnbg+LnJr4vTWKfLbZSXu0hOiVC24b0fnY2hQKXiCw== X-Received: by 2002:a05:6a00:1827:b0:622:c6ad:b373 with SMTP id y39-20020a056a00182700b00622c6adb373mr8123366pfa.3.1679998373864; Tue, 28 Mar 2023 03:12:53 -0700 (PDT) MIME-Version: 1.0 References: <20230324061608.33609-1-quic_hazha@quicinc.com> <20230324061608.33609-3-quic_hazha@quicinc.com> In-Reply-To: From: Mike Leach Date: Tue, 28 Mar 2023 11:12:42 +0100 Message-ID: Subject: Re: [PATCH v2 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema To: Hao Zhang Cc: Krzysztof Kozlowski , Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Andy Gross , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jonathan Corbet , Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Tingwei Zhang , Jinlong Mao , Yuanfang Zhang , Tao Zhang , Trilok Soni , linux-arm-msm@vger.kernel.org, Bjorn Andersson , linux-doc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hi, As per my comments in the previous patch in this set.... On Mon, 27 Mar 2023 at 08:38, Hao Zhang wrote: > > Hi Krzysztof, > > On 3/25/2023 7:49 PM, Krzysztof Kozlowski wrote: > > On 24/03/2023 07:16, Hao Zhang wrote: > >> Add new coresight-dummy.yaml file describing the bindings required > >> to define coresight dummy trace in the device trees. > >> > > > > Subject: drop second/last, redundant "YAML schema". The "dt-bindings" > > prefix is already stating that these are bindings and all new must be DT > > schema. You cannot add anything else, so this is redundant. > > > I will take your advice to drop redundant part of title in the next > version of patch. > > > >> Signed-off-by: Hao Zhang > >> --- > >> .../bindings/arm/qcom,coresight-dummy.yaml | 118 ++++++++++++++++++ > >> 1 file changed, 118 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml > >> new file mode 100644 > >> index 000000000000..7b719b084d72 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml > >> @@ -0,0 +1,118 @@ > >> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause > >> +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/arm/qcom,coresight-dummy.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: QCOM Coresight Dummy component > >> + > >> +description: | > >> + The Coresight Dummy component is for the specific devices that HLOS don't have > >> + permission to access or configure. Such as Coresight sink EUD, some TPDMs etc. > >> + So there need driver to register dummy devices as Coresight devices. Provide > >> + Coresight API for dummy device operations, such as enabling and disabling > >> + dummy devices. Build the Coresight path for dummy sink or dummy source for > >> + debugging. > >> + > >> + The primary use case of the coresight dummy is to build path for dummy sink or > >> + dummy source. > >> + > >> +maintainers: > >> + - Mao Jinlong > >> + - Tao Zhang > >> + - Hao Zhang > >> + > >> +select: > >> + properties: > >> + compatible: > >> + contains: > >> + enum: > >> + - qcom,coresight-dummy Can we have coresight-dummy-source and coresight-dummy-sink? > >> + required: > >> + - compatible > > > > Why do you need the select? > > > This is a mistake, will remove it in the next version of patch. > >> + > >> +properties: > >> + $nodename: > >> + pattern: "^dummy_.*(sink|source)_[0-9]+.*$" > > > > We do not enforce node names in individual bindings. Why do you need it? > > Plus underscore is not even proper character... > > > I will remove this node. > > >> + compatible: > >> + items: > > > > Drop items. You have only one item, so no need for list. > > I will take your advice and update it in the next version of patch. > > >> + - const: qcom,coresight-dummy > >> + > >> + qcom,dummy-sink: > >> + type: boolean > >> + description: > >> + Indicates that the type of this coresight node is dummy sink. > > > > You just duplicated property name. Write something useful. > > > >> + > >> + qcom,dummy-source: > >> + type: boolean > >> + description: > >> + Indicates that the type of this coresight node is dummy source. > > > > You just duplicated property name. Write something useful. > > > These properties not required if the compatible name is more specific > Sure, I will add more details for it. > > >> + > >> + out-ports: > >> + description: | > > > > No need for | > > > >> + Output connections from the dummy source to Coresight Trace bus. > >> + $ref: /schemas/graph.yaml#/properties/ports > >> + > >> + properties: > >> + port: > >> + description: Output connection from the dummy source to Coresight > >> + Trace bus. > >> + $ref: /schemas/graph.yaml#/properties/port > >> + > >> + in-ports: > >> + description: | > > > > Ditto > > > I will remove it in the next version of patch. > > >> + Input connections from the CoreSight Trace bus to dummy sink. > >> + $ref: /schemas/graph.yaml#/properties/ports > >> + > >> + properties: > >> + port: > >> + description: Input connection from the Coresight Trace bus to > >> + dummy sink. > >> + $ref: /schemas/graph.yaml#/properties/port > >> + > >> +required: > >> + - compatible > >> + The binding should constrain out ports to dummy-source only, and in ports to dummy sink only. Regards Mike > >> +additionalProperties: false > >> + > >> +oneOf: > >> + - required: > >> + - qcom,dummy-sink > >> + - required: > >> + - qcom,dummy-source > >> + > >> +examples: > >> + # minimum dummy sink definition. dummy sink connect to coresight replicator. > >> + - | > >> + dummy_sink_1 { > > > > Node names should be generic, so "sink" > > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > > >> + compatible = "qcom,coresight-dummy"; > >> + qcom,dummy-sink; > >> + > >> + in-ports { > >> + port { > >> + eud_in_replicator_swao: endpoint { > >> + remote-endpoint = > >> + <&replicator_swao_out_eud>; > > > > Why line break after =? > > > > >> + }; > >> + }; > >> + }; > >> + }; > >> + > >> + # minimum dummy source definition. dummy source connect to coresight funnel. > > > > If you use sentences, then start with capital letter. > > > > I will update it according to your advice in the next version of patch. > > >> + - | > >> + dummy_source_1 { > >> + compatible = "qcom,coresight-dummy"; > >> + qcom,dummy-source; > >> + > >> + out-ports { > >> + port { > >> + dummy_riscv_out_funnel_swao: endpoint { > >> + remote-endpoint = > >> + <&funnel_swao_in_dummy_riscv>; > > > > Why line break? > > I copy it from device tree and keep the original format, will correct > the format in the next version of patch. > > Thanks, > Hao > > >> + }; > >> + }; > >> + }; > >> + }; > >> + > >> +... > > > > Best regards, > > Krzysztof > > -- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK