Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1482619rwl; Fri, 31 Mar 2023 11:48:40 -0700 (PDT) X-Google-Smtp-Source: AKy350a1Q6s5rOPKwf+n9dW5VeoH96COuurbN9X72Tsr3/fWK4aB2JBVqyMEPI7Kaj5UhZfvsMvH X-Received: by 2002:a17:906:3f4f:b0:931:4285:ea1d with SMTP id f15-20020a1709063f4f00b009314285ea1dmr5557980ejj.5.1680288519896; Fri, 31 Mar 2023 11:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680288519; cv=none; d=google.com; s=arc-20160816; b=U8Ps1wP6PJd5cbzT4TsxXUKRl9UWiQ7hzYliVG3LL9iYdc3LcLb8HIQ9s+00Wua90w pl42jTZnw9DSn8Jh5M6oG9ZM0P4nzBNSd0rmS3mxVefhDLgOziF6LBCCgxItsQ8F2L5f B6fwWEB025/htbw9IJ/Y8yM2fKcR0jd20pa2mt40JZ4F9Mo6klAh0IFktHQbwxA5UHjJ otQJ6dU0ptVfzzDy2IjFmBHe5dcgXQR1sQsQn23dJ/weX4mWC0lC0dXzExXCmtgkd8/O OdaBoqnBLBaODaoB/L2QW9eHK6O5Se4iUEKC/jTEi2PbTyMu5+CyLrtm49vvkj2lHxh8 KKOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=KkseuN6EQE7Ox7VHfjMNPwBRFbWM28gSepVze7lckmI=; b=KOAFhZDLF+J4+9oaebhK1zJ5JfL9Vd+93La89D4inlE6n8rUVfWvRUxPywcy4TOFUg uBFKOs5xFPIPM56sqFax51GnmxErdcjDzABEU7issqDeiH4GdejUE+21QQaUKLiwnC02 w+sFRrEnV/BE2XUYm+UCMxCCsOe58fJxoGWNwRKEWdLcHrnZC9Y/rDcD8LMqzxwtNasL H7lp6FnzUxgdxY4XTgQf+KsT2fF+tU1L9sDVz9o34wnt+smpYoVfO7+SdpexsuZY5r33 79EXtcD93NfyIRsqlv0eDCAm+fzQPqP6P5jdJyWuFBQ2rXC3yzhdL6EzT7sGvSw6YyZH jbxw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a170906304100b00947a7291940si2353228ejd.618.2023.03.31.11.48.15; Fri, 31 Mar 2023 11:48:39 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233119AbjCaSrK (ORCPT + 99 others); Fri, 31 Mar 2023 14:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbjCaSrF (ORCPT ); Fri, 31 Mar 2023 14:47:05 -0400 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C35301D90C; Fri, 31 Mar 2023 11:47:02 -0700 (PDT) Received: by mail-ot1-f51.google.com with SMTP id ca2-20020a056830610200b006a11ab58c3fso11671783otb.4; Fri, 31 Mar 2023 11:47:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680288422; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=KkseuN6EQE7Ox7VHfjMNPwBRFbWM28gSepVze7lckmI=; b=KZflzkX6aA6x9JOG0gzo/g/muFMe+tXKQ262h/d1HmHwLHMQ4pFEmBXG7qT5/VzbWc Wc3ZsHR++a1UyXVd0PN9y/xi028hEkp3kzYPoThi2KBBnYlEuGlhtRTjvKU+epzV0yrW mMDaWR5p0DsgI0qew665uPe7iXWK4z1XuzMSIQvyDLLx7Us4v/yOhbZ+zzG2A6Ofacka FvDjUgLAfli9cJAS5jzjza/Lz6bJqbKlCxODUYRONQO10M/eJMuV4QtwloSUZG4AY3bm 5mxqGA8U1dJlmjZU7C2qrWoUqg6Isz4C7CgibRCUnJ/UmZ93aOnY8Ls/FPShsyf7qOtC iReA== X-Gm-Message-State: AAQBX9cO1FK/19F5+m0zUqny/mILrKNXONwStT82acU3+vm+lno7F+pv Sa43Ge6lcQP22eKF3pzqLg== X-Received: by 2002:a9d:77cd:0:b0:6a1:3101:8e2e with SMTP id w13-20020a9d77cd000000b006a131018e2emr8695069otl.29.1680288421913; Fri, 31 Mar 2023 11:47:01 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id j5-20020a9d7385000000b006a14579a8besm1441266otk.43.2023.03.31.11.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 11:47:01 -0700 (PDT) Received: (nullmailer pid 1933933 invoked by uid 1000); Fri, 31 Mar 2023 18:47:00 -0000 Date: Fri, 31 Mar 2023 13:47:00 -0500 From: Rob Herring To: Hao Zhang Cc: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , 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 Subject: Re: [PATCH v2 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema Message-ID: <20230331184700.GA1920623-robh@kernel.org> References: <20230324061608.33609-1-quic_hazha@quicinc.com> <20230324061608.33609-3-quic_hazha@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230324061608.33609-3-quic_hazha@quicinc.com> X-Spam-Status: No, score=0.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no 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 On Fri, Mar 24, 2023 at 02:16:07PM +0800, Hao Zhang wrote: > Add new coresight-dummy.yaml file describing the bindings required > to define coresight dummy trace in the device trees. The diff tells me all this. Please explain why this is needed and needs to be in DT here. > > 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. EUD? TPDM? I don't really love 'dummy' used here. Maybe the OS still wants/needs to know where the sink goes to even if not configurable. You *can* have multiple compatibles for a single generic driver if those compatibles might be useful some day. > + 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 > + required: > + - compatible > + > +properties: > + $nodename: > + pattern: "^dummy_.*(sink|source)_[0-9]+.*$" Don't use '_' in node names. Convention for multiple instances without 'reg' is '-[0-9]+' on the end, but you are allowing anything after that. > + compatible: > + items: > + - const: qcom,coresight-dummy > + > + qcom,dummy-sink: > + type: boolean > + description: > + Indicates that the type of this coresight node is dummy sink. > + > + qcom,dummy-source: Incorporate source or sink into the compatible strings. It's also somewhat redundant with 'in-ports' vs. 'out-ports'. > + type: boolean > + description: > + Indicates that the type of this coresight node is dummy source. > + > + out-ports: > + description: | Don't need '|' unless you need to preserve formatting. > + 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: | > + 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 > + > +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 { > + compatible = "qcom,coresight-dummy"; > + qcom,dummy-sink; > + > + in-ports { > + port { > + eud_in_replicator_swao: endpoint { > + remote-endpoint = > + <&replicator_swao_out_eud>; > + }; > + }; > + }; > + }; > + > + # minimum dummy source definition. dummy source connect to coresight funnel. > + - | > + 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>; > + }; > + }; > + }; > + }; > + > +... > -- > 2.17.1 >