From patchwork Tue Sep 12 07:49:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13380959 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 B8DBBCA0ED4 for ; Tue, 12 Sep 2023 07:50:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbjILHu3 (ORCPT ); Tue, 12 Sep 2023 03:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231816AbjILHuZ (ORCPT ); Tue, 12 Sep 2023 03:50:25 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0837910C4; Tue, 12 Sep 2023 00:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694505011; cv=none; d=strato.com; s=strato-dkim-0002; b=qOdQVWmUls7hOz2ZuWGqGaQn8Gpv0FKINBZaZWur3owBqjXsg3HLIk7DNcQbvE3Zl2 GbKPsKwErfYoFlFvEwuMxnMi/ucQDj4CrRM0SZv34qpQIo4wy0KgbsJa2a14NK1/dceM vADyBU70D+J1jUfvJ3QuD1dswjG4rMxrGPeVbEXu0FsZxQ0oSURlH9fCXslYzkhlrd+J AUYuCJONbt3OpgAB+OuOJiiAYj1W19ij2+LKCNHie1jkUsLeWj8BG8qnzAGNhxEYdgFh Zi3erasPqFzRZdkZcZePeMVfVWmi/wjHc+meLfwXmabL+/JFI4m8+RDclAzk6l2SNd7J y4eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=L/GhP++3ntz+tiVHjTtfdN0t8NIw2lLOzuPYeZ0wQb8=; b=t1kSAWZlkIBmcV7B/9v3ErYueu2G8cYYu1AAT5iQGDN+EcD24vt2FUFsmUG1G1UZ8a IXisC+NEZO95yk2o5sxfBVzW2HBTYkg0hbrdqJLlz7socLfqvlK1YYLVmxe2TeWAojsc 0/SisyMyYe4sRzbWcdD438CVUmNeywzQT+Y0/ZU4gn01loM7K510Sd48clUSqCw9+4Pm Ez2/Kpn7/oPNNBxeybwwuYqFWQOvHZjMifAdB0VEHbA5tJ+vcb/9D4+Ih30arF9VchNE jrOT/W2YUKBmdTatHoYRfeDpxcLkoTzaIZthh1OgFhdHSuyMXEEd/O/B7jUMXFn7VHo5 E9HA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=L/GhP++3ntz+tiVHjTtfdN0t8NIw2lLOzuPYeZ0wQb8=; b=AWm0QdpzMZvXlXaCc9KXRldje8YIcOfIkNjHCjp7iYJ+9SnXiMRRMcN52zO7N7SgBp 9pPzA96lPTABNMwFX2Ib6/gD+gyeyMIngooi74YePAibkH2UjfCQqtJ5nkGJ2BMVVsZx 0Fvk98QJQEimgND7K9MR7AaFNuNxjEIWySJVxOQV8JO7n8VQyRabU5rUGimy6XLtK2Qf I6v7FKjNK+hQR9Qh9PfxTSpdC6PtnQxer/Mf/mG9qOEQ2XGBOXNWalEwZUEQiXfu0+r/ 4bK9CpEfTr9IUPlJip0jFfQrxnFDA6qrhJIJdaRxbJ3TYXeZT8lBELVztPlhk0agVX6x rAuQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=L/GhP++3ntz+tiVHjTtfdN0t8NIw2lLOzuPYeZ0wQb8=; b=MPcsBaY3i6wqLxVrwbCO/lIwQYU1G10xy5HWwzoEYkf1Yiugz64DjYWtpcHsTmert9 GYfHM7Xb2MhLFR4L0FBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL7nT0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8C7oAcKm (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Sep 2023 09:50:10 +0200 (CEST) From: Stephan Gerhold Date: Tue, 12 Sep 2023 09:49:49 +0200 Subject: [PATCH 1/6] dt-bindings: regulator: qcom,spmi: Document PM8909 MIME-Version: 1.0 Message-Id: <20230912-spmi-pm8909-v1-1-ba4b3bfaf87d@gerhold.net> References: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> In-Reply-To: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> To: Mark Brown Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Marko , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stephan Gerhold Document the qcom,pm8909-regulators compatible together with the necessary supply properties to allow interfacing via the hardware regulator registers directly via SPMI. This is mainly intended for debugging since the regulators are typically controlled via the RPM firmware (qcom,rpm-pm8909-regulators compatible). Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring --- .../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 bdf34c2de96b..765c31246cc7 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml @@ -19,6 +19,7 @@ properties: - qcom,pm8005-regulators - qcom,pm8226-regulators - qcom,pm8841-regulators + - qcom,pm8909-regulators - qcom,pm8916-regulators - qcom,pm8941-regulators - qcom,pm8950-regulators @@ -206,6 +207,24 @@ allOf: patternProperties: "^vdd_s[1-8]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8909-regulators + then: + properties: + vdd_s1-supply: true + vdd_s2-supply: true + vdd_l1-supply: true + vdd_l2_l5-supply: true + vdd_l3_l6_l10-supply: true + vdd_l4_l7-supply: true + vdd_l8_l11_l15_l18-supply: true + vdd_l9_l12_l14_l17-supply: true + vdd_l13-supply: true + - if: properties: compatible: From patchwork Tue Sep 12 07:49:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13380961 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 329CFCA0ED4 for ; Tue, 12 Sep 2023 07:50:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231867AbjILHub (ORCPT ); Tue, 12 Sep 2023 03:50:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231856AbjILHu3 (ORCPT ); Tue, 12 Sep 2023 03:50:29 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CA5010D2; Tue, 12 Sep 2023 00:50:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694505011; cv=none; d=strato.com; s=strato-dkim-0002; b=jAaIyz3OLtuYENZ/aU3Iw7Qt+0tVRy8OmrnnlXzqAMZw7FmnIclv1pM8LGyQ/6BGpl r+mP5MRNw/4plcZUeVdNSsP5c/ROHAvpu4K2MuYN+bjrbeihf9ye/DHDhpDUc+HiY+nz 9WGfJXyqB/Voo/3jcN7Pg1NmHMnxutmpZSLnZdBxcKQ60YvWIYCnJbMolTUBXycs6LuO SdUaLjR2rT3cTH1L46zu8S3dom2E/RzKuIDybPp5hgTibytCOPsXp4LW2X6g4mI8U3R9 PZxkbn+KX3JleD0FF1mzXhuPMcgnjpK78rE1sRNH1yWaTAJO2qUDqlQHHyFY8EkHZ71O Znsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=GoY+wkPEUDk1CP3sMN6mSJftrGp/Nkm/mVVOtBRAzok=; b=EVW44+oLEBew2olp3qKodknQjoUPNqSPKeNNq/Os0gSFKrw0bR1f1dX8eVpkbFEWaH GYD37SpqDqimqgZlFY1kusx6Vij/yf4gh+simskfob3l+KL70jE4x0sq9BKp6ofoYDjP pJHnUQvmnFHeVbNBeFajYumx+6f2mOWJQSBb0AVvylnbCjnVgaKAjbMm6gvV2Nn/M4CK BOJnsmuKhJHkTx495iFjy9e5HSU9oyn9vsec9YXneJtK2e6C2xepuALnsxaO/wLLrFYa KjFQLp19vz7vKjbBSSMCkHny4rYknEfaN2ZlVvU/5ja86G17nzGVnkeN6+gCtIC5eX00 tTpQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=GoY+wkPEUDk1CP3sMN6mSJftrGp/Nkm/mVVOtBRAzok=; b=PlEjrdVfxnKlcIPe6FOk97cWDeMEH4rncdhamGgHTisVnvjBgeX5q02o5VcsE98OJM 53OMI0skSeKLmXC+VtbI97U3Fe+HOkoiYOegSpzxSJia5Yc9W2haWfNWQqZ5OkReyz3G QcvR9GTvJ2DSXn8/s+K5QlgvkrnVy95OGpLwfyZSo7A/Wh+ThHLvbmK05d/4WEB4VFev t31QUDfPfChhoOYN+NblInENx6xuC2RGOAiCaDfwxYj7Y7Jt7cUOmGaoxhvkLPBiJpsO D6aBH79wblcYGcJ841nJeHmWZ7t6xv39K8ISAdmnyEgxI7bvbCIro+kSaE/zZ3P1krNy Y5yw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=GoY+wkPEUDk1CP3sMN6mSJftrGp/Nkm/mVVOtBRAzok=; b=157Ylj0/ZcC1xYcEfUZeFWOrRNvMKfgGpFu/zEBJTVYupfT5qEk9ihOnuYGsaMEj6f csmxE72A26Ns6Yc+F4CQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL7nT0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8C7oBcKn (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Sep 2023 09:50:11 +0200 (CEST) From: Stephan Gerhold Date: Tue, 12 Sep 2023 09:49:50 +0200 Subject: [PATCH 2/6] regulator: qcom_spmi: Add PM8909 regulators MIME-Version: 1.0 Message-Id: <20230912-spmi-pm8909-v1-2-ba4b3bfaf87d@gerhold.net> References: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> In-Reply-To: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> To: Mark Brown Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Marko , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold , Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stephan Gerhold Add the necessary definitions for the PM8909 PMIC to the qcom_spmi-regulator driver to allow reading the actual voltages applied to the hardware at runtime. This is mainly intended for debugging since the regulators are usually controlled through the RPM firmware (via qcom_smd-regulator). Signed-off-by: Stephan Gerhold --- drivers/regulator/qcom_spmi-regulator.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index c95f6e9c7ab5..3c7ab6416b61 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2168,6 +2168,29 @@ static const struct spmi_regulator_data pm8841_regulators[] = { { } }; +static const struct spmi_regulator_data pm8909_regulators[] = { + { "s1", 0x1400, "vdd_s1", }, + { "s2", 0x1700, "vdd_s2", }, + { "l1", 0x4000, "vdd_l1", }, + { "l2", 0x4100, "vdd_l2_l5", }, + { "l3", 0x4200, "vdd_l3_l6_l10", }, + { "l4", 0x4300, "vdd_l4_l7", }, + { "l5", 0x4400, "vdd_l2_l5", }, + { "l6", 0x4500, "vdd_l3_l6_l10", }, + { "l7", 0x4600, "vdd_l4_l7", }, + { "l8", 0x4700, "vdd_l8_l11_l15_l18", }, + { "l9", 0x4800, "vdd_l9_l12_l14_l17", }, + { "l10", 0x4900, "vdd_l3_l6_l10", }, + { "l11", 0x4a00, "vdd_l8_l11_l15_l18", }, + { "l12", 0x4b00, "vdd_l9_l12_l14_l17", }, + { "l13", 0x4c00, "vdd_l13", }, + { "l14", 0x4d00, "vdd_l9_l12_l14_l17", }, + { "l15", 0x4e00, "vdd_l8_l11_l15_l18", }, + { "l17", 0x5000, "vdd_l9_l12_l14_l17", }, + { "l18", 0x5100, "vdd_l8_l11_l15_l18", }, + { } +}; + static const struct spmi_regulator_data pm8916_regulators[] = { { "s1", 0x1400, "vdd_s1", }, { "s2", 0x1700, "vdd_s2", }, @@ -2357,6 +2380,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pm8005-regulators", .data = &pm8005_regulators }, { .compatible = "qcom,pm8226-regulators", .data = &pm8226_regulators }, { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, + { .compatible = "qcom,pm8909-regulators", .data = &pm8909_regulators }, { .compatible = "qcom,pm8916-regulators", .data = &pm8916_regulators }, { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators }, { .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators }, From patchwork Tue Sep 12 07:49:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13380960 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 ABFDDCA0ED5 for ; Tue, 12 Sep 2023 07:50:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231890AbjILHua (ORCPT ); Tue, 12 Sep 2023 03:50:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231849AbjILHu3 (ORCPT ); Tue, 12 Sep 2023 03:50:29 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 941D510CE; Tue, 12 Sep 2023 00:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694505011; cv=none; d=strato.com; s=strato-dkim-0002; b=rqX4gv/vLK1CAASXFWZYqQ4ZIAtCRTVdw9hTqJRoYwA7OsF5HAwUygBPozwSoyhHoj gjqehxSH6c8G+KOkKIELDTE3+2ayGRIqbSEVYk+vcExsFSJoCPUDt5hSC4Btxzux4zoM LJn4xOSiIJKf3U5OgJWLqgndSN0vxZu1i7mli8LvUx+uMAktkaGpJoTo63UvomDVDW1E A3drZSkl5kTBK4N74sGEp033Dm5TMpm8H77RmffVqYJ9Qjeo60keArJR4sK1QE7icyJB G83T1jkYLcCq1zy6DaEs8uTqD5J3C3stEnRxa0W9VoCvjpVlJfp2PRVrawosFfGayhcs ud9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Iiu5Q8DuotQnaG8K35L+wCLQXHnhA6SyDFIEGecdGAc=; b=QU10HOv7c1DeTwsx0OTVnzRyqGXKbvHrVQtUJeG0y4DjV5OhYSj/wNpUuGDRgMrqbk H0LKm7SJuchYY4fzSKKMaM+mtdkbWxZdtBlaW4lUqv3/WwZjHguEokGLHsGF9MeMW5Tq GCVjWDEbfXXRB3vYiFTJe8fBZK0doyPgTA4b7EszbAmeFZRBWCsFC60z2Eoexr1D/yWg zdWKrVDHKCeO2S2qfFPeMd61QDduGve/5ZGlz67JlgJ6lDEalbbAg/PF15dceFwvnrRx TaTu74at5iyrM9y9haKVuekcdVRbJqFIuOU7VXZNOHRCLMtHnGaOHycM2CE2CULaXwu8 DvIQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Iiu5Q8DuotQnaG8K35L+wCLQXHnhA6SyDFIEGecdGAc=; b=U/TIv4MFoYHefuHO6JutSbhlRYz02V+kMY2Chmzu0dBGPnqvpGqaTlvAXRst4ZW4Sh fgqXXfm2hujwQX3l2u0I8Oe3MnSmjjE4nMuX6TE4EnChQWYJZoF0cH++QnL6JSK0iGTB Qja3OrBtjKrg6MEtgrlGVDqCHzk80wgk0kCnma3eSvMbOyJbYy5xIX96QOrXtI1aHkd6 Y2k8r4DQWS2C3PzYgZ9HRA0z2JDl/SYZIX+dSFPqH627wbwea6YbGbphYULQNzvGzYpz YgfH1GbUS4RFEKt9wMklk5Bojg35J7rDISflaT+cZOi7ETa0akokM+S0AoLBRBZ5eHGx aRlw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694505011; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Iiu5Q8DuotQnaG8K35L+wCLQXHnhA6SyDFIEGecdGAc=; b=oxffIhsXSN7aOnbfLkDZxockkxvkyJvpLwon/WqqrK9OKc5VMTcFiLHuagTDvXjtnk 65hsEpz01gc6wCLDeBAg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL7nT0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8C7oBcKo (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Sep 2023 09:50:11 +0200 (CEST) From: Stephan Gerhold Date: Tue, 12 Sep 2023 09:49:51 +0200 Subject: [PATCH 3/6] dt-bindings: regulator: qcom,spmi: Document PM8019 MIME-Version: 1.0 Message-Id: <20230912-spmi-pm8909-v1-3-ba4b3bfaf87d@gerhold.net> References: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> In-Reply-To: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> To: Mark Brown Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Marko , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the qcom,pm8019-regulators compatible together with the necessary supply properties to allow interfacing via the hardware regulator registers directly via SPMI. This is mainly intended for debugging since the regulators are typically controlled via the RPM firmware (qcom,rpm-pm8019-regulators compatible). Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring --- .../bindings/regulator/qcom,spmi-regulator.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml index 765c31246cc7..fe6898a89ea1 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml @@ -17,6 +17,7 @@ properties: - qcom,pm660l-regulators - qcom,pm8004-regulators - qcom,pm8005-regulators + - qcom,pm8019-regulators - qcom,pm8226-regulators - qcom,pm8841-regulators - qcom,pm8909-regulators @@ -177,6 +178,25 @@ allOf: patternProperties: "^vdd_s[1-4]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8019-regulators + then: + properties: + vdd_l1-supply: true + vdd_l2_l3-supply: true + vdd_l4_l5_l6-supply: true + vdd_l7_l8_l11-supply: true + vdd_l9-supply: true + vdd_l10-supply: true + vdd_l12-supply: true + vdd_l13_l14-supply: true + patternProperties: + "^vdd_s[1-4]-supply$": true + - if: properties: compatible: From patchwork Tue Sep 12 07:49:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13380958 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 333F5CA0EC3 for ; Tue, 12 Sep 2023 07:50:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231815AbjILHu0 (ORCPT ); Tue, 12 Sep 2023 03:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231814AbjILHuY (ORCPT ); Tue, 12 Sep 2023 03:50:24 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B582E79; Tue, 12 Sep 2023 00:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694505012; cv=none; d=strato.com; s=strato-dkim-0002; b=IcJI1yDLNLTpb+keWEMbKlBBhK061oaWAfnIf5f6IxX2wxANw9BB41ZLYivC6CDroz MP7idyUZzMtGEompC+imZMH2IPFWnRntgoHJL+j7I8S36BQyR0yY7484BkqjjTCnV1Y4 cvAoFofXUikMUpmt38fSg/GAm40lguUiiL/CrjrF930BRcoZfjxyKuGfC45d0IxwN2lh gExUzxEbWMAWviGloDowXIgtk8ZiMjLPnEqvWJnrXwhaITvSX3zraFpDevWELnqZkTvY vZCEAALfqQ30ExMaPfott5T0zgG8GojgXLlxqF1dgR+UIS1w7vjwV9suBcjkaz8tYBYH jkIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505012; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=3BlPOpYYuTl9VcTVtvme0f5FGpEQD50BRzvSon1zHE0=; b=cjy2YeZ5vKnFDc1Z4/jdnD98TLvymu4XJ6HcT50HK3HehNG/ZQ7apYIlXs8P7+gRej u8RgQEjzYth8OShkANb0UvG05ehMk4grQzaYOpZeA014Nv7PMrWRZB9RiVqs8c+iSj0j pgzxs3ntiUXZS/EJ7wVJ2rGAVw71VyEEJbLihCAnf8lpcZ/4rcnuTVD6/hIxLmoQRaAc JgrmRnZieCiP3lClDPkRf+729CCjCNwN5CsI6ERhYYpilfhNG9/PrluhXg/soJM+aR5G CXHy/R2sqrN1L1oMbpHnsh2G8IhmGETikSxZAKa7i+mD+QHQk9CtOSrZ2ceQwFWhokRu O0pA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505012; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=3BlPOpYYuTl9VcTVtvme0f5FGpEQD50BRzvSon1zHE0=; b=HzZWncz+lyNz2uxEJUgPvbzGt3ghPPYh/vxyCBNFpXRWtpMxARw+2hQDLoVnc7UpOX 8gDbLbA+kJ1gc/AO+HQ0qQpJtdOy1rWz9mkEBThfpnor7AzesLw6O/r/+nluU4YTDoqr wejrdkkuRvszbD2dS+YqN15iGrdaQasU5UvjrsU8qOHHnjF4Brj8toFj67QLDq/gk3U7 hfQRxPZYkc4DVvceTuYQYfwVx+8ZiehWFBE6ds32gmQHTjwx+2lsfO+oRdsWmZwtExGF xGNXS4p+kdFS/5lqzW/17LYj8qg08PGDiPxZaeeRgq+/4KfN/g4smgucze5Ng1eW+r0A BYcQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694505012; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=3BlPOpYYuTl9VcTVtvme0f5FGpEQD50BRzvSon1zHE0=; b=RBBdpI7PTRW0dz/J8gJid8JM4XL0NJoO2rWUJ0cumj3GGpU/pSvv4KM7KmdxHh02Up JhaiMuGDdWnciqmPG0Cw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL7nT0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8C7oCcKp (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Sep 2023 09:50:12 +0200 (CEST) From: Stephan Gerhold Date: Tue, 12 Sep 2023 09:49:52 +0200 Subject: [PATCH 4/6] regulator: qcom_spmi: Add PM8019 regulators MIME-Version: 1.0 Message-Id: <20230912-spmi-pm8909-v1-4-ba4b3bfaf87d@gerhold.net> References: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> In-Reply-To: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> To: Mark Brown Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Marko , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the necessary definitions for the PM8019 PMIC to the qcom_spmi-regulator driver to allow reading the actual voltages applied to the hardware at runtime. This is mainly intended for debugging since the regulators are usually controlled through the RPM firmware (via qcom_smd-regulator). Signed-off-by: Stephan Gerhold --- drivers/regulator/qcom_spmi-regulator.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 3c7ab6416b61..13fe1c73a547 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2118,6 +2118,28 @@ static const struct spmi_regulator_data pm8005_regulators[] = { { } }; +static const struct spmi_regulator_data pm8019_regulators[] = { + { "s1", 0x1400, "vdd_s1", }, + { "s2", 0x1700, "vdd_s2", }, + { "s3", 0x1a00, "vdd_s3", }, + { "s4", 0x1d00, "vdd_s4", }, + { "l1", 0x4000, "vdd_l1", }, + { "l2", 0x4100, "vdd_l2_l3", }, + { "l3", 0x4200, "vdd_l2_l3", }, + { "l4", 0x4300, "vdd_l4_l5_l6", }, + { "l5", 0x4400, "vdd_l4_l5_l6", }, + { "l6", 0x4500, "vdd_l4_l5_l6", }, + { "l7", 0x4600, "vdd_l7_l8_l11", }, + { "l8", 0x4700, "vdd_l7_l8_l11", }, + { "l9", 0x4800, "vdd_l9", }, + { "l10", 0x4900, "vdd_l10", }, + { "l11", 0x4a00, "vdd_l7_l8_l11", }, + { "l12", 0x4b00, "vdd_l12", }, + { "l13", 0x4c00, "vdd_l13_l14", }, + { "l14", 0x4d00, "vdd_l13_l14", }, + { } +}; + static const struct spmi_regulator_data pm8226_regulators[] = { { "s1", 0x1400, "vdd_s1", }, { "s2", 0x1700, "vdd_s2", }, @@ -2378,6 +2400,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pm660l-regulators", .data = &pm660l_regulators }, { .compatible = "qcom,pm8004-regulators", .data = &pm8004_regulators }, { .compatible = "qcom,pm8005-regulators", .data = &pm8005_regulators }, + { .compatible = "qcom,pm8019-regulators", .data = &pm8019_regulators }, { .compatible = "qcom,pm8226-regulators", .data = &pm8226_regulators }, { .compatible = "qcom,pm8841-regulators", .data = &pm8841_regulators }, { .compatible = "qcom,pm8909-regulators", .data = &pm8909_regulators }, From patchwork Tue Sep 12 07:49:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13380962 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 8A788CA0ED6 for ; Tue, 12 Sep 2023 07:50:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231921AbjILHud (ORCPT ); Tue, 12 Sep 2023 03:50:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231866AbjILHu3 (ORCPT ); Tue, 12 Sep 2023 03:50:29 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F4CF10DA; Tue, 12 Sep 2023 00:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694505012; cv=none; d=strato.com; s=strato-dkim-0002; b=LonhuwYkkytTATaw5ve6ZtA8lrM3sZdiKlTK2zQLicpgp3XFP8pKaoe23lPk0bAYU0 e/HmlQW3KUk13FbnSgiu/tvB0uYg09p2YJFQo4ZJnMtp3g/uRMrQu8qrcBtqxW5KShGh MSF2+T4J4m0bgVAxMSjn7jb+A5eK/3QvVZrfKnBThBfGg6rtsa+0AMvLVzOEt5Ggj579 DyfuflDRt8pY7fI2wSR0v92x0dpKTAyy++50fGcgPmxG2cCJHRH/S31p8brvQpEDFlJv wWYTBsZIDJpnz471dWmZyygUNJwQuB1Ep20UoQcn/065DdsDBsHMLEFGaEvdnhplv/LX 1X2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505012; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=8RZIiOJxTChJVlcH8og1reLl52uYP4ns/TSqtnk2nms=; b=GehRxwnKNASf+wbai6LQrdw9sS2shqXzfoG5+VkLCemSwknA0D99+nm6oy32IqoW4H ZTcDizlvxF/e2RwG60YCg8Q+stOpiZWicigtFamj9J+DZB2yXf5lMGiL4FDJ2m6K2wVG 44l+51mqbEfUlwd58FfJPcGfbDc/Ytltz6Qf8tYgXGknFSuWh/J3avMrGE7hqNzW8qbg tqd6VPpUeVIKkMcmeTQk20TnaI0R4CyNITzBbT/lDvegPkKfPip0TfPhUiNe2Yq03bsT IPXNUIraa0Isilvb3EeIne/2Gi3Vzqan0Pv52xAIBvLy0Y6+orF+Cmyx3NqFkSR0iKem TVdQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505012; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=8RZIiOJxTChJVlcH8og1reLl52uYP4ns/TSqtnk2nms=; b=QuzG7VPEFpTaVjytLNT2ElrNvTOA6qX0awGvDJe3Hgdoy/QmuDjVkFFvayRMwIBFP3 6SGiHbio8RBN22VbpMc0NbqRekNc4peTNru35Owe7JwS3jOWQhNzsIv/8782O0gqD2iy BLAxrFNVXC+20xkfP6wfX/fcPrRbjowLN0T8oeWang9BQhND3fLD0DIeZyPQxSPDA15W 4/9U719I7Lm9kMMaSwQXhfpplIyGFdfGdU5k3gW/djWxQfNy5NOHL9zpWpSr19XBG/CA 5ZMPbbMDFvO1/q0Os8UFvc8iFzn5MB0SEt/RPRVfNaxce9L7MSJ7yJXJeMWGsVerAgGd qjHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694505012; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=8RZIiOJxTChJVlcH8og1reLl52uYP4ns/TSqtnk2nms=; b=hepHxnrLavN7eJXruGrfYeVbK/w0SxfAWluj/QSKUXiX28qDGLXhZcoa1I4B4in3p7 u/HVu8EEWM5C7LRxBQBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL7nT0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8C7oCcKs (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Sep 2023 09:50:12 +0200 (CEST) From: Stephan Gerhold Date: Tue, 12 Sep 2023 09:49:53 +0200 Subject: [PATCH 5/6] dt-bindings: regulator: qcom,spmi: Document PMA8084 MIME-Version: 1.0 Message-Id: <20230912-spmi-pm8909-v1-5-ba4b3bfaf87d@gerhold.net> References: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> In-Reply-To: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> To: Mark Brown Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Marko , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the qcom,pma8084-regulators compatible together with the necessary supply properties to allow interfacing via the hardware regulator registers directly via SPMI. This is mainly intended for debugging since the regulators are typically controlled via the RPM firmware (qcom,rpm-pma8084-regulators compatible). Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring --- .../bindings/regulator/qcom,spmi-regulator.yaml | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml index fe6898a89ea1..7a1b7d2abbd4 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml @@ -25,6 +25,7 @@ properties: - qcom,pm8941-regulators - qcom,pm8950-regulators - qcom,pm8994-regulators + - qcom,pma8084-regulators - qcom,pmi8994-regulators - qcom,pmp8074-regulators - qcom,pms405-regulators @@ -34,7 +35,7 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle patternProperties: - "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$": + "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-4])$": description: List of regulators and its properties type: object $ref: regulator.yaml# @@ -334,6 +335,32 @@ allOf: patternProperties: "^vdd_s[1-9][0-2]?-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pma8084-regulators + then: + properties: + vdd_l1_l11-supply: true + vdd_l2_l3_l4_l27-supply: true + vdd_l5_l7-supply: true + vdd_l6_l12_l14_l15_l26-supply: true + vdd_l8-supply: true + vdd_l9_l10_l13_l20_l23_l24-supply: true + vdd_l16_l25-supply: true + vdd_l17-supply: true + vdd_l18-supply: true + vdd_l19-supply: true + vdd_l21-supply: true + vdd_l22-supply: true + vdd_lvs1_2-supply: true + vdd_lvs3_4-supply: true + vdd_5vs1-supply: true + patternProperties: + "^vdd_s([1-9]|1[0-2])-supply$": true + - if: properties: compatible: From patchwork Tue Sep 12 07:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13380963 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 12BF1CA0ECE for ; Tue, 12 Sep 2023 07:50:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231840AbjILHuh (ORCPT ); Tue, 12 Sep 2023 03:50:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231871AbjILHu3 (ORCPT ); Tue, 12 Sep 2023 03:50:29 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF27D10DE; Tue, 12 Sep 2023 00:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694505013; cv=none; d=strato.com; s=strato-dkim-0002; b=ib3VDx5cP75IwWqBbq8zVusKA5qfF+0AXQE9BakT5r4lCup2xey8tV04o+jnTsgmVO rwcPVLEqCrep3Vjx/AS4hdXsI7Itq6lFluKU7FmoAP4+bHaKH0LMyxM41/NdDEquCAUi jiKhEuJT3TE7QsOSPCI8P8OnKAcUcqCq66xvFiRXntVgRfmbv9tqHXcIeleeSr8TzO1a 14SFfzuoSLcQQ5Ra41kLdTvSdZEOUBL1AolqvhJS6xPe4NrESGviLsQOJieLF7q/t+h4 bK4EvA5iq+yHyC38bhVf94q2HEzMKmw6csTALYVdyXvJwU1ehPHMX+obPTUL23RXdmhv 0MbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505013; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=g7bOyAxn6FtoUXlouwMS8dne0RmfAXqkR/iQ0MYt+F0=; b=RytiEHUyAEQa3tTASF+sYEFdGL6HwzWmBEBZ3wKcCnhb+dcnYhH1x0yobdMO/dngd8 kEFE3qtb8UoasMert4VYiAMTQqD38+z/nGHFdRTixEORxVfvhd8YLsIP4hbPf5Xj75Vm niUy76zwv+rtUyVZLAC7pjE/FyOckFnzcd9jouBlt1z1CqLVRoQ9qKwUcPa19xQxo4mW Xxy4TPz+hllPRVYwg6NfFG+Vdk3rkfl7gIAVILiL5nzXnzAKGEoPyT0PCSotnbD36nEL p5GPJZfMNQd5rhfWnX2Irf+LKz/bOgWOHT1xBo8kXinGc8r0HmHN/Tyi5VAaDEqk7ym1 dwfw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1694505013; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=g7bOyAxn6FtoUXlouwMS8dne0RmfAXqkR/iQ0MYt+F0=; b=snOQ+8EGQGDSleCVsj8Ni4sZpepCW9fpLRcbx/mawETer7rxpSPvz2bYiGstzTtuhd BJLvF7qS7uwDFIwH529FK2Dxow9SzeOTz29q0iUDXADPbtXasGRLXwvZOQx5tPm1ueTN gA8fuBm2v6LlKLmg3O+yno8BSCiMI+B9KNxobcMqEi3ZzsS2CBF9JeebkDwApCT0UNIW 76aAiJTDPI+at1a8grhDNqpFtPYLFFw39w9gQgu2Sma4fjnJZSyzh8kTY50dI9YLcnDX vSLC0uT2jv7bkM+RWDaoUW3WIVz8p5GjMwqfmNLrLVgFLYRdzOtAtJMGWm0uhVN/P+Ay jb3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1694505013; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=g7bOyAxn6FtoUXlouwMS8dne0RmfAXqkR/iQ0MYt+F0=; b=Z36x2yCRxb7hgE7effU7qsvOgOhWMsF3X91AwF4sMesZ/XbpuYYAN6/OJzMse0tJhr 2Fa04MsQIbYoj+uw/xDw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn9VOL7nT0=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id 60372az8C7oCcKt (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 12 Sep 2023 09:50:12 +0200 (CEST) From: Stephan Gerhold Date: Tue, 12 Sep 2023 09:49:54 +0200 Subject: [PATCH 6/6] regulator: qcom_spmi: Add PMA8084 regulators MIME-Version: 1.0 Message-Id: <20230912-spmi-pm8909-v1-6-ba4b3bfaf87d@gerhold.net> References: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> In-Reply-To: <20230912-spmi-pm8909-v1-0-ba4b3bfaf87d@gerhold.net> To: Mark Brown Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Robert Marko , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add the necessary definitions for the PMA8084 PMIC to the qcom_spmi-regulator driver to allow reading the actual voltages applied to the hardware at runtime. This is mainly intended for debugging since the regulators are usually controlled through the RPM firmware (via qcom_smd-regulator). Signed-off-by: Stephan Gerhold --- drivers/regulator/qcom_spmi-regulator.c | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 13fe1c73a547..fe32fd53f683 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2359,6 +2359,54 @@ static const struct spmi_regulator_data pm8994_regulators[] = { { } }; +static const struct spmi_regulator_data pma8084_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", }, + { "s7", 0x2600, "vdd_s7", }, + { "s8", 0x2900, "vdd_s8", }, + { "s9", 0x2c00, "vdd_s9", }, + { "s10", 0x2f00, "vdd_s10", }, + { "s11", 0x3200, "vdd_s11", }, + { "s12", 0x3500, "vdd_s12", }, + { "l1", 0x4000, "vdd_l1_l11", }, + { "l2", 0x4100, "vdd_l2_l3_l4_l27", }, + { "l3", 0x4200, "vdd_l2_l3_l4_l27", }, + { "l4", 0x4300, "vdd_l2_l3_l4_l27", }, + { "l5", 0x4400, "vdd_l5_l7", }, + { "l6", 0x4500, "vdd_l6_l12_l14_l15_l26", }, + { "l7", 0x4600, "vdd_l5_l7", }, + { "l8", 0x4700, "vdd_l8", }, + { "l9", 0x4800, "vdd_l9_l10_l13_l20_l23_l24", }, + { "l10", 0x4900, "vdd_l9_l10_l13_l20_l23_l24", }, + { "l11", 0x4a00, "vdd_l1_l11", }, + { "l12", 0x4b00, "vdd_l6_l12_l14_l15_l26", }, + { "l13", 0x4c00, "vdd_l9_l10_l13_l20_l23_l24", }, + { "l14", 0x4d00, "vdd_l6_l12_l14_l15_l26", }, + { "l15", 0x4e00, "vdd_l6_l12_l14_l15_l26", }, + { "l16", 0x4f00, "vdd_l16_l25", }, + { "l17", 0x5000, "vdd_l17", }, + { "l18", 0x5100, "vdd_l18", }, + { "l19", 0x5200, "vdd_l19", }, + { "l20", 0x5300, "vdd_l9_l10_l13_l20_l23_l24", }, + { "l21", 0x5400, "vdd_l21", }, + { "l22", 0x5500, "vdd_l22", }, + { "l23", 0x5600, "vdd_l9_l10_l13_l20_l23_l24", }, + { "l24", 0x5700, "vdd_l9_l10_l13_l20_l23_l24", }, + { "l25", 0x5800, "vdd_l16_l25", }, + { "l26", 0x5900, "vdd_l6_l12_l14_l15_l26", }, + { "l27", 0x5a00, "vdd_l2_l3_l4_l27", }, + { "lvs1", 0x8000, "vdd_lvs1_2", }, + { "lvs2", 0x8100, "vdd_lvs1_2", }, + { "lvs3", 0x8200, "vdd_lvs3_4", }, + { "lvs4", 0x8300, "vdd_lvs3_4", }, + { "5vs1", 0x8400, "vdd_5vs1", }, + { } +}; + static const struct spmi_regulator_data pmi8994_regulators[] = { { "s1", 0x1400, "vdd_s1", }, { "s2", 0x1700, "vdd_s2", }, @@ -2408,6 +2456,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pm8941-regulators", .data = &pm8941_regulators }, { .compatible = "qcom,pm8950-regulators", .data = &pm8950_regulators }, { .compatible = "qcom,pm8994-regulators", .data = &pm8994_regulators }, + { .compatible = "qcom,pma8084-regulators", .data = &pma8084_regulators }, { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators }, { .compatible = "qcom,pmp8074-regulators", .data = &pmp8074_regulators }, { .compatible = "qcom,pms405-regulators", .data = &pms405_regulators },