Message ID | 20230523011522.65351-3-quic_bjorande@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1824267vqo; Mon, 22 May 2023 18:22:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kNAdEZoxPfa1puf+oF4EY12fT9dJxRTW0DRlS5ctWrzZnZfsnHHIDpdkAnN/v4EiPK6J+ X-Received: by 2002:a05:6a21:339f:b0:10b:3b4d:8c16 with SMTP id yy31-20020a056a21339f00b0010b3b4d8c16mr7217986pzb.38.1684804935541; Mon, 22 May 2023 18:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684804935; cv=none; d=google.com; s=arc-20160816; b=BqH/Oq8FTVAkd8wYks0bbuiKHabjWGyv/vvRrEddufRgWYfVZed1t+OA0miwY0zPQS GXHDZJDMZAOnbSjbLgGXlBxvqJ0PN/GLqPlagmxGMA2DU7ZQ2oG8Ho4iRm6CI+GTZ5Gy 1Eits6oLqGdoEiIb1iyZxIC5Fh25ZQmWJ2vVCbAUk1SfYVAxASiCoZCEi6B5v08KKbWP JYNR7mHuKr2537uUjEB1BdWc32ONCfkWPjLgxbU11E1Uak0hn6wPMf7BTaY8goSZCkHl ZFvZBm6ECFP7b1TsCeh4WBnOqKIwmPVqlr75CsDrXzTa4FMACdr7U4p3hkSrv9P1s/Sq rlUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7mTm0CsXSFTQMSfRmCh5x73gvFAtJkR8I++fxoyfoGA=; b=PkwNRn9zgMCP6FuioNfpSYe28ffFoY/QKg4B8Hc526np/wD3G6N4JgwscsL63TesTC TvIj1zNDsJtR13sO3Yt1RcYhwCnmF9m2umjFBlHRrw+6XWZ7DhpZIBbIfJ5DY7a+458+ BvHuY9+lFcTc8yRsFtDJc3dXmD7/mDHtyo+pW/rmtXtrdqPILr++s9qne6A4Gy7AIvm5 P2kEvoWUhk9CPm2oJI2AYxsPc1Lm4aBXtG9fJHWHbRaSsibblWyt7WEit1omeadeGvGQ 4Vel/6b4BKKv6wg/lWDTC6wOfzBpm7N8ByKyy7dSv4HBzFZtgLTimyMrygYgQ1jOnqJP c3aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Kq49kwiY; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a63b608000000b0052c844f06c1si1198309pgf.460.2023.05.22.18.22.01; Mon, 22 May 2023 18:22: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=Kq49kwiY; 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 S234549AbjEWBPj (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Mon, 22 May 2023 21:15:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjEWBPf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 22 May 2023 21:15:35 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7D6B93; Mon, 22 May 2023 18:15:33 -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 34N1FTFI015477; Tue, 23 May 2023 01:15:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=7mTm0CsXSFTQMSfRmCh5x73gvFAtJkR8I++fxoyfoGA=; b=Kq49kwiY0DrS1OS4On49oOUwJ+jg68BBz24aD15CdcfBGa1/5g5ljuLQjKgphih4BJQp eeFiGsJU7H2PZmcG7zMfrkn3LunxQhhigxDr4kymJD8ytfdwZPmMIapO7Wmfzi0UzRrc 3Q8OJ46OMAyZTcwLe88Y+tx49QR3PPB14O1pilVYb0OvItEnr/x36BXm0v1lNmSoUWKg aTf2pktbCUUkcMiL2E5Lj+aZ/h02+0nI2dxR/Fr6jwDmVwKQbvx2StAmvVH1CJecGmpP YqcQ1aBMSo/CTXhOHPDwfrsmeaIa3WgmJ1zROXDKM+yFvKOB9lsBxlyGpCrIwXUuSjdy fA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qr6h0smcd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 01:15:29 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34N1FSvB016159 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 01:15:28 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) 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; Mon, 22 May 2023 18:15:28 -0700 From: Bjorn Andersson <quic_bjorande@quicinc.com> To: Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org> CC: Rob Clark <robdclark@gmail.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, Akhil P Oommen <quic_akhilpo@quicinc.com>, <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>, <freedreno@lists.freedesktop.org>, <johan@kernel.org>, <mani@kernel.org> Subject: [PATCH v2 2/3] arm64: dts: qcom: sc8280xp: Add GPU related nodes Date: Mon, 22 May 2023 18:15:21 -0700 Message-ID: <20230523011522.65351-3-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523011522.65351-1-quic_bjorande@quicinc.com> References: <20230523011522.65351-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) 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: ODOSsaG41fwu7Qjb0YZb6RVaSvtrT9D5 X-Proofpoint-ORIG-GUID: ODOSsaG41fwu7Qjb0YZb6RVaSvtrT9D5 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-05-22_18,2023-05-22_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 spamscore=0 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305230008 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,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766646020132045508?= X-GMAIL-MSGID: =?utf-8?q?1766646020132045508?= |
Series |
drm/msm/adreno: GPU support on SC8280XP
|
|
Commit Message
Bjorn Andersson
May 23, 2023, 1:15 a.m. UTC
From: Bjorn Andersson <bjorn.andersson@linaro.org> Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the SC8280XP. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> --- 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(+)
Comments
On 23.05.2023 03:15, Bjorn Andersson wrote: > From: Bjorn Andersson <bjorn.andersson@linaro.org> > > Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the > SC8280XP. > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > --- 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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> > #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> > +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> > #include <dt-bindings/clock/qcom,rpmh.h> > #include <dt-bindings/interconnect/qcom,osm-l3.h> > #include <dt-bindings/interconnect/qcom,sc8280xp.h> > @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; > + 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 = <RPMH_REGULATOR_LEVEL_LOW_SVS>; > + opp-peak-kBps = <451000>; > + }; > + > + opp-410000000 { > + opp-hz = /bits/ 64 <410000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; > + opp-peak-kBps = <1555000>; > + }; > + > + opp-500000000 { > + opp-hz = /bits/ 64 <500000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; > + opp-peak-kBps = <1555000>; > + }; > + > + opp-547000000 { > + opp-hz = /bits/ 64 <547000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; > + opp-peak-kBps = <1555000>; > + }; > + > + opp-606000000 { > + opp-hz = /bits/ 64 <606000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; > + opp-peak-kBps = <2736000>; > + }; > + > + opp-640000000 { > + opp-hz = /bits/ 64 <640000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; > + opp-peak-kBps = <2736000>; > + }; > + > + opp-690000000 { > + opp-hz = /bits/ 64 <690000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; > + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; > + 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? > + > + gmu_opp_table: opp-table { > + compatible = "operating-points-v2"; > + > + opp-200000000 { > + opp-hz = /bits/ 64 <200000000>; > + opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>; > + }; 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; > + > + 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";
On 23.05.2023 09:59, Konrad Dybcio wrote: > > > On 23.05.2023 03:15, Bjorn Andersson wrote: >> From: Bjorn Andersson <bjorn.andersson@linaro.org> >> >> Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the >> SC8280XP. >> >> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> >> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> >> --- > 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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> >> #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> >> +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> >> #include <dt-bindings/clock/qcom,rpmh.h> >> #include <dt-bindings/interconnect/qcom,osm-l3.h> >> #include <dt-bindings/interconnect/qcom,sc8280xp.h> >> @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; >> + 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"; I also noticed downstream adds additional votes for L3 (*not* LLCC), should we explore that? Konrad >> + #cooling-cells = <2>; >> + >> + status = "disabled"; >> + >> + gpu_opp_table: opp-table { >> + compatible = "operating-points-v2"; >> + >> + opp-270000000 { >> + opp-hz = /bits/ 64 <270000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>; >> + opp-peak-kBps = <451000>; >> + }; >> + >> + opp-410000000 { >> + opp-hz = /bits/ 64 <410000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; >> + opp-peak-kBps = <1555000>; >> + }; >> + >> + opp-500000000 { >> + opp-hz = /bits/ 64 <500000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; >> + opp-peak-kBps = <1555000>; >> + }; >> + >> + opp-547000000 { >> + opp-hz = /bits/ 64 <547000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; >> + opp-peak-kBps = <1555000>; >> + }; >> + >> + opp-606000000 { >> + opp-hz = /bits/ 64 <606000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; >> + opp-peak-kBps = <2736000>; >> + }; >> + >> + opp-640000000 { >> + opp-hz = /bits/ 64 <640000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; >> + opp-peak-kBps = <2736000>; >> + }; >> + >> + opp-690000000 { >> + opp-hz = /bits/ 64 <690000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; >> + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; >> + 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? > >> + >> + gmu_opp_table: opp-table { >> + compatible = "operating-points-v2"; >> + >> + opp-200000000 { >> + opp-hz = /bits/ 64 <200000000>; >> + opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>; >> + }; > 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; >> + >> + 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";
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 <bjorn.andersson@linaro.org> > > > > Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the > > SC8280XP. > > > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > > --- > 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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> > > #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> > > +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> > > #include <dt-bindings/clock/qcom,rpmh.h> > > #include <dt-bindings/interconnect/qcom,osm-l3.h> > > #include <dt-bindings/interconnect/qcom,sc8280xp.h> > > @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; > > + 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 = <RPMH_REGULATOR_LEVEL_LOW_SVS>; > > + opp-peak-kBps = <451000>; > > + }; > > + > > + opp-410000000 { > > + opp-hz = /bits/ 64 <410000000>; > > + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; > > + opp-peak-kBps = <1555000>; > > + }; > > + > > + opp-500000000 { > > + opp-hz = /bits/ 64 <500000000>; > > + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; > > + opp-peak-kBps = <1555000>; > > + }; > > + > > + opp-547000000 { > > + opp-hz = /bits/ 64 <547000000>; > > + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; > > + opp-peak-kBps = <1555000>; > > + }; > > + > > + opp-606000000 { > > + opp-hz = /bits/ 64 <606000000>; > > + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; > > + opp-peak-kBps = <2736000>; > > + }; > > + > > + opp-640000000 { > > + opp-hz = /bits/ 64 <640000000>; > > + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; > > + opp-peak-kBps = <2736000>; > > + }; > > + > > + opp-690000000 { > > + opp-hz = /bits/ 64 <690000000>; > > + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; > > + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; > > + 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? > AFAIU, GMU's job is controlling the voltage and clock to the GPU. It doesn't do any data transactions on its own. 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 = <RPMH_REGULATOR_LEVEL_MIN_SVS>; > > + }; > 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; > > + > > + 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";
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 <bjorn.andersson@linaro.org> >>> >>> Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the >>> SC8280XP. >>> >>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> >>> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> >>> --- >> 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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> >>> #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> >>> +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> >>> #include <dt-bindings/clock/qcom,rpmh.h> >>> #include <dt-bindings/interconnect/qcom,osm-l3.h> >>> #include <dt-bindings/interconnect/qcom,sc8280xp.h> >>> @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; >>> + 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 = <RPMH_REGULATOR_LEVEL_LOW_SVS>; >>> + opp-peak-kBps = <451000>; >>> + }; >>> + >>> + opp-410000000 { >>> + opp-hz = /bits/ 64 <410000000>; >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; >>> + opp-peak-kBps = <1555000>; >>> + }; >>> + >>> + opp-500000000 { >>> + opp-hz = /bits/ 64 <500000000>; >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; >>> + opp-peak-kBps = <1555000>; >>> + }; >>> + >>> + opp-547000000 { >>> + opp-hz = /bits/ 64 <547000000>; >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; >>> + opp-peak-kBps = <1555000>; >>> + }; >>> + >>> + opp-606000000 { >>> + opp-hz = /bits/ 64 <606000000>; >>> + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; >>> + opp-peak-kBps = <2736000>; >>> + }; >>> + >>> + opp-640000000 { >>> + opp-hz = /bits/ 64 <640000000>; >>> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; >>> + opp-peak-kBps = <2736000>; >>> + }; >>> + >>> + opp-690000000 { >>> + opp-hz = /bits/ 64 <690000000>; >>> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; >>> + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; >>> + 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? >> > > 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 = <RPMH_REGULATOR_LEVEL_MIN_SVS>; >>> + }; >> 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, >>> + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; >>> + >>> + 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"; >
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 <bjorn.andersson@linaro.org> > >>> > >>> Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the > >>> SC8280XP. > >>> > >>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > >>> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > >>> --- > >> 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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> > >>> #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> > >>> +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> > >>> #include <dt-bindings/clock/qcom,rpmh.h> > >>> #include <dt-bindings/interconnect/qcom,osm-l3.h> > >>> #include <dt-bindings/interconnect/qcom,sc8280xp.h> > >>> @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; > >>> + 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 = <RPMH_REGULATOR_LEVEL_LOW_SVS>; > >>> + opp-peak-kBps = <451000>; > >>> + }; > >>> + > >>> + opp-410000000 { > >>> + opp-hz = /bits/ 64 <410000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-500000000 { > >>> + opp-hz = /bits/ 64 <500000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-547000000 { > >>> + opp-hz = /bits/ 64 <547000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-606000000 { > >>> + opp-hz = /bits/ 64 <606000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + > >>> + opp-640000000 { > >>> + opp-hz = /bits/ 64 <640000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + > >>> + opp-690000000 { > >>> + opp-hz = /bits/ 64 <690000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; > >>> + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; > >>> + 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? > >> > > > > 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. > Okay, good to know! > 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. > That doesn't justify the fact that cache coherency is needed, especially MMIO writes, unless GMU could snoop the MMIO writes to AP caches. - Mani > > 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 = <RPMH_REGULATOR_LEVEL_MIN_SVS>; > >>> + }; > >> 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; > >>> + > >>> + 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"; > >
On Mon, May 29, 2023 at 02:16:14PM +0530, Manivannan Sadhasivam wrote: > 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 <bjorn.andersson@linaro.org> [..] > > >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi [..] > > >>> + gmu: gmu@3d6a000 { [..] > > >>> + 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? > > >> > > > > > > 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. > > > > Okay, good to know! > > > 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. > > But those aren't shared memory accesses. > > That doesn't justify the fact that cache coherency is needed, especially > MMIO writes, unless GMU could snoop the MMIO writes to AP caches. > In reviewing the downstream state again I noticed that the GPU smmu is marked dma-coherent, so I will adjust that in v3. Regards, Bjorn
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 <bjorn.andersson@linaro.org> > >>> > >>> Add Adreno SMMU, GPU clock controller, GMU and GPU nodes for the > >>> SC8280XP. > >>> > >>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > >>> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> > >>> --- > >> 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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> > >>> #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> > >>> +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> > >>> #include <dt-bindings/clock/qcom,rpmh.h> > >>> #include <dt-bindings/interconnect/qcom,osm-l3.h> > >>> #include <dt-bindings/interconnect/qcom,sc8280xp.h> > >>> @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; > >>> + 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 = <RPMH_REGULATOR_LEVEL_LOW_SVS>; > >>> + opp-peak-kBps = <451000>; > >>> + }; > >>> + > >>> + opp-410000000 { > >>> + opp-hz = /bits/ 64 <410000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-500000000 { > >>> + opp-hz = /bits/ 64 <500000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-547000000 { > >>> + opp-hz = /bits/ 64 <547000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; > >>> + opp-peak-kBps = <1555000>; > >>> + }; > >>> + > >>> + opp-606000000 { > >>> + opp-hz = /bits/ 64 <606000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + > >>> + opp-640000000 { > >>> + opp-hz = /bits/ 64 <640000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; > >>> + opp-peak-kBps = <2736000>; > >>> + }; > >>> + > >>> + opp-690000000 { > >>> + opp-hz = /bits/ 64 <690000000>; > >>> + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; > >>> + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; > >>> + 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 = <RPMH_REGULATOR_LEVEL_MIN_SVS>; > >>> + }; > >> 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, > >>> + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; > >>> + > >>> + 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"; > >
On Tue, May 30, 2023 at 08:35:14AM -0700, Bjorn Andersson wrote: > > On Mon, May 29, 2023 at 02:16:14PM +0530, Manivannan Sadhasivam wrote: > > 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 <bjorn.andersson@linaro.org> > [..] > > > >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > [..] > > > >>> + gmu: gmu@3d6a000 { > [..] > > > >>> + 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? > > > >> > > > > > > > > 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. > > > > > > > Okay, good to know! > > > > > 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. > > > > > But those aren't shared memory accesses. > > > > > That doesn't justify the fact that cache coherency is needed, especially > > MMIO writes, unless GMU could snoop the MMIO writes to AP caches. > > > > In reviewing the downstream state again I noticed that the GPU smmu is > marked dma-coherent, so I will adjust that in v3. Bjorn, Would you mind sharing a perf delta (preferrably manhattan offscreen) you see with and without this dma-coherent property? -Akhil. > > Regards, > Bjorn
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 <dt-bindings/clock/qcom,dispcc-sc8280xp.h> #include <dt-bindings/clock/qcom,gcc-sc8280xp.h> +#include <dt-bindings/clock/qcom,gpucc-sc8280xp.h> #include <dt-bindings/clock/qcom,rpmh.h> #include <dt-bindings/interconnect/qcom,osm-l3.h> #include <dt-bindings/interconnect/qcom,sc8280xp.h> @@ -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 = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; + 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 = <RPMH_REGULATOR_LEVEL_LOW_SVS>; + opp-peak-kBps = <451000>; + }; + + opp-410000000 { + opp-hz = /bits/ 64 <410000000>; + opp-level = <RPMH_REGULATOR_LEVEL_SVS>; + opp-peak-kBps = <1555000>; + }; + + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>; + opp-peak-kBps = <1555000>; + }; + + opp-547000000 { + opp-hz = /bits/ 64 <547000000>; + opp-level = <RPMH_REGULATOR_LEVEL_SVS_L2>; + opp-peak-kBps = <1555000>; + }; + + opp-606000000 { + opp-hz = /bits/ 64 <606000000>; + opp-level = <RPMH_REGULATOR_LEVEL_NOM>; + opp-peak-kBps = <2736000>; + }; + + opp-640000000 { + opp-hz = /bits/ 64 <640000000>; + opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>; + opp-peak-kBps = <2736000>; + }; + + opp-690000000 { + opp-hz = /bits/ 64 <690000000>; + opp-level = <RPMH_REGULATOR_LEVEL_TURBO>; + 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 = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>; + 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"; + + gmu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>; + }; + }; + }; + + 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"; + + 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 = <GIC_SPI 672 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 673 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 678 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 679 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 680 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 681 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 682 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 683 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 684 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 685 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 686 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 687 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 688 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 689 IRQ_TYPE_LEVEL_HIGH>; + + 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"; + }; + usb_0_hsphy: phy@88e5000 { compatible = "qcom,sc8280xp-usb-hs-phy", "qcom,usb-snps-hs-5nm-phy";