From patchwork Tue Apr 11 13:47:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 672455 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 2A831C77B75 for ; Tue, 11 Apr 2023 13:47:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230377AbjDKNrY (ORCPT ); Tue, 11 Apr 2023 09:47:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230313AbjDKNrX (ORCPT ); Tue, 11 Apr 2023 09:47:23 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265B2E51 for ; Tue, 11 Apr 2023 06:47:22 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id e20so8379401lji.6 for ; Tue, 11 Apr 2023 06:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681220840; 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=7u3cWIrv9ii7tk7AluAyAc28Sz76nQ4EdYUWb/87faI=; b=jFgb4agX4lazt4/ZszyG08ELsETbvW3xLfgM0i1ouStqSP+Y9JAqhQoEJTrvSt438F FOmWYogsRPjMbzL6YUfgpUW1Olfo6C6I38OQq2hHrFm+L9c7NiEPB6YwEabMc2LJUOV9 o7cLSMREy8g3A5Dip9viKPO4t7XiVYL16IJ61tPrVmcLiyVbh2EPhaXzhuGgh1oL0Qzr m83uDro7GKL2aLlOhS1O0j51QekunK/Ur2DUp9ICMDZLp+czYGbvaYNcFTLNlnGHqLA+ 8R0gSWs4D0r3507poUVxpYLjxWckZBpSNqf+oaOPGYLS6mpBXZuyJdtyEDUTPOvaliHP pZ1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681220840; 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=7u3cWIrv9ii7tk7AluAyAc28Sz76nQ4EdYUWb/87faI=; b=ZZj4xVUgUMfEOlXBhtoxPMIZ/IGJ2p9Gdd4b5lvrGrs+KQqnD9NhCzo7R45ykK3Emi v0KWUCN6VYwMrEQ3XCiatQ6VR+SRk4HY0miRVuw+Ov0QKq1IrSe8S0JzMp18wSCjt5ov 0O8g64jVmKpRzrUYXQ78ESloiDAFgVe0XocWy3RKcfMUn+3bRnj6E/+z/dkrD0JUtxUB Lc+EffkdHK0M+CDYBmx00kCRhdLMOJ9cPAy1LEP8hTdwLP+B3/CfQH3bLKssUyVKCRPw 8KSrBbBgOmltC2hjI0sAo+72lZtOn1SZ2UfQrpwVHuCq4KGqU8iMYcLihpOf1mC8+/eA kJfA== X-Gm-Message-State: AAQBX9dam0byinMmQAV4YoZIUBNEW4AzKCdyrhmAwW9VHkfJhQc0usXa wtK2SruoGRWgn8gHbN4/3Pvlb3MGKCluRc9zrzA= X-Google-Smtp-Source: AKy350YYkyug7myhwYEEqkIYfm6neRPDD8G+4mIaKDqjpoSh5zOv+O4G8T55cOewfN97R+ZEMXOsBw== X-Received: by 2002:a05:651c:86:b0:2a7:8544:1e71 with SMTP id 6-20020a05651c008600b002a785441e71mr1007706ljq.3.1681220840146; Tue, 11 Apr 2023 06:47:20 -0700 (PDT) Received: from [192.168.1.101] (abxj23.neoplus.adsl.tpnet.pl. [83.9.3.23]) by smtp.gmail.com with ESMTPSA id c10-20020a2e680a000000b002a77583b718sm1245887lja.12.2023.04.11.06.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Apr 2023 06:47:19 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Apr 2023 15:47:15 +0200 Subject: [PATCH v2 1/3] dt-bindings: power: qcom,rpmpd: Add SA8155P MIME-Version: 1.0 Message-Id: <20230411-topic-hanaau-v2-1-fd3d70844b31@linaro.org> References: <20230411-topic-hanaau-v2-0-fd3d70844b31@linaro.org> In-Reply-To: <20230411-topic-hanaau-v2-0-fd3d70844b31@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Bhupesh Sharma , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681220837; l=1558; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=oNW0CgFyxBXeievXT87JHE+KppSisz4HMgd5P1GQgyc=; b=1gOb3wAz8sBLrYX3/bS5JEeK4J5PuGFWkLeVjGnuGJoLuky+eOYnSAc6VULEQjLEUBTpPCf8JMUF Sh/t7bqlDncO5N7MseZ90ARv39biQHBUWccpuA55CBT4K+ihKTin X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a compatible for SA8155P platforms and relevant defines to the include file. Signed-off-by: Konrad Dybcio --- Documentation/devicetree/bindings/power/qcom,rpmpd.yaml | 1 + include/dt-bindings/power/qcom-rpmpd.h | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml index afad3135ed67..f9c211a9a938 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.yaml @@ -29,6 +29,7 @@ properties: - qcom,qcm2290-rpmpd - qcom,qcs404-rpmpd - qcom,qdu1000-rpmhpd + - qcom,sa8155p-rpmhpd - qcom,sa8540p-rpmhpd - qcom,sa8775p-rpmhpd - qcom,sdm660-rpmpd diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 1bf8e87ecd7e..867b18e041ea 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -90,6 +90,15 @@ #define SM8150_MMCX 9 #define SM8150_MMCX_AO 10 +/* SA8155P is a special case, kept for backwards compatibility */ +#define SA8155P_CX SM8150_CX +#define SA8155P_CX_AO SM8150_CX_AO +#define SA8155P_EBI SM8150_EBI +#define SA8155P_GFX SM8150_GFX +#define SA8155P_MSS SM8150_MSS +#define SA8155P_MX SM8150_MX +#define SA8155P_MX_AO SM8150_MX_AO + /* SM8250 Power Domain Indexes */ #define SM8250_CX 0 #define SM8250_CX_AO 1 From patchwork Tue Apr 11 13:47:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 672454 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 91648C76196 for ; Tue, 11 Apr 2023 13:48:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbjDKNsA (ORCPT ); Tue, 11 Apr 2023 09:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230401AbjDKNrZ (ORCPT ); Tue, 11 Apr 2023 09:47:25 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E3503AAA for ; Tue, 11 Apr 2023 06:47:24 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id a3so3037604ljr.11 for ; Tue, 11 Apr 2023 06:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681220842; 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=lnOa1rnUIW+VOH2jrUKXRz6zTj4Kf4Fep5TGBDQYvsQ=; b=k5dSAhm5qHMWnCH2FNZJ51zDDkW5l7jKxuKcwwGlLqCG9z9X8FeAxp3DVocNrWpUAz HeRV6hY8oD99WT26OLXsHK/v7fTEiIEc6DhEHtt0q+wVSYzRxOzYRA2xyD4pFdWzNtJM DkbwD1D6WV2ke3I9ns/rE2+Zt4MZhUM5cdnB0pPKCmfj9jLwcsQnOwmwTcJXgIvoiQ4O kBCugDzNdOp+S9pT4pP+to4dhveDhL5m6Ksy1YdxUK0dblmSgAOFfa+nflArPPelj39y W6S6zEpNzlD3g2HD0DJbLizz5FpZdGZDxPlt0S4tRkjk7RZl7VbT2UkXfms7XBkVkJKb tDVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681220842; 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=lnOa1rnUIW+VOH2jrUKXRz6zTj4Kf4Fep5TGBDQYvsQ=; b=kVZICpmxe0LCPoXRKp+g6WE9CWgKoxIFW8/h5nsjAJ3mx17iy1o05QLqeLq3bsBvVE iemYsqvYk+eiERlkxXBd8ccDUd3XEBvub0Xk5YxEh1VC71+bnlbM4G+QElqhAs8kwBTq jKs+vqUemHC4zzg6zKJbhCdJzr9vixzpobY/5aN1xr9DkMBjJPWZF99/wcbD2WgxqwAB lQ64ZmtjdThSY82gGNsoxViwQnQQWW0tKRRpMeTRofljfisbgs22Plx4C5SFj0RTLA/8 +wkITaU6BCRePOu3T9J+orLIq7JK/e4N6Z7Sf+pfGn5wMnwhq8ykCwx0ZIP2Z+JMSMZu xMrg== X-Gm-Message-State: AAQBX9ewpyw6hNEA7i5zzi6hcfJPO1sG56w7GTLVKdxI2tsl9uUQ24x7 aoC90MyFKngDb7Zw0jYgTdnjF5TpWHw9Lb/hAmk= X-Google-Smtp-Source: AKy350a1m+Y/HfUj1FBHEOehNpusviqs5rax+2zYdmiHX+5UhMZqOIUVFE/wXrizC+lNWX3MH7O2ww== X-Received: by 2002:a2e:920b:0:b0:2a7:7b5e:271 with SMTP id k11-20020a2e920b000000b002a77b5e0271mr651740ljg.24.1681220842452; Tue, 11 Apr 2023 06:47:22 -0700 (PDT) Received: from [192.168.1.101] (abxj23.neoplus.adsl.tpnet.pl. [83.9.3.23]) by smtp.gmail.com with ESMTPSA id c10-20020a2e680a000000b002a77583b718sm1245887lja.12.2023.04.11.06.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Apr 2023 06:47:22 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Apr 2023 15:47:17 +0200 Subject: [PATCH v2 3/3] arm64: dts: qcom: Split out SA8155P and use correct RPMh power domains MIME-Version: 1.0 Message-Id: <20230411-topic-hanaau-v2-3-fd3d70844b31@linaro.org> References: <20230411-topic-hanaau-v2-0-fd3d70844b31@linaro.org> In-Reply-To: <20230411-topic-hanaau-v2-0-fd3d70844b31@linaro.org> To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Bhupesh Sharma , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681220837; l=2119; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=GTxTzfHDkLcCspsXqSwwuRYb2T4ZqC5yjZaaQlxphPk=; b=rGen8sT5XjdbxkaKlembBhwUlJG9cvFLwnBLZgGvlrDk0vTG0pSChCVlSvyincyAJApnpLzvzqmn bp5/4k1tC/1SmWyCyIDP9M4jbjGcJ8jKEswNLy7TL1/NKp5KaGBP X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The RPMhPD setup on SA8155P is different compared to SM8150. Correct it to ensure the platform will not try accessing forbidden/missing RPMh entries at boot, as a bad vote will hang the machine. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sa8155p-adp.dts | 2 +- arch/arm64/boot/dts/qcom/sa8155p.dtsi | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts index 339fea522509..15e1ae1c1a97 100644 --- a/arch/arm64/boot/dts/qcom/sa8155p-adp.dts +++ b/arch/arm64/boot/dts/qcom/sa8155p-adp.dts @@ -7,7 +7,7 @@ #include #include -#include "sm8150.dtsi" +#include "sa8155p.dtsi" #include "pmm8155au_1.dtsi" #include "pmm8155au_2.dtsi" diff --git a/arch/arm64/boot/dts/qcom/sa8155p.dtsi b/arch/arm64/boot/dts/qcom/sa8155p.dtsi new file mode 100644 index 000000000000..ffb7ab695213 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sa8155p.dtsi @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023, Linaro Limited + * + * SA8155P is an automotive variant of SM8150, with some minor changes. + * Most notably, the RPMhPD setup differs: MMCX and LCX/LMX rails are gone, + * though the cmd-db doesn't reflect that and access attemps result in a bite. + */ + +#include "sm8150.dtsi" + +&dispcc { + power-domains = <&rpmhpd SA8155P_CX>; +}; + +&mdss_dsi0 { + power-domains = <&rpmhpd SA8155P_CX>; +}; + +&mdss_dsi1 { + power-domains = <&rpmhpd SA8155P_CX>; +}; + +&mdss_mdp { + power-domains = <&rpmhpd SA8155P_CX>; +}; + +&remoteproc_slpi { + power-domains = <&rpmhpd SA8155P_CX>, + <&rpmhpd SA8155P_MX>; +}; + +&rpmhpd { + /* + * The bindings were crafted such that SA8155P PDs match their + * SM8150 counterparts to make it more maintainable and only + * necessitate adjusting entries that actually differ + */ + compatible = "qcom,sa8155p-rpmhpd"; +};