Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp56823rdb; Mon, 30 Oct 2023 23:44:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEySc2Riv2UWOlzPuwIkAjs3KtLUsG6/CNyLSpiK014WOQpDeIVTNBpfwyQMAJIXadL2kmR X-Received: by 2002:a05:6358:713:b0:168:f58d:7bff with SMTP id e19-20020a056358071300b00168f58d7bffmr13822270rwj.30.1698734679952; Mon, 30 Oct 2023 23:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698734679; cv=none; d=google.com; s=arc-20160816; b=uSQtdKPobHTV1YNolP4CVT1Mocnrze7vsob3XaWJ0gwG+bcvRDGwx9mN6ExyqMR8eo QwMvxt7QrjDc89ks1aYqCKq/fBUmPXjBmOe0h0oyRWYePspfEaxD6WOBy2+SXDorxNJM +cf7ZqWQYV5pQFFD+HLnTbbioxRpxnCj8vxk0j1VC+u4LLRxn4N1EUVzhvbniZ0bIJDO sMT6TnMWHlQnX4ZC864NKy3ROSX/nw4VXMAK8b1RfmdN3JJnLwjCuF9i6zP0A9A0xsz9 NiaWAXbMKK8KMjh92KvxTXiw71uae6K7bPapfPE4gyTaQrB+N7Nh9mb07TpZ/seJv1BO NGaw== 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=7jFveTWj7jSeTd53Jdrv/kWC+xzTymP6HQnAeMDpXjQ=; fh=tk2SG1nfDV9S60bvX13dM8ubBH4F3oPmQiIyu8wHys4=; b=DrawdLRrttPHelZtOZUssdSrB/qVN6aLr3I1FpkecAaVLpKYaqjGe6oN/VNUc8n/Ij vuaMDUHDNVkbYaqCeNdABFvrrhammWTO3gnW5hmCvlQV6HIWpLAeE153WYruADPYRNlE wfjVKyrDppI+CjZo8rGh3P+wyTk89yCNxBnPrpUnbBBQgam5qsdhuGTf2qQJqWKvZme8 yNopGMz1lJAF4XHJ8C4Z1ZPh1yvr7Cp1QXxKDoKiavt8Qo/StOJRN+JDNT3wtEWA9wt1 QyJMsdkShp0eg9a/aJrJAtL5hz3eFgIBJb9DptRzkdQD25cAjT69cqGJMIdrpW9Xy1Fd SIdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EoVLFynk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a21-20020a63e855000000b005a9fde46f98si615589pgk.52.2023.10.30.23.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 23:44:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EoVLFynk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4B3C0803BAA0; Mon, 30 Oct 2023 23:44:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236533AbjJaGo3 (ORCPT + 99 others); Tue, 31 Oct 2023 02:44:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236218AbjJaGo1 (ORCPT ); Tue, 31 Oct 2023 02:44:27 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B355BC0; Mon, 30 Oct 2023 23:44:24 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39V4kPix026272; Tue, 31 Oct 2023 06:44:18 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=7jFveTWj7jSeTd53Jdrv/kWC+xzTymP6HQnAeMDpXjQ=; b=EoVLFynkKlceX/B9V+tZ3Vhx9TKjmoVsnVWzIzNuR7AKs9tMQf95sQTVkr7OeMnjtROo 4xz8WhUNwg6bm2pCHS7EnNV0rGqjW5eKJvn2U8qqpHSktZQHWXYu6Hlf/CGBOF2dGFJP t6owKadQbUabA3pwvJz/uy+OCmNafTWp4gAWiwkKfOJoOoGi6Pop4eCyLxtr+ysnA2cS 5n1aSnjZVNqriYymd5wvOGA12YOV4/shCahU8tCNGSuLaHjAoXVK82M3kBTWs+szdfKp qeXr7NiRU4Gk52FU476c1rf91RH0coVf3zKewxF/Ccq7/4V3zwjPjf2EBvW9P0e7Aqga iA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u2b2qtbq7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Oct 2023 06:44:17 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39V6iGCB028264 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Oct 2023 06:44:16 GMT Received: from [10.214.225.95] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Mon, 30 Oct 2023 23:44:10 -0700 Message-ID: Date: Tue, 31 Oct 2023 12:14:07 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 7/9] arm64: dts: qcom: sc7280: Add CDSP node Content-Language: en-US To: Doug Anderson , Luca Weiss CC: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , , <~postmarketos/upstreaming@lists.sr.ht>, , Krzysztof Kozlowski , Rob Herring , =?UTF-8?Q?Matti_Lehtim=c3=a4ki?= , , , , References: <20231027-sc7280-remoteprocs-v1-0-05ce95d9315a@fairphone.com> <20231027-sc7280-remoteprocs-v1-7-05ce95d9315a@fairphone.com> <7934a36a-9438-719a-2ed0-4a78757b044b@quicinc.com> From: Mukesh Ojha 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 nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Rhgh_dG_VXDdBDu2mFsR1Lk5K0QmyRH3 X-Proofpoint-ORIG-GUID: Rhgh_dG_VXDdBDu2mFsR1Lk5K0QmyRH3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-30_13,2023-10-31_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 spamscore=0 clxscore=1015 phishscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 impostorscore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310310051 X-Spam-Status: No, score=-5.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 30 Oct 2023 23:44:37 -0700 (PDT) On 10/30/2023 8:33 PM, Doug Anderson wrote: > Hi, > > On Mon, Oct 30, 2023 at 7:43 AM Luca Weiss wrote: >> >> On Mon Oct 30, 2023 at 3:11 PM CET, Doug Anderson wrote: >>> Hi, >>> >>> On Mon, Oct 30, 2023 at 2:12 AM Luca Weiss wrote: >>>> >>>> On Mon Oct 30, 2023 at 10:04 AM CET, Mukesh Ojha wrote: >>>>> >>>>> >>>>> On 10/27/2023 7:50 PM, Luca Weiss wrote: >>>>>> Add the node for the ADSP found on the SC7280 SoC, using standard >>>>>> Qualcomm firmware. >>>>>> >>>>>> The memory region for sc7280-chrome-common.dtsi is taken from msm-5.4 >>>>>> yupik.dtsi since the other areas also seem to match that file there, >>>>>> though I cannot be sure there. >>>>>> >>>>>> Signed-off-by: Luca Weiss >>>>>> --- >>>>>> arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 5 + >>>>>> arch/arm64/boot/dts/qcom/sc7280.dtsi | 138 +++++++++++++++++++++ >>>>>> 2 files changed, 143 insertions(+) >>>>>> >>>>>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi >>>>>> index eb55616e0892..6e5a9d4c1fda 100644 >>>>>> --- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi >>>>>> +++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi >>>>>> @@ -29,6 +29,11 @@ adsp_mem: memory@86700000 { >>>>>> no-map; >>>>>> }; >>>>>> >>>>>> + cdsp_mem: memory@88f00000 { >>>>>> + reg = <0x0 0x88f00000 0x0 0x1e00000>; >>>>>> + no-map; >>>>>> + }; >>>>>> + >>>>> >>>>> Just a question, why to do it here, if chrome does not use this ? >>>> >>>> Other memory regions in sc7280.dtsi also get referenced but not actually >>>> defined in that file, like mpss_mem and wpss_mem. Alternatively we can >>>> also try and solve this differently, but then we should probably also >>>> adjust mpss and wpss to be consistent. >>>> >>>> Apart from either declaring cdsp_mem in sc7280.dtsi or >>>> "/delete-property/ memory-region;" for CDSP I don't really have better >>>> ideas though. >>>> >>>> I also imagine these ChromeOS devices will want to enable cdsp at some >>>> point but I don't know any plans there. >>> >>> Given that "remoteproc_cdsp" has status "disabled" in the dtsi, it >>> feels like the dtsi shouldn't be reserving memory. I guess maybe >>> memory regions can't be status "disabled"? >> >> Hi Doug, >> >> That's how it works in really any qcom dtsi though. I think in most/all >> cases normally the reserved-memory is already declared in the SoC dtsi >> file and also used with the memory-region property. >> >> I wouldn't be against adjusting sc7280.dtsi to match the way it's done >> in the other dtsi files though, so to have all the required labels >> already defined in the dtsi so it doesn't rely on these labels being >> defined in the device dts. >> >> In other words, currently if you include sc7280.dtsi and try to build, >> you first have to define the labels mpss_mem and wpss_mem (after this >> patch series also cdsp_mem and adsp_mem) for it to build. >> >> I'm quite neutral either way, let me know :) > > I haven't done a ton of thinking about this, so if I'm spouting > gibberish then feel free to ignore me. :-P It just feels weird that > when all the "dtsi" files are combined and you look at what you end up > on a sc7280 Chrome board that you'll be reserving 32MB of memory for a > device that's set (in the same device tree) to be "disabled", right? > ...the 32MB is completely wasted, I think. If we wanted to enable the > CDSP we'd have to modify the device tree anyway, so it seems like that > same modification would set the CDSP to "okay" and also reserve the > memory... > > In that vein, it seems like maybe you could move the "cdsp_mem" to the > SoC .dsti file with a status of "disabled". . I guess we don't do that > elsewhere, but maybe we should be? As far as I can tell without > testing it (just looking at fdt_scan_reserved_mem()) this should > work... What do you think about moving present reserve memory block from sc7280-chrome-common to sc7280.dtsi and delete the stuff which chrome does not need it sc7280-chrome-common ? -Mukesh > > -Doug