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: 32583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2547635wrr; Mon, 12 Dec 2022 16:26:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf5s0qa1/rcKx1Vbjay4ZjYtfwzQE5FLVjLgiWcrZFXbskST0O5AUlY8YudsYLPaN2i49WCA X-Received: by 2002:a05:6402:401b:b0:46c:e2f1:3a81 with SMTP id d27-20020a056402401b00b0046ce2f13a81mr17077537eda.37.1670891218886; Mon, 12 Dec 2022 16:26:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670891218; cv=none; d=google.com; s=arc-20160816; b=ABZ2/tRUiK26KkuEDzKjSBNUIOS7OEmmlZkgkex0hXuU7V67oqNbIZFvoGJfOWZKd4 YRV5blB4GTzRogoMKXyng+iVfZFoB2Xt6kcZmfFPCN6iWEp7K4OTN+wDtV2DQPAzpU9N NjN5ikzuwDUXKcJ5cqMh9AqiGPeuJDUqCQvhJPPEsoMQu/n/4kIvIuCTZs5oodUny5iw A3+szOTpfjXLGmK+9h0gpKAkUz/wwqhu5eLS1NLEmqY6pOsnFLpnwmjT71YF7R6jW2UX Pver1jB3OKs7QC3odKww8rJhElTZv95ORrGKV9OMdTnlIdN3umdaiCRPTFqkGEjsNtyc 8/iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=484kpt6M8crrqJsBdPMWKiVNmZINIXNPAP5xDyx65J0=; b=se6h187e6OTyxzZdPtLR0jRlZI7CBD7BuTvHl7xxqNlm1Pcjo82RXUkGcIU5FQ1jtW wg/51wwJNczFcXykDnSE8eREdSrc+kaVKs6eAaivaiQ4GCVP0Vyl4ugeTNMYPFPIJj3I kVP8kWpQKy7DkNjnQl5w5dqYX9g7ZW5xDO26bq3wAjafSwuKSRMDgNxaema/VJFHGkSI gMsi4eJ++3WB4oaj+/se63gHEW+2uyfKfwEn+gdhJiXZMA+XqtF5Cf61lC6FzxMr6Xci cipynmkJCfC01cyXNDJRo7EInESlVVyjijYEngETsYPKd+XXqmQQPiWVby9TyfKF8xAo 434w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxJbmngw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a50fa87000000b0046d2975b08fsi6866730edr.555.2022.12.12.16.26.34; Mon, 12 Dec 2022 16:26:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxJbmngw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234159AbiLMAZ3 (ORCPT + 99 others); Mon, 12 Dec 2022 19:25:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234139AbiLMAYm (ORCPT ); Mon, 12 Dec 2022 19:24:42 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13F371B1F9 for ; Mon, 12 Dec 2022 16:24:40 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id g7so2319355lfv.5 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=hWfl+qdmmnZqpjSw5VDpxuUFWMyU/LVK5sEIbMRrjK0Dy8XzpZYruFj82Ph8OPkjUt cv2sCAYblOfOoEUR2fzXKSrP97+iLSBwRtcsJYIvDUfEHD490HC6UlipfVhPvprxa1aZ SH3bSdvkKd+S2L/z8LESykc+a2/+HzlZ+0RnWKQIC4ilti2mJOJHomq97btSKtW+Agf2 vVTCBs1wEGlBwaOFWXtwTFbMtk5U/jHABTfqr5MjAx7UFgqYt8SCK/X4rXWtBPfrjW73 FJLnNdf0I0RNzzHamrDtQLxhItY+hU8nR67zrMDoWBtv+Gk1xgsN06wS9uZJL4fT/ZMZ mlDg== X-Gm-Message-State: ANoB5pmA8KQYf9uUO+kBGlV2017/j2SPQ6AyOmBjFUtxHMHJm+Vu/H8j c0Gyi0WCiPZE4bcJRrYmjKfk6w== 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752056430620974717?= X-GMAIL-MSGID: =?utf-8?q?1752056430620974717?= 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>; }; }; };