From patchwork Mon Nov 6 12:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 741547 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 84A69C4332F for ; Mon, 6 Nov 2023 12:17:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231641AbjKFMR6 (ORCPT ); Mon, 6 Nov 2023 07:17:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbjKFMR4 (ORCPT ); Mon, 6 Nov 2023 07:17:56 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 099271732; Mon, 6 Nov 2023 04:08:58 -0800 (PST) Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9B11GPQzDqq1; Mon, 6 Nov 2023 12:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272537; bh=vxdLPlYkKHzrfDcJmGFVY0ukHxnT/HqPpbvcc0KQ5Q8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pwM8r55cuCfAoQcIiRbgSkcymakzicgkiypUqJSfphwkfvXzEmQdETzSsKaEgINRo 3JLKAaq/LHHX+niTaXkdzGRHjpg+3clPKQOrDVhVYJwsKqCAembkLmtkpu5ivTrk7f 7e4YpmmgLkZCvQNC0veBd6agErZ1btF183d2S1xI= X-Riseup-User-ID: B5E5DFBA031A42562C92CDB58BBB3267332B43F9401CDFB88B8A99D1CED59ED0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP99x6RvvzJp9g; Mon, 6 Nov 2023 12:08:53 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:29 +0700 Subject: [PATCH 1/8] mfd: qcom-spmi-pmic: Add support for PM8937 MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-1-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the subtype and compatible strings for PM8937. The PM8937 is found in various SoCs, including MSM8917, MSM8937, MSM8940 and APQ variants. Signed-off-by: Dang Huynh --- drivers/mfd/qcom-spmi-pmic.c | 1 + include/soc/qcom/qcom-spmi-pmic.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c index 4549fa9f7d4b..eab5bf6cff10 100644 --- a/drivers/mfd/qcom-spmi-pmic.c +++ b/drivers/mfd/qcom-spmi-pmic.c @@ -53,6 +53,7 @@ static const struct of_device_id pmic_spmi_id_table[] = { { .compatible = "qcom,pm8901", .data = N_USIDS(2) }, { .compatible = "qcom,pm8909", .data = N_USIDS(2) }, { .compatible = "qcom,pm8916", .data = N_USIDS(2) }, + { .compatible = "qcom,pm8937", .data = N_USIDS(2) }, { .compatible = "qcom,pm8941", .data = N_USIDS(2) }, { .compatible = "qcom,pm8950", .data = N_USIDS(2) }, { .compatible = "qcom,pm8994", .data = N_USIDS(2) }, diff --git a/include/soc/qcom/qcom-spmi-pmic.h b/include/soc/qcom/qcom-spmi-pmic.h index c47cc71a999e..17a0a8c3d656 100644 --- a/include/soc/qcom/qcom-spmi-pmic.h +++ b/include/soc/qcom/qcom-spmi-pmic.h @@ -31,6 +31,7 @@ #define PM8998_SUBTYPE 0x14 #define PMI8998_SUBTYPE 0x15 #define PM8005_SUBTYPE 0x18 +#define PM8937_SUBTYPE 0x19 #define PM660L_SUBTYPE 0x1a #define PM660_SUBTYPE 0x1b #define PM8150_SUBTYPE 0x1e From patchwork Mon Nov 6 12:08:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 742302 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 72488C4167D for ; Mon, 6 Nov 2023 12:18:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231493AbjKFMSP (ORCPT ); Mon, 6 Nov 2023 07:18:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjKFMSD (ORCPT ); Mon, 6 Nov 2023 07:18:03 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0A1C19A9; Mon, 6 Nov 2023 04:09:12 -0800 (PST) Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9B44y4qzDqdN; Mon, 6 Nov 2023 12:09:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272552; bh=rvBysnDTedQ1OPH1fcwqwY0T/9uUDPaDjSEpMyS7Tcs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=JcNFWOPDOx8aqPkhLq/QVs/eG9N24kg+hAPN8BiG3x+jo1lr/nHdjIuYNdy/9hQx9 4wPn7S1XL4QkQ27Ro5WRAIX1E22f94CSnn4oecxCvkx1GcNpLoSupJqQcRmL36MoOx ECNrmt46U5qUYeflNYyzzE5h4IMEaZktFMWj5Eh0= X-Riseup-User-ID: EC34A06A5473F8E656B867CF49E6268AFAF37AF9EDCA1140DEC63E033A1FE818 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9B12gVxzJmtY; Mon, 6 Nov 2023 12:08:57 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:30 +0700 Subject: [PATCH 2/8] dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-2-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add bindings for PM8937 PMIC (qcom,pm8937). This PMIC is found in boards with MSM8917, MSM8937, MSM8940 and APQ variants. Signed-off-by: Dang Huynh --- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml index 9fa568603930..8f728920df9e 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml @@ -66,6 +66,7 @@ properties: - qcom,pm8841 - qcom,pm8909 - qcom,pm8916 + - qcom,pm8937 - qcom,pm8941 - qcom,pm8950 - qcom,pm8953 From patchwork Mon Nov 6 12:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 741545 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 9F051C4167D for ; Mon, 6 Nov 2023 12:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231601AbjKFMSX (ORCPT ); Mon, 6 Nov 2023 07:18:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231612AbjKFMSH (ORCPT ); Mon, 6 Nov 2023 07:18:07 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B36C519A4; Mon, 6 Nov 2023 04:09:05 -0800 (PST) Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9B83Hy8zDqr0; Mon, 6 Nov 2023 12:09:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272545; bh=YTEY+p9l8vyzga8FHdlMAXeCEukEJdaPJkD1Tear8EA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kOTnpXsnBICUiTpjFjgVOCMbFsACMZnNM3XiE5RWlgtrk0HcQCPhr6wnvPDs3zKFl HQl3b0vEOUsrvLmW2r65HkY1jmOYmkfAM5F1ZzxS+IS2iBgczbGTqgIwZ7bXcgDu1q cVqE64k3CcwtvCGMZmh5+gGyuv77Ctl7+C2GB5HI= X-Riseup-User-ID: 61DCC19ADFF9D7551A15F9BC64D05A7BC80C6F5FBE86C6E8D5461DA1D9E0C888 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9B46CXgzJmy2; Mon, 6 Nov 2023 12:09:00 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:31 +0700 Subject: [PATCH 3/8] regulator: qcom_spmi: Add PM8937 SPMI regulator MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-3-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The PM8937 has 4 HFSMPS, 2 FTSMPS2.5 (for controlling APC voltage) and 23 LDO regulators. Add the configuration for this chip. Signed-off-by: Dang Huynh --- drivers/regulator/qcom_spmi-regulator.c | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 94f9092b29ef..9a9fa20dcd95 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2239,6 +2239,39 @@ static const struct spmi_regulator_data pm8916_regulators[] = { { } }; +static const struct spmi_regulator_data pm8937_regulators[] = { + { "s1", 0x1400, "vdd_s1", }, + { "s2", 0x1700, "vdd_s2", }, + { "s3", 0x1a00, "vdd_s3", }, + { "s4", 0x1d00, "vdd_s4", }, + { "s5", 0x2000, "vdd_s5", }, + { "s6", 0x2300, "vdd_s6", }, + { "l1", 0x4000, "vdd_l1_l19", }, + { "l2", 0x4100, "vdd_l2_l23", }, + { "l3", 0x4200, "vdd_l3", }, + { "l4", 0x4300, "vdd_l4_l5_l6_l7_l16", }, + { "l5", 0x4400, "vdd_l4_l5_l6_l7_l16", }, + { "l6", 0x4500, "vdd_l4_l5_l6_l7_l16", }, + { "l7", 0x4600, "vdd_l4_l5_l6_l7_l16", }, + { "l8", 0x4700, "vdd_l8_l11_l12_l17_l22", }, + { "l9", 0x4800, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l10", 0x4900, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l11", 0x4a00, "vdd_l8_l11_l12_l17_l22", }, + { "l12", 0x4b00, "vdd_l8_l11_l12_l17_l22", }, + { "l13", 0x4c00, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l14", 0x4d00, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l15", 0x4e00, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l16", 0x4f00, "vdd_l4_l5_l6_l7_l16", }, + { "l17", 0x5000, "vdd_l8_l11_l12_l17_l22", }, + { "l18", 0x5100, "vdd_l9_l10_l13_l14_l15_l18", }, + { "l19", 0x5200, "vdd_l1_l19", }, + { "l20", 0x5300, "vdd_l20_l21", }, + { "l21", 0x5400, "vdd_l21_l21", }, + { "l22", 0x5500, "vdd_l8_l11_l12_l17_l22", }, + { "l23", 0x5600, "vdd_l2_l23", }, + { } +}; + static const struct spmi_regulator_data pm8941_regulators[] = { { "s1", 0x1400, "vdd_s1", }, { "s2", 0x1700, "vdd_s2", }, @@ -2453,6 +2486,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, { .compatible = "qcom,pm8909-regulators", .data = &pm8909_regulators }, { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators }, + { .compatible = "qcom,pm8937-regulators", .data = &pm8937_regulators }, { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators }, { .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators }, { .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators }, From patchwork Mon Nov 6 12:08:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 741546 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 EC8E9C4332F for ; Mon, 6 Nov 2023 12:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231669AbjKFMSL (ORCPT ); Mon, 6 Nov 2023 07:18:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbjKFMSD (ORCPT ); Mon, 6 Nov 2023 07:18:03 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D3D419A1; Mon, 6 Nov 2023 04:09:09 -0800 (PST) Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9BF0lJKzDqr0; Mon, 6 Nov 2023 12:09:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272549; bh=ueiGIoED8D7GUi0JdyqB+12pNhhh43uK1CXKDG24qd8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PsiuYecOlEokv/12vj6Gdbn+xtk4cDHGjC8jB43V1rFX6o1GLTt8xkjb95E0FoFqR dNQ5eoQEm7CC2IQ/TRrluRm5M+sd1APi/OVQGSrvbwCdrgGTshSO+H+43RDNeSV4pU PahLdxtkULbaMQIV8QjV4xnfrFNZnNqC7qxrS7pc= Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4SP9BC4Txpz9tMS; Mon, 6 Nov 2023 12:09:07 +0000 (UTC) X-Riseup-User-ID: 7746C3B741D4916DBEF99B4EF2D3668B6DB9241BDE0EEDFD821D3A7F75339FA0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9B82XcyzJmmw; Mon, 6 Nov 2023 12:09:04 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:32 +0700 Subject: [PATCH 4/8] dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-4-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for qcom,pm8937-regulators compatible string and add relevant supplies in QCOM's SPMI regulator documentation. Signed-off-by: Dang Huynh --- .../bindings/regulator/qcom,spmi-regulator.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml index 7a1b7d2abbd4..aea849e8eadf 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml @@ -22,6 +22,7 @@ properties: - qcom,pm8841-regulators - qcom,pm8909-regulators - qcom,pm8916-regulators + - qcom,pm8937-regulators - qcom,pm8941-regulators - qcom,pm8950-regulators - qcom,pm8994-regulators @@ -291,6 +292,24 @@ allOf: patternProperties: "^vdd_s[1-3]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8937-regulators + then: + properties: + vdd_l1_l19-supply: true + vdd_l20_l21-supply: true + vdd_l2_l23-supply: true + vdd_l3-supply: true + vdd_l4_l5_l6_l7_l16-supply: true + vdd_l8_l11_l12_l17_l22-supply: true + vdd_l9_l10_l13_l14_l15_l18-supply: true + patternProperties: + "^vdd_s[1-6]-supply$": true + - if: properties: compatible: From patchwork Mon Nov 6 12:08:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 741549 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 8E46CC4167D for ; Mon, 6 Nov 2023 12:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231549AbjKFMKI (ORCPT ); Mon, 6 Nov 2023 07:10:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231682AbjKFMJ5 (ORCPT ); Mon, 6 Nov 2023 07:09:57 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C65FC19B6; Mon, 6 Nov 2023 04:09:12 -0800 (PST) Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9BJ2gTxzDqsX; Mon, 6 Nov 2023 12:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272552; bh=7pgsRKWcwRTNDPHDoZLIANiLecTwz83xiDRbmz/rPtw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=esaN8iFgm8e8WFmO+JYOBohR4UiK0MoDXYBqE4zmbd3wD1T6zxEL06S4HWAS650XE ynKy8ez+K4RqbG2P46OAPfX6KadUgHSkiHLqxMjqtMOERMUXojqk8XqdRbrJqHQDW1 GPL+a9pl5eUr5X1ni6EFosM3louB6+QnAxWaK8qY= Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4SP9BH14Zlz9t68; Mon, 6 Nov 2023 12:09:11 +0000 (UTC) X-Riseup-User-ID: BD66EE103BBC77DFC4872B2C4102DF19499F98CDCA7198128B6896BB94568163 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9BC5vCgzJmsF; Mon, 6 Nov 2023 12:09:07 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:33 +0700 Subject: [PATCH 5/8] regulator: qcom_smd: Add PM8937 regulators MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-5-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The PM8937 is found on boards with MSM8917, MSM8937, MSM8940 SoCs and APQ variants. It provides 6 SMPS (two are controlled by SPMI) and 23 LDO regulators. Signed-off-by: Dang Huynh --- drivers/regulator/qcom_smd-regulator.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c index f53ada076252..09c471a0ba2e 100644 --- a/drivers/regulator/qcom_smd-regulator.c +++ b/drivers/regulator/qcom_smd-regulator.c @@ -1012,6 +1012,39 @@ static const struct rpm_regulator_data rpm_pm8916_regulators[] = { {} }; +static const struct rpm_regulator_data rpm_pm8937_regulators[] = { + { "s1", QCOM_SMD_RPM_SMPA, 1, &pm8994_hfsmps, "vdd_s1" }, + { "s2", QCOM_SMD_RPM_SMPA, 2, &pm8994_hfsmps, "vdd_s2" }, + { "s3", QCOM_SMD_RPM_SMPA, 3, &pm8994_hfsmps, "vdd_s3" }, + { "s4", QCOM_SMD_RPM_SMPA, 4, &pm8994_hfsmps, "vdd_s4" }, + /* S5 - S6 are managed by SPMI */ + + { "l1", QCOM_SMD_RPM_LDOA, 1, &pm8953_ult_nldo, "vdd_l1_l19" }, + { "l2", QCOM_SMD_RPM_LDOA, 2, &pm8953_ult_nldo, "vdd_l2_l23" }, + { "l3", QCOM_SMD_RPM_LDOA, 3, &pm8953_ult_nldo, "vdd_l3" }, + { "l4", QCOM_SMD_RPM_LDOA, 4, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" }, + { "l5", QCOM_SMD_RPM_LDOA, 5, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" }, + { "l6", QCOM_SMD_RPM_LDOA, 6, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" }, + { "l7", QCOM_SMD_RPM_LDOA, 7, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" }, + { "l8", QCOM_SMD_RPM_LDOA, 8, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" }, + { "l9", QCOM_SMD_RPM_LDOA, 9, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" }, + { "l10", QCOM_SMD_RPM_LDOA, 10, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18"}, + { "l11", QCOM_SMD_RPM_LDOA, 11, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" }, + { "l12", QCOM_SMD_RPM_LDOA, 12, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" }, + { "l13", QCOM_SMD_RPM_LDOA, 13, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" }, + { "l14", QCOM_SMD_RPM_LDOA, 14, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" }, + { "l15", QCOM_SMD_RPM_LDOA, 15, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" }, + { "l16", QCOM_SMD_RPM_LDOA, 16, &pm8950_ult_pldo, "vdd_l4_l5_l6_l7_l16" }, + { "l17", QCOM_SMD_RPM_LDOA, 17, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" }, + { "l18", QCOM_SMD_RPM_LDOA, 18, &pm8950_ult_pldo, "vdd_l9_l10_l13_l14_l15_l18" }, + { "l19", QCOM_SMD_RPM_LDOA, 19, &pm8953_ult_nldo, "vdd_l1_l19" }, + { "l20", QCOM_SMD_RPM_LDOA, 20, &pm8953_lnldo, "vdd_l20_l21" }, + { "l21", QCOM_SMD_RPM_LDOA, 21, &pm8953_lnldo, "vdd_l20_l21" }, + { "l22", QCOM_SMD_RPM_LDOA, 22, &pm8950_ult_pldo, "vdd_l8_l11_l12_l17_l22" }, + { "l23", QCOM_SMD_RPM_LDOA, 23, &pm8994_nldo, "vdd_l2_l23" }, + {} +}; + static const struct rpm_regulator_data rpm_pm8941_regulators[] = { { "s1", QCOM_SMD_RPM_SMPA, 1, &pm8x41_hfsmps, "vdd_s1" }, { "s2", QCOM_SMD_RPM_SMPA, 2, &pm8x41_hfsmps, "vdd_s2" }, @@ -1329,6 +1362,7 @@ static const struct of_device_id rpm_of_match[] = { { .compatible = "qcom,rpm-pm8841-regulators", .data = &rpm_pm8841_regulators }, { .compatible = "qcom,rpm-pm8909-regulators", .data = &rpm_pm8909_regulators }, { .compatible = "qcom,rpm-pm8916-regulators", .data = &rpm_pm8916_regulators }, + { .compatible = "qcom,rpm-pm8937-regulators", .data = &rpm_pm8937_regulators }, { .compatible = "qcom,rpm-pm8941-regulators", .data = &rpm_pm8941_regulators }, { .compatible = "qcom,rpm-pm8950-regulators", .data = &rpm_pm8950_regulators }, { .compatible = "qcom,rpm-pm8953-regulators", .data = &rpm_pm8953_regulators }, From patchwork Mon Nov 6 12:08:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 742303 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 DDCBFC4167B for ; Mon, 6 Nov 2023 12:17:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbjKFMR7 (ORCPT ); Mon, 6 Nov 2023 07:17:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbjKFMR5 (ORCPT ); Mon, 6 Nov 2023 07:17:57 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1308119AB; Mon, 6 Nov 2023 04:09:16 -0800 (PST) Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9BM4nVLzDqsX; Mon, 6 Nov 2023 12:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272555; bh=ADhevVZxzxyn973JhlX1uMcq1ATrbwpwc2EAFNlpRzk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MMV+nZ03yDGqw6FoNGSKPxGaGHQsbRAksTscvpZJmqMLy6NJ1WeZeVjFDD5VKMe+E znVk2Mw6r/QV5q7YRcoKWCuABuKXOizbWB0UDJDeky+wTvpamxncKuYDGUKs7ktFDO TotoxWIy8PqyNxcJSS1i651an02OTFPzt6w7BoCU= Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4SP9BL4lX5z9t68; Mon, 6 Nov 2023 12:09:14 +0000 (UTC) X-Riseup-User-ID: 51291C5CE49DEA1B08EC6951B10B8EF80AE208013B4D379B345326152F2E336F Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9BH2JswzJmmw; Mon, 6 Nov 2023 12:09:11 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:34 +0700 Subject: [PATCH 6/8] dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-6-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the pm8937 compatible string and available regulators in the QCOM SMD RPM regulator documentation. Signed-off-by: Dang Huynh --- .../devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml index 9ea8ac0786ac..f2fd2df68a9e 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml @@ -47,6 +47,9 @@ description: For pm8916, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18 + For pm8937, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, + l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23 + For pm8941, s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2, lvs3, 5vs1, 5vs2 @@ -92,6 +95,7 @@ properties: - qcom,rpm-pm8841-regulators - qcom,rpm-pm8909-regulators - qcom,rpm-pm8916-regulators + - qcom,rpm-pm8937-regulators - qcom,rpm-pm8941-regulators - qcom,rpm-pm8950-regulators - qcom,rpm-pm8953-regulators From patchwork Mon Nov 6 12:08:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 742304 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 98C72C4332F for ; Mon, 6 Nov 2023 12:10:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231569AbjKFMKK (ORCPT ); Mon, 6 Nov 2023 07:10:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231472AbjKFMJ7 (ORCPT ); Mon, 6 Nov 2023 07:09:59 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F7DD47; Mon, 6 Nov 2023 04:09:19 -0800 (PST) Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9BR1K1MzDqr0; Mon, 6 Nov 2023 12:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272559; bh=x/uVJ4y+BKaDtZRSrzEBCkT6rnwUpT71PwE0Q5+lCVc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IzXMlflQyQFgA1zVsDTNa1slH3W9ovYelEuYLKigYTKpT3cqSZAK5TXyrIyGSu0xM kwWrYdfkXie+HIF0JjpV3TFBf4xnTb5x6gdtRj1pkmBcV1P8nV+PeWNSfyoWHdOvj1 5VjgFZpdkBLeH8oSS27AVz4Yy//imNRPJ45uyi7U= Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4SP9BQ12Fdz9t68; Mon, 6 Nov 2023 12:09:18 +0000 (UTC) X-Riseup-User-ID: A13B83CE898926B08CEDE4B8826E719059B713394A3C5DFC4E970B50AA5559B5 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9BL5hTczJmsF; Mon, 6 Nov 2023 12:09:14 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:35 +0700 Subject: [PATCH 7/8] arm64: dts: qcom: Add PM8937 PMIC MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-7-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The PM8937 features integrated peripherals like ADC, GPIO controller, MPPs, PON keys and others. Add the device tree so that any boards with this PMIC can use it. Signed-off-by: Dang Huynh --- arch/arm64/boot/dts/qcom/pm8937.dtsi | 202 +++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8937.dtsi b/arch/arm64/boot/dts/qcom/pm8937.dtsi new file mode 100644 index 000000000000..6091d6938885 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pm8937.dtsi @@ -0,0 +1,202 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023, Dang Huynh + */ + +#include +#include +#include +#include +#include + +/ { + thermal-zones { + pm8937-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-sensors = <&pm8937_temp>; + + trips { + pm8937_trip0: pm8937-trip0 { + temperature = <105000>; + hysteresis = <0>; + type = "passive"; + }; + pm8937_trip1: pm8937-trip1 { + temperature = <125000>; + hysteresis = <0>; + type = "passive"; + }; + pm8937_trip2: pm8937-trip2 { + temperature = <145000>; + hysteresis = <0>; + type = "passive"; + }; + }; + }; + }; +}; + +&spmi_bus { + pmic@0 { + compatible = "qcom,pm8937", "qcom,spmi-pmic"; + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pon@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x800>; + mode-bootloader = <0x2>; + mode-recovery = <0x1>; + + pm8937_pwrkey: pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + + pm8937_resin: resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + }; + + pm8937_gpios: gpio@c000 { + compatible = "qcom,pm8937-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + gpio-ranges = <&pm8937_gpios 0 0 8>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pm8937_mpps: mpps@a000 { + compatible = "qcom,pm8937-mpp", "qcom,spmi-mpp"; + reg = <0xa000>; + gpio-controller; + gpio-ranges = <&pm8937_mpps 0 0 4>; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + pm8937_temp: temp-alarm@2400 { + compatible = "qcom,spmi-temp-alarm"; + reg = <0x2400>; + interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; + io-channels = <&pm8937_vadc VADC_DIE_TEMP>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + + pm8937_vadc: adc@3100 { + compatible = "qcom,spmi-vadc"; + reg = <0x3100>; + interrupts = <0 0x31 0 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + channel@5 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "vcoin"; + }; + + channel@7 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "vph_pwr"; + }; + + channel@8 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "die_temp"; + }; + + channel@9 { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_625mv"; + }; + + channel@a { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_1250mv"; + }; + + channel@c { + reg = ; + qcom,pre-scaling = <1 1>; + label = "ref_buf_625mv"; + }; + + channel@11 { + reg = ; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + label = "pa_therm1"; + }; + + channel@13 { + reg = ; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + label = "case_therm"; + }; + + channel@32 { + reg = ; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + label = "xo_therm"; + }; + + channel@36 { + reg = ; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + label = "pa_therm0"; + }; + + channel@3c { + reg = ; + qcom,pre-scaling = <1 1>; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + label = "xo_therm_buf"; + }; + }; + + rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>, <0x6100>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; + }; + }; + + pmic@1 { + compatible = "qcom,pm8937", "qcom,spmi-pmic"; + reg = <0x1 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm8937_spmi_regulators: regulators { + compatible = "qcom,pm8937-regulators"; + }; + }; +}; From patchwork Mon Nov 6 12:08:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 741548 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 51F85C4167B for ; Mon, 6 Nov 2023 12:10:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231590AbjKFMKL (ORCPT ); Mon, 6 Nov 2023 07:10:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231583AbjKFMKA (ORCPT ); Mon, 6 Nov 2023 07:10:00 -0500 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10B0710C2; Mon, 6 Nov 2023 04:09:23 -0800 (PST) Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4SP9BV4r8gzDqqs; Mon, 6 Nov 2023 12:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1699272562; bh=q692EMLiwWELVU5OazHP7MapPL7Sxk2dJzZRLS2Ag4c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=bGHp5YcbbstwN543CYfC65ybVr9InUDIKqnsXV1M1wxD+lLArDlCCEzYjfT01FVKD vsqSyarspdyguFt1lfOCrshyGpY17M+iXKVRbFl3h9IMYgO2ZZ86TJnCsjOkOEiy7H Sqr1iXj0dVwn6N1TdoeW51EfxCrETU1E6cPZjOxc= Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4SP9BT481Fz9t68; Mon, 6 Nov 2023 12:09:21 +0000 (UTC) X-Riseup-User-ID: 770E6A4A8EF85EF28666735B757F63337B5306E8D98DDF1F13F0AD2D57CFE857 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4SP9BQ1y1XzJmtY; Mon, 6 Nov 2023 12:09:18 +0000 (UTC) From: Dang Huynh Date: Mon, 06 Nov 2023 19:08:36 +0700 Subject: [PATCH 8/8] soc: qcom: socinfo: Add PM8937 Power IC MIME-Version: 1.0 Message-Id: <20231106-pm8937-v1-8-ec51d9eeec53@riseup.net> References: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> In-Reply-To: <20231106-pm8937-v1-0-ec51d9eeec53@riseup.net> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephen Boyd , Liam Girdwood , Mark Brown , Robert Marko Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dang Huynh Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The PM8917 and PM8937 uses the same SUBTYPE ID. The PM8937 is found in boards with MSM8917, MSM8937 and MSM8940 and APQ variants. Signed-off-by: Dang Huynh --- drivers/soc/qcom/socinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 51e05bec5bfc..37692fc1aefb 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -93,7 +93,7 @@ static const char *const pmic_models[] = { [22] = "PM8821", [23] = "PM8038", [24] = "PM8005/PM8922", - [25] = "PM8917", + [25] = "PM8917/PM8937", [26] = "PM660L", [27] = "PM660", [30] = "PM8150",