From patchwork Wed Jun 21 11:21:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 110985 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4286909vqr; Wed, 21 Jun 2023 04:24:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60AJUubh4wX7KqxpTvs4Tyg4qLa88o2B8EgffbpMFx8dMhN/aiRu7UjommsPctFv9XTFoh X-Received: by 2002:a17:902:dace:b0:1b6:783d:9ba7 with SMTP id q14-20020a170902dace00b001b6783d9ba7mr7867222plx.27.1687346644113; Wed, 21 Jun 2023 04:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687346644; cv=none; d=google.com; s=arc-20160816; b=FZC22r6ACxW3lgL0IhjTlb9JOYQZwrNi2AwDnzsxQOgOaZbTeih0l4VadxPR0EuGkh SgH5jGxvWgiLWLb3GuwNbBp2ggW6myw73pJNGh1J2VkVCmfJzVi3Pn9I0K2VPIBr6PqD Gxk6BzbGhNVDJRGagB1QCxxvPmT0BkXNh0uX5LoXOkIR2BiAqdl5WSOC9vdIFrYlBn9K jAMCjPWTvKmmLJn97cWMhIA8K5PBA3lO96LeHSEX77x2sfrhmZW95UMsIMuyRoGAxWeV QoeVD9BsQTn+Z+2XBgekpFBdHBGhTmrqJaqqSNyFawScS9rYnoS8p7+E/dnjyYfRVlt+ Q9Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=afrS/r3Jpl+lieZo9J+fA9jIAnBpaiCiUTWlN9YBqDM=; b=pPGCKALSx/GAvd2w37WdrF4uoIdpjUxPofShBPej4MF1mLUDl7vkeNm5hP+HEzPjBz sci5eAmiKOPehxAR9Swr0V7cMgPsdXL8VI3v/7wYDtxtgHArD0eGeNHCk65xQao7vMXC r0Wuoh+uXIxm7y+0XRpBBZQWAOdF3sk+W59ZE7Bs5exYRtyH0W6jYzB9/zy8kzNfu9bb DLUgjH2BjNUEN6GqSsRxXuXkcvq7fWNfFKC3pOP8FI40l1AzJVMsXn6H0PfPawowuJBD nZ4kLcDdlL5lKfDGekiLrMotT4964OHAuia77rHvPVVfpGBA5F6AEF3WSfo1RWdrzDwO +Jnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ODddu4CT; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ku5-20020a170903288500b001ab1fb8cc83si1035398plb.161.2023.06.21.04.23.30; Wed, 21 Jun 2023 04:24:04 -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=@linaro.org header.s=google header.b=ODddu4CT; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232583AbjFULWN (ORCPT + 99 others); Wed, 21 Jun 2023 07:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232227AbjFULWJ (ORCPT ); Wed, 21 Jun 2023 07:22:09 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44E30135 for ; Wed, 21 Jun 2023 04:22:08 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b4636bb22eso67105081fa.2 for ; Wed, 21 Jun 2023 04:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687346526; x=1689938526; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=afrS/r3Jpl+lieZo9J+fA9jIAnBpaiCiUTWlN9YBqDM=; b=ODddu4CTFlDcfwCdB9H3nN0azQAlAcL082ol1AecELnvcuWp6uOsxxZOzOFlKl1wpr UwHs0+FqvPfysCqepgVwRX/9kloIC/ON3xOfKsJyVUviFbtUv1YFClxb4GOitN7l3SxF tLp+ByaRM2o6FfGDJae8NLt37EfGyrmoxhW6KjIsLdwRze2oxrEzLsBAy+x4Sx7U9wrm 8IX8ztJnbU+cob546YDB/+zXauarVPhKKf5zk2D1nVaWFsw3K1ystiKb6XKLWm1B3Mts 4EnkiGIKaCGV/Plu2H7Is8YI7KjKcGnt8IN2bopnuJlyRp5GsDappjRZZlt+3DXSHdIs Isvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687346526; x=1689938526; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=afrS/r3Jpl+lieZo9J+fA9jIAnBpaiCiUTWlN9YBqDM=; b=C258NoCZwUBDvmX7DBhwhvkMwnVaCWNspMIy6DfbFjXOVNQt+MMihKQpLEgcY1Tax9 AApzy7kn2+DfROgW7k7UmljK9YSvrJ+MC0woeWoZ+u1VKiN0WJm2T4uYI0V6arr8ug9y XGcfWuatg8wPOuTO8oBdsICP97HcUjaQBExxlVtm31lnJPJ1oHAoSHFuXlAqpiTHXiFf Tfl9WFClCTqgo+DMv/9q7sNxeGIuGIeMW726zg189upGR+1oCKwcwQNZmqGWtSWv3BKF K6O5mW8JvBHgq0u/dUnm0Ypg1XdjQqHZ9j+Q7QC92+lb0m9jl1vJt80XgmLMGs8kWdck bTHA== X-Gm-Message-State: AC+VfDwf4Wvj7NHmJIeYeK1UULNA4n+DOFc42//AmU6OFKF4Kz5+458c bRdB/29FxtR1BKMVNilTIWAgzA== X-Received: by 2002:a2e:9985:0:b0:2b4:5a71:e637 with SMTP id w5-20020a2e9985000000b002b45a71e637mr9671045lji.18.1687346526542; Wed, 21 Jun 2023 04:22:06 -0700 (PDT) Received: from [192.168.1.101] (abxj193.neoplus.adsl.tpnet.pl. [83.9.3.193]) by smtp.gmail.com with ESMTPSA id l4-20020a05651c10c400b002b22a1a21easm866171ljn.110.2023.06.21.04.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 04:22:06 -0700 (PDT) From: Konrad Dybcio Date: Wed, 21 Jun 2023 13:21:52 +0200 Subject: [PATCH v2 1/4] arm64: dts: qcom: sm6115: Add GPU nodes MIME-Version: 1.0 Message-Id: <20230620-topic-gpu_tablet_disp-v2-1-0538ea1beb0b@linaro.org> References: <20230620-topic-gpu_tablet_disp-v2-0-0538ea1beb0b@linaro.org> In-Reply-To: <20230620-topic-gpu_tablet_disp-v2-0-0538ea1beb0b@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Dmitry Baryshkov X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1687346515; l=3623; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=rrwHv/YxiN3sUzxciWmcTrdSRgXtI03mz+a9WJQcNo0=; b=gJnvOwZ6OEzWLw7Id3ZEbQzozrseg494A5KEV8wj4k67RirVGyNSqmkOdPwmz2kyweZLSZlnk oMTc4A2WfG7DiagwYI2QqAgE7r99wSMdGSROo9m8Mk8QpmvSLARoyeD X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769311194708271524?= X-GMAIL-MSGID: =?utf-8?q?1769311194708271524?= Introduce nodes for the A610 GPU and its GMU wrapper along with the speedbin fuse entry in QFPROM. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 103 +++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 55118577bf92..424b4f3c909b 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -865,6 +865,11 @@ qusb2_hstx_trim: hstx-trim@25b { reg = <0x25b 0x1>; bits = <1 4>; }; + + gpu_speed_bin: gpu-speed-bin@6006 { + reg = <0x6006 0x2>; + bits = <5 8>; + }; }; rng: rng@1b53000 { @@ -1316,6 +1321,104 @@ usb_dwc3: usb@4e00000 { }; }; + gpu: gpu@5900000 { + compatible = "qcom,adreno-610.0", "qcom,adreno"; + reg = <0x0 0x05900000 0x0 0x40000>; + reg-names = "kgsl_3d0_reg_memory"; + + /* There's no (real) GMU, so we have to handle quite a bunch of clocks! */ + clocks = <&gpucc GPU_CC_GX_GFX3D_CLK>, + <&gpucc GPU_CC_AHB_CLK>, + <&gcc GCC_BIMC_GPU_AXI_CLK>, + <&gcc GCC_GPU_MEMNOC_GFX_CLK>, + <&gpucc GPU_CC_CX_GMU_CLK>, + <&gpucc GPU_CC_CXO_CLK>; + clock-names = "core", + "iface", + "mem_iface", + "alt_mem_iface", + "gmu", + "xo"; + + interrupts = ; + + iommus = <&adreno_smmu 0 1>; + operating-points-v2 = <&gpu_opp_table>; + power-domains = <&rpmpd SM6115_VDDCX>; + qcom,gmu = <&gmu_wrapper>; + + nvmem-cells = <&gpu_speed_bin>; + nvmem-cell-names = "speed_bin"; + + status = "disabled"; + + zap-shader { + memory-region = <&pil_gpu_mem>; + }; + + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-320000000 { + opp-hz = /bits/ 64 <320000000>; + required-opps = <&rpmpd_opp_low_svs>; + opp-supported-hw = <0x1f>; + }; + + opp-465000000 { + opp-hz = /bits/ 64 <465000000>; + required-opps = <&rpmpd_opp_svs>; + opp-supported-hw = <0x1f>; + }; + + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + required-opps = <&rpmpd_opp_svs_plus>; + opp-supported-hw = <0x1f>; + }; + + opp-745000000 { + opp-hz = /bits/ 64 <745000000>; + required-opps = <&rpmpd_opp_nom>; + opp-supported-hw = <0xf>; + }; + + opp-820000000 { + opp-hz = /bits/ 64 <820000000>; + required-opps = <&rpmpd_opp_nom_plus>; + opp-supported-hw = <0x7>; + }; + + opp-900000000 { + opp-hz = /bits/ 64 <900000000>; + required-opps = <&rpmpd_opp_turbo>; + opp-supported-hw = <0x7>; + }; + + /* Speed bin 2 can reach 950 Mhz instead of 980 like the rest. */ + opp-950000000 { + opp-hz = /bits/ 64 <950000000>; + required-opps = <&rpmpd_opp_turbo_plus>; + opp-supported-hw = <0x4>; + }; + + opp-980000000 { + opp-hz = /bits/ 64 <980000000>; + required-opps = <&rpmpd_opp_turbo_plus>; + opp-supported-hw = <0x3>; + }; + }; + }; + + gmu_wrapper: gmu@596a000 { + compatible = "qcom,adreno-gmu-wrapper"; + reg = <0x0 0x0596a000 0x0 0x30000>; + reg-names = "gmu"; + power-domains = <&gpucc GPU_CX_GDSC>, + <&gpucc GPU_GX_GDSC>; + power-domain-names = "cx", "gx"; + }; + gpucc: clock-controller@5990000 { compatible = "qcom,sm6115-gpucc"; reg = <0x0 0x05990000 0x0 0x9000>;