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>; }; }; };