Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1536460rdb; Sat, 10 Feb 2024 06:14:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4eT20d235EDNR1nhcPptnsYJ+bJkk5r2xdEUoXmIhqkT3ROXDTJ1/IgmEe1dQVwHkiyIb X-Received: by 2002:aa7:dcc1:0:b0:55f:f32b:cd57 with SMTP id w1-20020aa7dcc1000000b0055ff32bcd57mr1293848edu.4.1707574447618; Sat, 10 Feb 2024 06:14:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707574447; cv=pass; d=google.com; s=arc-20160816; b=eUyMQhz+lIG9d3tnrlGrO5JDDIzgJoVTt0RAH4wD8qhhZ0fcIb6w4N0P1G6oJ60uhb l6uzOSwcHzGy2Ru02hbxDoDVyXGhLF3p6mbS9iylq+DWwTJiSa0fzfglPNPAhaL20lHM HDDhNoUJ7WSyGH331rnstzo3ng9KYTcQ9aiUNXPPgsSDu5RpMinOKTEu9439U3BBorAo mD7gnjjnQwsaAagun7SIkP7vveUMWychgnUWZKjLm7zSKCAd3q1EPshVEEOLNIc2ZyJJ eZS3KOOBsHiuQfQ0E8NtpSi5lA8u0GMiFg/FMNXlMMgW5fnXHekMlCnhsKPrGJbqT3nn oOWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=L/xp2QJpsQvAu2YVBpl5BifXbXhsoZWkAsqaa2vsuEY=; fh=X3saV8gy8R7bo+Ys4PrEYeq3zVhXjwQdYzcJm2tsQpE=; b=ihk7HQ1Sr4Vo9wzfMOhP85auFWZQBRu4u2PE/HMjhLn7KwpPFEnRuiFh9leUNgzb79 D3kp3cqYiaNRjw0NbWMtHeOqZlaywQpDP5ULJQZij/GxDCumbQKuXlhDc1uo5iEc6QdB fqtmNRzazYDFn0F0js3bLWuc64mRjsSTuDDy45yaN+WcQhOLADrVjjV0tojK1REwW131 sVLQJbw80+TwpYituKjtTjN+eDDtB8hC1WEuLXou6EB0ZIITkvW5Rn+Axr11M3cZh8n1 XP8TypLFkiySXNVfB2cCauFTEwIjA0AvqqRfOPH1U12u/T0KLnjuzBl9/ifnsyrLa2Ru b6Qw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=s1 header.b=7eEW7knG; arc=pass (i=1 spf=pass spfdomain=z3ntu.xyz dkim=pass dkdomain=z3ntu.xyz dmarc=pass fromdomain=z3ntu.xyz); spf=pass (google.com: domain of linux-kernel+bounces-60419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60419-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz X-Forwarded-Encrypted: i=2; AJvYcCVliFazjFVkNPKQc9CR7zFIMwd9IGoSE/SdeWbmNjtL/u24Jjpkbw2PeaFyxp9sFiH1PyyLRsE1r3XySxe2NYVjLZc8ycNtSGSc6J7iBA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u19-20020a50a413000000b00557392e2ed6si837903edb.429.2024.02.10.06.14.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 06:14:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=s1 header.b=7eEW7knG; arc=pass (i=1 spf=pass spfdomain=z3ntu.xyz dkim=pass dkdomain=z3ntu.xyz dmarc=pass fromdomain=z3ntu.xyz); spf=pass (google.com: domain of linux-kernel+bounces-60419-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60419-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 387CC1F22710 for ; Sat, 10 Feb 2024 14:14:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8573154BCF; Sat, 10 Feb 2024 14:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b="7eEW7knG" Received: from ahti.lucaweiss.eu (ahti.lucaweiss.eu [128.199.32.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26F4B53E0D; Sat, 10 Feb 2024 14:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=128.199.32.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707574409; cv=none; b=l8VjquMWK98bGnX6ek7SdO2Qy043aAkU9PVCtOdiZm7f2ggLeALqNImNhqwBFo6VKTZd6XUNFSTj1/HcDPbRhOUyR5d3LNCrfJ9zM6lFhQNBeV0+GHvbu/+nsNWouiH0FHozJieavq3SvjrBJ5N/ClGG6BxQtcme6zJG+77iF3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707574409; c=relaxed/simple; bh=pEbjMkaG6aytDHCPfPUMYKbhop5aoAakU84obp67bv8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Pcgr3T0O9nAjCE7IA45cCvO96W1T+EkQF+I4CpbDRCQw/xCdxqEgSAkqQqHTmCgpnju+6g5qlZxDWz51VYoxR8V9bzUrG+nwdD/MeOVgpgDvQOO+w2YKrAOM/FGnbD0ZdpEwhRKkNlUa6/3Hro3ZLUKqak1sa7uJzDfQ9RyNHmQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=z3ntu.xyz; spf=pass smtp.mailfrom=z3ntu.xyz; dkim=pass (1024-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b=7eEW7knG; arc=none smtp.client-ip=128.199.32.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=z3ntu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=z3ntu.xyz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=s1; t=1707574399; bh=pEbjMkaG6aytDHCPfPUMYKbhop5aoAakU84obp67bv8=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=7eEW7knG3Kt1XQZsTi0b2jkYMBHrEzKaJa5SRfZoehy1mNBUxZPOXS2y+ARlkUB50 zxa56jZICMKwcoO4qms09bGrpCwezCoEXgMXvZIiCsiup3xnhgDtFnu4M4+S9mfFDa X81E0fyxtYOa+8w8XTyfeerK9utVDGoMjfAXOHDA= From: Luca Weiss Date: Sat, 10 Feb 2024 15:12:57 +0100 Subject: [PATCH 3/3] pmdomain: qcom: rpmpd: Add MSM8974PRO+PMA8084 power domains Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240210-msm8974-rpmpd-v1-3-de9355e6842a@z3ntu.xyz> References: <20240210-msm8974-rpmpd-v1-0-de9355e6842a@z3ntu.xyz> In-Reply-To: <20240210-msm8974-rpmpd-v1-0-de9355e6842a@z3ntu.xyz> To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Stephan Gerhold , =?utf-8?q?Matti_Lehtim=C3=A4ki?= Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Luca Weiss X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2540; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=pEbjMkaG6aytDHCPfPUMYKbhop5aoAakU84obp67bv8=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBlx4R9DAmzORdeYJsmHQwKQRAjHJYEVq2+bwQ/T nGIpX0bUZeJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZceEfQAKCRBy2EO4nU3X Voi6D/95TvGZpv+6L56HIuBJv4E50X1zBarD4qhAMgxdQdh/qkeBRwI68dhKWRIa7IK4CS4Vmi/ QZXdFFxCIb6vtX4pWAceyaTVarcPpLW69+PUAws93WTtyeVTvNbs+ujsTZdslfVcjE+7uJPQZah gzSMg2QGBG2AmvgScPsyNCaP4hIFWrnfUf7KMKS5hRJx71YMLO+9L7rMUO8/yfgFnI722wJMf2r yoT4OE0KpdyfIFVOP7e5maYVEAUFYmm+oo0ZFKPBlPlIadOjhCbVtk2JHz30Jb1j9WbOrSh76Jr iegovPxfvv6tbZpOZFNCcNxXcblzFbLdULy5FACgUdoYbu/sZrjwMEBq+U2ogQSrfZFgGCfFVbl 3Ah4sYELgzB/OKtTmNvdP8aH/8swUJ84AQfWPeMzt2mdOzex7n+I6NTg9Q+zYRxfzi5EbK7uU0H 1Ndy0iw0Alhyrnw43/BzDRD+14PuRZ4nM4sYUZHcyH5kHbfAyULikJCTySkJoFkAwrmwA3T9RPf cXmHKTbR90Z5AFuvNxV2fF8fddYR6ywpnQrnBB5XPQGLthJqrqjGq/PPRAv9TxK8AZENJarDYT7 VWtRFF6OHV0K+LWpvdr0FyHU4ejz41NyPMvEnp28UKLqg08CZNv6AO9sIcD2V0hssYGbHRw+FI7 o7hvExQLT0/jX3g== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD Add the power domains CX & GFX found on MSM8974 devices that use PMA8084 instead of the standard PM8841+PM8941 combo. Signed-off-by: Luca Weiss --- drivers/pmdomain/qcom/rpmpd.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/pmdomain/qcom/rpmpd.c b/drivers/pmdomain/qcom/rpmpd.c index bb28a7319bed..3cd0d1ad6188 100644 --- a/drivers/pmdomain/qcom/rpmpd.c +++ b/drivers/pmdomain/qcom/rpmpd.c @@ -252,6 +252,31 @@ static struct rpmpd cx_s2b_vfc = { }; /* G(F)X */ +static struct rpmpd gfx_s7a_corner_ao; +static struct rpmpd gfx_s7a_corner = { + .pd = { .name = "gfx", }, + .peer = &gfx_s7a_corner_ao, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_CORNER, +}; + +static struct rpmpd gfx_s7a_corner_ao = { + .pd = { .name = "gfx_ao", }, + .peer = &gfx_s7a_corner, + .active_only = true, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_CORNER, +}; + +static struct rpmpd gfx_s7a_vfc = { + .pd = { .name = "gfx_vfc", }, + .res_type = RPMPD_SMPA, + .res_id = 7, + .key = KEY_FLOOR_CORNER, +}; + static struct rpmpd gfx_s2b_corner = { .pd = { .name = "gfx", }, .res_type = RPMPD_SMPB, @@ -728,6 +753,21 @@ static const struct rpmpd_desc msm8974_desc = { .max_state = MAX_CORNER_RPMPD_STATE, }; +static struct rpmpd *msm8974pro_pma8084_rpmpds[] = { + [MSM8974_VDDCX] = &cx_s2a_corner, + [MSM8974_VDDCX_AO] = &cx_s2a_corner_ao, + [MSM8974_VDDCX_VFC] = &cx_s2a_vfc, + [MSM8974_VDDGFX] = &gfx_s7a_corner, + [MSM8974_VDDGFX_AO] = &gfx_s7a_corner_ao, + [MSM8974_VDDGFX_VFC] = &gfx_s7a_vfc, +}; + +static const struct rpmpd_desc msm8974pro_pma8084_desc = { + .rpmpds = msm8974pro_pma8084_rpmpds, + .num_pds = ARRAY_SIZE(msm8974pro_pma8084_rpmpds), + .max_state = MAX_CORNER_RPMPD_STATE, +}; + static struct rpmpd *msm8976_rpmpds[] = { [MSM8976_VDDCX] = &cx_s2a_lvl, [MSM8976_VDDCX_AO] = &cx_s2a_lvl_ao, @@ -922,6 +962,7 @@ static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8939-rpmpd", .data = &msm8939_desc }, { .compatible = "qcom,msm8953-rpmpd", .data = &msm8953_desc }, { .compatible = "qcom,msm8974-rpmpd", .data = &msm8974_desc }, + { .compatible = "qcom,msm8974pro-pma8084-rpmpd", .data = &msm8974pro_pma8084_desc }, { .compatible = "qcom,msm8976-rpmpd", .data = &msm8976_desc }, { .compatible = "qcom,msm8994-rpmpd", .data = &msm8994_desc }, { .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc }, -- 2.43.0