Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1583135rwd; Sun, 14 May 2023 23:20:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sH2rcAZvSFfp16Xk/rHa2JdKQ9WhHSP/ii0CgM/iSrhlNS5jbzFs+SAQ6MxfI1bu9bvrg X-Received: by 2002:a05:6a20:8e1b:b0:100:640b:be3c with SMTP id y27-20020a056a208e1b00b00100640bbe3cmr35976065pzj.33.1684131627072; Sun, 14 May 2023 23:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684131627; cv=none; d=google.com; s=arc-20160816; b=vkkj1IPMBqtGjfpUbkmxPVTnSdhCnlJ8O9SsgXRxYX+7hFCLTbhLpzv4GM+/JQZ4Ju r4hWGPxVXRpazqG3aLLi0OrgayzyNVfj5WZPHr/KDSJBPx+JVgaSb7YZW/WGeQVgAdSX VlN0TSLR2DSdzaB3sW3qZvlx6Yo7z1EQhIbn6QucdUoZZ7VxoaMmCEg/WzJP2ofNS28m MPaAZp/LmXGH8G4uczRc/4JjyJYnd6ATdidylcI+hCO4p5NpEPEMFpeim7y5kzAv3s6m dItsA0dW3MdDNv5vRcGQl2VnaC8wQJPXn0pfWavi3sHYMIY0XP5z6rIywp1zp6wbO097 wnkg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EdoGL5c+TynhSxWSMv8UyHdglT4pqpHiJ4IPVScGgkc=; b=ColqS+Xu50QSjSiwuqQofXrzriEXlivtQlu81c7YLYOrwRzAScGLScxKNEEDHrDCz5 RZJoUNl4tQdiCyYAWpwzSVZlZEFhTB38yT6J6QxTGCxfHRI3DqAhMv9H/ZcTcCEBTRR2 hC8Q0Otmi0EsrHecOa+E7r1q4yo/1w1o+aAySlgamELu5gS1SK5Ll8S2FuvdHN5TDuJi izqZ2g9P72TjkkSggGVCqbj0uGbbtSNV2QL6SAAX7aZIsMczybn4gfvAj88LIKMhp3gx 9I0uV12MzHVaMSj+sh5a2zSBPiGg8AUnijfr9/QfnR8UBwxyCfkT6btENFg9r4SGRfg7 sZ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Gm9Mjpjf; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l65-20020a633e44000000b0052c6e736ad1si15551317pga.61.2023.05.14.23.20.12; Sun, 14 May 2023 23:20:27 -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=@quicinc.com header.s=qcppdkim1 header.b=Gm9Mjpjf; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239295AbjEOF6b (ORCPT + 99 others); Mon, 15 May 2023 01:58:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238619AbjEOF5s (ORCPT ); Mon, 15 May 2023 01:57:48 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01CA14C34; Sun, 14 May 2023 22:53:10 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34F4sCiS017139; Mon, 15 May 2023 05:52:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=EdoGL5c+TynhSxWSMv8UyHdglT4pqpHiJ4IPVScGgkc=; b=Gm9MjpjfHlY3H+e5uKhfBxhPADlPnjLl/cimWmV+hKIuv1X5haGNTxiJxK3tSIV0VtMm KRk+FcB5qg8L64SY3SKyJJjKASE1arzlk8BDoj2EgVyXhlv73LerfxfHJcl3hz2rRAq/ WLtDp4REwZ+LmEP1rNewr5xOaTbWOvhg5+xAwDdjlT0BZ2NL4wHnVhtX6ejOtF7d3YC+ z5IriQDk4qHukR5exsFYbEONwIZYJ6HeGnHdrWUUNyTeMPE1YLXjBSNBMRY6DkZEp0GK bWvTSEvWG6IxlIFyd+qIiKbKavO7TBSSgCJTjgKuAiL1kle0TwT2N5A1KmYmggFzw5oc fg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qj1jf2vnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 May 2023 05:52:51 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34F5qooE020097 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 May 2023 05:52:50 GMT Received: from [10.233.17.245] (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Sun, 14 May 2023 22:52:44 -0700 Message-ID: <44524ce9-b24e-7e2d-819c-232149e29f0e@quicinc.com> Date: Mon, 15 May 2023 13:52:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace To: Krzysztof Kozlowski , Suzuki K Poulose , Mike Leach , Leo Yan , Alexander Shishkin , Mathieu Poirier , Konrad Dybcio , "Rob Herring" , Krzysztof Kozlowski , Andy Gross , "Paul Walmsley" , Palmer Dabbelt , Albert Ou , Jonathan Corbet CC: Greg Kroah-Hartman , , , , , Tingwei Zhang , Jinlong Mao , "Yuanfang Zhang" , Tao Zhang , Trilok Soni , , "Bjorn Andersson" , References: <20230505092422.32217-1-quic_hazha@quicinc.com> <20230505092422.32217-3-quic_hazha@quicinc.com> <99343862-6b6a-30ba-40e5-7f984434b1dc@linaro.org> Content-Language: en-US From: Hao Zhang In-Reply-To: <99343862-6b6a-30ba-40e5-7f984434b1dc@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: fskWVE785-CXPTau5EtV_gWSbtYpjo_Y X-Proofpoint-ORIG-GUID: fskWVE785-CXPTau5EtV_gWSbtYpjo_Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-15_02,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 clxscore=1011 impostorscore=0 suspectscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305150051 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 5/7/2023 4:04 PM, Krzysztof Kozlowski wrote: > On 05/05/2023 11:24, Hao Zhang wrote: >> Add new coresight-dummy.yaml file describing the bindings required >> to define coresight dummy trace in the device trees. >> >> Signed-off-by: Hao Zhang >> --- >> .../bindings/arm/arm,coresight-dummy.yaml | 102 ++++++++++++++++++ >> 1 file changed, 102 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml >> >> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml >> new file mode 100644 >> index 000000000000..126518863eea >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml >> @@ -0,0 +1,102 @@ >> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/arm/arm,coresight-dummy.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: ARM Coresight Dummy component >> + >> +description: | >> + Coresight Dummy Trace Module is for the specific devices that kernel >> + don't have permission to access or configure, e.g., CoreSight TPDMs >> + on Qualcomm platforms. So there need driver to register dummy devices >> + as Coresight devices. It may also be used to define components that >> + may not have any programming interfaces (e.g, static links), so that >> + paths can be established in the driver. 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 in kernel >> + side for dummy sink and dummy source. >> + >> +maintainers: >> + - Mao Jinlong >> + - Tao Zhang >> + - Hao Zhang >> + - Yuanfang Zhang >> + >> +properties: >> + compatible: >> + items: > > You were asked to drop oneOf, not to replace with items. Drop items. > Drop oneOf. It's just enum. > Hi Krzysztof, I will drop items and update it in the next version. Thanks, Hao >> + - enum: >> + - arm,coresight-dummy-sink >> + - arm,coresight-dummy-source >> + >> + out-ports: >> + $ref: /schemas/graph.yaml#/properties/ports >> + >> + properties: >> + port: >> + description: Output connection from the source to Coresight >> + Trace bus. >> + $ref: /schemas/graph.yaml#/properties/port >> + >> + in-ports: >> + $ref: /schemas/graph.yaml#/properties/ports >> + >> + properties: >> + port: >> + description: Input connection from the Coresight Trace bus to >> + dummy sink, such as Embedded USB debugger(EUD). >> + $ref: /schemas/graph.yaml#/properties/port >> + >> +required: >> + - compatible >> + >> +if: >> + # If the compatible contains the below value >> + properties: >> + compatible: >> + contains: >> + const: arm,coresight-dummy-sink >> + >> +then: >> + required: >> + - in-ports >> + >> +else: >> + required: >> + - out-ports > > No improvements. Implement Rob's comments. > Hi Krzysztof, Rob, There are two comments from Rob: 1) I could imagine the OS wanting to know more information than just 'dummy'. Is data from an unknown source useful? Likewise, don't you want to know where you are sending data too? 2) This still allows the nodes when they don't make sense. I think this needs to be 2 schema files. The only common part is 'compatible' and that's not even shared. 1. The necessary information for coresight is connection(ports) between different components. However, this information is not very intuitive. There would be a generic change to support coresight name in the further. You can refer to the below link, this solution is still under discussion, I think it's also helpful for our query. https://lore.kernel.org/linux-arm-kernel/b7abee2a-99ca-26d6-5850-60ee19d9c0e9@quicinc.com/T/ 2. Dummy driver is very simple, the only goal of it is to build a path in kernel for subsystem, so we want to handle dummy source and sink in one generic driver. For one same driver, shall we split the schema file? Please feel free to comment. Thanks, Hao > Best regards, > Krzysztof >