From patchwork Mon Feb 19 13:35:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203086 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1292634dyc; Mon, 19 Feb 2024 05:48:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWuqCR/RtI/2FKcbYNqmSFMAaId9adV5ZzArXimOx33wiO6upoMVulMVtHQi5J25mqQbmU63QviGLozJSWaWvEmAKO/WQ== X-Google-Smtp-Source: AGHT+IG45tlhCQNkBDYi/ZhvxgWJc/4c1Ggngk6dYzwFmUATmMuyvhLim1Rtx4f38kO9iJ1bDU0l X-Received: by 2002:a05:6a21:3a82:b0:19c:5651:adc1 with SMTP id zv2-20020a056a213a8200b0019c5651adc1mr16727589pzb.38.1708350531642; Mon, 19 Feb 2024 05:48:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708350531; cv=pass; d=google.com; s=arc-20160816; b=ip4tZAcLZsBAVX4vdK/bmqOi7DtMsuCmSNWkkHvZcLzPxSgEn24A3O9YVXe3VnYzdA DintjZZA76lZxGjykVEVoYjOP+6lNMtHZ7c0yvju9HQ+N5KVQFXRuY2f73LNiXtj5oz3 wMqPA918HH2n9TZjkr5WCMWzbQYBU8cTo1G0WRN5SMV3+cgpgLoKBsjmzDaFgiGZYtxH jjPB2yeZme4x+w9e7vzF2uQ5IjQgMzxPzlySRrxFHKdvw83gwVxvpZYr3Jn3oYYpsDzM AtDjvbkDSGmPRlSXcCpHczg7+U+7SXydQYCtIU2wl+hFKD0xiLgGRCrItF4NkeJUcHgo 9UBA== 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=Vm4+HsWSLi5Bqiq8guveLonPTq6IX1sdSS8MIp6iya8=; fh=m5KrqD7IiZGhRBe0oPlHKNQgzORVRsnpeOOr63RMRmg=; b=p8dX+fXIeVV2YJ0PMTsfokWEWo46qkKAU1Nd56Vc1vTFJdzgr9j1cwFSLO12+QyznM vbpnLOFLRsZjgEUnS+lfDqrK1HpnreD5Hvm3RQHTU+ZWIclZ7utcPCTVASjOkgFVIHL1 s/X4bzENPjt9YDOaro7FN/HIyFdyTPfaPlftRsNf/IvNc6Ju6exwjxeCDS7/hBZZWvV0 kYC3Tz2di6xmJ/bqd4WoFFM2rNlBpofTl5Ne6bE9oh9hTh47h81P8PcxuOaP3fWSJVya npLNsxxttdtZ5O4JFHuqQKOkTPjWPiBWynaMGxG9wHqEjBSzPMDFRW7dR5plqjutlcpN BrxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHm0Q74V; 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-71411-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71411-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id x64-20020a638643000000b005b96d038729si4367423pgd.728.2024.02.19.05.48.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:48:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71411-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHm0Q74V; 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-71411-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71411-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 47F7CB22CC7 for ; Mon, 19 Feb 2024 13:36:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C0B8374F5; Mon, 19 Feb 2024 13:36:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dHm0Q74V" Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (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 16D23364AE for ; Mon, 19 Feb 2024 13:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349767; cv=none; b=n2ZIsMjbxZLB8oiKAYBl4mhI0o00jjr0BsDgiSBkgc2Wb49dMLqDZh4hla852EVduFj46+8+L2XyRN9+g3sgYWkYY47c5XEpaBVJKVZ6wB4iZS5D2r+iAlpjWOm9608Tm3ue4sUQnzPi1oF5M0GArlb/08y/V5dUDgnz4jq+mwM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349767; c=relaxed/simple; bh=iLSWFU0PEB/wfyF1Nv5EVeYr19/e5DAihIhWgNDJAow=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z/XH53fCYuusKmg0B80qkrSduNGVjf8zwg0C6ZQXb+kMNP+qE/r2XWncDkrPP/+9CkTsbXD/LExFqGOrkRKleOaFxEMenAeLAdcdJG74/aR2eVl2FGAx9A3czSr4ckKwS6NjhgGzPt+0uy8EToD9KvKRqd9rHA8rCte6VT+yNrg= 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=dHm0Q74V; arc=none smtp.client-ip=209.85.208.53 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-f53.google.com with SMTP id 4fb4d7f45d1cf-55f50cf2021so5938490a12.1 for ; Mon, 19 Feb 2024 05:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349764; x=1708954564; 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=Vm4+HsWSLi5Bqiq8guveLonPTq6IX1sdSS8MIp6iya8=; b=dHm0Q74VnjbI5ZMfbUOs10dnil2KlFmkK2+UcNOeJ+LX+79FSEhcPGLnBcgDOc8k1V q+gWqAUs6ZsiXAiAZ90kJApfE/67PKrohNv6pdbySK4FS/oA5tGaZCH8/8N6AN4rBAVB dZ/mOZUHawy0MaJZ7vOqqTBeAic0o7e2yVIt1RM8TXSF3VWtNJZNhHZuhvD0OPA9Qavl dZlo1NlkyhrWQQcbty0d44i+VhbYLdNYzrOBseT9MYvN1gwHHb39Es6bM79S88aC2lmZ zEa9NYrUypHMtbDLXocv+a9xcXh90Ms/2rGjvusCvAjW2DOdZ9tE6KT6X37AeXD+4LrX ZXhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349764; x=1708954564; 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=Vm4+HsWSLi5Bqiq8guveLonPTq6IX1sdSS8MIp6iya8=; b=c3ufaBg3bC35taYi0RFoaGEZrVmbAtg+ICmqhzQocBc19FDWwN41FUB+iXZVLmzfqT 5aXIK9O6lYkCQzj+PV37LTIn6ElmsQex8tkwU5rgU/UG/symRCqnFLUtmn6AcPCS6+De ZLaBHDDGt/ucDVpS71+HL6y30Ve2zwprNU31A/lK4fwx47tb1KCKb7xxQjDhOZMuzthn 1ZNBCZQ7AGgumoViwxs4QII91KlxD1sn0mjdh9WJqcXO2CDsJKCI5wsw30pOuYkfrCkt f++HMHtIV6ZBMw2L9zKh7EpuKRwJ+bc/k9lUkAnN/DkxCFuNggqFxyj2xWc4EZP4V4cl v3cw== X-Forwarded-Encrypted: i=1; AJvYcCUfIDVwyOoVJ37PDcHx4ffEiDVQM/r5RkT2fQAn4lbTuIkrSkGifjl44HmPRfTIJVXWAnvuPDY6l3Z1LO3tTLXTCdGxWFX13u2ZHhHj X-Gm-Message-State: AOJu0YxWbVmPWpnjLbjEhDR/jYSgGMXvtdfqaOWnd27ordl4AYmD+/Lq hm7GIkNw+DAOdzrK6L7cRKdITRIU4/nPCyj2bslyqXKeiO0uTdCShAMvL91dCp4= X-Received: by 2002:aa7:d959:0:b0:564:3191:f407 with SMTP id l25-20020aa7d959000000b005643191f407mr4013903eds.12.1708349764412; Mon, 19 Feb 2024 05:36:04 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:04 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:46 +0100 Subject: [PATCH 1/8] dt-bindings: arm-smmu: Add QCM2290 GPU SMMU Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-1-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=1444; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=iLSWFU0PEB/wfyF1Nv5EVeYr19/e5DAihIhWgNDJAow=; b=71RQnNARetoCSKqpzfQqO6Lapq/qBgUH5HXLBQdA6ZcDXcoSaL+2ynFTnCmi9jFSY8Q7b8KzZ O5iL+UfQEyvAPDXeCzVYV8yaVrWJofN/Mv+M8WmxZgIBOjFSCjpHxRD X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791335367277582081 X-GMAIL-MSGID: 1791335367277582081 The GPU SMMU on QCM2290 nicely fits into the description we already have for SM61[12]5. Add it. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index a4042ae24770..4a8d4022aebc 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml @@ -83,6 +83,7 @@ properties: - description: Qcom Adreno GPUs implementing "qcom,smmu-500" and "arm,mmu-500" items: - enum: + - qcom,qcm2290-smmu-500 - qcom,sa8775p-smmu-500 - qcom,sc7280-smmu-500 - qcom,sc8280xp-smmu-500 @@ -462,6 +463,7 @@ allOf: compatible: items: - enum: + - qcom,qcm2290-smmu-500 - qcom,sm6115-smmu-500 - qcom,sm6125-smmu-500 - const: qcom,adreno-smmu @@ -534,7 +536,6 @@ allOf: - cavium,smmu-v2 - marvell,ap806-smmu-500 - nvidia,smmu-500 - - qcom,qcm2290-smmu-500 - qcom,qdu1000-smmu-500 - qcom,sc7180-smmu-500 - qcom,sc8180x-smmu-500 From patchwork Mon Feb 19 13:35:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1290557dyc; Mon, 19 Feb 2024 05:44:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjsxyvtN7gik7LQvw+ujSMAWOr0pK3Daj/GQ1nQgybXcOZsIgRBje7d4t5oyUDFls0K9klAgkBuQNGs3p1Xh5ff3oxUg== X-Google-Smtp-Source: AGHT+IGXpBegLtvEW1gQ8lNGkPA2IS5kUOw5YLKg3diu8RHhJ5B3frTwyvlDuQoF7x+TF7hrF/1s X-Received: by 2002:a05:6358:2d8b:b0:17a:ec6c:4234 with SMTP id m11-20020a0563582d8b00b0017aec6c4234mr9846493rwn.10.1708350294378; Mon, 19 Feb 2024 05:44:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708350294; cv=pass; d=google.com; s=arc-20160816; b=xmGGktiqAzXxqdYJHuycPIR/ar+6/FKXdwUhuvoPiVTsNFSyuNExmURrQ3ZMBvCj+s o0DfFc0iCHga+flD47/okklwaQX3B8cPSI47GjXYehIx3Ybjxt/n4XYWWzVHMD4QcUYK ipwPNzgTiMph97+mxrD+HTQaVsBfaG7XrVDjyMk2dgZpvSqOqX7xl0L1czjli4XarPDR xWlMdeHz2CNjKuf/g4nyifNJV2p/EyMH5E7SuCYlXZOlD545Ug3yQRh9FRYfPO7PxNfw x609m7+CFmg19o6YxDAyQXFiO2NSWy3nHDS0uLfccrvL0Ff4TR/5qqgXOu9oMMWUUe8l ENPA== 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=EDFtd1C6W8+z/D4oBojXzEo0MFOHKoG2NOfGOeLFv6c=; fh=7mRoZBAvz6zPuxgHciw4aIFq9U50TUuIqo8dxPYkLz8=; b=WJCMHjtVGND9HUvwn/PaLRYO9cZY/kNDKDAEX2SINPAvDIrS/CacZZ40xbJ9yCeF5h wkpovYOuwjpA0tlUqOMZF4LSsxnjKpTzdArLd68CcPJdNgmWoabO8G2PYaOkN4u0OoS+ luNNnF4w/PKMCiEGP7i0+dQSclR/BuSc0IEzog9s37xOwvb4LGuD4juOlgf1uPm+8jnM Qi6cicVPo+OS1NiYDkm3ynhDjc5TdajroCFz4SblZMwx9Im5GnZBn+wd3OJwFf1YILN7 h4yWXbPt+1Q1k2Pd5IeIFYX1H3VAhk2WAs3Tf2ZhQKg4DyJ3c/rCVhXNmW9S1fW2MwXE nZVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iqIot3Aq; 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-71412-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71412-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 73-20020a63014c000000b005dc81a6b2b6si4460474pgb.782.2024.02.19.05.44.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:44:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71412-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iqIot3Aq; 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-71412-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71412-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7CDFA285AEA for ; Mon, 19 Feb 2024 13:37:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 533C3381AB; Mon, 19 Feb 2024 13:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iqIot3Aq" Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 0C2A537162 for ; Mon, 19 Feb 2024 13:36:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349770; cv=none; b=XYzTAcHmLVOg5l/YGHRYMdIBOOZM2srjsXju/JDIAk02wSBqNYKyvE+vL4wLw0Eam4o71aS6b01ntMejWDj8ldwE0iED20SNaQzsx+6oGz1eiszjDPOfRXZtO1+wpgOg3JTL86WYcgmPzkVYGgf4SxkGpL1DsRIAHV4+o7TM5sM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349770; c=relaxed/simple; bh=KHcmvINhJktJpppGgwULcqvLybPcSbgdTRhruWN1EGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pljuR4+aHMBbdXHFNN0dpDJKjvL9DES2R5c1fizVgOevbKOwZxOxRSZXGFNOxZIO9CBNsVlJnpxCEI3AzfANaBfJidYScRLt1DwFVNDU2AbOQULCC/Lm/DVD83m1VOXDjqJfXAgGMpI9TstS/Jf6GzrGS9ZkRKGpg8eXfoCcrjk= 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=iqIot3Aq; arc=none smtp.client-ip=209.85.208.51 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-f51.google.com with SMTP id 4fb4d7f45d1cf-563fe793e1cso3561444a12.3 for ; Mon, 19 Feb 2024 05:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349767; x=1708954567; 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=EDFtd1C6W8+z/D4oBojXzEo0MFOHKoG2NOfGOeLFv6c=; b=iqIot3AqOq40jE9SW6G67syq+9rGIthQ8UAIFGFRBKZjJPJK9rjel+cy3d5V6Cwrsw eHwmrLaepo1G6It1qAmAdg+vQ3n1IZCoEsbpImvGtHhVuVEziakneGnAFVvjo/QZp3Ob 6CtYVl5wY6G/PRTexK+UxnXLCrGHJ74s1wQKbcmiNintYyLIToBqwp5nDhGxFJ7m+CPc fTCdMYIEfBz6+d5TUdizjRWnxTvHRjg8zZhiwfXDx6CDHak6FH0YIWL/hSgewM1H8yAT 1lGUlF9FM9xcwKKmtX07+0v1oZBdFiAm/HDj4kbquQ9FTbSXCEwyAqaycRfwfKH5k6SU leqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349767; x=1708954567; 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=EDFtd1C6W8+z/D4oBojXzEo0MFOHKoG2NOfGOeLFv6c=; b=QcIGoPF0SwvK45IrPzkTKgal5zNfYdc1GJ4Uh3HQXpVvxmUfqFD3c6XmDA1GlvwpEc Y6VmoYkL/JfFj/Rdh473deby25zax8lDJU9nRb6PVvbsinBTDxObGHQWvd9XRa+/n1Vt w7QozMTgXtYXiOP7QSCF5CnhtqujmbweVIPb1hTBjKdVf0HsBo0wfQ8gjFkh+qbPhqob 9gfIPYWQl+tzvtkdE4w5nqcC8eYLb+XRjzQ2fYBa3prB3oLBBy/VMYI/KhcF8EuGU+c+ 9ToEhfheFMxfXYVLnNlbKR83wQLV9p1xNGLh804k4P6J8wHpxfZMO3yJoaqNbM5JUUGr jJVQ== X-Forwarded-Encrypted: i=1; AJvYcCXSP38kcKUMJph80xi0eaLnJpEEICamU0krWMydtlxlaC0xvEWUErHbLO9BIV97p7bGmAXZqDXEog8nE/Z94d3VbXysZWaS6gaJBIqI X-Gm-Message-State: AOJu0Yxt0iFX+1J7KmPvGt4TZN7SgTrwoPWXHuZ8NDoGqBZdjm92Q/U2 g0Vv/B7tsUKnSu1G3ncXCzhmj0ogAOTJx5bI0IEa3TiMJQAy4B8K5n48CdK5OpE= X-Received: by 2002:aa7:d382:0:b0:564:69be:6e86 with SMTP id x2-20020aa7d382000000b0056469be6e86mr2364504edq.0.1708349767419; Mon, 19 Feb 2024 05:36:07 -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.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:07 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:47 +0100 Subject: [PATCH 2/8] dt-bindings: clock: Add Qcom QCM2290 GPUCC Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-2-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=3746; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=KHcmvINhJktJpppGgwULcqvLybPcSbgdTRhruWN1EGg=; b=NaBvuZXGfNqiXM+yEApolRkCjYx+y/6MOaCnl4/saDR6RxS+H19AcURQQ3xL9s1DIJWPv3piV 7kE09+GRuIVBIzkVJIDvLMhuz1i4zyjDATa4Q78cYVazSmKNUX6FuQw X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791335117970885822 X-GMAIL-MSGID: 1791335117970885822 Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's QCM2290 SoCs. Signed-off-by: Konrad Dybcio --- .../bindings/clock/qcom,qcm2290-gpucc.yaml | 76 ++++++++++++++++++++++ include/dt-bindings/clock/qcom,qcm2290-gpucc.h | 32 +++++++++ 2 files changed, 108 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml new file mode 100644 index 000000000000..a16cb7e87e26 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,qcm2290-gpucc.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,qcm2290-gpucc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Graphics Clock & Reset Controller on QCM2290 + +maintainers: + - Konrad Dybcio + +description: | + Qualcomm graphics clock control module provides the clocks, resets and power + domains on Qualcomm SoCs. + + See also:: + include/dt-bindings/clock/qcom,qcm2290-gpucc.h + +properties: + compatible: + - const: qcom,qcm2290-gpucc + + reg: + maxItems: 1 + + clocks: + items: + - description: AHB interface clock, + - description: SoC CXO clock + - description: GPLL0 main branch source + - description: GPLL0 div branch source + + '#clock-cells': + const: 1 + + '#reset-cells': + const: 1 + + '#power-domain-cells': + const: 1 + +required: + - compatible + - reg + - clocks + - '#clock-cells' + - '#reset-cells' + - '#power-domain-cells' + +additionalProperties: false + +examples: + - | + #include + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + 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>; + }; + }; +... diff --git a/include/dt-bindings/clock/qcom,qcm2290-gpucc.h b/include/dt-bindings/clock/qcom,qcm2290-gpucc.h new file mode 100644 index 000000000000..7c76dd05278f --- /dev/null +++ b/include/dt-bindings/clock/qcom,qcm2290-gpucc.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2024, Linaro Limited + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_QCM2290_H +#define _DT_BINDINGS_CLK_QCOM_GPU_CC_QCM2290_H + +/* GPU_CC clocks */ +#define GPU_CC_AHB_CLK 0 +#define GPU_CC_CRC_AHB_CLK 1 +#define GPU_CC_CX_GFX3D_CLK 2 +#define GPU_CC_CX_GMU_CLK 3 +#define GPU_CC_CX_SNOC_DVM_CLK 4 +#define GPU_CC_CXO_AON_CLK 5 +#define GPU_CC_CXO_CLK 6 +#define GPU_CC_GMU_CLK_SRC 7 +#define GPU_CC_GX_GFX3D_CLK 8 +#define GPU_CC_GX_GFX3D_CLK_SRC 9 +#define GPU_CC_PLL0 10 +#define GPU_CC_SLEEP_CLK 11 +#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK 12 + +/* Resets */ +#define GPU_GX_BCR 0 + +/* GDSCs */ +#define GPU_CX_GDSC 0 +#define GPU_GX_GDSC 1 + +#endif From patchwork Mon Feb 19 13:35:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203077 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1287070dyc; Mon, 19 Feb 2024 05:37:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXFhubHmQVIwIZcmhV4guXQ+W2eJVS85v1sfLGbufV+LSGTavMdyxCdmxGAaYJ/ISreeVYMDPRfrBs65nNn30GFABJE0Q== X-Google-Smtp-Source: AGHT+IGbMqm3SrLLzbrqj2ZPIhDY6QlJ8SO+gVNkdiHkYBUYmqa9IzXr86AnhXdc6xaLkgKRiNvK X-Received: by 2002:a19:6405:0:b0:511:a0d5:9777 with SMTP id y5-20020a196405000000b00511a0d59777mr7724690lfb.42.1708349846067; Mon, 19 Feb 2024 05:37:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349846; cv=pass; d=google.com; s=arc-20160816; b=iRYxaNNzsQygl6pJDzFqlNwKOglKVgvXodlk56pz0KRkemJTfKWBsIPFfb9kwuWY8M WjmqwtvU0DjrOMT4ehTf7WGw/dlhJrNyCu/k47V5v4rxDQ98luGdavSNyzxY0HySB0Cv W9xxOAq/DXkye/PvL5OXZ2gvBvB7/4xZf8dWLb6djMH1JQmQstFuuA8lwf2Z3lD+AEN7 hlyaLFpU5uh/QRCupqGd4JWBRHfUfwrOZr74WNVHltRmMDOPeWbirun8lAL/8odpWZI+ A5+RauxuMzgzyIqKIbFDL1+hr1szFY1EcqsizA+Z2KBaL3GjVYSVbm1Jtkf4IIe3aWkQ 9bkg== 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=7M1e7EmpHdXumiDD0LMXKq+SIP28LzfgFkNX1b4YVQE=; fh=MoM9TFc0mxq268SZctS7flWcVVzYksRGTCyHbPkyMZw=; b=RlvGJDJrLN/sUcNNRZKIufSI0iJbsPy4zqXrbUSzhwJ4u0vcKW2TbJqxOqvu6O3SIk O2aznfrygBkNlKphXkTe5lkroaUHcYIc8XkZONqSRRKRcQ66PQSsDJ9HqXqezeoKAiBL nrLc/0DXzk9qiw0vcVgwqWeF9kCP3qK0Sjhdvnk1fmfdp73ZCOvs6XvDnZbgS2IIbJDt yQr/GwLnAzqzo52tHblWTKIv+3nTVu4/N59Jb3Mc+S5M9tAHEicjhW47D70XQCWXjQho 4Jf6X5BIk7rjozSpLaWTSdK6BRBrGY1UIvYa2g2nhvSKk0zhImC8ryf/+H74drQSNNEa //4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="GrD6zCE/"; 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-71413-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71413-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x8-20020a50ba88000000b00561f408c859si2434167ede.45.2024.02.19.05.37.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:37:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71413-ouuuleilei=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="GrD6zCE/"; 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-71413-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71413-ouuuleilei=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 8F73A1F21976 for ; Mon, 19 Feb 2024 13:37:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14A82381A8; Mon, 19 Feb 2024 13:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GrD6zCE/" Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 82347376E4 for ; Mon, 19 Feb 2024 13:36:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349773; cv=none; b=XU1z/psVlkWXFeSx83Ezr3XZoLtQlcVU2y3TD/EQXhOeDNw6YW2BedDqriw7JNLzF9a0LIj4HHTlzcJ+kWwS7csYafsnFLMenw0SDA7fWt0TRUZB7QBxMDVQHjcXbmJZLTs+Nw9a7aSF41SKWGueHOjnrwEzABMAjSwkmtA/moE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349773; c=relaxed/simple; bh=79Y0MxxohdGitgftXN/Ssqm4c/Qk+6TMe7Z4Gt+3Bxg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bPWI2h+nFMLlUUQmHDWMXaXSvZzsA0aU8aY7KRl4O3SU7xw92zu+v6OQgwcfTHbYz7jcAU3C8nzbTg/gOUh32VOHmUI6se1m9GZAh1iy3dl3WgVQagoZ8TB6AQMozoxoZmGSnFqNYoujCuFzEoj4/AMtvOzTvZ5/UI6dA40sNPY= 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=GrD6zCE/; arc=none smtp.client-ip=209.85.208.47 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-f47.google.com with SMTP id 4fb4d7f45d1cf-564647bcdbfso1186298a12.2 for ; Mon, 19 Feb 2024 05:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349770; x=1708954570; 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=7M1e7EmpHdXumiDD0LMXKq+SIP28LzfgFkNX1b4YVQE=; b=GrD6zCE/AfxRExmLVtZOeNgI/m3DjLilp+VKVqujXCbIyYWvgzFz1mADwUIh4JSGjb Y6J6aEyAzGX8gQQk5vpfGolASyhx7xI77+s+aEC1FBGl9s4x4Lu3Df7A55bPDwgaQpqH me5WqUglHw72xwX8LQinQxKoGW0ti0r9aP0ePeT+mBUPIa9RnM2wy7eEpHGOr79E8CEH syZ8SW6Kwgl8g35avzMZ0XjVJqb8qc96t+3lxTBemBsGBZFPs82MC2fN+rEZMGk7Bjph 6+tVFqrXR3HYJpBzUCvQrwere/kJH03UWFgdbd6ZA1A0LhMaW1zsMEUNX32SoFHeskMX DYgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349770; x=1708954570; 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=7M1e7EmpHdXumiDD0LMXKq+SIP28LzfgFkNX1b4YVQE=; b=N6psZ2HoxqWfe8jf5grh3OyNBmAUMfNWg7jDnzih6ag6HwS8EQAM+594i1AIqPYuHy 4sceKScaGE+sUpFveMdUjhSkzR7oxJ3sIYD6dZOotgIBWT19TEXCzVCAU7TvZQXFWu/Z jGJeW39LzznSeJNXYjoPj+B+Bd+zJwq+uFjtptbEb7gj6f0dloRja69V51nimC7Y/ogX kKfiNzjkLxgMRiF5JppvW+BeZavyXgxQQzkFdLXSlcH9YSBAZBYCbeYjfpLh1bgbZASx a75PWzMCy2cqcq9kxmJFC5+NPn8LaxHDHZYz6d7scz3Pz7FDAnMaLdbBXsJF2uqFEiAV xUIA== X-Forwarded-Encrypted: i=1; AJvYcCU5viZVL/Ep1WHPWCeVwLzYXRqeqwQGjawraYI5JbbU9eDf+0BMvehl+2a0YUD8avRQ+A+Cg1H95mslFI7G0jI68LcSLoq8HSNChyTa X-Gm-Message-State: AOJu0YypV4X0JIcOJ0i6c5AM3cvVF/rQWghK3hmuICLrUflcPo5HnU07 IFib4U1jih1bmG1DbEZ3CuXqWAt9waE9dWFUlFo49hb54fuHBc4fYf1ve7snpkE= X-Received: by 2002:a05:6402:1844:b0:564:3830:b9a5 with SMTP id v4-20020a056402184400b005643830b9a5mr3243810edy.21.1708349769992; Mon, 19 Feb 2024 05:36:09 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:09 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:48 +0100 Subject: [PATCH 3/8] clk: qcom: clk-alpha-pll: Add HUAYRA_2290 support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-3-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=4133; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=79Y0MxxohdGitgftXN/Ssqm4c/Qk+6TMe7Z4Gt+3Bxg=; b=4nQYbPVeI8Be4nvkpxVfXN4FtQYQuTUrRB6I4LVYY/kCkQW6/OyzfiXXuRABMb+6jrO9nZF9u NlAaZfORH/nBJ6Eq1c667ga2Qun9siLGQF88pnu9nhecTmr3DokAeBS X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791334648609768493 X-GMAIL-MSGID: 1791334648609768493 Commit 134b55b7e19f ("clk: qcom: support Huayra type Alpha PLL") introduced an entry to the alpha offsets array, but diving into QCM2290 downstream and some documentation, it turned out that the name Huayra apparently has been used quite liberally across many chips, even with noticeably different hardware. Introduce another set of offsets and a new configure function for the Huayra PLL found on QCM2290. This is required e.g. for the consumers of GPUCC_PLL0 to properly start. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/clk-alpha-pll.c | 45 ++++++++++++++++++++++++++++++++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 3 +++ 2 files changed, 48 insertions(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 8a412ef47e16..61b5abd13782 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -244,6 +244,19 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { [PLL_OFF_OPMODE] = 0x30, [PLL_OFF_STATUS] = 0x3c, }, + [CLK_ALPHA_PLL_TYPE_HUAYRA_2290] = { + [PLL_OFF_L_VAL] = 0x04, + [PLL_OFF_ALPHA_VAL] = 0x08, + [PLL_OFF_USER_CTL] = 0x0c, + [PLL_OFF_CONFIG_CTL] = 0x10, + [PLL_OFF_CONFIG_CTL_U] = 0x14, + [PLL_OFF_CONFIG_CTL_U1] = 0x18, + [PLL_OFF_TEST_CTL] = 0x1c, + [PLL_OFF_TEST_CTL_U] = 0x20, + [PLL_OFF_TEST_CTL_U1] = 0x24, + [PLL_OFF_OPMODE] = 0x28, + [PLL_OFF_STATUS] = 0x38, + }, }; EXPORT_SYMBOL_GPL(clk_alpha_pll_regs); @@ -779,6 +792,38 @@ static long clk_alpha_pll_round_rate(struct clk_hw *hw, unsigned long rate, return clamp(rate, min_freq, max_freq); } +void clk_huayra_2290_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, + const struct alpha_pll_config *config) +{ + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL(pll), config->config_ctl_val); + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U(pll), config->config_ctl_hi_val); + clk_alpha_pll_write_config(regmap, PLL_CONFIG_CTL_U1(pll), config->config_ctl_hi1_val); + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL(pll), config->test_ctl_val); + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U(pll), config->test_ctl_hi_val); + clk_alpha_pll_write_config(regmap, PLL_TEST_CTL_U1(pll), config->test_ctl_hi1_val); + clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l); + clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); + clk_alpha_pll_write_config(regmap, PLL_USER_CTL(pll), config->user_ctl_val); + + /* Set PLL_BYPASSNL */ + regmap_update_bits(regmap, PLL_MODE(pll), PLL_BYPASSNL, PLL_BYPASSNL); + + /* Wait 5 us between setting BYPASS and deasserting reset */ + mb(); + udelay(5); + + /* Take PLL out from reset state */ + regmap_update_bits(regmap, PLL_MODE(pll), PLL_RESET_N, PLL_RESET_N); + + /* Wait 50us for PLL_LOCK_DET bit to go high */ + mb(); + usleep_range(50, 55); + + /* Enable PLL output */ + regmap_update_bits(regmap, PLL_MODE(pll), PLL_OUTCTRL, PLL_OUTCTRL); +} +EXPORT_SYMBOL(clk_huayra_2290_pll_configure); + static unsigned long alpha_huayra_pll_calc_rate(u64 prate, u32 l, u32 a) { diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index fb6d50263bb9..91d3d6f19eae 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -29,6 +29,7 @@ enum { CLK_ALPHA_PLL_TYPE_BRAMMO_EVO, CLK_ALPHA_PLL_TYPE_STROMER, CLK_ALPHA_PLL_TYPE_STROMER_PLUS, + CLK_ALPHA_PLL_TYPE_HUAYRA_2290, CLK_ALPHA_PLL_TYPE_MAX, }; @@ -191,6 +192,8 @@ extern const struct clk_ops clk_alpha_pll_rivian_evo_ops; void clk_alpha_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config); +void clk_huayra_2290_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, + const struct alpha_pll_config *config); void clk_fabia_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, const struct alpha_pll_config *config); void clk_trion_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, From patchwork Mon Feb 19 13:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203079 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1287272dyc; Mon, 19 Feb 2024 05:37:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPa3/bYK7W4Bwd49O1w8hma6jaUf1Pp3bnO8j/vae3lQT8H/14+nZ42HY1v9zD0x4R70MGsHJW2eB2WbkUQpKvG05MIA== X-Google-Smtp-Source: AGHT+IHv+qIYFAxBhfGs47cyizkJvSN/5uFaJvJ0ZOm4oEUN9kZ2rjr1nnuQV5i++8m4eUX9PcCQ X-Received: by 2002:a05:6402:7c8:b0:564:81c8:cf8a with SMTP id u8-20020a05640207c800b0056481c8cf8amr1256143edy.20.1708349869154; Mon, 19 Feb 2024 05:37:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349869; cv=pass; d=google.com; s=arc-20160816; b=YKwYt+hsrXZpSUKuxvdQsMEdqdczFGFsNMBcKbIi1pFrKCiqAGol2IutAu5IywwU1w w7uUCzzuhOWLWGcE5/KwlI5f2s6Dbp724VbBYZIGh34WvtRl1Gywrd1HQ0qt8MjUc0bc BpDKIruXS0rt+4lSt4k6LmO6lO0oC82K0ApKjGR9v8OSW9dRQ1zx/o9N/UQhZO8dTLFH jGfuJscnp1Hub6hNfzcyRCZTHq5HkGATGSXPKan1PLNt9WVvQdG9LsuRhJg7KvMPkuO/ AlGrHFFPXBzXiUEe4PtgUtgqfoeMQE9vTkR5ORb8fs4ouXXC9E5CgQ/DbSoJYszLVHCH V7nA== 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=5jJJ8MRQY8vd4REempZLyWdJ24T2uzFSeOD4kaZSfnw=; fh=SRmIHE1plpzIqYoYQupkCR1P/Eb1WEVxXWgOUsuhF9s=; b=dLQnalEGReACrcSZbw32d2f9/yTqP+1Nz4DAcWieE8u7vhmOeirmLpXSiOEoUVG94o 3I0ZFcMpXVQfnKHTucaqxzo7UPU4WF40ZvERDnTH0Cz+rFlb8QOS0Pd9jH7HcQg/WQ4L GLMb3xvKtSePSZ92IpXGwZAp/oYPUkh+ZT9/TV2aXTlt2BAbJ7C5bSBgzKIr891sjK1d vliq7QUEm2Zt1NdKEV8ZTo2nljE6y0tzCigf8FWWFCNXNQydCJj80GNqtDFlisxOcUq5 gu2oiFIoA3rHxOJIv38R/QlkiFpG+Wv6bM0utYnmZPgQa/D5nQl7Uw0zrJOJoLWGrSj6 XJwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ICO5+oDH; 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-71414-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71414-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r7-20020a056402234700b005610b043f9esi2443748eda.384.2024.02.19.05.37.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:37:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71414-ouuuleilei=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=ICO5+oDH; 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-71414-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71414-ouuuleilei=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 99AB21F2108B for ; Mon, 19 Feb 2024 13:37:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D0E33B19C; Mon, 19 Feb 2024 13:36:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ICO5+oDH" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 2DD0E3771E for ; Mon, 19 Feb 2024 13:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349777; cv=none; b=rsRAa06PHJyaxJnzo0TafJhOwG7jRlyo6E72mKVx7FjzByamRrQNq8U9BaONtbY0/ZQroz9s2yz9m/2755GmP83cXRitgTg0FeoMb6KKIxUTFxpfCthHQSowi1EZGtxULAUyT554QsQx//cQ8we6LjXGKav+aLk2JZSPpmnQnEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349777; c=relaxed/simple; bh=dO647o6aBNMCZgw8TK/bcr4OlqfgIEZ68OVWZawfZFw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pTpK2gQ3LJhaUKcQiTN3xRJ6tvPI+UxzIcPeCVAUYvbg/hXqwzwUseFObHugiODIXmqBTuGPKu5ukcHhCuUTQgbPXs647L6fityBEF/vaqfqTHyfumKr0M76zJFIzLpkrpW8WIIP+5yv9AD0Z1kSpOJ6RPfHaAfTzQsCjXEQPqs= 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=ICO5+oDH; arc=none smtp.client-ip=209.85.208.41 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-f41.google.com with SMTP id 4fb4d7f45d1cf-55a035669d5so7019645a12.2 for ; Mon, 19 Feb 2024 05:36:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349772; x=1708954572; 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=5jJJ8MRQY8vd4REempZLyWdJ24T2uzFSeOD4kaZSfnw=; b=ICO5+oDH0erpKTQNB2BVblhDF0lYd1rYl7medMasV+Ytt/2rDhw7VVlFZdJ7gLsOiv 6qJ+TN2rKO5BLVyC4wRSUSrSETlOkXIDViufSQzkAYh5aIzU5NDnWQS8QAAXXr9ZZIMO UYkLAE8DcKG3ej1sOdS2ncVjogrT7lWetUHadO+LYAUJeOoQ5EoZTtt5U+eFoxBMf8Vm X9vGRFftm8bceHhdcnH3ndgjq1ZZbvkDLQB12vTvHcBzW89ifRLSpgrtCtvHbdwBH2ck 0e1nD8GkdgFmW86fwCcNMsFYCqABgGGmrHiK1dWez3P0vWlINzN1LuLTBBZXOK1QMdcV LuIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349772; x=1708954572; 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=5jJJ8MRQY8vd4REempZLyWdJ24T2uzFSeOD4kaZSfnw=; b=EsYAkYvrFr4Gzr8lK/i++eeNAfJakubRzPU+SJfLpqAJHedKIxD4jpxhIfdWFYlgWG /KB36sSzBKLm3F5zLt/SHKeF2JVNph6ENJ9WqeCAm2g0flgjF/MutRnOrHc3tQh+LZYd vian4t5k+b6nmluLZ4DbeDMYMy7dsSawI5VY77zWcVrytdJ7LYNi7uLoUW5anE9hBjSd bTpwUzpaAERi5Emur1sMfm4x0qUFrITOUbpfPklKsAFchDe+o1cNb+H4h+Cwur67ysni As+UJQ+LOaAjFdBanlk41apCy9AYReXe6xjjam3nJ3kgA9HKCo1JunMUcw5dNqrk+zee 1Pmw== X-Forwarded-Encrypted: i=1; AJvYcCV5BGtsTLTESayW61P+T93vqXZVJDxBbPaBNvHHciUyQndlcspkvBlNOnvM3gj1yw3ZpLcJQDcZtqtyUg2Bv0X+VAfFZe9FBFVkjzvf X-Gm-Message-State: AOJu0Ywz1j/w5/cSEXAjZIBCsDol6gYNC55OwZy/SoVLhNx+TXOBsvGX iTzuYr3c/GVE2BO8ZEVkxJqhEXQm6izxRsibR2+kQTGAj3DBBT4gZFProdAdDII= X-Received: by 2002:a05:6402:b38:b0:564:aa2c:a6e0 with SMTP id bo24-20020a0564020b3800b00564aa2ca6e0mr335769edb.4.1708349772587; Mon, 19 Feb 2024 05:36:12 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:12 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:49 +0100 Subject: [PATCH 4/8] clk: qcom: Add QCM2290 GPU clock controller driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-4-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=13117; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=dO647o6aBNMCZgw8TK/bcr4OlqfgIEZ68OVWZawfZFw=; b=6FlC3qLI5GiuvBX7DPfQOzUATj0eTQ+4qpLx9kjr72XqPDW9NyO6VUVCXuvfZCa+9DV0uh5SA syGcRS9lRs4CBJMY24cLdlDeRgJmVc+DU4By27VO7L/wHptgvjd3/eI X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791334672685129852 X-GMAIL-MSGID: 1791334672685129852 Add a driver for the GPU clock controller block found on the QCM2290 SoC. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gpucc-qcm2290.c | 423 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 433 insertions(+) diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index 4580edbd13ea..d70ea4548755 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig @@ -65,6 +65,15 @@ config CLK_X1E80100_TCSRCC Support for the TCSR clock controller on X1E80100 devices. Say Y if you want to use peripheral devices such as SD/UFS. +config CLK_QCM2290_GPUCC + tristate "QCM2290 Graphics Clock Controller" + depends on ARM64 || COMPILE_TEST + select CLK_QCM2290_GCC + help + Support for the graphics clock controller on QCM2290 devices. + Say Y if you want to support graphics controller devices and + functionality such as 3D graphics. + config QCOM_A53PLL tristate "MSM8916 A53 PLL" help diff --git a/drivers/clk/qcom/Makefile b/drivers/clk/qcom/Makefile index 1da65ca78e24..b8d49c054558 100644 --- a/drivers/clk/qcom/Makefile +++ b/drivers/clk/qcom/Makefile @@ -26,6 +26,7 @@ obj-$(CONFIG_CLK_X1E80100_DISPCC) += dispcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_GCC) += gcc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_GPUCC) += gpucc-x1e80100.o obj-$(CONFIG_CLK_X1E80100_TCSRCC) += tcsrcc-x1e80100.o +obj-$(CONFIG_CLK_QCM2290_GPUCC) += gpucc-qcm2290.o obj-$(CONFIG_IPQ_APSS_PLL) += apss-ipq-pll.o obj-$(CONFIG_IPQ_APSS_6018) += apss-ipq6018.o obj-$(CONFIG_IPQ_GCC_4019) += gcc-ipq4019.o diff --git a/drivers/clk/qcom/gpucc-qcm2290.c b/drivers/clk/qcom/gpucc-qcm2290.c new file mode 100644 index 000000000000..b6e20d63ac85 --- /dev/null +++ b/drivers/clk/qcom/gpucc-qcm2290.c @@ -0,0 +1,423 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2024, Linaro Limited + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "clk-alpha-pll.h" +#include "clk-branch.h" +#include "clk-rcg.h" +#include "clk-regmap.h" +#include "clk-regmap-divider.h" +#include "clk-regmap-mux.h" +#include "clk-regmap-phy-mux.h" +#include "gdsc.h" +#include "reset.h" + +enum { + DT_GCC_AHB_CLK, + DT_BI_TCXO, + DT_GCC_GPU_GPLL0_CLK_SRC, + DT_GCC_GPU_GPLL0_DIV_CLK_SRC, +}; + +enum { + P_BI_TCXO, + P_GPLL0_OUT_MAIN, + P_GPLL0_OUT_MAIN_DIV, + P_GPU_CC_PLL0_2X_DIV_CLK_SRC, + P_GPU_CC_PLL0_OUT_AUX, + P_GPU_CC_PLL0_OUT_AUX2, + P_GPU_CC_PLL0_OUT_MAIN, +}; + +static const struct pll_vco huayra_vco[] = { + { 600000000, 3300000000, 0 }, + { 600000000, 2200000000, 1 }, +}; + +static const struct alpha_pll_config gpu_cc_pll0_config = { + .l = 0x25, + .config_ctl_val = 0x200d4828, + .config_ctl_hi_val = 0x6, + .test_ctl_val = GENMASK(28, 26), + .test_ctl_hi_val = BIT(14), + .user_ctl_val = 0xf, +}; + +static struct clk_alpha_pll gpu_cc_pll0 = { + .offset = 0x0, + .vco_table = huayra_vco, + .num_vco = ARRAY_SIZE(huayra_vco), + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA_2290], + .clkr = { + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_pll0", + .parent_data = &(const struct clk_parent_data) { + .index = DT_BI_TCXO, + }, + .num_parents = 1, + .ops = &clk_alpha_pll_huayra_ops, + }, + }, +}; + +static const struct parent_map gpu_cc_parent_map_0[] = { + { P_BI_TCXO, 0 }, + { P_GPU_CC_PLL0_OUT_MAIN, 1 }, + { P_GPLL0_OUT_MAIN, 5 }, + { P_GPLL0_OUT_MAIN_DIV, 6 }, +}; + +static const struct clk_parent_data gpu_cc_parent_data_0[] = { + { .index = DT_BI_TCXO, }, + { .hw = &gpu_cc_pll0.clkr.hw, }, + { .index = DT_GCC_GPU_GPLL0_CLK_SRC, }, + { .index = DT_GCC_GPU_GPLL0_DIV_CLK_SRC, }, +}; + +static const struct parent_map gpu_cc_parent_map_1[] = { + { P_BI_TCXO, 0 }, + { P_GPU_CC_PLL0_2X_DIV_CLK_SRC, 1 }, + { P_GPU_CC_PLL0_OUT_AUX2, 2 }, + { P_GPU_CC_PLL0_OUT_AUX, 3 }, + { P_GPLL0_OUT_MAIN, 5 }, +}; + +static const struct clk_parent_data gpu_cc_parent_data_1[] = { + { .index = DT_BI_TCXO, }, + { .hw = &gpu_cc_pll0.clkr.hw, }, + { .hw = &gpu_cc_pll0.clkr.hw, }, + { .hw = &gpu_cc_pll0.clkr.hw, }, + { .index = DT_GCC_GPU_GPLL0_CLK_SRC, }, +}; + +static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = { + F(200000000, P_GPLL0_OUT_MAIN, 3, 0, 0), + { } +}; + +static struct clk_rcg2 gpu_cc_gmu_clk_src = { + .cmd_rcgr = 0x1120, + .mnd_width = 0, + .hid_width = 5, + .parent_map = gpu_cc_parent_map_0, + .freq_tbl = ftbl_gpu_cc_gmu_clk_src, + .clkr.hw.init = &(struct clk_init_data){ + .name = "gpu_cc_gmu_clk_src", + .parent_data = gpu_cc_parent_data_0, + .num_parents = ARRAY_SIZE(gpu_cc_parent_data_0), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_shared_ops, + }, +}; + +static const struct freq_tbl ftbl_gpu_cc_gx_gfx3d_clk_src[] = { + F(355200000, P_GPU_CC_PLL0_OUT_AUX, 2, 0, 0), + F(537600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(672000000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(844800000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(921600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(1017600000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + F(1123200000, P_GPU_CC_PLL0_OUT_AUX2, 2, 0, 0), + { } +}; + +static struct clk_rcg2 gpu_cc_gx_gfx3d_clk_src = { + .cmd_rcgr = 0x101c, + .mnd_width = 0, + .hid_width = 5, + .parent_map = gpu_cc_parent_map_1, + .freq_tbl = ftbl_gpu_cc_gx_gfx3d_clk_src, + .clkr.hw.init = &(struct clk_init_data){ + .name = "gpu_cc_gx_gfx3d_clk_src", + .parent_data = gpu_cc_parent_data_1, + .num_parents = ARRAY_SIZE(gpu_cc_parent_data_1), + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_rcg2_ops, + }, +}; + +static struct clk_branch gpu_cc_ahb_clk = { + .halt_reg = 0x1078, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1078, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_ahb_clk", + .flags = CLK_IS_CRITICAL, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_crc_ahb_clk = { + .halt_reg = 0x107c, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x107c, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_crc_ahb_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_gfx3d_clk = { + .halt_reg = 0x10a4, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x10a4, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_cx_gfx3d_clk", + .parent_data = &(const struct clk_parent_data){ + .hw = &gpu_cc_gx_gfx3d_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_gmu_clk = { + .halt_reg = 0x1098, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x1098, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_cx_gmu_clk", + .parent_data = &(const struct clk_parent_data){ + .hw = &gpu_cc_gmu_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cx_snoc_dvm_clk = { + .halt_reg = 0x108c, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x108c, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_cx_snoc_dvm_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cxo_aon_clk = { + .halt_reg = 0x1004, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1004, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_cxo_aon_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_cxo_clk = { + .halt_reg = 0x109c, + .halt_check = BRANCH_HALT, + .clkr = { + .enable_reg = 0x109c, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_cxo_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_gx_gfx3d_clk = { + .halt_reg = 0x1054, + .halt_check = BRANCH_HALT_DELAY, + .clkr = { + .enable_reg = 0x1054, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_gx_gfx3d_clk", + .parent_data = &(const struct clk_parent_data){ + .hw = &gpu_cc_gx_gfx3d_clk_src.clkr.hw, + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_sleep_clk = { + .halt_reg = 0x1090, + .halt_check = BRANCH_VOTED, + .clkr = { + .enable_reg = 0x1090, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_sleep_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gpu_cc_hlos1_vote_gpu_smmu_clk = { + .halt_reg = 0x5000, + .halt_check = BRANCH_VOTED, + .clkr = { + .enable_reg = 0x5000, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gpu_cc_hlos1_vote_gpu_smmu_clk", + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct gdsc gpu_cx_gdsc = { + .gdscr = 0x106c, + .gds_hw_ctrl = 0x1540, + .pd = { + .name = "gpu_cx_gdsc", + }, + .pwrsts = PWRSTS_OFF_ON, + .flags = VOTABLE, +}; + +static struct gdsc gpu_gx_gdsc = { + .gdscr = 0x100c, + .clamp_io_ctrl = 0x1508, + .resets = (unsigned int []){ GPU_GX_BCR }, + .reset_count = 1, + .pd = { + .name = "gpu_gx_gdsc", + }, + .parent = &gpu_cx_gdsc.pd, + .pwrsts = PWRSTS_OFF_ON, + .flags = CLAMP_IO | AON_RESET | SW_RESET, +}; + +static struct clk_regmap *gpu_cc_qcm2290_clocks[] = { + [GPU_CC_AHB_CLK] = &gpu_cc_ahb_clk.clkr, + [GPU_CC_CRC_AHB_CLK] = &gpu_cc_crc_ahb_clk.clkr, + [GPU_CC_CX_GFX3D_CLK] = &gpu_cc_cx_gfx3d_clk.clkr, + [GPU_CC_CX_GMU_CLK] = &gpu_cc_cx_gmu_clk.clkr, + [GPU_CC_CX_SNOC_DVM_CLK] = &gpu_cc_cx_snoc_dvm_clk.clkr, + [GPU_CC_CXO_AON_CLK] = &gpu_cc_cxo_aon_clk.clkr, + [GPU_CC_CXO_CLK] = &gpu_cc_cxo_clk.clkr, + [GPU_CC_GMU_CLK_SRC] = &gpu_cc_gmu_clk_src.clkr, + [GPU_CC_GX_GFX3D_CLK] = &gpu_cc_gx_gfx3d_clk.clkr, + [GPU_CC_GX_GFX3D_CLK_SRC] = &gpu_cc_gx_gfx3d_clk_src.clkr, + [GPU_CC_PLL0] = &gpu_cc_pll0.clkr, + [GPU_CC_SLEEP_CLK] = &gpu_cc_sleep_clk.clkr, + [GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK] = &gpu_cc_hlos1_vote_gpu_smmu_clk.clkr, +}; + +static const struct qcom_reset_map gpu_cc_qcm2290_resets[] = { + [GPU_GX_BCR] = { 0x1008 }, +}; + +static struct gdsc *gpu_cc_qcm2290_gdscs[] = { + [GPU_CX_GDSC] = &gpu_cx_gdsc, + [GPU_GX_GDSC] = &gpu_gx_gdsc, +}; + +static const struct regmap_config gpu_cc_qcm2290_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x9000, + .fast_io = true, +}; + + +static const struct qcom_cc_desc gpu_cc_qcm2290_desc = { + .config = &gpu_cc_qcm2290_regmap_config, + .clks = gpu_cc_qcm2290_clocks, + .num_clks = ARRAY_SIZE(gpu_cc_qcm2290_clocks), + .resets = gpu_cc_qcm2290_resets, + .num_resets = ARRAY_SIZE(gpu_cc_qcm2290_resets), + .gdscs = gpu_cc_qcm2290_gdscs, + .num_gdscs = ARRAY_SIZE(gpu_cc_qcm2290_gdscs), +}; + +static const struct of_device_id gpu_cc_qcm2290_match_table[] = { + { .compatible = "qcom,qcm2290-gpucc" }, + { } +}; +MODULE_DEVICE_TABLE(of, gpu_cc_qcm2290_match_table); + +static int gpu_cc_qcm2290_probe(struct platform_device *pdev) +{ + struct regmap *regmap; + int ret; + + regmap = qcom_cc_map(pdev, &gpu_cc_qcm2290_desc); + if (IS_ERR(regmap)) + return PTR_ERR(regmap); + + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret) + return ret; + + ret = devm_pm_clk_create(&pdev->dev); + if (ret) + return ret; + + ret = pm_clk_add(&pdev->dev, NULL); + if (ret < 0) { + dev_err(&pdev->dev, "failed to acquire ahb clock\n"); + return ret; + } + + ret = pm_runtime_resume_and_get(&pdev->dev); + if (ret) + return ret; + + clk_huayra_2290_pll_configure(&gpu_cc_pll0, regmap, &gpu_cc_pll0_config); + + regmap_update_bits(regmap, 0x1060, BIT(0), BIT(0)); /* GPU_CC_GX_CXO_CLK */ + + ret = qcom_cc_really_probe(pdev, &gpu_cc_qcm2290_desc, regmap); + if (ret) { + dev_err(&pdev->dev, "Failed to register display clock controller\n"); + goto out_pm_runtime_put; + } + +out_pm_runtime_put: + pm_runtime_put_sync(&pdev->dev); + + return 0; +} + +static struct platform_driver gpu_cc_qcm2290_driver = { + .probe = gpu_cc_qcm2290_probe, + .driver = { + .name = "gpucc-qcm2290", + .of_match_table = gpu_cc_qcm2290_match_table, + }, +}; +module_platform_driver(gpu_cc_qcm2290_driver); + +MODULE_DESCRIPTION("QTI QCM2290 GPU clock controller driver"); +MODULE_LICENSE("GPL"); From patchwork Mon Feb 19 13:35:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203078 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1287188dyc; Mon, 19 Feb 2024 05:37:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWei2J5NmyRKCEIJBB32i5FQRv7F1I4aUCuxbPOzF5iXeVGoG+nlNMbM0I+fqiy9f0Qu+bV9GgPksA4/rujGXdjz30GiQ== X-Google-Smtp-Source: AGHT+IHnYpBn9kEBopBes8EodVXkIdaeTzDDutFIhlPRdJDkunxbYZjy6eb1GVOdNznHPKVFOI5V X-Received: by 2002:ac2:5f50:0:b0:512:bc13:5ff0 with SMTP id 16-20020ac25f50000000b00512bc135ff0mr989652lfz.50.1708349859982; Mon, 19 Feb 2024 05:37:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349859; cv=pass; d=google.com; s=arc-20160816; b=njDFee2JBCavEjA1b14u0L25aWhBouN5nq0sK0fCepIzVUzJSp8cJLT6MqozFnGlp/ M3RzU9pdiPkDJ+lw9Q/LbUjw8IxPKhA6YFS6CDFDgLj5IfpL6sV4ziL9O16aBWMKLoJi vU/LKOiN0JLHf2p0fm2Pw+Zl3ZLVux2dxXog5v9chjBpfe545ehP7g7/Yk+3gFGw5NZt Sgz2IUAV9ls3h+c0qCVGO1sl7YKOUR+KkosIqGCmGMM4LDxgdKs2URfGdnrfbR6KSyAg ZTlZwLy/AlR9Dyj3CED279ejrVosdLbg0G8nq2SisJQPZS7YWrUk8Q/QxZKntIC520Gw FCMw== 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=mjP12Zq06nby7HMeSJ/EUbYJ63ENO6BkYD8FuiAok6w=; fh=yvy20zlFRF+sH/M7ztBRBBZ20bfQVF/rlU9hlaDhTXE=; b=hK7IZQ0qYnpJhLhxWmutydl7nuNuJBre0pUap5UzUbUz6+z45hYnmVqWKvrx1D3z5K Uc6fj0XoOa/xALf3Slwru7ITuNM//X4O4BvVrvvbcbldMBH3eVc6fMRN/SA2IXdnzy+/ 0qDotQreSStyVqcmVCxMSfx4PEgWesD+Pf/pF9vqVDscHH8zIAaGMMDc69KxBLwwl/jC aMMebuvpxXmLQHP8+Xf0AcH542JRAgtm3mU6GdczcmAUlMWzsyWOSE7DcdH//uXq7nKG wllTxu1+WT4OfiDMmSKoiATqcIMV8LrveGlHo65SCIr8kNGWawH/nmiwVDqWEnhvVXki Y3uA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ssl4sjxJ; 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-71415-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71415-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qk7-20020a170906d9c700b00a388d084d2bsi1670118ejb.744.2024.02.19.05.37.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:37:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71415-ouuuleilei=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=Ssl4sjxJ; 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-71415-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71415-ouuuleilei=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 3C8101F21997 for ; Mon, 19 Feb 2024 13:37:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 671BA3A1BF; Mon, 19 Feb 2024 13:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ssl4sjxJ" Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 8B66C381D4 for ; Mon, 19 Feb 2024 13:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349778; cv=none; b=p0T7Rbiy/hQBdYxWfYA7HPdLM+WfpxX1wN4Qhg79Jrc49NjIm89oC0CfBNg+TTQXRJsbLC0IvzqX0wje0D26nsQcBycnyCGnHSjz2DU4jAj5QGsjab0UnoGU7Ss+GeVSazg/pbyC7z41KrigdAalWmkOSJfT2oEP2ePms9TiGyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349778; c=relaxed/simple; bh=2VUaTHaFXwk9sVr7gsAachnQpNO5KMem0UoFA2HST7g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EReeqXtuz0t6V4EGJX1f4n5uc9IyiSJHIz1JkrC566ul5nYYP1vckmgyza6O5Q9dJNN3NsBBkN20nzvyVxjczy1kA0cIls/AXMyebAvgZLh9LKyint+hd1ZQmcIWZlH6nk39iWqW6duyWS+nmiKw9xuIpWSDKYEwdHugzztKEps= 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=Ssl4sjxJ; arc=none smtp.client-ip=209.85.208.44 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-f44.google.com with SMTP id 4fb4d7f45d1cf-563c0f13cabso5101618a12.3 for ; Mon, 19 Feb 2024 05:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349775; x=1708954575; 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=mjP12Zq06nby7HMeSJ/EUbYJ63ENO6BkYD8FuiAok6w=; b=Ssl4sjxJzcFd5xYTrymLfoecsB/HfYk80Nsw0Mxn6tDSn3jWgV5ZPbwuAOmEe1fZnq sD4gOctRV2VQ7BnZY5Dij/U52+ulKuvIpRA531mBxCcA/sx8TmJIVeejHeBDJC9xOrTm kiSoBXGIt74y/Psdnh/yRyJuMOxc1BmDR5e6uGqcs23g5f7RG71KAvdpiJ2/5D3hvmia beEXxa8PZULntObJ2g+4TLS8W+/YlDJ6K55YPyR6dZAoqMzSL48n1qLmn4d1ca6q2Hta KLkFibEIT2LtzH+Ku2minzw7yp2n5yYeuMmcFvVoE0FjfGR4EMLv2nbN+E53X2JlRlKo cfKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349775; x=1708954575; 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=mjP12Zq06nby7HMeSJ/EUbYJ63ENO6BkYD8FuiAok6w=; b=uOai4zbJ5aldE97qqm/TeBCJwzxZb7+riXNvYCtvsc4cjp8zmozcH/4AalaIo/j2IC Bt55NgJ2deDi2f0UtgdCyCFFlyt+vPyeqFXyO9xGEuhCn1XWIycXGAeZoCm71Eup9yo2 MGaZaT/rcb9bpbXkV6zVrausJAhRIya1XOJIVlpvg1F0piRnpCjzDNtoNfwvxiuaeSBV EJky/OcVWOpSo2d6UbIBZq+DwX/cmA+JDw1kEL8jriLfoUUh3Jv9yAbo+weXf0inORKY dg+xP6H2PC3qQT42fMt+hJeujVYB6ERT9KXIMCnVtcQS6zDLGNYjlHIR77d5E1xzeB/U C+zA== X-Forwarded-Encrypted: i=1; AJvYcCW7ceHempkszbq/ikfGCgT3eIMsZ6uUnYTPE4C999CfJEl4ClolXIX51KTJEEj43JhDMvQUQ88bIw4EJjN6TDSSzqXlD2rfYmCbYq3k X-Gm-Message-State: AOJu0YwMF/kjlpPV3WaswRibhkMbPUpPyjMX9d6zBViH0M8mIoObNR5Y c08npqZcGbOTImAH/yBmuj4Pz7jvx24Dz9hwrbGXuatJu1vFEglMYFtK1Vvn+Y8= X-Received: by 2002:aa7:db59:0:b0:564:ad01:20b with SMTP id n25-20020aa7db59000000b00564ad01020bmr139795edt.25.1708349775056; Mon, 19 Feb 2024 05:36:15 -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.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:14 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:50 +0100 Subject: [PATCH 5/8] drm/msm/adreno: Add missing defines for A702 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-5-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=1379; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=2VUaTHaFXwk9sVr7gsAachnQpNO5KMem0UoFA2HST7g=; b=uy8b7slouVEaFRzlMDQaQuGj6/EdLKuvoxlWss5WCvpYfkQIMuuko+sE6v3X1yKkbgzKjx7sS Sr/e/dPpNpcCFZmvXDeCJmc5sQgAXJeQ/E2oSh1XTeW54gedzNfKZ7t X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791334662821362749 X-GMAIL-MSGID: 1791334662821362749 Add some defines required for A702. Can be substituted with a header sync after merging mesa!27665 [1]. [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27665 Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx.xml.h b/drivers/gpu/drm/msm/adreno/a6xx.xml.h index 863b5e3b0e67..1ec4dbc0e746 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx.xml.h +++ b/drivers/gpu/drm/msm/adreno/a6xx.xml.h @@ -1945,6 +1945,24 @@ static inline uint32_t REG_A6XX_RBBM_PERFCTR_RBBM_SEL(uint32_t i0) { return 0x00 #define REG_A6XX_RBBM_CLOCK_HYST_TEX_FCHE 0x00000122 +#define REG_A6XX_RBBM_CLOCK_CNTL_FCHE 0x00000123 + +#define REG_A6XX_RBBM_CLOCK_DELAY_FCHE 0x00000124 + +#define REG_A6XX_RBBM_CLOCK_HYST_FCHE 0x00000125 + +#define REG_A6XX_RBBM_CLOCK_CNTL_MHUB 0x00000126 + +#define REG_A6XX_RBBM_CLOCK_DELAY_MHUB 0x00000127 + +#define REG_A6XX_RBBM_CLOCK_HYST_MHUB 0x00000128 + +#define REG_A6XX_RBBM_CLOCK_DELAY_GLC 0x00000129 + +#define REG_A6XX_RBBM_CLOCK_HYST_GLC 0x0000012a + +#define REG_A6XX_RBBM_CLOCK_CNTL_GLC 0x0000012b + #define REG_A7XX_RBBM_CLOCK_HYST2_VFD 0x0000012f #define REG_A6XX_RBBM_LPAC_GBIF_CLIENT_QOS_CNTL 0x000005ff From patchwork Mon Feb 19 13:35:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203080 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1287484dyc; Mon, 19 Feb 2024 05:38:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWpla7XFLwSkqDGCVeVFHMl+ZYP6H0Q1+GfS4f9P2HXju8mnoRK8Y8IVNb5NGkzcca2Dv77x4N3FzPOiv1tyrgoWoxN7w== X-Google-Smtp-Source: AGHT+IG9MyBiMnlZ/AWtIMdN9BYJqH+mBVxmjjze/OwjDh6GfABPEVq0axMpykOtMIeRupIgZAa0 X-Received: by 2002:a17:906:5916:b0:a3e:8312:616a with SMTP id h22-20020a170906591600b00a3e8312616amr3086678ejq.30.1708349895528; Mon, 19 Feb 2024 05:38:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349895; cv=pass; d=google.com; s=arc-20160816; b=E2UXRsYI+fvGOm06tcrIooAeoT7r6a1YuPafPRVSddx4vMHcZr0welLOEad43jQLg2 UxCe/i77PczC24qY+MhGAoB2g8dJj9d9YV0h4Nlz0dRB8NdrCZtMthKARt2wQj09BG3w CAGU2V6DdZuBZ3IT6d0eDyf62b2gGJ/hLyAtS5SR4elwC+JBRFxVvJYB0sCc8xDW5pYQ vtedEOzp7+7KR3LVQVJ3EzxB1bW9JEEmU8MK/2uN0zV5h0tT1QLda650jHFXtySQlq8e cqEkFgPOxyzEPPANO1NGQMVXEhfimHyvCQypyCkRLCjd2OnHspNuuGq4yIcNM+DIW1NH 2NNg== 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=+hQ3SpYizIIEdO8h/cb2gS2gZ6yJ1jbKnG/M424eunA=; fh=aVjg+OWvpx7kRKZ5O8/BgaeFuWfEXB8sd6EJDcowQnE=; b=Lm4sV2Jaro66HoAJPSSZehHPpztlJaXMTow87zJQ+THw1nRTuD+dMip9fmsjIC7veI M1Dfvru/lrl+GsV07CdaAYIl+M4Yce6Crao1FfCg/UDSrttiU6BuSO1BeXJ3chOWnGUK m4uCvXe0ufp0Ob8Gpi47V09PMYG5a4B0YQc3WIAs/O7ouw0dAzvrLrheggdpNWuHX9bR xqeqavA1pcz4Yn0Jg7v2YGo8FBOKa9GIKLjUGRCxxfuj5FmHjEywnksqUxBftvvuWD8g In6A7fkWn9hDlBHkLJA8aCQD6aiFoShFweYnnCUxC/PRcOp1gQgIF+LHzC6QiiwxCrXl 9PgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XBhQa7bn; 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-71416-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71416-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i6-20020a17090639c600b00a3ec6e7f336si369726eje.95.2024.02.19.05.38.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:38:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71416-ouuuleilei=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=XBhQa7bn; 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-71416-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71416-ouuuleilei=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 012AF1F218D9 for ; Mon, 19 Feb 2024 13:38:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EA2A3CF66; Mon, 19 Feb 2024 13:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XBhQa7bn" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 4629539840 for ; Mon, 19 Feb 2024 13:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349781; cv=none; b=MXxRH6KJqarUvae8uy3NCKSJRc2waxyvVwN7I/gV3RIi8nOB/guncvNIZTt/ojZPsc8gLFEy8McBteZsUR96tG8rWhbG7QTAdl/Q4o40117VzUg2/xmrhDqtqICPfpYcha73nj+UrdSK76F5REM9VAQDfi4ABLp/Jx49fYQxqyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349781; c=relaxed/simple; bh=/obkr4MMIdqspTXLmZcuivEDxO3xqayOzHksqJVGMAk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YBTdEeoAPwt5HwmrQiE2W2F3i4B6GmJXoIZ/eixLMbBPGDwX2BdhyKm7UEc9WiN+BgQdO9eRYymF4EnF1GVLejbLlGtLxGwbzO67JImyuotfh/FnQstR2+/aXh4m8/VXW6OciH+yVVazw1Ehe2JGaW+TeMCmWwTm1mmssXQYLLE= 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=XBhQa7bn; arc=none smtp.client-ip=209.85.208.41 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-f41.google.com with SMTP id 4fb4d7f45d1cf-5645efb2942so2053845a12.1 for ; Mon, 19 Feb 2024 05:36:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349777; x=1708954577; 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=+hQ3SpYizIIEdO8h/cb2gS2gZ6yJ1jbKnG/M424eunA=; b=XBhQa7bn4slRjZFakgSX6cAI43a6cUn96lQKW9EcXYjfJ7ivnuU8i7m9LkVtP6buyb ENWnSD/MGHFsLy1AFt1OreBcvfWVoGtGjx8kTTvaQHsF84EF6apeFCSZ/LG/Z+DRINEd JAAjSr5IFpLQyHrE6vTZCpZrYjjgSa2lHnjCWoGhrH7lNZmydtUOFNmG5qRYoA3L/SG8 CXeQumcpQ16bCmusizZsaaKwOjd/uM7cr5gZUlTRST05yFSU4hlFTAVZlGjpwXlVs25m Y+zvkbe4iskzXX6/eDnHEulvLtsmfIiPA8Uv8IxN3VhQUDEowzlkQ8WqWYe38f8IFnl/ /Dzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349777; x=1708954577; 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=+hQ3SpYizIIEdO8h/cb2gS2gZ6yJ1jbKnG/M424eunA=; b=mvwOwP9QiHqDAXc+D6xod+5mzCnJUGMr5QwtNI5h8HWkL0QBc60sPouBkz1pYQYf1p CaOMwitP6d7mo3c3RuOPfiGYDPAfIHiajLFzUdmihUnW6C+YdfVrueL6yyk1sWDa2h5k trIAIWoIRq/95b/3jD79Obz+4BfCt/1mKhi0P90uX+mZieb3SeaRmWf8zbptMoYufaRn Zs2MvyrpdQGQ9S2AVC/RnHdVO8n5yZdwI5s1yW6M9zNwo2lgAmV2FWP7tdDAbeb1he4d BSUJIQF2VrDwTJItJ7Hb+Bp2RRA9fdR4KRPZ8n2hV1YJkh9gO6OTiXAGg9/fIaEYdpw8 RNig== X-Forwarded-Encrypted: i=1; AJvYcCX04OdWZupJNbKbGcqjAcDXf9n8BnVIWjISGJFy0y6mBOzXlpDQSaMmuUYgaNkgafKcJJuTEa+vY2Ei+qx8J0STR1tuJiEzvQRz1LYI X-Gm-Message-State: AOJu0Yxpfo1/F7OCj4mlBSRplosAG29VHzWP0THhok6HvAbcaeIjXFHB ODVba5zi4iqJArbUn3t09Ao8bw2UnHRwHRrfxig8Z1FIfuWENJ+K1V4ML1M9pjA= X-Received: by 2002:a05:6402:5207:b0:564:4211:faa3 with SMTP id s7-20020a056402520700b005644211faa3mr4558857edd.1.1708349777655; Mon, 19 Feb 2024 05:36:17 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:17 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:51 +0100 Subject: [PATCH 6/8] drm/msm/adreno: Add A702 support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-6-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=11199; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=/obkr4MMIdqspTXLmZcuivEDxO3xqayOzHksqJVGMAk=; b=pC9ZbozvhtAheTgTbHhODa3zv/ScgMjLbvVCtaCW+Bx9TyZuBh7ZvlmsMYXyybffQAMfdiBn+ B1zLGn99G21DmgJjQlkyiv8TbzZ4oR4dXPhhJNaMpg/SIcTJh7PMjy3 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791334700184356144 X-GMAIL-MSGID: 1791334700184356144 The A702 is a weird mix of 600 and 700 series.. Perhaps even a testing ground for some A7xx features with good ol' A6xx silicon. It's basically A610 that's been beefed up with some new registers and hw features (like APRIV!), that was then cut back in size, memory bus and some other ways. Add support for it, tested with QCM2290 / RB1. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 92 +++++++++++++++++++++++++++--- drivers/gpu/drm/msm/adreno/adreno_device.c | 18 ++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 16 +++++- 3 files changed, 117 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index c9c55e2ea584..2a491a486ca1 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -837,6 +837,65 @@ const struct adreno_reglist a690_hwcg[] = { {} }; +const struct adreno_reglist a702_hwcg[] = { + { REG_A6XX_RBBM_CLOCK_CNTL_SP0, 0x22222222 }, + { REG_A6XX_RBBM_CLOCK_CNTL2_SP0, 0x02222220 }, + { REG_A6XX_RBBM_CLOCK_DELAY_SP0, 0x00000081 }, + { REG_A6XX_RBBM_CLOCK_HYST_SP0, 0x0000f3cf }, + { REG_A6XX_RBBM_CLOCK_CNTL_TP0, 0x22222222 }, + { REG_A6XX_RBBM_CLOCK_CNTL2_TP0, 0x22222222 }, + { REG_A6XX_RBBM_CLOCK_CNTL3_TP0, 0x22222222 }, + { REG_A6XX_RBBM_CLOCK_CNTL4_TP0, 0x00022222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_TP0, 0x11111111 }, + { REG_A6XX_RBBM_CLOCK_DELAY2_TP0, 0x11111111 }, + { REG_A6XX_RBBM_CLOCK_DELAY3_TP0, 0x11111111 }, + { REG_A6XX_RBBM_CLOCK_DELAY4_TP0, 0x00011111 }, + { REG_A6XX_RBBM_CLOCK_HYST_TP0, 0x77777777 }, + { REG_A6XX_RBBM_CLOCK_HYST2_TP0, 0x77777777 }, + { REG_A6XX_RBBM_CLOCK_HYST3_TP0, 0x77777777 }, + { REG_A6XX_RBBM_CLOCK_HYST4_TP0, 0x00077777 }, + { REG_A6XX_RBBM_CLOCK_CNTL_RB0, 0x22222222 }, + { REG_A6XX_RBBM_CLOCK_CNTL2_RB0, 0x01202222 }, + { REG_A6XX_RBBM_CLOCK_CNTL_CCU0, 0x00002220 }, + { REG_A6XX_RBBM_CLOCK_HYST_RB_CCU0, 0x00040f00 }, + { REG_A6XX_RBBM_CLOCK_CNTL_RAC, 0x05522022 }, + { REG_A6XX_RBBM_CLOCK_CNTL2_RAC, 0x00005555 }, + { REG_A6XX_RBBM_CLOCK_DELAY_RAC, 0x00000011 }, + { REG_A6XX_RBBM_CLOCK_HYST_RAC, 0x00445044 }, + { REG_A6XX_RBBM_CLOCK_CNTL_TSE_RAS_RBBM, 0x04222222 }, + { REG_A6XX_RBBM_CLOCK_MODE_VFD, 0x00002222 }, + { REG_A6XX_RBBM_CLOCK_MODE_GPC, 0x02222222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_HLSQ_2, 0x00000002 }, + { REG_A6XX_RBBM_CLOCK_MODE_HLSQ, 0x00002222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_TSE_RAS_RBBM, 0x00004000 }, + { REG_A6XX_RBBM_CLOCK_DELAY_VFD, 0x00002222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_GPC, 0x00000200 }, + { REG_A6XX_RBBM_CLOCK_DELAY_HLSQ, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_HYST_TSE_RAS_RBBM, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_HYST_VFD, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_HYST_GPC, 0x04104004 }, + { REG_A6XX_RBBM_CLOCK_HYST_HLSQ, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_CNTL_UCHE, 0x22222222 }, + { REG_A6XX_RBBM_CLOCK_HYST_UCHE, 0x00000004 }, + { REG_A6XX_RBBM_CLOCK_DELAY_UCHE, 0x00000002 }, + { REG_A6XX_RBBM_ISDB_CNT, 0x00000182 }, + { REG_A6XX_RBBM_RAC_THRESHOLD_CNT, 0x00000000 }, + { REG_A6XX_RBBM_SP_HYST_CNT, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX, 0x00000222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX, 0x00000111 }, + { REG_A6XX_RBBM_CLOCK_HYST_GMU_GX, 0x00000555 }, + { REG_A6XX_RBBM_CLOCK_CNTL_FCHE, 0x00000222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_FCHE, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_HYST_FCHE, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_CNTL_GLC, 0x00222222 }, + { REG_A6XX_RBBM_CLOCK_DELAY_GLC, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_HYST_GLC, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_CNTL_MHUB, 0x00000002 }, + { REG_A6XX_RBBM_CLOCK_DELAY_MHUB, 0x00000000 }, + { REG_A6XX_RBBM_CLOCK_HYST_MHUB, 0x00000000 }, + {} +}; + const struct adreno_reglist a730_hwcg[] = { { REG_A6XX_RBBM_CLOCK_CNTL_SP0, 0x02222222 }, { REG_A6XX_RBBM_CLOCK_CNTL2_SP0, 0x02022222 }, @@ -968,6 +1027,8 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) clock_cntl_on = 0x8aa8aa02; else if (adreno_is_a610(adreno_gpu)) clock_cntl_on = 0xaaa8aa82; + else if (adreno_is_a702(adreno_gpu)) + clock_cntl_on = 0xaaaaaa82; else clock_cntl_on = 0x8aa8aa82; @@ -989,14 +1050,14 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state) return; /* Disable SP clock before programming HWCG registers */ - if (!adreno_is_a610(adreno_gpu) && !adreno_is_a7xx(adreno_gpu)) + if (!adreno_is_a610_family(adreno_gpu) && !adreno_is_a7xx(adreno_gpu)) gmu_rmw(gmu, REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL, 1, 0); for (i = 0; (reg = &adreno_gpu->info->hwcg[i], reg->offset); i++) gpu_write(gpu, reg->offset, state ? reg->value : 0); /* Enable SP clock */ - if (!adreno_is_a610(adreno_gpu) && !adreno_is_a7xx(adreno_gpu)) + if (!adreno_is_a610_family(adreno_gpu) && !adreno_is_a7xx(adreno_gpu)) gmu_rmw(gmu, REG_A6XX_GPU_GMU_GX_SPTPRAC_CLOCK_CONTROL, 0, 1); gpu_write(gpu, REG_A6XX_RBBM_CLOCK_CNTL, state ? clock_cntl_on : 0); @@ -1224,7 +1285,7 @@ static void a6xx_set_cp_protect(struct msm_gpu *gpu) const u32 *regs = a6xx_protect; unsigned i, count, count_max; - if (adreno_is_a650(adreno_gpu)) { + if (adreno_is_a650(adreno_gpu) || adreno_is_a702(adreno_gpu)) { regs = a650_protect; count = ARRAY_SIZE(a650_protect); count_max = 48; @@ -1320,6 +1381,12 @@ static void a6xx_calc_ubwc_config(struct adreno_gpu *gpu) gpu->ubwc_config.rgb565_predicator = 1; gpu->ubwc_config.uavflagprd_inv = 2; } + + if (adreno_is_a702(gpu)) { + gpu->ubwc_config.highest_bank_bit = 14; + gpu->ubwc_config.min_acc_len = 1; + gpu->ubwc_config.ubwc_mode = 2; + } } static void a6xx_set_ubwc_config(struct msm_gpu *gpu) @@ -1453,7 +1520,7 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu, return false; /* A7xx is safe! */ - if (adreno_is_a7xx(adreno_gpu)) + if (adreno_is_a7xx(adreno_gpu) || adreno_is_a702(adreno_gpu)) return true; /* @@ -1671,7 +1738,7 @@ static int hw_init(struct msm_gpu *gpu) a6xx_set_hwcg(gpu, true); /* VBIF/GBIF start*/ - if (adreno_is_a610(adreno_gpu) || + if (adreno_is_a610_family(adreno_gpu) || adreno_is_a640_family(adreno_gpu) || adreno_is_a650_family(adreno_gpu) || adreno_is_a7xx(adreno_gpu)) { @@ -1705,6 +1772,7 @@ static int hw_init(struct msm_gpu *gpu) } if (!(adreno_is_a650_family(adreno_gpu) || + adreno_is_a702(adreno_gpu) || adreno_is_a730(adreno_gpu))) { gmem_range_min = adreno_is_a740_family(adreno_gpu) ? SZ_16M : SZ_1M; @@ -1725,7 +1793,7 @@ static int hw_init(struct msm_gpu *gpu) if (adreno_is_a640_family(adreno_gpu) || adreno_is_a650_family(adreno_gpu)) { gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_2, 0x02000140); gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_1, 0x8040362c); - } else if (adreno_is_a610(adreno_gpu)) { + } else if (adreno_is_a610_family(adreno_gpu)) { gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_2, 0x00800060); gpu_write(gpu, REG_A6XX_CP_ROQ_THRESHOLDS_1, 0x40201b16); } else if (!adreno_is_a7xx(adreno_gpu)) { @@ -1740,13 +1808,18 @@ static int hw_init(struct msm_gpu *gpu) if (adreno_is_a610(adreno_gpu)) { gpu_write(gpu, REG_A6XX_CP_MEM_POOL_SIZE, 48); gpu_write(gpu, REG_A6XX_CP_MEM_POOL_DBG_ADDR, 47); + } else if (adreno_is_a702(adreno_gpu)) { + gpu_write(gpu, REG_A6XX_CP_MEM_POOL_SIZE, 64); + gpu_write(gpu, REG_A6XX_CP_MEM_POOL_DBG_ADDR, 63); } else if (!adreno_is_a7xx(adreno_gpu)) gpu_write(gpu, REG_A6XX_CP_MEM_POOL_SIZE, 128); /* Setting the primFifo thresholds default values, * and vccCacheSkipDis=1 bit (0x200) for A640 and newer */ - if (adreno_is_a690(adreno_gpu)) + if (adreno_is_a702(adreno_gpu)) + gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x0000c000); + else if (adreno_is_a690(adreno_gpu)) gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00800200); else if (adreno_is_a650(adreno_gpu) || adreno_is_a660(adreno_gpu)) gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00300200); @@ -1786,7 +1859,7 @@ static int hw_init(struct msm_gpu *gpu) gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x4fffff); else if (adreno_is_a619(adreno_gpu)) gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x3fffff); - else if (adreno_is_a610(adreno_gpu)) + else if (adreno_is_a610(adreno_gpu) || adreno_is_a702(adreno_gpu)) gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x3ffff); else gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x1fffff); @@ -1822,6 +1895,9 @@ static int hw_init(struct msm_gpu *gpu) else gpu_write(gpu, REG_A6XX_CP_CHICKEN_DBG, 0x1); gpu_write(gpu, REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL, 0x0); + } else if (adreno_is_a702(adreno_gpu)) { + /* Something to do with the HLSQ cluster */ + gpu_write(gpu, REG_A6XX_CP_CHICKEN_DBG, BIT(24)); } if (adreno_is_a690(adreno_gpu)) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 2ce7d7b1690d..b121abc71338 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -492,6 +492,24 @@ static const struct adreno_info gpulist[] = { .zapfw = "a690_zap.mdt", .hwcg = a690_hwcg, .address_space_size = SZ_16G, + }, { + .chip_ids = ADRENO_CHIP_IDS(0x07000200), + .family = ADRENO_6XX_GEN1, /* NOT a mistake! */ + .fw = { + [ADRENO_FW_SQE] = "a702_sqe.fw", + }, + .gmem = SZ_128K, + .inactive_period = DRM_MSM_INACTIVE_PERIOD, + .quirks = ADRENO_QUIRK_HAS_HW_APRIV, + .init = a6xx_gpu_init, + .zapfw = "a702_zap.mbn", + .hwcg = a702_hwcg, + .speedbins = ADRENO_SPEEDBINS( + { 0, 0 }, + { 236, 1 }, + { 178, 2 }, + { 142, 3 }, + ), }, { .chip_ids = ADRENO_CHIP_IDS(0x07030001), .family = ADRENO_7XX_GEN1, diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h index bc14df96feb0..f451881a6ddf 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h @@ -77,7 +77,7 @@ struct adreno_reglist { }; extern const struct adreno_reglist a612_hwcg[], a615_hwcg[], a630_hwcg[], a640_hwcg[], a650_hwcg[]; -extern const struct adreno_reglist a660_hwcg[], a690_hwcg[], a730_hwcg[], a740_hwcg[]; +extern const struct adreno_reglist a660_hwcg[], a690_hwcg[], a702_hwcg[], a730_hwcg[], a740_hwcg[]; struct adreno_speedbin { uint16_t fuse; @@ -382,6 +382,20 @@ static inline int adreno_is_a690(const struct adreno_gpu *gpu) return gpu->info->chip_ids[0] == 0x06090000; } +static inline int adreno_is_a702(const struct adreno_gpu *gpu) +{ + return gpu->info->chip_ids[0] == 0x07000200; +} + +static inline int adreno_is_a610_family(const struct adreno_gpu *gpu) +{ + if (WARN_ON_ONCE(!gpu->info)) + return false; + + /* TODO: A612 */ + return adreno_is_a610(gpu) || adreno_is_a702(gpu); +} + /* check for a615, a616, a618, a619 or any a630 derivatives */ static inline int adreno_is_a630_family(const struct adreno_gpu *gpu) { From patchwork Mon Feb 19 13:35:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203081 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1287543dyc; Mon, 19 Feb 2024 05:38:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXKw9kGRqBKzv25hzQvaDIkZli/NEav/jvzSowGiT6BBs+okxtGbL8DoY7o9mdiVjKmJ1Nm54/Q5RbyR8OAIqZJ4dH4Ug== X-Google-Smtp-Source: AGHT+IGpGfy4kc+emHCvL1XcqkTsQ9eR/JInmfmuS6o6osZcHjGQSTPV/HVqsaLozANRZkR6O6nY X-Received: by 2002:a25:b04d:0:b0:dc7:4363:4532 with SMTP id e13-20020a25b04d000000b00dc743634532mr10702990ybj.53.1708349902486; Mon, 19 Feb 2024 05:38:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349902; cv=pass; d=google.com; s=arc-20160816; b=BhSxDcHNlACf87gDNLqt6WR3ZqcXDFD+9fXzj9PCffIXzzaoMvQurN6VLrNK1gS9Is yPQiZf4jiwfpAKgqX7N4JkJM7QTxLVQ5s4vlMet4Z3TO1O0JzSbmWEM3oFDmJRmL2Qkx A3YgX/QjfF4ehcT5/OdQOoLvYy5KUjsTveoFtoCTSn5fU7WlLZyN65raOb5lByZfrTyc iPWh4ScDJ08zWkStts0gdLWsbxdCkBgnzOEpMwJNH5pL/2eEI7ZkjvE7yN5HGV+OgElN SbIq6aAqms9uU7xA0C1YMm2OqQ3iuWhV8Lux+RNXLVhaF7iAWYjAvFdez5hd0hGrEboD i55w== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71417-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i15-20020a05620a144f00b007817072c0fesi6414990qkl.493.2024.02.19.05.38.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:38:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71417-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71417-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 38AF71C2345E for ; Mon, 19 Feb 2024 13:38:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F5FA3D3AC; Mon, 19 Feb 2024 13:36:27 +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 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= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791334707410160783 X-GMAIL-MSGID: 1791334707410160783 Describe the GPU hardware on the QCM2290. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- 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>; From patchwork Mon Feb 19 13:35:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 203082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1287613dyc; Mon, 19 Feb 2024 05:38:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWYmQc4ht2Bn1ojpFsMYnWvx14Yzoigee1qe3O13Y55SvIVyT9r0tG0sRftusQwnPyI2bjJb6dFD7/lv7x0zjH1wIWiSA== X-Google-Smtp-Source: AGHT+IEfx2vk3/OuHjT85C7udbcahNskcW4wMIPMAoPa0kuFqn+wS1yU8IcbCfbpDar2fNWLlK7B X-Received: by 2002:a17:906:33cd:b0:a3e:4504:f35e with SMTP id w13-20020a17090633cd00b00a3e4504f35emr3232212eja.50.1708349911208; Mon, 19 Feb 2024 05:38:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708349911; cv=pass; d=google.com; s=arc-20160816; b=xxCTQEpFIOkbyyRsr5u/E8s2Ur9UE1YqUAvbkhvqG2XpFl2RXIKj+Czk3hrBX3uvXf Ofg96sWgGP+3VlU9V+zeqqZXXPgLFfgVXy6mrtUG8x9HNgCBgid7kUnFoJ3mujLom7+r inwmzz6MPC0H6qqNzHWTsev0qzGERlVce4O1g8wDUPubHQq9vEUSHUfnPpo4AlQHCnnz vgmbD0VwimKrk78NFz4B6Ewk3Pl7iugWnTXnmc+irQyRNhIlm3s6X0IGtFg71Rpzot3C IAnKhqNFHrZErcxfFjXZUqkYWF0NA3VtqLim+3/tT8tNX/gyocX3se6XAcvKOVYTbUq9 PeVQ== 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=lYeaGN05CrS5pFcr/tEpV5+bAgqlMkDoOULt3QF1Ggk=; fh=3YqDAhcc6Nu+8vS8NrUuEHxZNKCoQtgL/hA+8SHbAGA=; b=aStG3leODfhuslRibox5djS13E8ATzpuE5ab9xufYlTZpSpF1DkCb+mD3Xz5XIZjox 6aqX//PAeBbM6pPe7AAq/IUuFl+qYxmsyiNgZ7kOgmWZBtLUOTzjJXK3wPa5ReJCbx8z 8RKWof7uVGvIY8xuE9NemlxjdBQiHGT0SM9nb1/pmXm6xLLMw+MOAxcs+aMq4rBPX7ur Bns/B34pQlLRtkbwLvCsjFmQ0l3aB4KN7BxkijCZ8aNlzWq7mS9PKagIlQSCVOEtN4qM EqCzV21WyHQWz9Z1xYcCTd3/p2cnbAAd2Ns6uKBCcyIB9N6FQDBN2ONH57G+eu7GtiQ9 JOlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hVLDPwnQ; 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-71418-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71418-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a6-20020a1709065f8600b00a3df9e0fb14si2507975eju.648.2024.02.19.05.38.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:38:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71418-ouuuleilei=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=hVLDPwnQ; 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-71418-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71418-ouuuleilei=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 A99711F218C8 for ; Mon, 19 Feb 2024 13:38:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D2913D554; Mon, 19 Feb 2024 13:36:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hVLDPwnQ" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 A6E303C460 for ; Mon, 19 Feb 2024 13:36:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349786; cv=none; b=lWRuJi50ITopf3guasBiRV7pu0FFTEHYHhuAumYHtbW33qOCNxNEEESENjccEuBYR5VV9B9j3DFrmaAnuwLKBw83/cw4Bh/yDEKfF4d5Is0f9hBkIDEj6ayc4AxdKB7W54Mm7wiTmcT9VCWrZUxl8GklAg41WoRMhk563VG4lrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708349786; c=relaxed/simple; bh=Qqtg4ojpOawwNYOqVpOvtJgi/pUtWJ369I3bzfKA0X4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E0Qix3Wx3eDreKo/ev8abxsQZNjoFXSlANSBI4bEnIWkvHpD63h6QHno2FhlDce33BU9RYPNmFTaunG2ajOEugWVDp0n2WKGOuBqnKKEpO3F8S4vJMWHvKSRXMT/9hyeGOKZgtLTPfH8zA/kWak9IV/+GPeuVrr2ppvKULBovHg= 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=hVLDPwnQ; arc=none smtp.client-ip=209.85.167.43 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-lf1-f43.google.com with SMTP id 2adb3069b0e04-512b4388dafso962985e87.2 for ; Mon, 19 Feb 2024 05:36:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708349783; x=1708954583; 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=lYeaGN05CrS5pFcr/tEpV5+bAgqlMkDoOULt3QF1Ggk=; b=hVLDPwnQZk2yW6UDBf540LepB2o7SAzdv3IAAhs+f315m2ruNaY5oo2kY+NL6pdvTY 1zrNhzMutFQSFIczXSYX+hRE0G80b1cmO8Sm9V5gfsAnINMSYn8iTvpVKvynYrJksQHS Hob/YZoweIAobxcombbBod4Eh+kp1ol+VJKPUUvFELxOvXMtsb599gV3SCn6aKalOhtP 95t/n6yIPDJ1kQ1jyOvaWBoU4q7mAlM7F7augd1FemG49Q16t5w1zzMOTh/NSP2o6BIJ Puv86dEFqdKAI0Z/c/yM/+ttvyKiB5Am/q6aBEe4cKvYEOYo42pYUzeDqUflVn7Gjp2K Zfgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708349783; x=1708954583; 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=lYeaGN05CrS5pFcr/tEpV5+bAgqlMkDoOULt3QF1Ggk=; b=GJD8sOG37YVfi+2ZptRrUewqwifcI1vPKcZeW+pFr6+4b9qmT6rcuWwWT11EJjcAA4 4eX7CZ6TA6adZNqLaZ11dXpQzGFl58GczxxF/Q18/azzrgkn1kDeV0F1YfasWdmYEn78 cB3goLpPAjB4u1QLhNJvE7p/IF2rgjMbQzURsG9JCeoOFpXixsIUxt1Rpq7H9KrmTYrN 0uuUA9FrsZFvzpEbn4K5yolG4gYPw143NFJ9Od4VJpR/BznM82CNtGetpQm2sM7IuipY Duhiyz20TqLUkrSzVMzAUZ29saT8C60F2TCdwHPsEgMWLQw8LxUm2fWpqv78pmF5hkDG Ve+A== X-Forwarded-Encrypted: i=1; AJvYcCUYs+aXzBLtaZUO+8SCKt5PNfIm3JZ1XALA6sWRRo+qDmOSFr1nFgwdUSgPpv3SSjGzmbvVn54pqbgcBEt/vI0e6yi5E+TmOGqtv0Rx X-Gm-Message-State: AOJu0YwRzLCazdpKGDzAoDxVn0U+hCqJei5rBlArLihQoDhkE/CQbDoh mgPtQR6tN3ksTNSiy4I05tqvaBsWtn41VQBeOopy2J5bObwPvN92njMqAPt5b2k= X-Received: by 2002:a05:6512:e8f:b0:512:be57:6dce with SMTP id bi15-20020a0565120e8f00b00512be576dcemr701562lfb.12.1708349782988; Mon, 19 Feb 2024 05:36:22 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:36:22 -0800 (PST) From: Konrad Dybcio Date: Mon, 19 Feb 2024 14:35:53 +0100 Subject: [PATCH 8/8] arm64: dts: qcom: qrb2210-rb1: Enable the GPU Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240219-topic-rb1_gpu-v1-8-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=852; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Qqtg4ojpOawwNYOqVpOvtJgi/pUtWJ369I3bzfKA0X4=; b=7s6b1o0Wbq+2Q9UxmDpWZcz1X+WrOuTL3z3Ndhfv4cWpB+GS8fT0yuSsDnxb4CeS4G3tVFSpH aC1g/6W2UwABvq/j2FmZN37rrNOb1IlvgJD1D3eP0KEN8TNjCvQO0bL X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791334716802390158 X-GMAIL-MSGID: 1791334716802390158 Enable the A702 GPU (also marketed as "3D accelerator by qcom [1], lol). [1] https://docs.qualcomm.com/bundle/publicresource/87-61720-1_REV_A_QUALCOMM_ROBOTICS_RB1_PLATFORM__QUALCOMM_QRB2210__PRODUCT_BRIEF.pdf Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts index 6e9dd0312adc..c9abca5a7e39 100644 --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts @@ -199,6 +199,14 @@ &gpi_dma0 { status = "okay"; }; +&gpu { + status = "okay"; + + zap-shader { + firmware-name = "qcom/qcm2290/a702_zap.mbn"; + }; +}; + &i2c2 { clock-frequency = <400000>; status = "okay";