From patchwork Tue Dec 13 00:24:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 634632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86FDFC04FDE for ; Tue, 13 Dec 2022 00:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233883AbiLMAYw (ORCPT ); Mon, 12 Dec 2022 19:24:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233827AbiLMAYb (ORCPT ); Mon, 12 Dec 2022 19:24:31 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C586110C for ; Mon, 12 Dec 2022 16:24:30 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id z26so2304621lfu.8 for ; Mon, 12 Dec 2022 16:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u+igP2QJ4zhnmJmTalpeVUPlHJ3uUv+ijfE0j0lwlwk=; b=k4vUYoD4QEVuww17VhwsQtpXRPQTJZeIdU2yeKwCezoDrS5lsP0U0PJYIXYltp4Kml mQKGGsGkwfOu50t9XT/X/NMw4Qta5iV06ySKAkPD0o2ztCvWcrAHV0x7CbJeyq4zVW0x ByDflb5B0e0qXSRizIFVtPzfoa2Px976YBvU+0cdiL/tH0T5VLnfzUQfHqeOmAc5TwRm sQfUsE0eE504iLZpqB5U6qii3Z3F9kmw6sDd6ce7tWdc/lm27q0HbMUFg/UmoUKDC/a3 o+aLx2YbScD1c4Muf/YDsnVecYmK2WnrBDqAO+IvriulZGPkv+s/p1RfRL6f9MvnOw91 jsKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u+igP2QJ4zhnmJmTalpeVUPlHJ3uUv+ijfE0j0lwlwk=; b=VPwB3wogyvUQrSOYHL3s7of+vJAiI8ipBiZbYcBOFToxfQekE/bNTXi+9ZhMeBdHHU PquQk6OHJg2j+zOY/lgg0W4GY1aaXiIuDp8wA90m1BvE/ou0NPFgjR7v1bpCt1zbhROd smekmbFVQX9KF+qG6j//ac9jAERyCU6XsbTmffDImXTDP/PO85aA3DCC9eFEEeMyPQV6 Prq3VqzpWi7LzAGRUwL4N28Zq+W8LlJW9T76sNiY8ZUre1NLSvt6H50jVt8gV/5KIE3Y WQqRZ4yQcdr+AN8xKLlYMGXhf03MKI4qgzQOKBqutLTExE9EUorsman83oDuHN3DgnLk /Pzw== X-Gm-Message-State: ANoB5pmtmhE8uY476ykx//MzWAP+ss5BPXdQJwVpvHo2w/t1ybV3FG5Q EfUw1+2AMf74mzpOlvenLogsOHrL0kkUMACZ X-Google-Smtp-Source: AA0mqf6BYAF1pc+MKAQRYlGa5eC8aZamI4avbyvA7Je2i7JVNS6Eg+GPuY3Fdw9mNRQKakPAGB+i2Q== X-Received: by 2002:a05:6512:2a86:b0:4a4:68b7:d625 with SMTP id dt6-20020a0565122a8600b004a468b7d625mr4719629lfb.12.1670891068499; Mon, 12 Dec 2022 16:24:28 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:28 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dt-bindings: nvmem: Add compatible for SM8150 Date: Tue, 13 Dec 2022 01:24:17 +0100 Message-Id: <20221213002423.259039-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Docuemnt the QFPROM on SM8150. Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index ca744f5890ff..a1305fd68f67 100644 --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml @@ -30,6 +30,7 @@ properties: - qcom,sdm845-qfprom - qcom,sm6115-qfprom - qcom,sm6350-qfprom + - qcom,sm8150-qfprom - const: qcom,qfprom reg: From patchwork Tue Dec 13 00:24:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 633618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12E34C4332F for ; Tue, 13 Dec 2022 00:24:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233288AbiLMAYx (ORCPT ); Mon, 12 Dec 2022 19:24:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233889AbiLMAYc (ORCPT ); Mon, 12 Dec 2022 19:24:32 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C15595FD8 for ; Mon, 12 Dec 2022 16:24:31 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 1so2329868lfz.4 for ; Mon, 12 Dec 2022 16:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D4q6KkeqgnM/VIxzMFkujQ4xlivfEBTCOf1r0+1KkKA=; b=eusrWSZAgsmPRJc6N9znea2Da65f2ALtLrRPkxePjh2U2GAPyZT/6yGVZMF1jus712 1M/g34bw6XKZOp85KjVaQie+Ho5UlDXkN/YdKpiZ69HETNlYVZSAkInmCKgQAFfkb24H v2Q7iP2VEJvD5pRLMsPJd0p7wld7N3tnIqgXuihjM2iP0R9tp0Xw6xH7byyXdHiACcfZ OOxPE4ZzkM/R98Kgbe3pSQFzGZO0wA3Piy1LJtpaO12BHn56Szhr782tHJvQMqx8rOgL 1yq4iT01lUe/nGmEkOLcVNljgv023KZWTVtzFXdzT1Bdl8ysZ6WT0FfVavmKatf6TdrP C3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D4q6KkeqgnM/VIxzMFkujQ4xlivfEBTCOf1r0+1KkKA=; b=7NYKnHc1b7KUElJCswZFIqBXmh4uS6+rvSEr8Q5a6SjnZrBCom6eqmR2hn8LFt6fb7 hhgHi2o8P7iQ6qGl8Dmb1CF0hGmNNk+MKMDezKcsyfdSRNjPWa7C/Y9rQTj2EpkTqbjX FAN3j2ixw6fst+FugHNVU/LYbzkYS6MB/RyIicIrFnMnpZAwx3uvLC6ZmXxCO85kG6LU MAJ4bZmCes2O/ABeSvCt2cWYOclqzTmuhxDjmFI6UKia8rednO1GG77CABr1K1SnJZih bY2QTJhuYqOHv3IS5WirOBUwC3HX9tK8gnPaIhQpJB9aH7lZlp1lLEgxtMUKlCBMleFN izmw== X-Gm-Message-State: ANoB5pmdEKBO80rFH9Pj+A9KpYYXmAEuGwjIKuZ/Bld3693rbEUp5v8c +LPs0lzL1HqUHVHUCpzHoWW53eT0sWKbJu4a X-Google-Smtp-Source: AA0mqf6F4AZqrS8BtwkOgXEUM1r0UFSawY85mESbk36TvdUnfid8hs6XJbQsTFfsB7pzbYpu/8JwGg== X-Received: by 2002:a05:6512:280c:b0:4a4:68b8:f4c7 with SMTP id cf12-20020a056512280c00b004a468b8f4c7mr5984712lfb.13.1670891069862; Mon, 12 Dec 2022 16:24:29 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:29 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] dt-bindings: nvmem: Add compatible for SM8250 Date: Tue, 13 Dec 2022 01:24:18 +0100 Message-Id: <20221213002423.259039-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Docuemnt the QFPROM on SM8250. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index a1305fd68f67..c3d909387e07 100644 --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml @@ -31,6 +31,7 @@ properties: - qcom,sm6115-qfprom - qcom,sm6350-qfprom - qcom,sm8150-qfprom + - qcom,sm8250-qfprom - const: qcom,qfprom reg: From patchwork Tue Dec 13 00:24:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 634631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D6B8C4332F for ; Tue, 13 Dec 2022 00:25:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233538AbiLMAZF (ORCPT ); Mon, 12 Dec 2022 19:25:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233250AbiLMAYg (ORCPT ); Mon, 12 Dec 2022 19:24:36 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D063162EA for ; Mon, 12 Dec 2022 16:24:34 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id b13so2336486lfo.3 for ; Mon, 12 Dec 2022 16:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EuRIOsbxJSRJCVkuwOFtkE5bn27vzsbdYBn710S1tsE=; b=lmwePmqSEsF3OnAp9cC6PduAdpMwYQXJYh2fNPY863g5M9oD9ZWSLPEBTqvp3ngl4o 9ySGQONxcxowsk7bT5fAzavUXJFT2Mm+pOmUafAwshUkw50rBcmP2m1ZHzBfyWvUtz0Q sDk7fOuV3OjsEv1vhYNCb3FY7izl6cNJg7dHscP3ev+wJlHMdNFYNc71G4Ld0ybIzEEi 0F9Grk4PBB8kEWXbSDxhmnT4EKJ/XMDY8X+odIVwZaTSvKTInZK6MGwuMXWXvBkbdVyf nALPrAHoNvXCh7amnOwUIcnLg6b5FyAoJ/kvP8QNoNHNogg5RzE1a5yhoyrkJJx0HNvp rTZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EuRIOsbxJSRJCVkuwOFtkE5bn27vzsbdYBn710S1tsE=; b=RsTVZFI+pXOmM0DKYxMsDRQETGFZRYMV7/Mh50jrjhYL66DDTLkeupuXXr0Mdl5Chy pkG+G1kb6cHKKLxBSOI11TDSJQdYIYlcMtGCvvcLt+jACx1alYnPqfaOT2mQ9E+9RoFD o3Ls/OXu0xCvPMxHuSOox9gdSDGcQnTlrjkyzKKqiFCId7/Ee0dsL23mg1253EWsB7de utbQ1fo49i1ye8WaOqH+TGnkd8uZBbeC+uJmKsXPccYvW//gkSdU9elDyPGwjzz40Av3 5ncD9iweyr/twIyyWA9rRA+hwNtOX/uZgBw/giHRP1xhEB2MCS4/BjAyKFk6Sx3bm1pm jl2Q== X-Gm-Message-State: ANoB5pkhteg2/k+kxz+jU9s8PfF73WinOHDlB1YOIhVv9T2AFdlLH8LR Mf96H6dyrohkqqC37u7i3Ct6Yo3xHesxARv5 X-Google-Smtp-Source: AA0mqf7FsYGwTEB0R89kNgfKs8NWR0YiZJmq+AA0ekGPv+hZSJMEhTrIOyi72Pmtjg6fC0kbmH3mpQ== X-Received: by 2002:a05:6512:150c:b0:4b4:b8fc:4ac5 with SMTP id bq12-20020a056512150c00b004b4b8fc4ac5mr5905858lfb.3.1670891072964; Mon, 12 Dec 2022 16:24:32 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:32 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Akhil P Oommen , Chia-I Wu , Douglas Anderson , dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] drm/msm/a6xx: Add support for A640 speed binning Date: Tue, 13 Dec 2022 01:24:19 +0100 Message-Id: <20221213002423.259039-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for matching QFPROM fuse values to get the correct speed bin on A640 (SM8150) GPUs. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 36c8fb699b56..2c1630f0c04c 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1877,6 +1877,16 @@ static u32 a619_get_speed_bin(u32 fuse) return UINT_MAX; } +static u32 a640_get_speed_bin(u32 fuse) +{ + if (fuse == 0) + return 0; + else if (fuse == 1) + return 1; + + return UINT_MAX; +} + static u32 adreno_7c3_get_speed_bin(u32 fuse) { if (fuse == 0) @@ -1902,6 +1912,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev)) val = adreno_7c3_get_speed_bin(fuse); + if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev)) + val = a640_get_speed_bin(fuse); + if (val == UINT_MAX) { DRM_DEV_ERROR(dev, "missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n", From patchwork Tue Dec 13 00:24:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 633617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2629C4332F for ; Tue, 13 Dec 2022 00:25:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233895AbiLMAZK (ORCPT ); Mon, 12 Dec 2022 19:25:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233831AbiLMAYg (ORCPT ); Mon, 12 Dec 2022 19:24:36 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 244C86302 for ; Mon, 12 Dec 2022 16:24:36 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 1so2330133lfz.4 for ; Mon, 12 Dec 2022 16:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SEIVdXDizl5GA8yUFDs8adYCHSjfLGoxScc9uTeNRRM=; b=OWqhQScustkMzjXFVt1cNe5DYkL14IYi+Rdz8Skrqo+RWKIyba1oepLqNaDTen2AQu cumnEwn/8PwtoHJFJrOUV+y5iRerymeZpB41CK5NsLALYjFRIrnIK3xjBfYvFq4FtPLv nR2+oV4oLbIySyy2BQh88feryeSpcMkQFXWRrJMGh23p+Vxp72TK1gHc1Xn1tSqw+WBZ NX2EhBKeq1NYa212WqZYh4nA+90M1oJXwSn6Wz4TVj3HKID+X/IvcbrXOuzaQIbkYrcs QbBF22P+qHGZISj+cg0cEu9C/iM0NJIQkUu0GuuRRcNff/u18zYZ8gy17M4ZYxZXpzoA xrNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEIVdXDizl5GA8yUFDs8adYCHSjfLGoxScc9uTeNRRM=; b=rUMWAWZyryKv9VpEhAMcjQaTl3MoTFTx4xuo7Fq3ThpHV+ebZTQTEUeVWJYKCK9uyw nVWxn22Sr8gqugN1dtGIfBpKRRzpRUY4+DZAKqE1I7ko7J1g+nwP47Rkp7csQFh8g+cq Yv7JFZ/f66VXqU4025XlR9R3F/EcDlOinRqIQ3LX/ytIc/iUOj28dTLzwKLb6ND/AZI1 KjUt09K46LTBQkble8jGvNhFvOs7reMyYIkHiclVN5FIOKZqKhF6wtiiWfawf3h6oGhu qKeaDrcYqYZBAXIO87V+ky9DW0pxcX5DYP1iu+wA/sQGM8qiwYmG/jsCIS+eNQ9ebEMj 14lQ== X-Gm-Message-State: ANoB5pmaxxeBHnzXCCzeYLXfHZDhraP+rQutt+KLSdySiK0lYxUAbjv3 DmZk3lt8gTaBZzmJ3Mh+Lnzc5/z3HZHDd+cH X-Google-Smtp-Source: AA0mqf5PxuEyT4388zQxFFOtql5DEIuyNV6rnOcvyNG+J41twRJyW7N0W6uU1rrt9dWlS69t0iQB/Q== X-Received: by 2002:a05:6512:7b:b0:4a4:68b9:66f1 with SMTP id i27-20020a056512007b00b004a468b966f1mr3805731lfo.60.1670891075461; Mon, 12 Dec 2022 16:24:35 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:35 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Akhil P Oommen , Chia-I Wu , Douglas Anderson , dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] drm/msm/a6xx: Add support for A650 speed binning Date: Tue, 13 Dec 2022 01:24:20 +0100 Message-Id: <20221213002423.259039-5-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for matching QFPROM fuse values to get the correct speed bin on A650 (SM8250) GPUs. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 2c1630f0c04c..f139ec57c32d 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1887,6 +1887,20 @@ static u32 a640_get_speed_bin(u32 fuse) return UINT_MAX; } +static u32 a650_get_speed_bin(u32 fuse) +{ + if (fuse == 0) + return 0; + else if (fuse == 1) + return 1; + else if (fuse == 2) + return 2; + else if (fuse == 3) + return 3; + + return UINT_MAX; +} + static u32 adreno_7c3_get_speed_bin(u32 fuse) { if (fuse == 0) @@ -1915,6 +1929,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev)) val = a640_get_speed_bin(fuse); + if (adreno_cmp_rev(ADRENO_REV(6, 5, 0, ANY_ID), rev)) + val = a650_get_speed_bin(fuse); + if (val == UINT_MAX) { DRM_DEV_ERROR(dev, "missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n", From patchwork Tue Dec 13 00:24:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 634630 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BB99C00145 for ; Tue, 13 Dec 2022 00:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233826AbiLMAZL (ORCPT ); Mon, 12 Dec 2022 19:25:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233989AbiLMAYi (ORCPT ); Mon, 12 Dec 2022 19:24:38 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9E96645D for ; Mon, 12 Dec 2022 16:24:37 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id b13so2336687lfo.3 for ; Mon, 12 Dec 2022 16:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g/RD5hHLuEtAj/FzoPif1UajBsEkjm276Up5taVp820=; b=LCnmv98yFk3t0xLleAbDjXpqUSXUe4CTn7EIS6uVu2hDYrIOsor5WWZf9AoJ9iYAlh 7KEmIDepRi0t6HYYPDVoQQkBN1TKiWSR5G7lCd3BEnZj4PmCbeDO6qWN3XhHOJe2k5rc lkEXq48UsHIvRRKbjeqPMwbN+7pSs1T/2gjFOwEH7Y2TxGQn8ymfkmjuWTaq8uYq2i/a ovgzWjDIXRXI/BE5I+oKw/ZChzKRk127n7XbAsLPuC7M1vmbEmZVJK5fbFSpL7af84Lw W3bwQMlqs6mi39eU7QBcp0L5TrrVngt4N6bumvoVNW/rjPqWy9cJzRQXY10SSubvIyoN ZsPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g/RD5hHLuEtAj/FzoPif1UajBsEkjm276Up5taVp820=; b=XMSHogBXn14sNPt2U+xDfegwojeb2jmt04tMjlP/yM/lzvMBxWRSh2rbNRhFpDi5xd nAroUes+OHKXwt+QcnW11HzwroQD2X042q0EhEytOWimCK8WdRYPxiOVEQxcPMZykHDD 5083p7bfQx6pFwMJpT3cNfqrgAj+ab4qM3V5HDW6Uig0KLvDmgG5e7V1fAYmlbJnTeIi fr7lBKrTJxc+CLd7sejCWrfeVQ5AVknwLz14yv10V4iDjYcGH/JtVz4SViep7R1SK5wO Qaun3xcYe6IrIHLu0bVuUq+BZn9BQEhDSjATLYrmX1hEQJck6G4UnVmYPFiEOezVgvQ+ /qYg== X-Gm-Message-State: ANoB5pndYxjY6bwu8gQ3xt/VX5WGurQlhDObZ0gZuHPwA+VmwzxAdTyC /2+KOFYnOHDLmuVSf11CUV2QdsZyjrkTViSM X-Google-Smtp-Source: AA0mqf5mWFMg/PdRlmixBPZVoe2Lvk5H6sRTTnI2EyTlQiibBSHwxZPb7R/rzg2W7YYBZFAlkKJDRQ== X-Received: by 2002:ac2:430d:0:b0:4b5:cda:44cf with SMTP id l13-20020ac2430d000000b004b50cda44cfmr4823620lfh.67.1670891076956; Mon, 12 Dec 2022 16:24:36 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:36 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] arm64: dts: qcom: sm8150: Don't start Adreno in headless mode Date: Tue, 13 Dec 2022 01:24:21 +0100 Message-Id: <20221213002423.259039-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Now that there's display support, there is no reason to assume the default mode for Adreno should be headless. Keep it like that for boards that previously enabled it, so as not to create regressions though. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 5 +++++ arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 +--------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts index 3331ee957d64..0ee5309408b9 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8150-hdk.dts @@ -359,6 +359,11 @@ &gmu { }; &gpu { + /* + * NOTE: "amd,imageon" makes Adreno start in headless mode, remove it + * after display support is added on this board. + */ + compatible = "qcom,adreno-640.1", "qcom,adreno", "amd,imageon"; status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sm8150-mtp.dts b/arch/arm64/boot/dts/qcom/sm8150-mtp.dts index 46b5cf9a1192..9dfecbf89b21 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8150-mtp.dts @@ -354,6 +354,11 @@ &gmu { }; &gpu { + /* + * NOTE: "amd,imageon" makes Adreno start in headless mode, remove it + * after display support is added on this board. + */ + compatible = "qcom,adreno-640.1", "qcom,adreno", "amd,imageon"; status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index fad70032a98a..e160acb47cd9 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -2125,15 +2125,7 @@ compute-cb@3 { }; gpu: gpu@2c00000 { - /* - * note: the amd,imageon compatible makes it possible - * to use the drm/msm driver without the display node, - * make sure to remove it when display node is added - */ - compatible = "qcom,adreno-640.1", - "qcom,adreno", - "amd,imageon"; - + compatible = "qcom,adreno-640.1", "qcom,adreno"; reg = <0 0x02c00000 0 0x40000>; reg-names = "kgsl_3d0_reg_memory"; From patchwork Tue Dec 13 00:24:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 633616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEEAFC4167B for ; Tue, 13 Dec 2022 00:25:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234103AbiLMAZY (ORCPT ); Mon, 12 Dec 2022 19:25:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234137AbiLMAYm (ORCPT ); Mon, 12 Dec 2022 19:24:42 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F4DD18E19 for ; Mon, 12 Dec 2022 16:24:39 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 1so2330276lfz.4 for ; Mon, 12 Dec 2022 16:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=484kpt6M8crrqJsBdPMWKiVNmZINIXNPAP5xDyx65J0=; b=uxJbmngwkiYc3dtFUkEW23+umw0pts3sm6vJ0n0PSjKBED/dw9scYOmk57vtu4kbjB vqzArufPxfZoFt90xxtLiHt8qZtOVOP/GPF3q6KAIkcrUt3m/nSpCuYwecrJanAJ/jXm UICVoec0f3kRplcK+y8+lETzpjBvYH765CyHJ9YecDHMr7DYQgeHBH6KeHDL0XMqpn6f q7/lA1y5HN2h+ndoznydxLeqKkPOlt551S3zBjpayxU5VDWq16lH+qZ8spLGcg5zO0S7 oiYNB9YARY5jeoP7Sx/lat6WAz5UejW2QNxz3WFn3krpNu+GakAYfm2Ty4QtcFXXN6+c f3bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=484kpt6M8crrqJsBdPMWKiVNmZINIXNPAP5xDyx65J0=; b=XvgKVRzh/JYQyNOZC59RFPqDmrojhEqQS2Pky4GixdEA3A20Ssn+oIFK0qqkjMnAu+ w2q7T/FQa/n2saQWIQsVHPFDaSZD4WtsBSkoO+1RQ4xUwm6Qpil8RiSVs6ktLS6SmgsY BgLZnsKt2El1olGJsBLoLl9cw33C3vDC8PoDLdDwyi42W7AnuK20OtmiLxu4xsjVWmVC PCeot7cO1T2IYVplq8t1m92rhCq7fCKjMH3wKQDVc+AjCF0+95GqDTn39wSjhcvgXNPW VOHmbdBQfITmrPcxH9GxixEboXgbsjCAXvbz2zIljGGpRK2CMjTgXWk+cHWU/Kp2C7wQ XFAw== X-Gm-Message-State: ANoB5plxbdXGQXE5R9aLrmae/U9ffSPEz7BAon9eeIAjicFCU/JyKeNz QJx7HFqvaeyYHW4gILYt7DI611TQBQbq41sY X-Google-Smtp-Source: AA0mqf7POXDdTzNkuyXTi10RQjyptGynl2zyz98smwto/7Y0eW9DfQ+VPVjAz+KyGie4fLw8Y0aZgA== X-Received: by 2002:a05:6512:c1e:b0:4b6:e726:45b9 with SMTP id z30-20020a0565120c1e00b004b6e72645b9mr2431702lfu.37.1670891078435; Mon, 12 Dec 2022 16:24:38 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:38 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] arm64: dts: qcom: sm8150: Add GPU speedbin support Date: Tue, 13 Dec 2022 01:24:22 +0100 Message-Id: <20221213002423.259039-7-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SM8150 has (at least) two GPU speed bins. With the support added on the driver side, wire up bin detection in the DTS to restrict lower-quality SKUs from running at frequencies they were not validated at. Signed-off-by: Konrad Dybcio Tested-by: Marijn Suijten # On Sony Xperia 5 (speed bin 0x3) Reviewed-by: Marijn Suijten --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index e160acb47cd9..3f940cc3f32b 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -936,6 +936,17 @@ ethernet: ethernet@20000 { status = "disabled"; }; + qfprom: efuse@784000 { + compatible = "qcom,sm8150-qfprom", "qcom,qfprom"; + reg = <0 0x00784000 0 0x8ff>; + #address-cells = <1>; + #size-cells = <1>; + + gpu_speed_bin: gpu_speed_bin@133 { + reg = <0x133 0x1>; + bits = <5 3>; + }; + }; qupv3_id_0: geniqup@8c0000 { compatible = "qcom,geni-se-qup"; @@ -2137,6 +2148,9 @@ gpu: gpu@2c00000 { qcom,gmu = <&gmu>; + nvmem-cells = <&gpu_speed_bin>; + nvmem-cell-names = "speed_bin"; + status = "disabled"; zap-shader { @@ -2150,31 +2164,37 @@ gpu_opp_table: opp-table { opp-675000000 { opp-hz = /bits/ 64 <675000000>; opp-level = ; + opp-supported-hw = <0x2>; }; opp-585000000 { opp-hz = /bits/ 64 <585000000>; opp-level = ; + opp-supported-hw = <0x3>; }; opp-499200000 { opp-hz = /bits/ 64 <499200000>; opp-level = ; + opp-supported-hw = <0x3>; }; opp-427000000 { opp-hz = /bits/ 64 <427000000>; opp-level = ; + opp-supported-hw = <0x3>; }; opp-345000000 { opp-hz = /bits/ 64 <345000000>; opp-level = ; + opp-supported-hw = <0x3>; }; opp-257000000 { opp-hz = /bits/ 64 <257000000>; opp-level = ; + opp-supported-hw = <0x3>; }; }; }; From patchwork Tue Dec 13 00:24:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 634629 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8C54C10F31 for ; Tue, 13 Dec 2022 00:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234127AbiLMAZ0 (ORCPT ); Mon, 12 Dec 2022 19:25:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234112AbiLMAYo (ORCPT ); Mon, 12 Dec 2022 19:24:44 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 936581B7AD for ; Mon, 12 Dec 2022 16:24:40 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id j4so2404105lfk.0 for ; Mon, 12 Dec 2022 16:24:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4NqADL9fRikgvphogBytlGfLHviEG2IYDDL43EsbLJM=; b=fxIG0R1YWutzDM2ebme2YUNsnVBPR9NhVIaIyS5WlfSb4y6x1FAZ/sq7GgpgwGIOCI u/7OD29+NCKkclW9EhgH/ygrjOeHaHiQ3fHqXCbQmnbyTWw4UgKog0zKd8R8FfIFLKeO NQ6WwxkPe6prynwNHD+GTA7HxB5gm/cuRFVgl0v4eoMh9kls3rRH6imiaOstAy6/+QY2 ODSspyfa0Rs0Tcci7bjgC6Zieefm03DIfYPLNs7u0DeF/HiDGA/XfEdtMHMfq4Db6Ab5 e5g4sK6C3j3rNM7/0BYJZeeDAyG8ctHpWgy1QwhqEaTn7Lrk/V9IV7z5pMccP9tmtt4T nrDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4NqADL9fRikgvphogBytlGfLHviEG2IYDDL43EsbLJM=; b=SsfjuNwCf4/qTVJnYsSM1PyNcOOoloWrx+xkMl+8kYx2+TOmW7jsFIT7rMmHfR7av8 gDJ/x2u8VSNIiT9G9qOyQGD5DIj4pnZ2I2AV3QG3BddEJ6TMFA/vevfVoW6yMxgrLBEH SnR6pJ9Rk11plEf9pxjJ5EAyDoEUpWNIT5Nem8ktXZxIwY8bmLXsPF7vx3wwJO3ZvINT FvwZmLTr8l6V+575i5O0MDIFtlkuMmObqylP5IGcWeuAy2mTvQ+6U7ZQnz8Pky1TtCTg q9twloiBndKO/s9Srr9oRfSlQw9hEAdweaL7/vMkgCYzNxX2qhCXEmnPBSaAHQnqvVMw z5DA== X-Gm-Message-State: ANoB5pllg7DjLtE8bRSDj/9jbfybrYyDFn4N4A1bDi/WwF3ql1s9m3wY jFCwLG3cABIAy0oY//ki6bmHgpatnJSCBmK9 X-Google-Smtp-Source: AA0mqf7ztEvfed14f5GISkGdaXHFag5HjecBnWyEV2K7hdOGQx80J51qVunnDxiJBg94adYD058YeA== X-Received: by 2002:a05:6512:b91:b0:4a4:68b8:c2e4 with SMTP id b17-20020a0565120b9100b004a468b8c2e4mr7478764lfv.59.1670891079853; Mon, 12 Dec 2022 16:24:39 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:39 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] arm64: dts: qcom: sm8250: Add GPU speedbin support Date: Tue, 13 Dec 2022 01:24:23 +0100 Message-Id: <20221213002423.259039-8-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org SM8250 has (at least) four GPU speed bins. With the support added on the driver side, wire up bin detection in the DTS to restrict lower-quality SKUs from running at frequencies they were not validated at. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index c008f49b5852..0c4ecdab1244 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -955,6 +955,18 @@ ipcc: mailbox@408000 { #mbox-cells = <2>; }; + qfprom: efuse@784000 { + compatible = "qcom,sm8250-qfprom", "qcom,qfprom"; + reg = <0 0x00784000 0 0x8ff>; + #address-cells = <1>; + #size-cells = <1>; + + gpu_speed_bin: gpu_speed_bin@19b { + reg = <0x19b 0x1>; + bits = <5 3>; + }; + }; + rng: rng@793000 { compatible = "qcom,prng-ee"; reg = <0 0x00793000 0 0x1000>; @@ -2563,49 +2575,58 @@ gpu: gpu@3d00000 { qcom,gmu = <&gmu>; + nvmem-cells = <&gpu_speed_bin>; + nvmem-cell-names = "speed_bin"; + status = "disabled"; zap-shader { memory-region = <&gpu_mem>; }; - /* note: downstream checks gpu binning for 670 Mhz */ gpu_opp_table: opp-table { compatible = "operating-points-v2"; opp-670000000 { opp-hz = /bits/ 64 <670000000>; opp-level = ; + opp-supported-hw = <0x6>; }; opp-587000000 { opp-hz = /bits/ 64 <587000000>; opp-level = ; + opp-supported-hw = <0x7>; }; opp-525000000 { opp-hz = /bits/ 64 <525000000>; opp-level = ; + opp-supported-hw = <0xf>; }; opp-490000000 { opp-hz = /bits/ 64 <490000000>; opp-level = ; + opp-supported-hw = <0xf>; }; opp-441600000 { opp-hz = /bits/ 64 <441600000>; opp-level = ; + opp-supported-hw = <0xf>; }; opp-400000000 { opp-hz = /bits/ 64 <400000000>; opp-level = ; + opp-supported-hw = <0xf>; }; opp-305000000 { opp-hz = /bits/ 64 <305000000>; opp-level = ; + opp-supported-hw = <0xf>; }; }; };