Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1505410rwl; Fri, 4 Nov 2022 15:05:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jIQ2KC+ocEV5ocT2iErUmX4gbVDUZtHZYOpvo+n63g2rp3lLLPDzOtAPVxoo7S4ZONWir X-Received: by 2002:a17:902:c410:b0:187:190f:6aa2 with SMTP id k16-20020a170902c41000b00187190f6aa2mr31008522plk.88.1667599511634; Fri, 04 Nov 2022 15:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667599511; cv=none; d=google.com; s=arc-20160816; b=b8ZzAfr0Iabdm2Oa0hIwq1RNd/rpdFeapcfBJycZoYaPUjb21viRwkxTHZ5AeK3eGE vErcEjD/SIXIqxDSu16a+rO1Ulg5B7FcLccQWIDMnEbelTZ6E/EYb16sdZSW7dS0BkdE y+bVwjmqNNhKPi8wTO5/vgktN0Az5z/zsvPSmdEu8vyCEM39PFAvCwKHafsPatRFjJCF RgU3QIO6b8DulU7JUy44kr+lq1aOPy9VoQ1cPPqWdkSMLTzjH/fN7dDc8qZ3yas+rzpC y3GCwvewghwy0FMXRKqB4wBPKhQOCoyoQ4hURNrkza6/UZkV5cKq4qoa504zMmBQqIrT CPOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pyGds6Hg1ZCJpXSt9b953qf8BGwVMn84FDUpPupYsPA=; b=c9SoB90JJNi/R3IzfCs82tWD3+uDe1NjrpeTMnk616MqsEMUPd33TBiDVB9WRuDbJr K/PckxqOuEQwlvkjo9JBbmsViQbOhOGdDvYYCMdWSTq7gNMwQAWduidbR6iDyOhClgsH Jm1/QxqhK2bQt3XyLs1gnFZlogxv18gBX/KmTGpedWgxGJPlW7e88QA99w2fW5CneK7K lUkdMNkf0eyOdvL0ZQGaipLpAbx/YvKXvkOKh8ma3XgAgzutqzGm7CuZy6m8kjZXEwBL N4Xv9OZ6F8qis9oc3pVT7yO+KC1IpyOIBSu8x96CqpH/5MGaBeLnSFbj2ln6hQEuO0+r sQnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DssSrfVl; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a1709027d8400b001867bac69cdsi685037plm.342.2022.11.04.15.04.56; Fri, 04 Nov 2022 15:05:11 -0700 (PDT) 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=DssSrfVl; 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 S229445AbiKDVRN (ORCPT + 97 others); Fri, 4 Nov 2022 17:17:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229588AbiKDVRH (ORCPT ); Fri, 4 Nov 2022 17:17:07 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E586A2700 for ; Fri, 4 Nov 2022 14:17:06 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id n85so1602089yba.1 for ; Fri, 04 Nov 2022 14:17:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pyGds6Hg1ZCJpXSt9b953qf8BGwVMn84FDUpPupYsPA=; b=DssSrfVlC3iSSNTKeeDHt8VNgTSi5VuuN0su+R3SWycgfn/MKXXDOSE3gj83VHj9cl HrcoYCHYVAfb1wbgNsGa68z+V456TnMfPIT+EWX1A3hvJA/y97t/hSXShCZHpAd8xdqx qTIh8O0CZ6+qBXguTqj2gcIVxJzVVFi8qg2OlMU5BHM3ZGOyhfU60YFUTTnbgQiDVrIp Wz6zJ1INTZtvm0/sZ/ImQPWgnnMzAS1PkvA5/N8CuSHTNsKF0Ut11gL4z0iziR9dStwo jvo60f0Su6wLkC44wUyx1gW8XdHwqtDcMrVuoVfluOlT7V7Ddh7BsQtyAPevahbOC6o6 uDKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pyGds6Hg1ZCJpXSt9b953qf8BGwVMn84FDUpPupYsPA=; b=koHtxOIMXei7wwfJ2IdxR0ZzA7jT1hVni5M1NDOprZQKW0JWu8elkfQ1Nt/+7JVBNO LYNAXs5vmev12NNtQAQmujW48C9xrWotHm5Bn2fPTs/hqqFwZp/fuMeRHqQ8z3wE72dt d0Xm9NhFlchUp6Na7lWgHjxRUtgOiYD32JzwwPPz4/hX7DHOXHESocgXLz9WAGCl1TY0 Zy6671rZlX8DoEQt+BslAN5qTWVQqoIFFcTEFS/qj2EzqHYWvuyeQQ5WQG+SLjfDpIJO MzGMuHCb9WIU9GSl7yvAx0rG0M2bT404+g9UMWMdd+Tg0UhYnFIO8CKGLWal1ya6jp8W 6y2g== X-Gm-Message-State: ANoB5pk6Be6J8RHIrcWwDwGqMBRSsf/RxU+NCbFTGkVyKlpWS7B9orwi ChikhZlhPwhf+3dQy2uoIH2hS+Lm8KDKRxd36eBi4g== X-Received: by 2002:a25:3b90:0:b0:6d3:5464:8338 with SMTP id i138-20020a253b90000000b006d354648338mr4703120yba.288.1667596626192; Fri, 04 Nov 2022 14:17:06 -0700 (PDT) MIME-Version: 1.0 References: <20221104133452.131227-1-angelogioacchino.delregno@collabora.com> <20221104133452.131227-3-angelogioacchino.delregno@collabora.com> <20221104143202.nps2iwqjcwug6mij@SoMainline.org> In-Reply-To: <20221104143202.nps2iwqjcwug6mij@SoMainline.org> From: Dmitry Baryshkov Date: Sat, 5 Nov 2022 00:16:55 +0300 Message-ID: Subject: Re: [PATCH 2/2] soc: qcom: spm: Implement support for SAWv2.3, MSM8976 L2 PM To: Marijn Suijten Cc: AngeloGioacchino Del Regno , agross@kernel.org, andersson@kernel.org, konrad.dybcio@somainline.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, AngeloGioacchino Del Regno Content-Type: text/plain; charset="UTF-8" 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=ham 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 On Fri, 4 Nov 2022 at 17:34, Marijn Suijten wrote: > > On 2022-11-04 14:34:52, AngeloGioacchino Del Regno wrote: > > From: AngeloGioacchino Del Regno > > > > Implement the support for SAW v2.3, used in at least MSM8976, MSM8956 > > and APQ variants and while at it also add the configuration for the > > MSM8976's little (a53) and big (a72) clusters cache power management. > > > > Signed-off-by: AngeloGioacchino Del Regno > > [Marijn: reorder struct definitions to follow high-to-low order] > > Signed-off-by: Marijn Suijten With this sign-off in place, Reviewed-by: Dmitry Baryshkov > > > Signed-off-by: AngeloGioacchino Del Regno > > --- > > drivers/soc/qcom/spm.c | 33 +++++++++++++++++++++++++++++++++ > > 1 file changed, 33 insertions(+) > > > > diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c > > index 484b42b7454e..bfcd321d7837 100644 > > --- a/drivers/soc/qcom/spm.c > > +++ b/drivers/soc/qcom/spm.c > > @@ -98,6 +98,35 @@ static const struct spm_reg_data spm_reg_8916_cpu = { > > .start_index[PM_SLEEP_MODE_SPC] = 5, > > }; > > > > +static const u16 spm_reg_offset_v2_3[SPM_REG_NR] = { > > + [SPM_REG_CFG] = 0x08, > > + [SPM_REG_SPM_CTL] = 0x30, > > + [SPM_REG_DLY] = 0x34, > > + [SPM_REG_PMIC_DATA_0] = 0x40, > > + [SPM_REG_PMIC_DATA_1] = 0x44, > > +}; > > + > > +/* SPM register data for 8976 */ > > +static const struct spm_reg_data spm_reg_8976_gold_l2 = { > > + .reg_offset = spm_reg_offset_v2_3, > > + .spm_cfg = 0x14, > > + .spm_dly = 0x3c11840a, > > + .pmic_data[0] = 0x03030080, > > + .pmic_data[1] = 0x00030000, > > + .start_index[PM_SLEEP_MODE_STBY] = 0, > > + .start_index[PM_SLEEP_MODE_SPC] = 3, > > +}; > > + > > +static const struct spm_reg_data spm_reg_8976_silver_l2 = { > > + .reg_offset = spm_reg_offset_v2_3, > > + .spm_cfg = 0x14, > > + .spm_dly = 0x3c102800, > > + .pmic_data[0] = 0x03030080, > > + .pmic_data[1] = 0x00030000, > > + .start_index[PM_SLEEP_MODE_STBY] = 0, > > + .start_index[PM_SLEEP_MODE_SPC] = 2, > > +}; > > + > > static const u16 spm_reg_offset_v2_1[SPM_REG_NR] = { > > [SPM_REG_CFG] = 0x08, > > [SPM_REG_SPM_CTL] = 0x30, > > @@ -213,6 +242,10 @@ static const struct of_device_id spm_match_table[] = { > > .data = &spm_reg_8916_cpu }, > > { .compatible = "qcom,msm8974-saw2-v2.1-cpu", > > .data = &spm_reg_8974_8084_cpu }, > > + { .compatible = "qcom,msm8976-gold-saw2-v2.3-l2", > > + .data = &spm_reg_8976_gold_l2 }, > > + { .compatible = "qcom,msm8976-silver-saw2-v2.3-l2", > > + .data = &spm_reg_8976_silver_l2 }, > > { .compatible = "qcom,msm8998-gold-saw2-v4.1-l2", > > .data = &spm_reg_8998_gold_l2 }, > > { .compatible = "qcom,msm8998-silver-saw2-v4.1-l2", > > -- > > 2.37.2 > > -- With best wishes Dmitry