Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1136846rdb; Mon, 19 Feb 2024 05:37:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUeKflOGaHa3oG9j267zo4LzAGddn0nt1iVT6gzUbTR3zqAMhDmsKjP714gH9WuUB7ALDdvFoTI8+s1YPTGJRBiL2X7AFQdcEXu2z8GiQ== X-Google-Smtp-Source: AGHT+IGNO1XQmGG0e4ivq3jOSOVyUtWB54K77b7V2ZT5Ca6rTGyj9my1pJ9Jzs6iQ6CL6UCcEc9F X-Received: by 2002:ac2:43ac:0:b0:512:a4ce:abaa with SMTP id t12-20020ac243ac000000b00512a4ceabaamr3196643lfl.48.1708349878306; Mon, 19 Feb 2024 05:37:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349878; cv=pass; d=google.com; s=arc-20160816; b=E1gKL3R0ybdg7R53/wLCgQJf2hijoKUoVjV5ScE20dCC8V2yalNZYzel7DvQRXEtVe nYU3EpLfsH1HxVEtlF63Voz5hwGFPpPN+arSVvfTl6gh4PKNVry5joNwSTDEMvDIsg1m O55X/J+Ta3Dw1iHGlcY9qSFAyvUt+UIbKur+DpPr/vIfpbIyTQAQAObtGnZKtfUushup jbtY5zDDYykT3+St5xkkQlQBw2oeB1maoW26nDN2QtzBVqtuLmS0/N04eZDNIW3WLi0s GQpQuea+Gk/n1t7osIzjUWWdkVQQ0QTgsN0HwJEjowCg+aBx1peJ6bn6OVihLEX19Msv /8mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=TfbMb3jj0qItrK4emPJgHKMlXlJN3RIWDWQruK+cJ2c=; fh=HdGLTk3EQJduE/hXbf3wAgJ6S/uXxS9cYP5Va3DQCu8=; b=SHAFqDN83z8sQZYT2vifTi0VlCY/wnc1/8HRByNyKlz3HEKZfmFmYV9i228f4pW0iW tmTAos0q7nSMq5tWfjRzw71QCjRx18TNSp8l2CnHWAV4DSCec+GazDS4rBKF7Bg3V4G7 fCq74D1+9puFqHsDa6VIkqvwydYf5yWSjf1jSdRSrOLSCK91MP7KzqU3tL9RRjvw9xw3 VKVsPMh1+roml1qqxP0slwgwjoq+Eo0LAA22/gVs1WYLnepSjn32+bDM5RnALut9slsi 2G0jr3mHnk7yuwg/sHhYCLPeOhyKnW487zLKo3vcrAu9w3rOZWkqaBOoNQHOo4EJ5ON3 dw0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jC6KFrS4; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-71417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w11-20020a056402268b00b005645c4af6bcsi1292518edd.93.2024.02.19.05.37.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:37:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jC6KFrS4; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-71417-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71417-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DB4301F20F8A for ; Mon, 19 Feb 2024 13:37:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B57A83C467; Mon, 19 Feb 2024 13:36:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jC6KFrS4" Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C43036AE5 for ; Mon, 19 Feb 2024 13:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349783; cv=none; b=GzCqTdRsuzayRu2gTC9nY/oLoZ4yJaAqILTJOG24ExNG5S96/1xPlqrRvILlwCYkelJDGpatV3AanUkPKSKnA7zAe2yYe8Zxcd1z6cOtmsX0YFjG8mSALJmJlUGh1QbbFN4fUcGX0aOQVjMZAarZ5ezudhQ2c8lr4Kf+sgTgifk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349783; c=relaxed/simple; bh=HC/xBfPb+Ge3S4O35AHKQR0tXgYuKOO6Vtq5u/Zvis8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MDkIVXVn81lGPPKAmAAg/VeRiNpeYelNmzWSo5XrPX1UGdlCRAAx72mY1A81EgncOV3sCc7RdCQP/7flGPGmjoGtYRw5DHuxN/ZhLxtLmwVEj2ndPs+vofKgOQ6XzGfYoex+iOpUo4OhMUpjChzZUf6qtrLalUikUBoaT+xo87A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jC6KFrS4; arc=none smtp.client-ip=209.85.208.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-563d56ee65cso3716722a12.2 for ; Mon, 19 Feb 2024 05:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349780; x=1708954580; darn=vger.kernel.org; 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=TfbMb3jj0qItrK4emPJgHKMlXlJN3RIWDWQruK+cJ2c=; b=jC6KFrS42iUy6rxRlREt2hpAHjTVeks+AD6lB2ox/QRFyxlBNqj/hA96m06C/WbTGz MdPF/4y1SCPsbcRY+PVPKTolG2Z3D360UX1zBvH1E05cLeSXEFgoHlQi4ilSoqbd/fHG XG2tOBGmyzRHeeinPhq9SJZAY8xgZsMliIkGhbClVho14ayKHlXkpA3wZ8HBNabJiUkY jVPl5UOSMveEou4C7FX2FCLJnqmOehz5zz8aHWkbLArTil8Pnbw8plcYqgkEQO5BJJFi OQ+TMuK4cVV+jODRwSYj2dXiQ4axtfiUvAr5k7PUiDNq8CKVCGJWT48HMs4fgswT1QWe 4eRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349780; x=1708954580; 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=TfbMb3jj0qItrK4emPJgHKMlXlJN3RIWDWQruK+cJ2c=; b=pfyqNDovIOe7whxeL7T3Ct4bLw8PP8A/kIVBUPiYFcawH9SEg5+zCTWnjkPNAm2HHb LZiW8IcQ2dzv+S2BNUTHzU65m6RaGC38EwyX3+hato7WfwXsDTwuGzl3vTQeZUuqCwgK BFD4qZRh4bHwhksDEzSL+MqsYF7AE9051Mfo2gEk7idlN4U77C8kOZsIIsaMguppmk2O sLis543QtrURsW5tFJyVwBKkoJega2SWA2GfuebpmZWl2/czzCs4gJXOoxoCIJZ4UWAJ j50zGdNNxzNcSsEN0uxVK3QwJOnO7LvIZQ+g27ZUWxBGCdxj9sJjdmtnoNMudSlXybZn FC9A== X-Forwarded-Encrypted: i=1; AJvYcCWj8fgMDsEuCcbGZUOLJJ1mbzkI1m/nCtKmzzjoWZMcdB4CRLEqzLDikZVDxO/j6zu1FBP+c9IyogVvVEQbnabxTDw8/akJZYoPo+YW X-Gm-Message-State: AOJu0YwJ99CDLHdkhWJDsqNw02l7QmwxWliZLs/XHRfKdVonU41Q8pME K4dBD6FgczEwtygGdXUm5KFLidNzhIg19ymoaA6in7gP1Jbf7+eqIVZWQsMHiIA= X-Received: by 2002:a05:6402:358:b0:564:8d2f:505b with SMTP id r24-20020a056402035800b005648d2f505bmr1119514edw.39.1708349780176; Mon, 19 Feb 2024 05:36:20 -0800 (PST) Received: from [10.167.154.1] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id q29-20020a50cc9d000000b00563a3ff30basm2900168edi.59.2024.02.19.05.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:19 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:52 +0100 Subject: [PATCH 7/8] arm64: dts: qcom: qcm2290: Add GPU nodes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240219-topic-rb1_gpu-v1-7-d260fa854707@linaro.org> References: <20240219-topic-rb1_gpu-v1-0-d260fa854707@linaro.org> In-Reply-To: <20240219-topic-rb1_gpu-v1-0-d260fa854707@linaro.org> To: Will Deacon , Robin Murphy , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter Cc: Marijn Suijten , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708349759; l=5419; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=HC/xBfPb+Ge3S4O35AHKQR0tXgYuKOO6Vtq5u/Zvis8=; b=6WqrsuxfLwQscwtWGCN3jaXQS4gD+jRD2N76tzuid6qwF60qAtrmeKNmZwBsDDJYOwXJF/j8X yi7onOH5wJcCDk8DEhMMqf3+8V2WfyVbN7QF698aYfGcH1cr1M7d0IK X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Describe the GPU hardware on the QCM2290. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 154 ++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index 89beac833d43..ec5aef5d9c69 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -737,6 +738,11 @@ qusb2_hstx_trim: hstx-trim@25b { reg = <0x25b 0x1>; bits = <1 4>; }; + + gpu_speed_bin: gpu-speed-bin@2006 { + reg = <0x2006 0x2>; + bits = <5 8>; + }; }; pmu@1b8e300 { @@ -1383,6 +1389,154 @@ usb_dwc3: usb@4e00000 { }; }; + gpu: gpu@5900000 { + compatible = "qcom,adreno-07000200", "qcom,adreno"; + reg = <0x0 0x05900000 0x0 0x40000>; + reg-names = "kgsl_3d0_reg_memory"; + + interrupts = ; + + 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"; + + interconnects = <&bimc MASTER_GFX3D RPM_ALWAYS_TAG + &bimc SLAVE_EBI1 RPM_ALWAYS_TAG>; + interconnect-names = "gfx-mem"; + + iommus = <&adreno_smmu 0 1>, + <&adreno_smmu 2 0>; + operating-points-v2 = <&gpu_opp_table>; + power-domains = <&rpmpd QCM2290_VDDCX>; + qcom,gmu = <&gmu_wrapper>; + + nvmem-cells = <&gpu_speed_bin>; + nvmem-cell-names = "speed_bin"; + #cooling-cells = <2>; + + status = "disabled"; + + zap-shader { + memory-region = <&pil_gpu_mem>; + }; + + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + /* TODO: Scale RPM_SMD_BIMC_GPU_CLK w/ turbo freqs */ + opp-1123200000 { + opp-hz = /bits/ 64 <1123200000>; + required-opps = <&rpmpd_opp_turbo_plus>; + opp-peak-kBps = <6881000>; + opp-supported-hw = <0x3>; + turbo-mode; + }; + + opp-1017600000 { + opp-hz = /bits/ 64 <1017600000>; + required-opps = <&rpmpd_opp_turbo>; + opp-peak-kBps = <6881000>; + opp-supported-hw = <0x3>; + turbo-mode; + }; + + opp-921600000 { + opp-hz = /bits/ 64 <921600000>; + required-opps = <&rpmpd_opp_nom_plus>; + opp-peak-kBps = <6881000>; + opp-supported-hw = <0x3>; + }; + + opp-844800000 { + opp-hz = /bits/ 64 <844800000>; + required-opps = <&rpmpd_opp_nom>; + opp-peak-kBps = <6881000>; + opp-supported-hw = <0x7>; + }; + + opp-672000000 { + opp-hz = /bits/ 64 <672000000>; + required-opps = <&rpmpd_opp_svs_plus>; + opp-peak-kBps = <3879000>; + opp-supported-hw = <0xf>; + }; + + opp-537600000 { + opp-hz = /bits/ 64 <537600000>; + required-opps = <&rpmpd_opp_svs>; + opp-peak-kBps = <2929000>; + opp-supported-hw = <0xf>; + }; + + opp-355200000 { + opp-hz = /bits/ 64 <355200000>; + required-opps = <&rpmpd_opp_low_svs>; + opp-peak-kBps = <1720000>; + opp-supported-hw = <0xf>; + }; + }; + }; + + 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,qcm2290-gpucc"; + reg = <0x0 0x05990000 0x0 0x9000>; + clocks = <&gcc GCC_GPU_CFG_AHB_CLK>, + <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>; + power-domains = <&rpmpd QCM2290_VDDCX>; + required-opps = <&rpmpd_opp_low_svs>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + + adreno_smmu: iommu@59a0000 { + compatible = "qcom,qcm2290-smmu-500", "qcom,adreno-smmu", + "qcom,smmu-500", "arm,mmu-500"; + reg = <0x0 0x059a0000 0x0 0x10000>; + interrupts = , + , + , + , + , + , + , + , + ; + + clocks = <&gcc GCC_GPU_MEMNOC_GFX_CLK>, + <&gpucc GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK>, + <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>; + clock-names = "mem", + "hlos", + "iface"; + + power-domains = <&gpucc GPU_CX_GDSC>; + + #global-interrupts = <1>; + #iommu-cells = <2>; + }; + mdss: display-subsystem@5e00000 { compatible = "qcom,qcm2290-mdss"; reg = <0x0 0x05e00000 0x0 0x1000>; -- 2.43.2