From patchwork Thu Feb 9 13:38:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 652135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED5D3C64EC7 for ; Thu, 9 Feb 2023 13:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbjBINiy (ORCPT ); Thu, 9 Feb 2023 08:38:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbjBINiw (ORCPT ); Thu, 9 Feb 2023 08:38:52 -0500 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA9510D4 for ; Thu, 9 Feb 2023 05:38:49 -0800 (PST) Received: by mail-ej1-x62c.google.com with SMTP id sa10so6369634ejc.9 for ; Thu, 09 Feb 2023 05:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HbNSgvEpkwVdgA7925qUz5Hh4qlTRI6dcej7JpGFQvc=; b=cc3oaSlfXZtWFnHTr1bsRRiVQmeYdDxsLSDdY4P+76waqbncQfyjc9nT1ZdgHyONbw QieDp5U1uPEEPjxlqlMc4vshOzK7He2ZG1M28wTYWi1YCKvBKX3y2QX+c0mpveWlq6Vk JzViK6V14kh1ZGgl72zt7ihrZygmBf0ZZfEQC9w+n/x31AB9QFmsHqSJlNPS9zUFqr5q ujSXdhllC/jjsUQ1IluzI8zekHex14crt7/wlumx2CS+g8HhtEKm2GBezYG2sq5IVTmc 5U9YaIUnIyGn27S6JXRVsqVwZt6bIK7aDleNNQ1ynzv2oL8B1WKw58Iz3b3M0v0n1ec8 c0qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HbNSgvEpkwVdgA7925qUz5Hh4qlTRI6dcej7JpGFQvc=; b=sl2+Ftg4bMl5JLMjfA+5sT+YSj6WS6ICl46P1zTbYVBCw7cEOkk+gsRdikZO9rpTx/ Jr8lCBjdviTUdedJlH1jyDtzpLMM8k81FPGrJH3BDCDJh2s7+aKL7sj3RwGkglIg9hwr cRzmn1TgFfrAhH9+Aw/1sh8pW11G08saxNVXoXlP41eXYE6YaeC402jYGZxdALcvTtkE JGUON/2E3czIPR0F4HPDLjOoIqnOwZPoVT0hl+mM8WagzOIVAOo2fTwogOfhNOKjSdb0 +Ykd7s1DolPcGiBAH/9a6VfG0Mb95mmAGVpN/jKHfyXYLDx5J2VakJdCxpXxEXa/MPRF Gsgg== X-Gm-Message-State: AO0yUKUW26kgGzRkbwCd0a2ZVkPKfI+Sf7fd1BFcSU9tnVCylMGDJtWg PTFRuit2VGrCrXXd9ADL88/VPA== X-Google-Smtp-Source: AK7set8CZMFv80aXtpV4vg7HwHkfVforoWXCSsOwhumccunE3y8hozgGy1WxjSh3PE145NaugPJq1Q== X-Received: by 2002:a17:906:a189:b0:87b:db62:d659 with SMTP id s9-20020a170906a18900b0087bdb62d659mr12426341ejy.19.1675949927739; Thu, 09 Feb 2023 05:38:47 -0800 (PST) Received: from eriador.lan (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id cd17-20020a170906b35100b0088f8ee84b76sm885553ejb.105.2023.02.09.05.38.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 05:38:47 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Clark , Sean Paul , Abhinav Kumar , Rob Herring , Krzysztof Kozlowski Cc: Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v3 5/6] arm64: dts: qcom: sm8350: add GPU, GMU, GPU CC and SMMU nodes Date: Thu, 9 Feb 2023 15:38:38 +0200 Message-Id: <20230209133839.762631-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209133839.762631-1-dmitry.baryshkov@linaro.org> References: <20230209133839.762631-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add device nodes required to enable GPU on the SM8350 platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 178 +++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index 742e9dd17084..4c1a2f814b5c 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -1765,6 +1766,183 @@ tcsr_mutex: hwlock@1f40000 { #hwlock-cells = <1>; }; + gpu: gpu@3d00000 { + compatible = "qcom,adreno-660.1", "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 0x400>, <&adreno_smmu 1 0x400>; + + operating-points-v2 = <&gpu_opp_table>; + + qcom,gmu = <&gmu>; + + status = "disabled"; + + zap-shader { + memory-region = <&pil_gpu_mem>; + }; + + /* note: downstream checks gpu binning for 670 Mhz */ + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-840000000 { + opp-hz = /bits/ 64 <840000000>; + opp-level = ; + }; + + opp-778000000 { + opp-hz = /bits/ 64 <778000000>; + opp-level = ; + }; + + opp-738000000 { + opp-hz = /bits/ 64 <738000000>; + opp-level = ; + }; + + opp-676000000 { + opp-hz = /bits/ 64 <676000000>; + opp-level = ; + }; + + opp-608000000 { + opp-hz = /bits/ 64 <608000000>; + opp-level = ; + }; + + opp-540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-level = ; + }; + + opp-491000000 { + opp-hz = /bits/ 64 <491000000>; + opp-level = ; + }; + + opp-443000000 { + opp-hz = /bits/ 64 <443000000>; + opp-level = ; + }; + + opp-379000000 { + opp-hz = /bits/ 64 <379000000>; + opp-level = ; + }; + + opp-315000000 { + opp-hz = /bits/ 64 <315000000>; + opp-level = ; + }; + }; + }; + + gmu: gmu@3d6a000 { + compatible = "qcom,adreno-gmu-660.1", "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_CX_GDSC>, + <&gpucc GPU_GX_GDSC>; + power-domain-names = "cx", + "gx"; + + iommus = <&adreno_smmu 5 0x400>; + + operating-points-v2 = <&gmu_opp_table>; + + gmu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-level = ; + }; + }; + }; + + gpucc: clock-controller@3d90000 { + compatible = "qcom,sm8350-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"; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + + adreno_smmu: iommu@3da0000 { + compatible = "qcom,sm8350-smmu-500", "qcom,adreno-smmu", "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 = "bus", + "iface", + "ahb", + "hlos1_vote_gpu_smmu", + "cx_gmu", + "hub_cx_int", + "hub_aon"; + + power-domains = <&gpucc GPU_CX_GDSC>; + dma-coherent; + }; + lpass_ag_noc: interconnect@3c40000 { compatible = "qcom,sm8350-lpass-ag-noc"; reg = <0 0x03c40000 0 0xf080>;