Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1237667rwd; Thu, 1 Jun 2023 12:25:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6+RFSoSLglqYeg5621DJT5fZJMO9jDNp15ilAzThfjPHvFw8tOpNojI49s2KWt3mPNBgxH X-Received: by 2002:a05:6358:24a3:b0:11c:7287:8add with SMTP id m35-20020a05635824a300b0011c72878addmr3761596rwc.20.1685647536495; Thu, 01 Jun 2023 12:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685647536; cv=none; d=google.com; s=arc-20160816; b=oEEGzqle2NZTlM4uCwV8ZUnZaQyK1zATzKpMgau2bPKSQoQxuCtqwaUrOZo+d9r77i 6HyzdGuhfGVwejmZEusGzno2+u0hiG6W0uyxCwpWUzvE/x3Ja7N/7E9JGVO3zys1E+hV GFgBuXIkJr+ZEKxBaps7mCCfkdYALFF2dhDfpOwC0Ylv00aeN+votmnOZ+Gb7adfXH8h jsEf5Fr5N35MGcBdUY9QzIcBt7DRxtpm+omLY8y3kxLxJQsPaU+iBnH6Exy9Nx0KUzoQ x0mOwZqOps0SxC9UGIeY0vtg/t1Tsml3o8MUaSS3CUexgcYqcW1yx4GNKz14x+18GUQ4 DU9w== 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:dkim-signature; bh=F0WJVLyRQu7X8JxkRniXUb+QdkBHIpcaPwMpaFf3WGM=; b=lizMnUoMJiIMyB2bAd6imku5z6xj0fneqyK8mvfL4T2mr/0wYoE8LDDdxAO2BXzHze Xv3wr3c2boxezrO2fEIwKWup6zTzRjDJFww6Kd/m5YU1CRZuSp2bQROvKDptxjAEyINt FJ5qY4IA36/GN9NC6526oWH2XD0pA8bE1BmQLvpg8FcuFQRr6mIpB8GWl2/W8hGtyxg/ sLLbBf1mo3gsI1nx5JXBu2x8Mnb/n9NZb4Dfu/DLwSGmuk/DdCL+vRe6fhS6YgwE/GvN RQ3M+qIfwz/gUcEcUFyQ/1mekZfF6PAnaawvK1BhPJm5JLVgUTawckhKylA/dow4S5+o n81w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Gj8dtd4R; 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 m14-20020a633f0e000000b0054294720d57si63415pga.617.2023.06.01.12.25.23; Thu, 01 Jun 2023 12:25:36 -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=Gj8dtd4R; 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 S233084AbjFASq3 (ORCPT + 99 others); Thu, 1 Jun 2023 14:46:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232323AbjFASq1 (ORCPT ); Thu, 1 Jun 2023 14:46:27 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DE12E4; Thu, 1 Jun 2023 11:46:26 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 351IV73l011329; Thu, 1 Jun 2023 18:46:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=F0WJVLyRQu7X8JxkRniXUb+QdkBHIpcaPwMpaFf3WGM=; b=Gj8dtd4RhryW2b/3x927fC5Wh6Nfz112H/MgwMldSobPBPjm4q0YCTj0BLpmQGoxEpC6 Qhz8ywlX0St9afdDJCLlKKtCHECEnklFPfObq8RTFNUeB867Ivd4ilSYWqicztIS/pGC 4wCI9sAa8qK3LtsOsReh66au8dmWfxhwcPHvyetofY4qSZcdbQckHf+cgLpzFaDzHNVB RdTOY2/N+b4Kq/rj7waXp97LQ5M1K8RC793uNy1lCkarB84aN06xU82wK9dusoGbeg7H IBOLqPoj9pc/r0f8nXWjZHSwFLqtVVBfXodaD5rFN3oUk3GmNoDp+BJqb+TfzHRimz+T Vg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qxqne9k9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Jun 2023 18:46:19 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 351IkIiG004585 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Jun 2023 18:46:18 GMT Received: from akhilpo-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 1 Jun 2023 11:46:15 -0700 Date: Fri, 2 Jun 2023 00:16:12 +0530 From: Akhil P Oommen To: Konrad Dybcio CC: Manivannan Sadhasivam , Bjorn Andersson , Bjorn Andersson , "Rob Clark" , Dmitry Baryshkov , Sean Paul , , , , , , Subject: Re: [PATCH v2 2/3] arm64: dts: qcom: sc8280xp: Add GPU related nodes Message-ID: References: <20230523011522.65351-1-quic_bjorande@quicinc.com> <20230523011522.65351-3-quic_bjorande@quicinc.com> <097944b0-fa7a-ad4d-1c3d-e74ab2b977de@linaro.org> <20230528170717.GG2814@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: sAa5Zpn6kBN-dzLFg1e8x18zqKnT8RSg X-Proofpoint-GUID: sAa5Zpn6kBN-dzLFg1e8x18zqKnT8RSg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-01_08,2023-05-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306010162 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 Mon, May 29, 2023 at 09:38:59AM +0200, Konrad Dybcio wrote: > > > > On 28.05.2023 19:07, Manivannan Sadhasivam wrote: > > On Tue, May 23, 2023 at 09:59:53AM +0200, Konrad Dybcio wrote: > >> > >> > >> On 23.05.2023 03:15, Bjorn Andersson wrote: > >>> From: Bjorn Andersson > >>> > >>> Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the > >>> SC8280XP. > >>> > >>> Signed-off-by: Bjorn Andersson > >>> Signed-off-by: Bjorn Andersson > >>> --- > >> It does not look like you tested the DTS against bindings. Please run > >> `make dtbs_check` (see > >> Documentation/devicetree/bindings/writing-schema.rst for instructions). > >> > >>> > >>> Changes since v1: > >>> - Dropped gmu_pdc_seq region from &gmu, as it shouldn't have been used. > >>> - Added missing compatible to &adreno_smmu. > >>> - Dropped aoss_qmp clock in &gmu and &adreno_smmu. > >>> > >>> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 169 +++++++++++++++++++++++++ > >>> 1 file changed, 169 insertions(+) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >>> index d2a2224d138a..329ec2119ecf 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >>> @@ -6,6 +6,7 @@ > >>> > >>> #include > >>> #include > >>> +#include > >>> #include > >>> #include > >>> #include > >>> @@ -2331,6 +2332,174 @@ tcsr: syscon@1fc0000 { > >>> reg = <0x0 0x01fc0000 0x0 0x30000>; > >>> }; > >>> > >>> + gpu: gpu@3d00000 { > >>> + compatible = "qcom,adreno-690.0", "qcom,adreno"; > >>> + > >>> + reg = <0 0x03d00000 0 0x40000>, > >>> + <0 0x03d9e000 0 0x1000>, > >>> + <0 0x03d61000 0 0x800>; > >>> + reg-names = "kgsl_3d0_reg_memory", > >>> + "cx_mem", > >>> + "cx_dbgc"; > >>> + interrupts = ; > >>> + iommus = <&adreno_smmu 0 0xc00>, <&adreno_smmu 1 0xc00>; > >>> + operating-points-v2 = <&gpu_opp_table>; > >>> + > >>> + qcom,gmu = <&gmu>; > >>> + interconnects = <&gem_noc MASTER_GFX3D 0 &mc_virt SLAVE_EBI1 0>; > >>> + interconnect-names = "gfx-mem"; > >>> + #cooling-cells = <2>; > >>> + > >>> + status = "disabled"; > >>> + > >>> + gpu_opp_table: opp-table { > >>> + compatible = "operating-points-v2"; > >>> + > >>> + opp-270000000 { > >>> + opp-hz = /bits/ 64 <270000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <451000>; > >>> + }; > >>> + > >>> + opp-410000000 { > >>> + opp-hz = /bits/ 64 <410000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-500000000 { > >>> + opp-hz = /bits/ 64 <500000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-547000000 { > >>> + opp-hz = /bits/ 64 <547000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-606000000 { > >>> + opp-hz = /bits/ 64 <606000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + > >>> + opp-640000000 { > >>> + opp-hz = /bits/ 64 <640000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + > >>> + opp-690000000 { > >>> + opp-hz = /bits/ 64 <690000000>; > >>> + opp-level = ; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + }; > >>> + }; > >>> + > >>> + gmu: gmu@3d6a000 { > >>> + compatible = "qcom,adreno-gmu-690.0", "qcom,adreno-gmu"; > >>> + reg = <0 0x03d6a000 0 0x34000>, > >>> + <0 0x03de0000 0 0x10000>, > >>> + <0 0x0b290000 0 0x10000>; > >>> + reg-names = "gmu", "rscc", "gmu_pdc"; > >>> + interrupts = , > >>> + ; > >>> + interrupt-names = "hfi", "gmu"; > >>> + clocks = <&gpucc GPU_CC_CX_GMU_CLK>, > >>> + <&gpucc GPU_CC_CXO_CLK>, > >>> + <&gcc GCC_DDRSS_GPU_AXI_CLK>, > >>> + <&gcc GCC_GPU_MEMNOC_GFX_CLK>, > >>> + <&gpucc GPU_CC_AHB_CLK>, > >>> + <&gpucc GPU_CC_HUB_CX_INT_CLK>, > >>> + <&gpucc GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK>; > >>> + clock-names = "gmu", > >>> + "cxo", > >>> + "axi", > >>> + "memnoc", > >>> + "ahb", > >>> + "hub", > >>> + "smmu_vote"; > >>> + power-domains = <&gpucc GPU_CC_CX_GDSC>, > >>> + <&gpucc GPU_CC_GX_GDSC>; > >>> + power-domain-names = "cx", > >>> + "gx"; > >>> + iommus = <&adreno_smmu 5 0xc00>; > >>> + operating-points-v2 = <&gmu_opp_table>; > >>> + > >>> + status = "disabled"; > >> I've recently discovered that - and I am not 100% sure - all GMUs are > >> cache-coherent. Could you please ask somebody at qc about this? If supported at hw and necessary pte attributes are present, all GPU transactions are cache-coherent. Since gmu is part of GPU, it is a fairly good assumption that it would be too. But current set of GMUs doesn't do enough frequent chatter with CPU to get any meaningful benefit with coherency. So I feel it is better to leave it similar to downstream. -Akhil > >> > > > > AFAIU, GMU's job is controlling the voltage and clock to the GPU. > Not just that, it's only the limited functionality we've implemented > upstream so far. > > It doesn't do > > any data transactions on its own. > Of course it does. AP communication is done through MMIO writes and > the GMU talks to RPMh via the GPU RSC directly. Apart from that, some > of the GPU registers (that nota bene don't have anything to do with > the GMU M3 core itself) lay within the GMU address space. > > > Bjorn noticed that this coherent mask setting downstream may be > a bluff, but I guess we could poke Qualcomm about whether it's > cache-coherent (Akhil, could you say anything about that?). > > Konrad > > So cache-coherent doesn't make sense to me. > > > > - Mani > > > >>> + > >>> + gmu_opp_table: opp-table { > >>> + compatible = "operating-points-v2"; > >>> + > >>> + opp-200000000 { > >>> + opp-hz = /bits/ 64 <200000000>; > >>> + opp-level = ; > >>> + }; > >> Missing 500MHz + RPMH_REGULATOR_LEVEL_SVS > >> > >> (that may be used in the future for hw scheduling) > >>> + }; > >>> + }; > >>> + > >>> + gpucc: clock-controller@3d90000 { > >>> + compatible = "qcom,sc8280xp-gpucc"; > >>> + reg = <0 0x03d90000 0 0x9000>; > >>> + clocks = <&rpmhcc RPMH_CXO_CLK>, > >>> + <&gcc GCC_GPU_GPLL0_CLK_SRC>, > >>> + <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>; > >>> + clock-names = "bi_tcxo", > >>> + "gcc_gpu_gpll0_clk_src", > >>> + "gcc_gpu_gpll0_div_clk_src"; > >> FWIW the driver doesn't use clock-names, but the binding defines it, > >> so I suppose it's fine > >> > >>> + > >>> + power-domains = <&rpmhpd SC8280XP_GFX>; > >>> + #clock-cells = <1>; > >>> + #reset-cells = <1>; > >>> + #power-domain-cells = <1>; > >>> + > >>> + status = "disabled"; > >>> + }; > >>> + > >>> + adreno_smmu: iommu@3da0000 { > >>> + compatible = "qcom,sc8280xp-smmu-500", "qcom,adreno-smmu", > >>> + "qcom,smmu-500", "arm,mmu-500"; > >>> + reg = <0 0x03da0000 0 0x20000>; > >>> + #iommu-cells = <2>; > >>> + #global-interrupts = <2>; > >>> + interrupts = , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + , > >>> + ; > >>> + > >>> + clocks = <&gcc GCC_GPU_MEMNOC_GFX_CLK>, > >>> + <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>, > >>> + <&gpucc GPU_CC_AHB_CLK>, > >>> + <&gpucc GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK>, > >>> + <&gpucc GPU_CC_CX_GMU_CLK>, > >>> + <&gpucc GPU_CC_HUB_CX_INT_CLK>, > >>> + <&gpucc GPU_CC_HUB_AON_CLK>; > >>> + clock-names = "gcc_gpu_memnoc_gfx_clk", > >>> + "gcc_gpu_snoc_dvm_gfx_clk", > >>> + "gpu_cc_ahb_clk", > >>> + "gpu_cc_hlos1_vote_gpu_smmu_clk", > >>> + "gpu_cc_cx_gmu_clk", > >>> + "gpu_cc_hub_cx_int_clk", > >>> + "gpu_cc_hub_aon_clk"; > >>> + > >>> + power-domains = <&gpucc GPU_CC_CX_GDSC>; > >>> + > >>> + status = "disabled"; > >> This one should be dma-coherent (per downstream, plus 8350's mmu is for sure) > >> > >> Konrad > >>> + }; > >>> + > >>> usb_0_hsphy: phy@88e5000 { > >>> compatible = "qcom,sc8280xp-usb-hs-phy", > >>> "qcom,usb-snps-hs-5nm-phy"; > >