Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7198177rwp; Tue, 18 Jul 2023 11:28:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZcFjmQx6JXgOf7eJCbfDmV0XNBrcWPUwE5YRrMaLJrd1rF7/zUtme/APbnFRiCJCChwKk X-Received: by 2002:a17:907:c29:b0:991:b2a2:e424 with SMTP id ga41-20020a1709070c2900b00991b2a2e424mr611146ejc.76.1689704895196; Tue, 18 Jul 2023 11:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689704895; cv=none; d=google.com; s=arc-20160816; b=Xf1mkgfmwhZx3Bc3jODxxVLOzm01/sdE52OlafzUJIimfUhShaR28gqu/Gq6UTjKs+ 4jETUuBpPlDiVaOi1pw5T2YjgNf+KNBUnzzEa1If5gJuqE5Mx1jqMknEsc0XW/nF2v67 6ef/oLXortf3ovqJuXQ8yc3emX/YfljH77frI61gDEQhi81wz9g+pxpxwJF/lJTBUoHZ 6+oFRh+9TOkoWmwuXOMJOgEkqhGs51lmtRwb2vrqDRyZjy6mqaehQMUqiwYmi+Y9oNC+ neCLyyoi+pJTmMqiYDZIe0gPi12ejoDNo4z7Q+gNdjWlVkVx1FllDYGnp6REvhG3LptU nT4Q== 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=l4pXiPpeYymHMYShWK/s3/TFJSTWiPRwLM8s3s2kGNc=; fh=ECCAaOIeYwlfH/bgkOTGRVTqFDIUTBbwG6yhCUBFDPc=; b=KeMNc363e2fBlbBYDYRZpJ3nFxC0p4a8NcQcvkZLg9FNQf3v2dwdTvwUhcV5gA254L yFaQ9FVcv+AbCrCvZ/waz0wruPD27JXL2zKrUUNP8A7mREkdslYJSddd6v+aVfFlF7RS RVC1JzSEjOHEa2HgsNpU8+HF3I9s7q9nRX/IaASMKbdK/4rbj5RVoMJSqC2Go54M9eDX Daq9DfIblWtRorKid8/dDuYPIgyQv03htCcze6Q6QPQqiOR7rBLnnb3vEiGcat0ByalR p22dlwJGvIibtKNiRiMISjZHa3bSlJKrKznyo299xPZtdUAsuR5MJnzZgR4tXiEBpN7j +Qsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NF16cfC2; 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 lc24-20020a170906f91800b00992437c5881si1732252ejb.198.2023.07.18.11.27.50; Tue, 18 Jul 2023 11:28:15 -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=NF16cfC2; 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 S229570AbjGRSSy (ORCPT + 99 others); Tue, 18 Jul 2023 14:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjGRSSw (ORCPT ); Tue, 18 Jul 2023 14:18:52 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56144F7; Tue, 18 Jul 2023 11:18:51 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36IGmHg7009181; Tue, 18 Jul 2023 18:18:33 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=l4pXiPpeYymHMYShWK/s3/TFJSTWiPRwLM8s3s2kGNc=; b=NF16cfC2dAJyLyz8U0D28eSR70AFuZkQnii/q64wm8vweI8uwRdHNuvb71Vzy/rNPtxv HfDLWh25+vD/twWjbT8/VbF0YRuJO2S0XvepDJJjrJEaDTco+2T09bA9NBRU/rVg6NlQ JXYZpoGfDQbZsJsZ2RQwXJbs+FdNSXMKeqmPSwWz0z0OTxBJTOnWigSjx2+RkaHnQpzL 1cCqgiXNd1v5hDVevQfqheQhlJAk+5FNVT/n7jy8UjGhoUjaCG7gYvKKSSBANFpKvHPr Eqy32wwLPaajgiLJrcTYPL3WEDrHUKOYf3vAI9eAcxpdz+rSCeB8W2JgAqmMgjb1Mdcv Cw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rwqqg9ajm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 18:18:33 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36IIIW8c002707 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 18:18:32 GMT Received: from [10.110.49.60] (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.1118.30; Tue, 18 Jul 2023 11:18:32 -0700 Message-ID: <4753a76c-d0ee-4371-9f70-ffc57d39ff1a@quicinc.com> Date: Tue, 18 Jul 2023 11:18:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 1/2] dt-bindings: arm: Add qcom specific hvc transport for SCMI To: Krzysztof Kozlowski , CC: , , , , , , , , , , References: <20230718160833.36397-1-quic_nkela@quicinc.com> <20230718160833.36397-2-quic_nkela@quicinc.com> Content-Language: en-US From: Nikunj Kela In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit 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: f1KiiObHY6D0zZ2mdTo3imAwRGXdePbr X-Proofpoint-ORIG-GUID: f1KiiObHY6D0zZ2mdTo3imAwRGXdePbr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-18_13,2023-07-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307180167 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 7/18/2023 11:12 AM, Krzysztof Kozlowski wrote: > On 18/07/2023 18:08, Nikunj Kela wrote: >> Introduce compatible "qcom,scmi-hvc-shmem" for SCMI >> transport channel for Qualcomm virtual platforms. >> The compatible mandates a shared memory channel. >> >> Signed-off-by: Nikunj Kela >> --- >> .../bindings/firmware/arm,scmi.yaml | 69 +++++++++++++++++++ >> 1 file changed, 69 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml >> index b138f3d23df8..605b1e997a85 100644 >> --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml >> +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml >> @@ -45,6 +45,9 @@ properties: >> - description: SCMI compliant firmware with OP-TEE transport >> items: >> - const: linaro,scmi-optee >> + - description: SCMI compliant firmware with Qualcomm hvc/shmem transport >> + items: >> + - const: qcom,scmi-hvc-shmem >> >> interrupts: >> description: >> @@ -321,6 +324,16 @@ else: >> required: >> - linaro,optee-channel-id >> >> + else: >> + if: >> + properties: >> + compatible: >> + contains: >> + const: qcom,scmi-hvc-shmem >> + then: >> + required: >> + - shmem > Unfortunately this pattern if-else-if-else-if-else does not scale well. > Please convert all entries first to allOf:if:then,if:then,if:then (in > new patch), and then add new if:then: Ok! > >> + >> examples: >> - | >> firmware { >> @@ -444,6 +457,62 @@ examples: >> }; >> }; >> >> + - | >> + firmware { >> + scmi_dpu { > No underscores in node names. > > Node names should be generic. See also an explanation and list of > examples (not exhaustive) in DT specification: > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation ACK! > > > >> + compatible = "qcom,scmi-hvc-shmem"; >> + shmem = <&shmem_dpu>; >> + >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + scmi_pd_dpu: protocol@11 { >> + reg = <0x11>; >> + #power-domain-cells = <1>; >> + }; >> + }; >> + > Add only one example, but then only if it differs significantly. I see > no differences - except compatible - so maybe no point of examples. Other than the compatible, it also doesn't require smc-id, we read it from shmem region.  Will remove examples. > > >> + scmi_gpu { >> + compatible = "qcom,scmi-hvc-shmem"; >> + shmem = <&shmem_gpu>; > This example for sure is not needed - you duplicate above. Right, will remove this example. > >> + >> + interrupts = ; >> + interrupt-names = "a2p"; >> + >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + scmi_pd_gpu: protocol@11 { >> + reg = <0x11>; >> + #power-domain-cells = <1>; >> + }; >> + }; >> + }; >> + >> + soc { >> + #address-cells = <1>; >> + #size-cells = <1>; >> + >> + sram@95c00000 { >> + compatible = "mmio-sram"; >> + reg = <0x95c00000 0x10000>; >> + >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges; >> + >> + shmem_dpu: scmi-sram-dpu@95c00000 { >> + compatible = "arm,scmi-shmem"; >> + reg = <0x95c00000 0x3f0>; >> + }; > How does these differ from existing example? It doesn't. Will remove the example as suggested. Thanks > > Best regards, > Krzysztof >