From patchwork Thu Feb 21 06:44:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 158867 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp141503jaa; Wed, 20 Feb 2019 22:44:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IZwEFaHtaeBhakKNZluEdzL0YV7TtdloM3s2Kq2PopNFwxbX31bzExooylk6taUr+M+eBOa X-Received: by 2002:a63:d34a:: with SMTP id u10mr33576194pgi.301.1550731457824; Wed, 20 Feb 2019 22:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550731457; cv=none; d=google.com; s=arc-20160816; b=jCdewNb/7nnatcXjIOTyT1fHOAkf6y1IIkV4mhS+tJGazaVqFDS15lYFg5W/a7w7Ty H3o9mXx4ibCThK/SW8e/iYUYl6gzSnkDppWOtjqoSHmJ0xlCESciHg8klg0B2dw6Z1fU 2dsT4P1T/yrI3h5GKV+Iol7DSQKVywsSFUnfbt1uzSoQd0KwJmDEKg44UnIADyshmYC+ 9aRgrf3Uvttry4Vm6uZtU/tZVTjTKU7SNi0kOtgpGYfLFHgXbm3+NFKYBgJkEc8RsK9k NdSWYPJ8qidby9Ctpn7Fe5wxbZNOnwVMDAffEyi+Ud8IxkIoCHLfj9GMuohlPoibGvHh IPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=QetkU8HkeLHZ7CDP8UqLFrIsq3JOZpxLPjU3HCJfceo=; b=tF6i2zy6wxFdNZq7Irz3OKuHKmi+4vakAd1p0VLQHmk1u1YfnpG5aqx0aoLF/XxSVX mXZiMMtvAqtiDtOj8KLbrShBCm+xEzEiOcWkDPRrqtyS1vWJtagnctP2hHZQUTsK98fs ZcrOX8tY7fZC38gZQwLITL7Dyr/JlJLM0dmU9dQXS4f3gVyBhFtKhR5IEAAoFpFM2QYY 7oDffuw07EF8HVsi4WG3rlqAzDEwMlfbqGAENiJWy5MgR2ZptLiZhCI1EFxb12uDvhCV WjHAerIKxRBGSKdyOuYSMI9rq8TAt2iuYvZu5Mwy3JnZ2Z0/Qsvn0SVWMlaR2eCcPVO+ V8UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ybWJeU6M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si15007332pfi.248.2019.02.20.22.44.17; Wed, 20 Feb 2019 22:44:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ybWJeU6M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726812AbfBUGoQ (ORCPT + 32 others); Thu, 21 Feb 2019 01:44:16 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:38960 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbfBUGoN (ORCPT ); Thu, 21 Feb 2019 01:44:13 -0500 Received: by mail-pl1-f194.google.com with SMTP id 101so13660263pld.6 for ; Wed, 20 Feb 2019 22:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QetkU8HkeLHZ7CDP8UqLFrIsq3JOZpxLPjU3HCJfceo=; b=ybWJeU6Mu2zhZx5fivSPY6ji/N+2+BKh+V0cdC41h+EDcyPkv5PNd1OgarL1qnrctK z8jx/Kz7FrTP4qFDcBzxqWN92wKJTbzRLBfmfvfk5RQ644Tv/GVhSRH2jvYKwFSenNPk VAjURrSghxrrGowOJEKsBOXa/vPRtn/aVG5lp7tXmqXZ/fX2RUqlbtIO2sJMvuIGjwjN 6fp+0SkVZ/jM/Tzjdxwz/EqCvqf9OJ5fOyARmbFt4BD36TQgsAn4LS+VzhPs9j6A6aCX 7XYkZO9z9ai1OxGyiOCb9dk9ejziGnTuqJZVa6kAnvAOE2EvuqTlnn7XSwHbdcWcJ539 XNGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QetkU8HkeLHZ7CDP8UqLFrIsq3JOZpxLPjU3HCJfceo=; b=AQ8fm+iOwBCwL7NISNmOWxCAQcRBUjV0wfST/NQGV86WHv0ah/f4uP0IX+dc7znIlM mJxVXZ/umKRuuPX5UrSlg29jwSoEwfj90JUOR3agAAETCQGBwabqSOgOpiXjl/fdOp6E 9A+oAxk5EMmnbVxU1g+j+OnjxY9H048Szv4Q4mtKuGLVqFuLjPxWBia40Velq1bnHH4z FpkcMBZfpliZlc1wknaLurA55U/AFBNyyAxxj1S1QezwcbCQkTJ+eI1F0RzdJggkF03x gV+WRZsAqrdbcMbqZRB+QYfsvY4vlyrgaJ29Yl8j0s8aoh68Uc/FGR2xxgseqio3T1Rr bIIA== X-Gm-Message-State: AHQUAub8fFfmflauasVyGcRs2ilRJULrPRof1zyEuqSnIz+YRBASzVto k/ao2xj80bm/iwqQ5IWvZJtQGA== X-Received: by 2002:a17:902:8348:: with SMTP id z8mr19400212pln.151.1550731453196; Wed, 20 Feb 2019 22:44:13 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id b4sm22777892pgq.57.2019.02.20.22.44.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 22:44:12 -0800 (PST) From: Bjorn Andersson To: Andy Gross , David Brown , Rajendra Nayak Cc: Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] soc: qcom: rpmpd: Modify corner defining macros Date: Wed, 20 Feb 2019 22:44:32 -0800 Message-Id: <20190221064434.2760-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190221064434.2760-1-bjorn.andersson@linaro.org> References: <20190221064434.2760-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QCS404 uses individual resource type magic for each power-domain, so adjust the macros slightly to make them reusable for this. Signed-off-by: Bjorn Andersson --- drivers/soc/qcom/rpmpd.c | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) -- 2.18.0 diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 005326050c23..74b2f001b9c6 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -17,8 +17,8 @@ #define domain_to_rpmpd(domain) container_of(domain, struct rpmpd, pd) /* Resource types */ -#define RPMPD_SMPA 0x61706d73 -#define RPMPD_LDOA 0x616f646c +#define RPMPD_SMPA 0x61706d73 /* smpa */ +#define RPMPD_LDOA 0x616f646c /* ldoa */ /* Operation Keys */ #define KEY_CORNER 0x6e726f63 /* corn */ @@ -27,12 +27,12 @@ #define MAX_RPMPD_STATE 6 -#define DEFINE_RPMPD_CORNER_SMPA(_platform, _name, _active, r_id) \ +#define DEFINE_RPMPD_CORNER_PAIR(_platform, _name, _active, r_type, r_id) \ static struct rpmpd _platform##_##_active; \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ .peer = &_platform##_##_active, \ - .res_type = RPMPD_SMPA, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_CORNER, \ }; \ @@ -40,33 +40,27 @@ .pd = { .name = #_active, }, \ .peer = &_platform##_##_name, \ .active_only = true, \ - .res_type = RPMPD_SMPA, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_CORNER, \ } -#define DEFINE_RPMPD_CORNER_LDOA(_platform, _name, r_id) \ +#define DEFINE_RPMPD_CORNER(_platform, _name, r_type, r_id) \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ - .res_type = RPMPD_LDOA, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_CORNER, \ } -#define DEFINE_RPMPD_VFC(_platform, _name, r_id, r_type) \ +#define DEFINE_RPMPD_VFC(_platform, _name, r_type, r_id) \ static struct rpmpd _platform##_##_name = { \ .pd = { .name = #_name, }, \ - .res_type = r_type, \ + .res_type = RPMPD_##r_type, \ .res_id = r_id, \ .key = KEY_FLOOR_CORNER, \ } -#define DEFINE_RPMPD_VFC_SMPA(_platform, _name, r_id) \ - DEFINE_RPMPD_VFC(_platform, _name, r_id, RPMPD_SMPA) - -#define DEFINE_RPMPD_VFC_LDOA(_platform, _name, r_id) \ - DEFINE_RPMPD_VFC(_platform, _name, r_id, RPMPD_LDOA) - struct rpmpd_req { __le32 key; __le32 nbytes; @@ -94,12 +88,12 @@ struct rpmpd_desc { static DEFINE_MUTEX(rpmpd_lock); /* msm8996 RPM Power domains */ -DEFINE_RPMPD_CORNER_SMPA(msm8996, vddcx, vddcx_ao, 1); -DEFINE_RPMPD_CORNER_SMPA(msm8996, vddmx, vddmx_ao, 2); -DEFINE_RPMPD_CORNER_LDOA(msm8996, vddsscx, 26); +DEFINE_RPMPD_CORNER_PAIR(msm8996, vddcx, vddcx_ao, SMPA, 1); +DEFINE_RPMPD_CORNER_PAIR(msm8996, vddmx, vddmx_ao, SMPA, 2); +DEFINE_RPMPD_CORNER(msm8996, vddsscx, LDOA, 26); -DEFINE_RPMPD_VFC_SMPA(msm8996, vddcx_vfc, 1); -DEFINE_RPMPD_VFC_LDOA(msm8996, vddsscx_vfc, 26); +DEFINE_RPMPD_VFC(msm8996, vddcx_vfc, SMPA, 1); +DEFINE_RPMPD_VFC(msm8996, vddsscx_vfc, LDOA, 26); static struct rpmpd *msm8996_rpmpds[] = { [MSM8996_VDDCX] = &msm8996_vddcx, From patchwork Thu Feb 21 06:44:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 158869 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp141614jaa; Wed, 20 Feb 2019 22:44:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IZFt9AsXehbBn3GKAg+uX4nAJDzF2qFdV50Twpevi3j+BQzIwvbu3plF/IIZGL/mU00qwPN X-Received: by 2002:a65:4807:: with SMTP id h7mr32347008pgs.15.1550731467340; Wed, 20 Feb 2019 22:44:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550731467; cv=none; d=google.com; s=arc-20160816; b=Rla45JRs0B6ILkAD/cwYHNiSfv62dRJkKpx1xMi7DIHOT05uKxGOk+9Mwmo1/W7yUf 1RwVPC77D7scQQsNKcw2z/JFX2quxQ6ebFypDvKPiWFB1aP59oYrewKzMYRabLobBRbE 4QWbl2mJuDjQr1adBQwZa6HpN8B/w/yXGg8YljkuGWVxGHANynOQJ/d2enHvdKRpYgCK 1iPn21ozTYL7uCENYSQCgquA+HDkbTBJVIOaAJHURisaUbG+J8UVsBAcwjeYb11rJi0i HLR9RMxvJSc40SQ0QBP3xHwHT61dCPGqflpMePPV0o7Tzt3RJNDlHVptQScG7qVL9hn+ TNsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=/tCAF+6qYZ4v3albO6Hwzpgn40ANVmjeSJ8wHTFMDAs=; b=p7w7bGO0f4J30XtO1B4C22sAWDMUrWqYrkjhVHgsNqwF6P+3PmjF5SuKYknYvryPMF Hohc9x1P+Zrd0rv59EWgFrs6zXx8oqwLX99CuA263BmZhU180ZF/CsiqrWwVlXFxY1oZ xABYb8lMgEGPMKK76EEMWFc+ytGFypO5oWXyEY0sob6IDu0on/Q3GgNy1lqiSQihE/Ta tKo8W3ZfC9y8SkhT83ULL2hnpWIB0oHN6vRKa5M/7sprM7v+WEPoX+Xnd3UsRRnKBsQL A0JiaLOWlHFdGPNG72dah3Yo/7GXwhQhormFVKHgtoANV7njZy9/7iUkCuw1YryL9yp4 JdXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FZcNa2Or; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k22si19832536pfi.256.2019.02.20.22.44.26; Wed, 20 Feb 2019 22:44:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FZcNa2Or; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727101AbfBUGoZ (ORCPT + 32 others); Thu, 21 Feb 2019 01:44:25 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:42512 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726736AbfBUGoP (ORCPT ); Thu, 21 Feb 2019 01:44:15 -0500 Received: by mail-pf1-f195.google.com with SMTP id n74so13259984pfi.9 for ; Wed, 20 Feb 2019 22:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/tCAF+6qYZ4v3albO6Hwzpgn40ANVmjeSJ8wHTFMDAs=; b=FZcNa2Or4S3vBYhXqk1xMtNXcQkxO172ndZWtV9HGE7VLfiin4ilKRs7C7sWFgsgJ/ nFgQBZKZXcFO97MlCrrxvgAeOhUNDTI6bDa24jx4uc3LtwJtmO6319JBze/AFBY25szB Sn4GDiDmbrI32qU5OZX3znuXtEjil9Zn/O+Xq41uP/WY4ojkHFo4DJl/m7pD2rIjaoey PKzXZ8DMJSUkRXiAlmacpB3WIGesViGeRV8LWuDdfOOayDZ0Y9Ucs5mcIxBWeuZAMAV7 vXN4JKSrxMP5r8tY7iUs3MysS+ld/wOvq7RpeC9mRsgSNlq7F3wCr0btB21Yo0S+XqrF 5Brw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/tCAF+6qYZ4v3albO6Hwzpgn40ANVmjeSJ8wHTFMDAs=; b=FUC0GtC8xrGzAvjAxKBw8v1uVy6XcTrkLcVZjLcu+/eGa/ivbnEWEXZ8x7NCfvkoxt 4wUPucde6J5AlHexR6CtcNMJLp/7qYP58w9EWcT3x/AmOIyJo7hFUli5d2ZZPpzGEsYF llmEoBFt5UA7eMlKL5JCnO0Ed3NKDGQFblA+WUsyLBHWmk5IUcF+Asq8ylXYEuR5DzZ0 nMpexgO+DVXeaQ2PQHRlyM2/GP91Yy8chQgZxcvWzCs+2PsydCDXApZxWTlYfymkXuLU kDOYTou9MOJqWrJkZRs8W4ToefS2EbQCiIowIGYDj5ASM3oRJEDnruft4V/gkfT1gbWV YWIg== X-Gm-Message-State: AHQUAuaTM8XO6JdlPX8cHZ/c2oLIQKirIfNZP6B5mC6lazqXSC8xU6Rl 2IAddl86ddfcaprrkwuXSBaowA== X-Received: by 2002:a63:1ce:: with SMTP id 197mr32756167pgb.47.1550731454565; Wed, 20 Feb 2019 22:44:14 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id b4sm22777892pgq.57.2019.02.20.22.44.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 22:44:13 -0800 (PST) From: Bjorn Andersson To: Andy Gross , David Brown , Rob Herring , Mark Rutland , Rajendra Nayak Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] soc: qcom: rpmpd: Add QCS404 corners Date: Wed, 20 Feb 2019 22:44:33 -0800 Message-Id: <20190221064434.2760-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190221064434.2760-1-bjorn.andersson@linaro.org> References: <20190221064434.2760-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the shared cx/mx and the low-power-island's cx and mx power-domains found on QCS404. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/power/qcom,rpmpd.txt | 1 + drivers/soc/qcom/rpmpd.c | 29 +++++++++++++++++++ include/dt-bindings/power/qcom-rpmpd.h | 9 ++++++ 3 files changed, 39 insertions(+) -- 2.18.0 diff --git a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt index 980e5413d18f..b6c596883ea4 100644 --- a/Documentation/devicetree/bindings/power/qcom,rpmpd.txt +++ b/Documentation/devicetree/bindings/power/qcom,rpmpd.txt @@ -6,6 +6,7 @@ which then translates it into a corresponding voltage on a rail Required Properties: - compatible: Should be one of the following * qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC + * qcom,qcs404-rpmpd: RPM Power domain for the qcs404 * qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC - #power-domain-cells: number of cells in Power domain specifier must be 1. diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c index 74b2f001b9c6..0001fcafaf97 100644 --- a/drivers/soc/qcom/rpmpd.c +++ b/drivers/soc/qcom/rpmpd.c @@ -19,6 +19,9 @@ /* Resource types */ #define RPMPD_SMPA 0x61706d73 /* smpa */ #define RPMPD_LDOA 0x616f646c /* ldoa */ +#define RPMPD_RWMX 0x786d7772 /* rwmx */ +#define RPMPD_RWLC 0x636c7772 /* rwlc */ +#define RPMPD_RWLM 0x6d6c7772 /* rwlm */ /* Operation Keys */ #define KEY_CORNER 0x6e726f63 /* corn */ @@ -110,8 +113,34 @@ static const struct rpmpd_desc msm8996_desc = { .num_pds = ARRAY_SIZE(msm8996_rpmpds), }; +/* qcs404 RPM Power domains */ +DEFINE_RPMPD_CORNER_PAIR(qcs404, vddmx, vddmx_ao, RWMX, 0); +DEFINE_RPMPD_VFC(qcs404, vddmx_vfc, RWMX, 0); + +DEFINE_RPMPD_CORNER(qcs404, vdd_lpicx, RWLC, 0); +DEFINE_RPMPD_VFC(qcs404, vdd_lpicx_vfc, RWLC, 0); + +DEFINE_RPMPD_CORNER(qcs404, vdd_lpimx, RWLM, 0); +DEFINE_RPMPD_VFC(qcs404, vdd_lpimx_vfc, RWLM, 0); + +static struct rpmpd *qcs404_rpmpds[] = { + [QCS404_VDDMX] = &qcs404_vddmx, + [QCS404_VDDMX_AO] = &qcs404_vddmx_ao, + [QCS404_VDDMX_VFC] = &qcs404_vddmx_vfc, + [QCS404_LPICX] = &qcs404_vdd_lpicx, + [QCS404_LPICX_VFC] = &qcs404_vdd_lpicx_vfc, + [QCS404_LPIMX] = &qcs404_vdd_lpimx, + [QCS404_LPIMX_VFC] = &qcs404_vdd_lpimx_vfc, +}; + +static const struct rpmpd_desc qcs404_desc = { + .rpmpds = qcs404_rpmpds, + .num_pds = ARRAY_SIZE(qcs404_rpmpds), +}; + static const struct of_device_id rpmpd_match_table[] = { { .compatible = "qcom,msm8996-rpmpd", .data = &msm8996_desc }, + { .compatible = "qcom,qcs404-rpmpd", .data = &qcs404_desc }, { } }; diff --git a/include/dt-bindings/power/qcom-rpmpd.h b/include/dt-bindings/power/qcom-rpmpd.h index 87d9c6611682..0b1b147292a3 100644 --- a/include/dt-bindings/power/qcom-rpmpd.h +++ b/include/dt-bindings/power/qcom-rpmpd.h @@ -36,4 +36,13 @@ #define MSM8996_VDDSSCX 5 #define MSM8996_VDDSSCX_VFC 6 +/* QCS404 Power Domains */ +#define QCS404_VDDMX 0 +#define QCS404_VDDMX_AO 1 +#define QCS404_VDDMX_VFC 2 +#define QCS404_LPICX 3 +#define QCS404_LPICX_VFC 4 +#define QCS404_LPIMX 5 +#define QCS404_LPIMX_VFC 6 + #endif