Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1312701rwd; Tue, 16 May 2023 15:24:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DD5emt/9Fuh/7/tWMWh1juI4lxxrGd8wnb7MwzcATtU1PB0crSb+TL4bmEIRZCykGbllB X-Received: by 2002:a05:6a20:9153:b0:105:dafa:fec2 with SMTP id x19-20020a056a20915300b00105dafafec2mr11007260pzc.53.1684275882626; Tue, 16 May 2023 15:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684275882; cv=none; d=google.com; s=arc-20160816; b=sPNMqlz6rWy3qL7WD9HVgBn8etfWB8H97PsmkAdYGThMh4uDJQtQcGcu/wLsSKzwJT B8tLJI55ZfcQH0XTrDiB//EfCgv4zxvZQzQZT9v+cncZTXN/6ErVnBjoDp0fUxo8lQpb u71Cx8krS0HI+Inm7dPJkjxdKy0gowPDDazcIeui7/WydrCZCSlPzVAXyZ8Sif127+I7 3QohtZHMcA8RvNBuKNDqIv9Nty80Akk0JVRxc3FbiD57h1+Vrupc8aiC6hLfwXAB4I0E 8YHJaln+q50oiry5WIVTpTlE4CAkYMhxaqKOFefkUyk5ahmX/ngosnyJfHYk0SnRTTnq 2Axg== 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:dkim-signature; bh=6WBOdrp4MoRntPk4JTak4XppU+MY2+sHrZfFMGMjML8=; b=xuB8g62XhfRud1AtdLkXunfetkcCmn5obVh37fUHg/oLIOBECBdC9WV621qC946/aj Le43zAiSTTFzqBmr+uu1H2F3WEE7WC9Ht2b/8qcjWGzb0SmM/YMZSUD8tMjbe21C8/je CeOkrejGIDIy7OmWGsdfU2cHa0wqx8d0VG8GsYnaOkKY/Iowmj/ZOFLvmI0kCxVNxqz/ 15K91ykY1XKLdm4e7hyyVhGOxq3I8y9IP5vk7zITjCZR6iGQPhj9MTVraHnYgCN/v2vj M2ZLKRHYhGls28Blo74NsHuuEcdJM8LhcOmFeITpaaaZHU9xxq679hYp7x2cZYgbhn+V H0ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DMf+dTPg; 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 r71-20020a632b4a000000b0052cc0f960ebsi18770075pgr.714.2023.05.16.15.24.27; Tue, 16 May 2023 15:24:42 -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=DMf+dTPg; 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 S229974AbjEPV7l (ORCPT + 99 others); Tue, 16 May 2023 17:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjEPV7j (ORCPT ); Tue, 16 May 2023 17:59:39 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F51810EC; Tue, 16 May 2023 14:59:38 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34GKRlO9013008; Tue, 16 May 2023 21:59:24 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=6WBOdrp4MoRntPk4JTak4XppU+MY2+sHrZfFMGMjML8=; b=DMf+dTPgQgntwEMgqi6ZG+LAhviXPqdFnX6AnIf3JQ5vJ6gWdm34k4EmRFZgL7DkXnLG aHVU06r3oI/jq/YHbe6N/28+yDgALEibdjQXmh7wFAaLiii8fce4CjKSqjuAxdn0a67I EsuvAPvdXkWreMjBBb5/oI3dZeXcmPlVFxCgtl5KZFF6TksPi19qTzNo1Q1Vdw5bBcom gjYaPVDehvbETKzIAcck0PO29ZDCVKBvkkiVUDqKmdVae5HZVhbZFM94iHlfms8Y0lTg 0wlQIrAEGPVX9fm6xEUO6c9JE6+50ZTKBN5tmEzHytsmy9VUjFAoyGjcf75B2t+1pSxG 4A== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qm36n21s9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 21:58:53 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34GLwqZF022335 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 21:58:52 GMT Received: from [10.110.39.6] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 16 May 2023 14:58:51 -0700 Message-ID: Date: Tue, 16 May 2023 14:58:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM Content-Language: en-US To: Dmitry Baryshkov , Arnd Bergmann CC: Souradeep Chowdhury , Andy Gross , Konrad Dybcio , "Krzysztof Kozlowski" , Bjorn Andersson , Rob Herring , , , , , Sibi Sankar , Rajendra Nayak References: <343182748e12b6a4ac57d336405c50e36fc5520c.1683628357.git.quic_schowdhu@quicinc.com> <7d397e67-5d56-4975-98af-1ac9746c07f4@app.fastmail.com> From: Trilok Soni In-Reply-To: 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 nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 06qlANEolpxD5bkS0wOaTIjr0rpYHE67 X-Proofpoint-ORIG-GUID: 06qlANEolpxD5bkS0wOaTIjr0rpYHE67 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-16_12,2023-05-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=999 spamscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 phishscore=0 bulkscore=0 impostorscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305160186 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, 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 5/16/2023 12:17 PM, Dmitry Baryshkov wrote: > On Tue, 16 May 2023 at 11:16, Arnd Bergmann wrote: >> >> On Tue, May 9, 2023, at 13:35, Dmitry Baryshkov wrote: >>> On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury >>> wrote: >>>> >>>> All Qualcomm bootloaders log useful timestamp information related >>>> to bootloader stats in the IMEM region. Add the child node within >>>> IMEM for the boot stat region containing register address and >>>> compatible string. >>> >>> I might have a minor vote here. Is there any reason why you have to >>> instantiate the device from DT? >>> It looks like a software interface. Ideally software should not be >>> described in DT (e.g. this can be instantiated from imem >>> driver-to-be). >> >> There is nothing wrong with describing firmware in DT, if that >> firmware is part of the platform, we do that for a lot of >> other bits of firmware. >> >> However, in this specific case, many things are wrong with the >> implementation, and neither the DT binding nor the driver >> makes sense to me in its current state. >> >>>> + "^stats@[0-9a-f]+$": >>>> + type: object >>>> + description: >>>> + Imem region dedicated for storing timestamps related >>>> + information regarding bootstats. >>>> + >>>> + additionalProperties: false >>>> + >>>> + properties: >>>> + compatible: >>>> + items: >>>> + - enum: >>>> + - qcom,sm8450-bootstats >>>> + - const: qcom,imem-bootstats >>>> + >>>> + reg: >>>> + maxItems: 1 >> >> If I understand this right, this "qcom,imem-bootstats" >> device serves as an indirection to store additional >> properties of the system in a memory area, but the description >> of that area is more complex than its contents, which >> makes no sense to me. >> >> Just create a binding for a firmware node in the devicetree >> itself, and put the values in properties of that. The first >> stage firmware can still use the same interface, but the >> actual loader that assembles the DT can get it out of that >> and store it in the properties. With that done, there is also >> no need for a kernel driver, as userspace can just get the >> values from /sys/firmware/devicetree/ directly. > > This sounds good, except the always-present issue of the devices which > have already been released. Usually we can not expect a bootloader > update for these devices. Valid point. I don't expect current SOCs supported at upstream to update with the newer bootloader having this feature done through bootloader. ---Trilok Soni