From patchwork Mon Jul 4 21:23:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587154 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 3B5BECCA480 for ; Mon, 4 Jul 2022 21:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbiGDVYK (ORCPT ); Mon, 4 Jul 2022 17:24:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbiGDVYJ (ORCPT ); Mon, 4 Jul 2022 17:24:09 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF37310FE1; Mon, 4 Jul 2022 14:24:06 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id eq6so13024538edb.6; Mon, 04 Jul 2022 14:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6YK0Qy2E/EJZUmG508VlvTboIMY5FeBTto36YOpoAJM=; b=cLyxJ9nj0B6idyzePiQTDbd6GrawwqiqBL9J4RALJGSQ43ljmxmygR5n7wsNroZWcX W5rEl/8NFZRmqtWfj5AparSqGPanCoqRoKR4kZ6mb1QwzLYxf/LEb9k6KT44ionRxDj5 s+O2t9YhcHQxg2KfYm0Qvnn2f3W5zrnIOJ7OKYZceWKI0YIqGrMug+xA6H82UgcyLn/k 6sRPNk6iPHo8xee94DhS7PoUw73HAMZK4M2UBqW3IR4orLpjsXIRsT3U1yGUMsKfzlY8 axLp1G0bEVGAk46nAdtOU2d/qTtKWLYnte7rzozi6rwHLW2Z/ngCwlSNCH5vnaoX0Vif zI6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6YK0Qy2E/EJZUmG508VlvTboIMY5FeBTto36YOpoAJM=; b=ZmHnnfkSVfx2OQLQVe+iDP6eJUY/hsBiHDUTgjDJnwygUbIVH/FACBSk2DFj/IX5nw EBT9QFTMokyxBYRQdyLh+S1NIPiYa8tlVnNFSweXr+xPeo1j3xmPoxQX3xSiDm/ddvcm vntjsG7+9KAANO7wFkYAcFlMXI5cCB05EygVA+lybLREbP30L4yAcpk8WEPGosH25fQD Ygyemyq00oVfzZIQcv1PqesjkbaZ594gAvTOlEkEfqyLh5guGzZhtl3Su3UcTBKMZfBd yiJlMrR+vUE/lj4calMyk89cGc3jss4HJj9fApDLfY3X8FzMlAqRMimR1nestB+YOSNR 6nmQ== X-Gm-Message-State: AJIora99Qn3mhABPBAvk3qdC8tha3lR7060Ua0pwF0R4/LIsHzMLepiF g8Ve7GAP0IGMZl5CFoGhp7k= X-Google-Smtp-Source: AGRyM1s0uahroH7j430DAMUMmeCYbOJfpqgBJL7TKvrQ10BOSx53TueNzEINxulMH4uj6aeQwz00VA== X-Received: by 2002:a05:6402:84a:b0:423:fe99:8c53 with SMTP id b10-20020a056402084a00b00423fe998c53mr42552801edz.195.1656969845581; Mon, 04 Jul 2022 14:24:05 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:05 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 01/12] dt-bindings: mfd: qcom-spmi-pmic: add support for PMP8074 Date: Mon, 4 Jul 2022 23:23:51 +0200 Message-Id: <20220704212402.1715182-1-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document compatible for the PMP8074 PMIC. I planned to convert the bindings to dtschema, but there is already a patch to do so [1]. I will make a patch to add the compatible to dtschema once it gets accepted. [1] https://lore.kernel.org/linux-arm-msm/20220626191630.176835-1-david@ixit.cz/ Signed-off-by: Robert Marko Acked-by: Lee Jones Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt index eb78e3ae7703..c46d17609f3a 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.txt @@ -46,6 +46,7 @@ Required properties: "qcom,pmi8998", "qcom,pmk8002", "qcom,pmk8350", + "qcom,pmp8074", "qcom,pmr735a", "qcom,smb2351", or generalized "qcom,spmi-pmic". From patchwork Mon Jul 4 21:23:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587547 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 04C30CCA47F for ; Mon, 4 Jul 2022 21:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230027AbiGDVYJ (ORCPT ); Mon, 4 Jul 2022 17:24:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbiGDVYJ (ORCPT ); Mon, 4 Jul 2022 17:24:09 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A5CE10FE3; Mon, 4 Jul 2022 14:24:08 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id fi2so18513377ejb.9; Mon, 04 Jul 2022 14:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3+4K6FS88GjWRG2vNTzrV4fX3yhY0zamHKZ1oi+4NJA=; b=UcNupKVE/BgJZhTDjB1BayRPSArdq+tq58bYK/NxpM1FjQvGIAQpcHxEp1TadSMglF b7QeNTZNB3tVcoozfEVRqtqZYKHPpwhMLFKxfcsbGoSxrL0VNzGGXlOBrG1VtDgSibkU s+JRyYixVTrz8WTJ/2wk08YNSQSl3yMIeBl7+2pV6gMWNCfRtj/j46JnfUs4yBM/tOX5 9OWZi9UAAH0gIhOBau+FQVhKDinXDova9a/79pGwb25YsNqXo5sG3O2uOUaoAXY5wM65 uguKWF0QEJFbym1JOWNW2yP+vS5GBunc37DtFDQvgv77OkJyenhfew3cCX7yEFmp90UN qsWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3+4K6FS88GjWRG2vNTzrV4fX3yhY0zamHKZ1oi+4NJA=; b=J982aUtrDUG12QITYLBMxX848ggghe/Jb7U4FgYJqoUxRvwpdDdmo7q2vv2XNLd1Om JMJvv+w11gwdOskc13SAjqnFA0lS9lWRnag171i/xuQ+l6SVZKQe3t3Qec9d0PLaeVux 8jd9ua+Km1hh1TTz6ipiuLRXCfnibWCSdDBMR2uKrw6f7iFktTlkeLIYjaGZyvW86Vkv nv8xvrlY/HVT1Pdx0YG96JMeHR/KGlVVp7SkxXbzq1ubsSuiLCw/4LXDjFtRXnIwdK6h iCU637ON5AQM55OXJC41H3JCeiyL0IBxGxhSAV6N3yO3efKZk9WjP74GgqVMnAZ+QCkD q8XA== X-Gm-Message-State: AJIora+GLV14tCZ6kT3Tm5H2ipoHBhH03y1v1nJKIRupZDjXyTjxk+w7 Y+HmsLudVdT/FYsKCwAxn17zzzwBPnpFJQ== X-Google-Smtp-Source: AGRyM1vvujxbLUAyHmDHtU/L5L9BdISJJVTcRoGxA1SYv1leKWG7HqHCFRGd5nrc6DVrHr5MFaK1Sg== X-Received: by 2002:a17:906:844d:b0:72a:932b:b467 with SMTP id e13-20020a170906844d00b0072a932bb467mr17537368ejy.250.1656969846726; Mon, 04 Jul 2022 14:24:06 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:06 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 02/12] mfd: qcom-spmi-pmic: add support for PMP8074 Date: Mon, 4 Jul 2022 23:23:52 +0200 Message-Id: <20220704212402.1715182-2-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for PMP8074 PMIC which is a companion PMIC for the Qualcomm IPQ8074 SoC-s. It shares the same subtype identifier as PM8901. Signed-off-by: Robert Marko --- drivers/mfd/qcom-spmi-pmic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c index 00003a868d28..7e2cd79d17eb 100644 --- a/drivers/mfd/qcom-spmi-pmic.c +++ b/drivers/mfd/qcom-spmi-pmic.c @@ -60,6 +60,7 @@ static const struct of_device_id pmic_spmi_id_table[] = { { .compatible = "qcom,pmi8994", .data = N_USIDS(2) }, { .compatible = "qcom,pmi8998", .data = N_USIDS(2) }, { .compatible = "qcom,pmk8002", .data = N_USIDS(2) }, + { .compatible = "qcom,pmp8074", .data = N_USIDS(2) }, { .compatible = "qcom,smb2351", .data = N_USIDS(2) }, { .compatible = "qcom,spmi-pmic", .data = N_USIDS(1) }, { } From patchwork Mon Jul 4 21:23:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587546 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 8750DCCA488 for ; Mon, 4 Jul 2022 21:24:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233381AbiGDVYL (ORCPT ); Mon, 4 Jul 2022 17:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231230AbiGDVYL (ORCPT ); Mon, 4 Jul 2022 17:24:11 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8132F10FEB; Mon, 4 Jul 2022 14:24:09 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id o25so18554774ejm.3; Mon, 04 Jul 2022 14:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ijucohTcx2NfryVQq5+sitQQFN9wDUIRBG+qVkPAkGU=; b=evDlv3Um4LTPaFNRT9XknBcUTOQDQx10NdSNJ0z/gexSmScEZ4Im1kJjXj5IrvyHPM 8Km05RqVgETcJ5sca6FnHJtTpO6P/pNmXTBKddJNIDzNVXPblfsozg+/reO9Dj3X+gnO FvC11ANAEHd0mOD5ZerEkWZWe7mLtCiWPFvbffNLUPkcezXlJM4WgHA6XxjY9tpaxfka Xh+0ZS/d5mrInHy3EmhKnNJWgMW+9y8VKa9mjz5+FOsYyRkml7B+E1/Y/KJ0eM4r3DRt QIH1xKSIuIx1lT8Ji6AfObc38HW0/ANS7wujC4AX0O1uyS/XIPRUEjdsghB47HTZIrnn dubQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ijucohTcx2NfryVQq5+sitQQFN9wDUIRBG+qVkPAkGU=; b=fMN+iP0jSXBjj12eJkhZiDUxGmJfaLNUL3QZbUfBM/km3MVQLIG6p9UMtWpS2i4vTj Eh+2+vSEfPOczk5tsGHqzMcBXFXU3pD3thWPwOKwdlE6i+WRFqvkaP1kbMJnnjdRD7b6 IP9BnhX2HWnHi16y/0w52wCYr5d3S/Bg4fd/2OvlGkbNu7RSr9gzRilCTS13jE5TbqPj /74nFjpfRu0I/26FnK+NVBgYHlxJCtoWrXUAF8L25pRxu2f9myZbSFjJIQbqo9BDPVpz mOUUWbac5YvpvUF3Ej+BdL9HNjhJUmEPKa4D2S07tlBUjRoK5vIdXCa1/Xo+eo7bTWU7 Fu0g== X-Gm-Message-State: AJIora9hfBlWvZnNjOIwiulSLtE92eXlEJRpG2y9NcNv6cS+01Sh4Rhn fc8PHG2yG9rFCYXY3L8SlTo= X-Google-Smtp-Source: AGRyM1sw5fb0E37RfCoxjHYdHSiw2Tepn7NIW9tSMVJZDMmCl4D0pKpyElj2ilqRwvPX1b6sNIeEnA== X-Received: by 2002:a17:906:e16:b0:726:a026:27ff with SMTP id l22-20020a1709060e1600b00726a02627ffmr29488640eji.573.1656969847962; Mon, 04 Jul 2022 14:24:07 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:07 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko , Krzysztof Kozlowski Subject: [PATCH v6 03/12] dt-bindings: regulator: qcom, spmi-regulator: Convert to dtschema Date: Mon, 4 Jul 2022 23:23:53 +0200 Message-Id: <20220704212402.1715182-3-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert the bindings of Qualcomm SPMI regulators to DT schema. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski --- Changes in v6: * Remove SAW example due to syscon Changes in v4: * Remove blank interrupts and interrupt-names as generic properties to only allow them per compatible Changes in v3: * Remove quotes around refs * Use much stricter regex for regulator node matching * Add supply matching per compatible * Add blank interrupts and interrupt-names as generic properties Changes in v2: * Remove the forgotten text bindings * Move allOf after patternProperties * Use my private email as the maintainer email --- .../regulator/qcom,spmi-regulator.txt | 347 ------------------ .../regulator/qcom,spmi-regulator.yaml | 307 ++++++++++++++++ 2 files changed, 307 insertions(+), 347 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt create mode 100644 Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt deleted file mode 100644 index c2a39b121b1b..000000000000 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt +++ /dev/null @@ -1,347 +0,0 @@ -Qualcomm SPMI Regulators - -- compatible: - Usage: required - Value type: - Definition: must be one of: - "qcom,pm8004-regulators" - "qcom,pm8005-regulators" - "qcom,pm8226-regulators" - "qcom,pm8841-regulators" - "qcom,pm8916-regulators" - "qcom,pm8941-regulators" - "qcom,pm8950-regulators" - "qcom,pm8994-regulators" - "qcom,pmi8994-regulators" - "qcom,pm660-regulators" - "qcom,pm660l-regulators" - "qcom,pms405-regulators" - -- interrupts: - Usage: optional - Value type: - Definition: List of OCP interrupts. - -- interrupt-names: - Usage: required if 'interrupts' property present - Value type: - Definition: List of strings defining the names of the - interrupts in the 'interrupts' property 1-to-1. - Supported values are "ocp-", where - corresponds to a voltage switch - type regulator. - -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s4-supply: -- vdd_s5-supply: -- vdd_s6-supply: -- vdd_s7-supply: -- vdd_s8-supply: - Usage: optional (pm8841 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s4-supply: -- vdd_l1_l3-supply: -- vdd_l2-supply: -- vdd_l4_l5_l6-supply: -- vdd_l7-supply: -- vdd_l8_l11_l14_l15_l16-supply: -- vdd_l9_l10_l12_l13_l17_l18-supply: - Usage: optional (pm8916 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_l1_l3-supply: -- vdd_l2_lvs_1_2_3-supply: -- vdd_l4_l11-supply: -- vdd_l5_l7-supply: -- vdd_l6_l12_l14_l15-supply: -- vdd_l8_l16_l18_19-supply: -- vdd_l9_l10_l17_l22-supply: -- vdd_l13_l20_l23_l24-supply: -- vdd_l21-supply: -- vin_5vs-supply: - Usage: optional (pm8941 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s4-supply: -- vdd_s4-supply: -- vdd_s5-supply: -- vdd_s6-supply: -- vdd_l1_l19-supply: -- vdd_l2_l23-supply: -- vdd_l3-supply: -- vdd_l4_l5_l6_l7_l16-supply: -- vdd_l8_l11_l12_l17_l22-supply: -- vdd_l9_l10_l13_l14_l15_l18-supply: -- vdd_l20-supply: -- vdd_l21-supply: - Usage: optional (pm8950 only) - Value type: - Definition: reference to regulator supplying the input pin, as - described in the data sheet - -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s4-supply: -- vdd_s5-supply: -- vdd_s6-supply: -- vdd_s7-supply: -- vdd_s8-supply: -- vdd_s9-supply: -- vdd_s10-supply: -- vdd_s11-supply: -- vdd_s12-supply: -- vdd_l1-supply: -- vdd_l2_l26_l28-supply: -- vdd_l3_l11-supply: -- vdd_l4_l27_l31-supply: -- vdd_l5_l7-supply: -- vdd_l6_l12_l32-supply: -- vdd_l8_l16_l30-supply: -- vdd_l9_l10_l18_l22-supply: -- vdd_l13_l19_l23_l24-supply: -- vdd_l14_l15-supply: -- vdd_l17_l29-supply: -- vdd_l20_l21-supply: -- vdd_l25-supply: -- vdd_lvs_1_2-supply: - Usage: optional (pm8994 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_l1-supply: - Usage: optional (pmi8994 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_l1_l6_l7-supply: -- vdd_l2_l3-supply: -- vdd_l5-supply: -- vdd_l8_l9_l10_l11_l12_l13_l14-supply: -- vdd_l15_l16_l17_l18_l19-supply: -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s5-supply: -- vdd_s6-supply: - Usage: optional (pm660 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_l1_l9_l10-supply: -- vdd_l2-supply: -- vdd_l3_l5_l7_l8-supply: -- vdd_l4_l6-supply: -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s4-supply: -- vdd_s5-supply: - Usage: optional (pm660l only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- vdd_l1_l2-supply: -- vdd_l3_l8-supply: -- vdd_l4-supply: -- vdd_l5_l6-supply: -- vdd_l10_l11_l12_l13-supply: -- vdd_l7-supply: -- vdd_l9-supply: -- vdd_s1-supply: -- vdd_s2-supply: -- vdd_s3-supply: -- vdd_s4-supply: -- vdd_s5-supply - Usage: optional (pms405 only) - Value type: - Definition: Reference to regulator supplying the input pin, as - described in the data sheet. - -- qcom,saw-reg: - Usage: optional - Value type: - Description: Reference to syscon node defining the SAW registers. - - -The regulator node houses sub-nodes for each regulator within the device. Each -sub-node is identified using the node's name, with valid values listed for each -of the PMICs below. - -pm8004: - s2, s5 - -pm8005: - s1, s2, s3, s4 - -pm8841: - s1, s2, s3, s4, s5, s6, s7, s8 - -pm8916: - s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, - l14, l15, l16, l17, l18 - -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 - -pm8994: - s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, l1, l2, l3, l4, l5, - l6, l7, l8, l9, l10, l11, l12, l13, l14, l15, l16, l17, l18, l19, l20, - l21, l22, l23, l24, l25, l26, l27, l28, l29, l30, l31, l32, lvs1, lvs2 - -pmi8994: - s1, s2, s3, l1 - -The content of each sub-node is defined by the standard binding for regulators - -see regulator.txt - with additional custom properties described below: - -- regulator-initial-mode: - Usage: optional - Value type: - Description: 2 = Set initial mode to auto mode (automatically select - between HPM and LPM); not available on boost type - regulators. - - 1 = Set initial mode to high power mode (HPM), also referred - to as NPM. HPM consumes more ground current than LPM, but - it can source significantly higher load current. HPM is not - available on boost type regulators. For voltage switch type - regulators, HPM implies that over current protection and - soft start are active all the time. - - 0 = Set initial mode to low power mode (LPM). - -- qcom,ocp-max-retries: - Usage: optional - Value type: - Description: Maximum number of times to try toggling a voltage switch - off and back on as a result of consecutive over current - events. - -- qcom,ocp-retry-delay: - Usage: optional - Value type: - Description: Time to delay in milliseconds between each voltage switch - toggle after an over current event takes place. - -- qcom,pin-ctrl-enable: - Usage: optional - Value type: - Description: Bit mask specifying which hardware pins should be used to - enable the regulator, if any; supported bits are: - 0 = ignore all hardware enable signals - BIT(0) = follow HW0_EN signal - BIT(1) = follow HW1_EN signal - BIT(2) = follow HW2_EN signal - BIT(3) = follow HW3_EN signal - -- qcom,pin-ctrl-hpm: - Usage: optional - Value type: - Description: Bit mask specifying which hardware pins should be used to - force the regulator into high power mode, if any; - supported bits are: - 0 = ignore all hardware enable signals - BIT(0) = follow HW0_EN signal - BIT(1) = follow HW1_EN signal - BIT(2) = follow HW2_EN signal - BIT(3) = follow HW3_EN signal - BIT(4) = follow PMIC awake state - -- qcom,vs-soft-start-strength: - Usage: optional - Value type: - Description: This property sets the soft start strength for voltage - switch type regulators; supported values are: - 0 = 0.05 uA - 1 = 0.25 uA - 2 = 0.55 uA - 3 = 0.75 uA - -- qcom,saw-slave: - Usage: optional - Value type: - Description: SAW controlled gang slave. Will not be configured. - -- qcom,saw-leader: - Usage: optional - Value type: - Description: SAW controlled gang leader. Will be configured as - SAW regulator. - -Example: - - regulators { - compatible = "qcom,pm8941-regulators"; - vdd_l1_l3-supply = <&s1>; - - s1: s1 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1400000>; - }; - - ... - - l1: l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1300000>; - }; - - .... - }; - -Example 2: - - saw3: syscon@9A10000 { - compatible = "syscon"; - reg = <0x9A10000 0x1000>; - }; - - ... - - spm-regulators { - compatible = "qcom,pm8994-regulators"; - qcom,saw-reg = <&saw3>; - s8 { - qcom,saw-slave; - }; - s9 { - qcom,saw-slave; - }; - s10 { - qcom,saw-slave; - }; - pm8994_s11_saw: s11 { - qcom,saw-leader; - regulator-always-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1140000>; - }; - }; diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml new file mode 100644 index 000000000000..06dc99b942e5 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml @@ -0,0 +1,307 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/qcom,spmi-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SPMI Regulators + +maintainers: + - Robert Marko + +properties: + compatible: + enum: + - qcom,pm660-regulators + - qcom,pm660l-regulators + - qcom,pm8004-regulators + - qcom,pm8005-regulators + - qcom,pm8226-regulators + - qcom,pm8841-regulators + - qcom,pm8916-regulators + - qcom,pm8941-regulators + - qcom,pm8950-regulators + - qcom,pm8994-regulators + - qcom,pmi8994-regulators + - qcom,pms405-regulators + + qcom,saw-reg: + description: Reference to syscon node defining the SAW registers + $ref: /schemas/types.yaml#/definitions/phandle + +patternProperties: + "^(5vs[1-2]|(l|s)[1-9][0-9]?|lvs[1-3])$": + description: List of regulators and its properties + type: object + $ref: regulator.yaml# + + properties: + qcom,ocp-max-retries: + description: + Maximum number of times to try toggling a voltage switch off and + back on as a result of consecutive over current events + $ref: /schemas/types.yaml#/definitions/uint32 + + qcom,ocp-retry-delay: + description: + Time to delay in milliseconds between each voltage switch toggle + after an over current event takes place + $ref: /schemas/types.yaml#/definitions/uint32 + + qcom,pin-ctrl-enable: + description: + Bit mask specifying which hardware pins should be used to enable the + regulator, if any. + Supported bits are + 0 = ignore all hardware enable signals + BIT(0) = follow HW0_EN signal + BIT(1) = follow HW1_EN signal + BIT(2) = follow HW2_EN signal + BIT(3) = follow HW3_EN signal + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + + qcom,pin-ctrl-hpm: + description: + Bit mask specifying which hardware pins should be used to force the + regulator into high power mode, if any. + Supported bits are + 0 = ignore all hardware enable signals + BIT(0) = follow HW0_EN signal + BIT(1) = follow HW1_EN signal + BIT(2) = follow HW2_EN signal + BIT(3) = follow HW3_EN signal + BIT(4) = follow PMIC awake state + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 31 + + qcom,vs-soft-start-strength: + description: + This property sets the soft start strength for voltage switch type + regulators. + Supported values are + 0 = 0.05 uA + 1 = 0.25 uA + 2 = 0.55 uA + 3 = 0.75 uA + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 3 + + qcom,saw-slave: + description: SAW controlled gang slave. Will not be configured. + type: boolean + + qcom,saw-leader: + description: + SAW controlled gang leader. Will be configured as SAW regulator. + type: boolean + + unevaluatedProperties: false + +required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,pm660-regulators + then: + properties: + vdd_l15_l16_l17_l18_l19-supply: true + vdd_l1_l6_l7-supply: true + vdd_l2_l3-supply: true + vdd_l5-supply: true + vdd_l8_l9_l10_l11_l12_l13_l14-supply: true + patternProperties: + "^vdd_s[1-6]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm660l-regulators + then: + properties: + vdd_l1_l9_l10-supply: true + vdd_l2-supply: true + vdd_l3_l5_l7_l8-supply: true + vdd_l4_l6-supply: true + patternProperties: + "^vdd_s[1-5]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8004-regulators + then: + patternProperties: + "^vdd_s[25]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8005-regulators + then: + patternProperties: + "^vdd_s[1-4]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8226-regulators + then: + properties: + vdd_l10_l11_l13-supply: true + vdd_l12_l14-supply: true + vdd_l15_l16_l17_l18-supply: true + vdd_l19_l20_l21_l22_l23_l28-supply: true + vdd_l1_l2_l4_l5-supply: true + vdd_l25-supply: true + vdd_l3_l24_l26-supply: true + vdd_l6_l7_l8_l9_l27-supply: true + vdd_lvs1-supply: true + patternProperties: + "^vdd_s[1-5]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8841-regulators + then: + patternProperties: + "^vdd_s[1-8]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8916-regulators + then: + properties: + vdd_l1_l3-supply: true + vdd_l4_l5_l6-supply: true + vdd_l8_l11_l14_l15_l16-supply: true + vdd_l9_l10_l12_l13_l17_l18-supply: true + patternProperties: + "^vdd_l[27]-supply$": true + "^vdd_s[1-4]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8941-regulators + then: + properties: + interrupts: + items: + - description: Over-current protection interrupt for 5V S1 + - description: Over-current protection interrupt for 5V S2 + interrupt-names: + items: + - const: ocp-5vs1 + - const: ocp-5vs2 + vdd_l13_l20_l23_l24-supply: true + vdd_l1_l3-supply: true + vdd_l21-supply: true + vdd_l2_lvs_1_2_3-supply: true + vdd_l4_l11-supply: true + vdd_l5_l7-supply: true + vdd_l6_l12_l14_l15-supply: true + vdd_l8_l16_l18_19-supply: true + vdd_l9_l10_l17_l22-supply: true + vin_5vs-supply: true + patternProperties: + "^vdd_s[1-3]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pm8950-regulators + then: + properties: + vdd_l1_l19-supply: true + vdd_l20-supply: true + vdd_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: + contains: + enum: + - qcom,pm8994-regulators + then: + properties: + vdd_l1-supply: true + vdd_l13_l19_l23_l24-supply: true + vdd_l14_l15-supply: true + vdd_l17_l29-supply: true + vdd_l20_l21-supply: true + vdd_l25-supply: true + vdd_l2_l26_l28-supply: true + vdd_l3_l11-supply: true + vdd_l4_l27_l31-supply: true + vdd_l5_l7-supply: true + vdd_l6_l12_l32-supply: true + vdd_l8_l16_l30-supply: true + vdd_l9_l10_l18_l22-supply: true + vdd_lvs_1_2-supply: true + patternProperties: + "^vdd_s[1-9][0-2]?-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pmi8994-regulators + then: + properties: + vdd_l1-supply: true + patternProperties: + "^vdd_s[1-3]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pms405-regulators + then: + properties: + vdd_s3-supply: true + +unevaluatedProperties: false + +examples: + - | + regulators { + compatible = "qcom,pm8941-regulators"; + vdd_l1_l3-supply = <&s1>; + + s1: s1 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1400000>; + }; + + l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1300000>; + }; + }; +... From patchwork Mon Jul 4 21:23:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587153 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 4BAF3CCA489 for ; Mon, 4 Jul 2022 21:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233501AbiGDVYM (ORCPT ); Mon, 4 Jul 2022 17:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbiGDVYL (ORCPT ); Mon, 4 Jul 2022 17:24:11 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8358510FE1; Mon, 4 Jul 2022 14:24:10 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id o25so18554813ejm.3; Mon, 04 Jul 2022 14:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oIDUTK5KnimKV7JPutWUmQpjQBhC0JH0W89/0KDYnjU=; b=eDfKHqF7WgMDLnMzwKT9v+qjyy7+6NXb0LduS9SI6XJFpxmCnK4VDAfp+a5Ki9YyX2 DZuSwtyd6EKS0YOWkDO3rD+Gbz3LqeMSdch8YKUYJmzMWPjf8QBD9XkUz/uPhmQdj+IV C1ehkacW68jylA5X/K0jEvK6F2q9MRaNqM4RMw60BjBpUa1J93KzIQAmJVwvWE3QenUg ZB0CALBFFJoKzr88aHUOOmJYz9C9zTmE1S6yLIUh3xPLHMkf7tbo66ry9pkaSY/wbQ4S 0KmnVF+tJRvvnrDnZNSs8tcnnbrPekSPSf0/h1WKCfbPzFQh2+pgKJlgwKGanVl4eJUj eTCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oIDUTK5KnimKV7JPutWUmQpjQBhC0JH0W89/0KDYnjU=; b=Uy3ho7iAqpk0uUzgRVjgwIBI1fEVKxQCzDQqlR7nh92E9EQ81EuYpvAvurqPydzxdI iyMjHs+96jJH6MaNkW5RDB3w20V+bWfuKx56+yymYUsNPb8/GHvkq7sQ+kxAcInc8/vq T/YzyAHTHw9X360Rv/R3ujwe4XbtEpa+7TCg+qQddfs3f4mnqrvO4d6y8MVjjtU5gKKp 2KyQEMkOTga3bkH2n8FL3jBbjllt1lV8G6fYH2wZ7EOHzag6J1ryjnLXqX4HSXngBwJ7 iuxo7O40w0tLkYBswA5c3P1ITr+wR6gtJA4Cw977QovbnHbbcbM6CpD0mqrhVy4s3Acb UCAA== X-Gm-Message-State: AJIora+LdIxFqYCsf6BLQ93oeQZ30hS1QORDLUch5O+p8hrmTfXVd5O/ c1IORQJeA53eKS27UpyLU44= X-Google-Smtp-Source: AGRyM1uA8oVogKLtZbQYNp2tti8JJkbZ6Q0JKYCXcnMCO7CVL66lqNTCM1pSUHOHnMxnqeCuPNigRQ== X-Received: by 2002:a17:906:4fc9:b0:726:f4e4:88e8 with SMTP id i9-20020a1709064fc900b00726f4e488e8mr29857071ejw.57.1656969849150; Mon, 04 Jul 2022 14:24:09 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:08 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 04/12] regulator: qcom_spmi: add support for HT_P150 Date: Mon, 4 Jul 2022 23:23:54 +0200 Message-Id: <20220704212402.1715182-4-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org HT_P150 is a LDO PMOS regulator based on LV P150 using HFS430 layout found in PMP8074 and PMS405 PMIC-s. Both PMP8074 and PMS405 define the programmable range as 1.616V to 3.304V but the actual MAX output voltage depends on the exact LDO in each of the PMIC-s. It has a max current of 150mA, voltage step of 8mV. Signed-off-by: Robert Marko --- drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 02bfce981150..38bbc70241ae 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -164,6 +164,7 @@ enum spmi_regulator_subtype { SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL3 = 0x0f, SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL4 = 0x10, SPMI_REGULATOR_SUBTYPE_HFS430 = 0x0a, + SPMI_REGULATOR_SUBTYPE_HT_P150 = 0x35, }; enum spmi_common_regulator_registers { @@ -544,6 +545,10 @@ static struct spmi_voltage_range hfs430_ranges[] = { SPMI_VOLTAGE_RANGE(0, 320000, 320000, 2040000, 2040000, 8000), }; +static struct spmi_voltage_range ht_p150_ranges[] = { + SPMI_VOLTAGE_RANGE(0, 1616000, 1616000, 3304000, 3304000, 8000), +}; + static DEFINE_SPMI_SET_POINTS(pldo); static DEFINE_SPMI_SET_POINTS(nldo1); static DEFINE_SPMI_SET_POINTS(nldo2); @@ -564,6 +569,7 @@ static DEFINE_SPMI_SET_POINTS(nldo660); static DEFINE_SPMI_SET_POINTS(ht_lvpldo); static DEFINE_SPMI_SET_POINTS(ht_nldo); static DEFINE_SPMI_SET_POINTS(hfs430); +static DEFINE_SPMI_SET_POINTS(ht_p150); static inline int spmi_vreg_read(struct spmi_regulator *vreg, u16 addr, u8 *buf, int len) @@ -1458,6 +1464,7 @@ static const struct regulator_ops spmi_hfs430_ops = { static const struct spmi_regulator_mapping supported_regulators[] = { /* type subtype dig_min dig_max ltype ops setpoints hpm_min */ + SPMI_VREG(LDO, HT_P150, 0, INF, HFS430, hfs430, ht_p150, 10000), SPMI_VREG(BUCK, GP_CTL, 0, INF, SMPS, smps, smps, 100000), SPMI_VREG(BUCK, HFS430, 0, INF, HFS430, hfs430, hfs430, 10000), SPMI_VREG(LDO, N300, 0, INF, LDO, ldo, nldo1, 10000), From patchwork Mon Jul 4 21:23:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587152 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 D12D1CCA483 for ; Mon, 4 Jul 2022 21:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233565AbiGDVYN (ORCPT ); Mon, 4 Jul 2022 17:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233494AbiGDVYM (ORCPT ); Mon, 4 Jul 2022 17:24:12 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA40010FEB; Mon, 4 Jul 2022 14:24:11 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id fd6so13038412edb.5; Mon, 04 Jul 2022 14:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hKTBlcPzeTtNqnyrU1hJ/yZCoy1XKsotOx9CBAENNAA=; b=cx7knMNy/RTcqIAtDpMWLflHmEGfcfVOfufxQctKFPmCR3991aoNB9HbBOCPDAWNa3 y1Tn1NdUC/SCguxO6t4C+2Atwz3I2IoJzDLM42vtNIWusLZdDmnBoqW59b1MfGcrPgrE KcbL5r2yjIpBs7DrJTv6sPDWRtDnpGmZ0/Ii3uPIqfoJ1i/eydJim3dk7ZLhXZ42qRXm MSwKOtxxq4TlGcgBUtgCDdQQGFEe2JilaG0a9fkuh/gLCeWWHgychsFqjQTg5PIeWmbC /YJg977Bw1b1wKMvHJS88a1MXnRvr7yC5ppT1Qew82fRLLxbXuWjqEYr/EepLJSMMJjq OoYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hKTBlcPzeTtNqnyrU1hJ/yZCoy1XKsotOx9CBAENNAA=; b=dw/YogmJByqsDsgRO8zBGB1wZWLp9Yktp1iXaRHXnLHYr2gkB79sIXhnmfanhY459z rMcDOaAALOOtQz0KcWfPRqWjRPzST7rIh3YRKhjusM1ZwXhKCmufiBm/0gVTPrN7/cBi uexhr0Xogu1gIZbePl6kPD1IVPdgihe15jXEMWyu2a1Hfd2S7yfE692GVo+I1yvuwlEv NIO6VPXciRE3eoN7qwNa1kGERH8G467z0kEw7NuKGfYKbmSU3YvBFoI+UWt0bbeh60OH EE1znJuPjkAUw8K7Cm2E3fmNmqOw99iuTaATM/XmmHKiZdcEJYzxRZGTMtVWibQeLbpz 3/OA== X-Gm-Message-State: AJIora/BrMH+CX0iKjfIeTqR5fwqXOGHjkFcB3megkfmue/coeyPZSBx iYGo7w9JajmOhsLOKDMGxHQ= X-Google-Smtp-Source: AGRyM1udASbZPCvFns16TjCXoQo78F7gpfERpvzJDxsCQszQMX8GH//fAXtr/TymJn+nTVchALHHtA== X-Received: by 2002:a05:6402:2985:b0:439:651b:c1f4 with SMTP id eq5-20020a056402298500b00439651bc1f4mr30559264edb.276.1656969850307; Mon, 04 Jul 2022 14:24:10 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:10 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 05/12] regulator: qcom_spmi: add support for HT_P600 Date: Mon, 4 Jul 2022 23:23:55 +0200 Message-Id: <20220704212402.1715182-5-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org HT_P600 is a LDO PMOS regulator based on LV P600 using HFS430 layout found in PMP8074 and PMS405 PMIC-s. Both PMP8074 and PMS405 define the programmable range as 1.704 to 1.896V but the actual MAX output voltage depends on the exact LDO in each of the PMIC-s. Their usual voltage that they are used is 1.8V. It has a max current of 600mA, voltage step of 8mV. Signed-off-by: Robert Marko --- drivers/regulator/qcom_spmi-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 38bbc70241ae..ad9ad9f4be8e 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -165,6 +165,7 @@ enum spmi_regulator_subtype { SPMI_REGULATOR_SUBTYPE_ULT_HF_CTL4 = 0x10, SPMI_REGULATOR_SUBTYPE_HFS430 = 0x0a, SPMI_REGULATOR_SUBTYPE_HT_P150 = 0x35, + SPMI_REGULATOR_SUBTYPE_HT_P600 = 0x3d, }; enum spmi_common_regulator_registers { @@ -549,6 +550,10 @@ static struct spmi_voltage_range ht_p150_ranges[] = { SPMI_VOLTAGE_RANGE(0, 1616000, 1616000, 3304000, 3304000, 8000), }; +static struct spmi_voltage_range ht_p600_ranges[] = { + SPMI_VOLTAGE_RANGE(0, 1704000, 1704000, 1896000, 1896000, 8000), +}; + static DEFINE_SPMI_SET_POINTS(pldo); static DEFINE_SPMI_SET_POINTS(nldo1); static DEFINE_SPMI_SET_POINTS(nldo2); @@ -570,6 +575,7 @@ static DEFINE_SPMI_SET_POINTS(ht_lvpldo); static DEFINE_SPMI_SET_POINTS(ht_nldo); static DEFINE_SPMI_SET_POINTS(hfs430); static DEFINE_SPMI_SET_POINTS(ht_p150); +static DEFINE_SPMI_SET_POINTS(ht_p600); static inline int spmi_vreg_read(struct spmi_regulator *vreg, u16 addr, u8 *buf, int len) @@ -1464,6 +1470,7 @@ static const struct regulator_ops spmi_hfs430_ops = { static const struct spmi_regulator_mapping supported_regulators[] = { /* type subtype dig_min dig_max ltype ops setpoints hpm_min */ + SPMI_VREG(LDO, HT_P600, 0, INF, HFS430, hfs430, ht_p600, 10000), SPMI_VREG(LDO, HT_P150, 0, INF, HFS430, hfs430, ht_p150, 10000), SPMI_VREG(BUCK, GP_CTL, 0, INF, SMPS, smps, smps, 100000), SPMI_VREG(BUCK, HFS430, 0, INF, HFS430, hfs430, hfs430, 10000), From patchwork Mon Jul 4 21:23:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587545 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 2E9E7CCA486 for ; Mon, 4 Jul 2022 21:24:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233573AbiGDVYP (ORCPT ); Mon, 4 Jul 2022 17:24:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233576AbiGDVYN (ORCPT ); Mon, 4 Jul 2022 17:24:13 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E441210FEB; Mon, 4 Jul 2022 14:24:12 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id g26so18535172ejb.5; Mon, 04 Jul 2022 14:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t/BG5vD2Kpre80JUee6H++Vy9Vk4uNgKEic0vq+tFnI=; b=UNW9KqwNzjksDAvjfdnrtc14uOmbwuh+Am2xG3GPA8KJYNPPB+SBsQZWA5H1b+U3gK 7xa8C+31YCf21Ao6Ks11X2AJvx1xLz1vVkfpy3TlFr6l+O1jVwnqJ51K1d6pHhWg6bHx a6vsOXedsgzeNEJ/PFliIJgM1k5pOk2x5+GLvbVAFrAU/FhegnS3fP2w5VKPpUX7qeS5 aAPJsTQLuhWgerDrZuY3HoKJc252HxtYrdhI/5q6Xoihbg98hN5P/hDHPDdKbMx7vY6i B+rYPM+DkB+0z15JnNqDNmVk32bO4gjcL+1UQ+5EXp6R3oKyze2U7TZIZFa+YKQt2q/s Bxgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t/BG5vD2Kpre80JUee6H++Vy9Vk4uNgKEic0vq+tFnI=; b=08x1BBERpUfHhWo799R4tDnatzqXT54XRQZ5HxqlCDnsvTRgj7q6KuLu36B9V2DGrg CEeCWvzU1sV0xOLQxyvVjmbr3j1flABwwb2o430Icy/s6KyeF5ATnB3tWjcn+5Z0yUby OIgBBWoU1BdDXECLBm+gpvf+vaXZA2jDZHnd8YlWTGWsx/sxIcpJ1f07x7Q5H34RhhVV ywPfkDwSLYyZWBsgwvFyO9rHsLG52rpxxCf/8rdwiL35pAYkP+7oLY1mqNb5Qg4RxHzW BsR7pXvbfV4uDwErOpsm/tdRGgQ7ppTtJ7wew15X+QPNjiAM4wfFHgo0qnSfiajXFxt1 EYpA== X-Gm-Message-State: AJIora93/dOXJzPcfcz+Fx5MGOdtw59CpozmxDVpSQ+UWODzGB+oz+HR UD5+0x4wYJMzyI7TxD1sPYo= X-Google-Smtp-Source: AGRyM1sCRfzWqQ+ofHuJmszZhv+vMuETuyMMUkgtqf/VGab9V12EsouF0SIFzrocMGAo26mXr5EHEQ== X-Received: by 2002:a17:907:763a:b0:72a:5128:b34f with SMTP id jy26-20020a170907763a00b0072a5128b34fmr26180805ejc.372.1656969851534; Mon, 04 Jul 2022 14:24:11 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:11 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko , Krzysztof Kozlowski Subject: [PATCH v6 06/12] dt-bindings: regulator: qcom,spmi-regulator: add PMP8074 PMIC Date: Mon, 4 Jul 2022 23:23:56 +0200 Message-Id: <20220704212402.1715182-6-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the PMP8074 PMIC compatible. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski --- Changes in v4: * Add remaining supplies Changes in v3: * Add supply matching --- .../bindings/regulator/qcom,spmi-regulator.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml index 06dc99b942e5..8b7c4af4b551 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.yaml @@ -23,6 +23,7 @@ properties: - qcom,pm8950-regulators - qcom,pm8994-regulators - qcom,pmi8994-regulators + - qcom,pmp8074-regulators - qcom,pms405-regulators qcom,saw-reg: @@ -276,6 +277,21 @@ allOf: vdd_l1-supply: true patternProperties: "^vdd_s[1-3]-supply$": true + - if: + properties: + compatible: + contains: + enum: + - qcom,pmp8074-regulators + then: + properties: + vdd_l10_l11_l12_l13-supply: true + vdd_l1_l2-supply: true + vdd_l3_l8-supply: true + vdd_l5_l6_l15-supply: true + patternProperties: + "^vdd_l[479]-supply$": true + "^vdd_s[1-5]-supply$": true - if: properties: compatible: From patchwork Mon Jul 4 21:23:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587544 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 AA3DFCCA47F for ; Mon, 4 Jul 2022 21:24:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233943AbiGDVYX (ORCPT ); Mon, 4 Jul 2022 17:24:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233804AbiGDVYU (ORCPT ); Mon, 4 Jul 2022 17:24:20 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64D4310FF9; Mon, 4 Jul 2022 14:24:14 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id v12so422725edc.10; Mon, 04 Jul 2022 14:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NpQYDqqTMKvAHgyQOKIaDAZVZin4gTd/M2O8Q7thQ0s=; b=nscnq7g5yJ446rTwwf868cT0pibJ9Z/WeiMwSVkbo1s/s3xxa+H6jggyp6hP/1FzgS WQ5u+05UkLqpn1J00oSp2gy3TcLij3+CSTb7pF7IshU1ztmMtwSG+xtjZHiJ7ukyTCDq zz+VC9rQjPHYWHVaXWR8r5Igrvrs21VQTER+ZBJWAxqowaB7eDvLAQDVWOP4jLdGINpq jNoZKsS93uQHvc7AG+66lCJLz2I0jFiXVYwk3ihGPXCYATgJ8Rs5BR84cNUCryw3PDRr 10EE/SNyOrcEhfSRetGbxcBC6+KchZzg7sq5HKbABlzyAFYjvLYjyy0Oz8u9Rr9rBfWR jxwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NpQYDqqTMKvAHgyQOKIaDAZVZin4gTd/M2O8Q7thQ0s=; b=NINTrIqEx+TwMulR5ozoHuhqXz2lrn1SaL1OTjmBIXrqLVZjOD3pURW0hgHQJjqv0M 0N5dU3hEOE3J0psOHCWNzFLgLuysDZuTxgf0JM/BxDPn1Jyhq1MhQMB2G4oKGiX3rrrd xK2Dal0O9Oig5JdutGu4qZTqhBB2gWe5G4MysmptA4iUkQJihdC0ZohusyeegqYii3Mt eXJ2JUzmlxxd7GC88P2plyV7kXsfzXmLOiWy7z3iWw4g2fd8Jv97a3D1DJMJ+CerQsju tL6BreBn0ks/IIBYS4zrJojwij/22b0i3Tf8RD99GLqhqp0k9FDPSp4RSTRF2cezh7RW IT6A== X-Gm-Message-State: AJIora94DABQzZFrd/wpd8bj/hprgccSYeWowZn0IyIlgVgnkRIqxDeC +INRoCuiY8RbyzZj/ni7ZXQ= X-Google-Smtp-Source: AGRyM1s0i2L45cDGqJO0VCVY9JRf7+PMoiq0E5AZSKuGA06grf+X2ZsTKHkeTSEskkPW1PUeT/nqFA== X-Received: by 2002:a05:6402:c47:b0:437:ce2d:c30d with SMTP id cs7-20020a0564020c4700b00437ce2dc30dmr41785629edb.395.1656969852690; Mon, 04 Jul 2022 14:24:12 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:12 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 07/12] regulator: qcom_spmi: add support for PMP8074 regulators Date: Mon, 4 Jul 2022 23:23:57 +0200 Message-Id: <20220704212402.1715182-7-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org PMP8074 is a companion PMIC for the Qualcomm IPQ8074 WiSoC-s. It features 5 HF-SMPS and 13 LDO regulators. HF-SMPS regulators are Buck HFS430 regulators. L1, L2 and L3 are HT_N1200_ST subtype LDO regulators. L4 is HT_N300_ST subtype LDO regulator. L5 and L6 are HT_P600 subtype LDO regulators. L7, L11, L12 and L13 are HT_P150 subtype LDO regulators. L10 is HT_P50 subtype LDO regulator. This commit adds support for all of the buck regulators and LDO-s except for L10 as I dont have documentation on its output voltage range. S3 is the CPU cluster voltage supply, S4 supplies the UBI32 NPU cores and L11 is the SDIO/eMMC I/O voltage regulator required for high speeds. Signed-off-by: Robert Marko --- Changes in v4: * Add remaining regulators, minus L11 * Sort structure and compatible --- 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 ad9ad9f4be8e..a2d0292a92fd 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -2139,6 +2139,28 @@ static const struct spmi_regulator_data pm8005_regulators[] = { { } }; +static const struct spmi_regulator_data pmp8074_regulators[] = { + { "s1", 0x1400, "vdd_s1"}, + { "s2", 0x1700, "vdd_s2"}, + { "s3", 0x1a00, "vdd_s3"}, + { "s4", 0x1d00, "vdd_s4"}, + { "s5", 0x2000, "vdd_s5"}, + { "l1", 0x4000, "vdd_l1_l2"}, + { "l2", 0x4100, "vdd_l1_l2"}, + { "l3", 0x4200, "vdd_l3_l8"}, + { "l4", 0x4300, "vdd_l4"}, + { "l5", 0x4400, "vdd_l5_l6_l15"}, + { "l6", 0x4500, "vdd_l5_l6_l15"}, + { "l7", 0x4600, "vdd_l7"}, + { "l8", 0x4700, "vdd_l3_l8"}, + { "l9", 0x4800, "vdd_l9"}, + /* l10 is currently unsupported HT_P50 */ + { "l11", 0x4a00, "vdd_l10_l11_l12_l13"}, + { "l12", 0x4b00, "vdd_l10_l11_l12_l13"}, + { "l13", 0x4c00, "vdd_l10_l11_l12_l13"}, + { } +}; + static const struct spmi_regulator_data pms405_regulators[] = { { "s3", 0x1a00, "vdd_s3"}, { } @@ -2156,6 +2178,7 @@ static const struct of_device_id qcom_spmi_regulator_match[] = { { .compatible = "qcom,pmi8994-regulators", .data = &pmi8994_regulators }, { .compatible = "qcom,pm660-regulators", .data = &pm660_regulators }, { .compatible = "qcom,pm660l-regulators", .data = &pm660l_regulators }, + { .compatible = "qcom,pmp8074-regulators", .data = &pmp8074_regulators }, { .compatible = "qcom,pms405-regulators", .data = &pms405_regulators }, { } }; From patchwork Mon Jul 4 21:23:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587151 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 E307BCCA479 for ; Mon, 4 Jul 2022 21:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233846AbiGDVYW (ORCPT ); Mon, 4 Jul 2022 17:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233864AbiGDVYV (ORCPT ); Mon, 4 Jul 2022 17:24:21 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 547FD1146C; Mon, 4 Jul 2022 14:24:15 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id z41so13067671ede.1; Mon, 04 Jul 2022 14:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aguHBKBuHMX4tBuQp1cFa26DPca4WlhIJZY4sZw7kpI=; b=ojujb3UjR7HvSea3IliR0bkYdtIX7oMv0SXdby+o/etwI5aBvu/mQ0JBHo8A8QtpD4 dGG98aq1Kgcg8WAFUcskS+ikG9MqSlPo2ULSRmbVoOqoSM6oAtTMsRm+g5xkrOGMpkcO kNzuh+mCpaNUPrS0A9P12Z/NIRCIBoy57sb6HdyLISv7QiaJXGZLk9KNykvcZ8R+vQjM Myb/s0yjXSCfamNW/sXFT3UDNdtYBAEDr8FT+9FJWY4SgU/1X58wzEvMwo3Un5i/EqPH cQ5nSqX1DpRsMAD09zSVC5KnWTZQ7t5ErwF/cUCnIaenB99S/pojqJi6gIdkGi0dcixa Hm9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aguHBKBuHMX4tBuQp1cFa26DPca4WlhIJZY4sZw7kpI=; b=m2I2uyX4JCNKST/QJgo+13aMIjlrEzSWaFAslu62EE3L9snqNnxRGKeDhqaemlMsGy N6uUSvDo7HXydpVOHvlU3z53282rFZh+AlFtLiipqRStR6mNe/uHEQGTMnmqGAwn0MJ6 N5zif80WfSQigeylHpFVguSYc3yY1Fr7FGmRvFXPuvc0H08jdaqp9uiCcJWfSpXkQy3w 1CsBL4bsKnwM/e8UfnEDFgtYMxT8k4fkDHf2nH2hALm44bI0PJJ7b0SkkGZNz25QXQ6a BwuMCpvCZPQLPQ1tKp+E5j/+N3RNcUy+Ed0itKMFxxH4FtCydOOcc+Rw4xuBivBn4Brj YCjg== X-Gm-Message-State: AJIora9QwtJcVi6od1cnv5wB1ct7uZUvdR6xOsZOuIULCQ8rYmC9C/JO FcrOgQa2dkk9rJyFe6OaJuI= X-Google-Smtp-Source: AGRyM1uYnmUs41aY4+0Bx//un652jbOxDwftRFuw6MGuHm1nvUYU7VO6Te9W+NsFnV4lxLzi0g/Vcw== X-Received: by 2002:a05:6402:b34:b0:435:d064:8762 with SMTP id bo20-20020a0564020b3400b00435d0648762mr41916027edb.238.1656969853859; Mon, 04 Jul 2022 14:24:13 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:13 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 08/12] dt-bindings: pinctrl: qcom,pmic-gpio: add PMP8074 Date: Mon, 4 Jul 2022 23:23:58 +0200 Message-Id: <20220704212402.1715182-8-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Document the compatible for PMP8074 which has 12 GPIO-s with holes at GPIO1 and GPIO12. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml index 6f2efc3772cb..6bc84779b092 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml @@ -52,6 +52,7 @@ properties: - qcom,pmi8998-gpio - qcom,pmk8350-gpio - qcom,pmm8155au-gpio + - qcom,pmp8074-gpio - qcom,pmr735a-gpio - qcom,pmr735b-gpio - qcom,pms405-gpio @@ -233,6 +234,7 @@ allOf: - qcom,pm8150b-gpio - qcom,pm8150l-gpio - qcom,pmc8180c-gpio + - qcom,pmp8074-gpio - qcom,pms405-gpio then: properties: @@ -415,6 +417,7 @@ $defs: - gpio1-gpio10 for pmi8994 - gpio1-gpio4 for pmk8350 - gpio1-gpio10 for pmm8155au + - gpio1-gpio12 for pmp8074 (holes on gpio1 and gpio12) - gpio1-gpio4 for pmr735a - gpio1-gpio4 for pmr735b - gpio1-gpio12 for pms405 (holes on gpio1, gpio9 From patchwork Mon Jul 4 21:23:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587150 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 C2F0ECCA480 for ; Mon, 4 Jul 2022 21:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234231AbiGDVYe (ORCPT ); Mon, 4 Jul 2022 17:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233895AbiGDVYV (ORCPT ); Mon, 4 Jul 2022 17:24:21 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83A9A1181F; Mon, 4 Jul 2022 14:24:16 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id c65so13049307edf.4; Mon, 04 Jul 2022 14:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BIa9uRxXfloP6LkJCYKSY6LlyEe4ZLWO3jSm59Xwpnk=; b=F1QSNH79dLgNP/6WYXYGY8G160qYTl/vmjKH6G/1Pywa1xCc5rTpMpq/b+TuToOiPo po5pRf0PG1DN2RWWUo9gH3YcSaayJZ0PMc1klbYCNgzmTuUcURxl/TrVmKVCBWtZG6GA aqI6EXVZVx9duGvCBhMMwt9lUxvx3aaVCwFwXVMPKE3HfnH/g/btm7z9ijKWUeY3+ngz NIixMpYnPcoId96a5t3pPfCzU4yTHmJuugT8AWKBJjemtDX/edBjr4IkokyurvQYDFCd MfYde3sXUST4d558xAOyxAlEPBVBdpogr5yOvoowqVoGyi+R+MYUJ42Bj0KGarT27nST ITjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BIa9uRxXfloP6LkJCYKSY6LlyEe4ZLWO3jSm59Xwpnk=; b=OxVqdIDjY4k+ZRQo6DF1knooN7GqPXW/raUewuga6lq2lKAXZJhpZfj3luy+96dYcW ZSHmdTlVM3zQJ1PM02Ye8BsEXn47k0lMzx/CTDE5edVTn6E53Vz9vH8TLxdCAIWH/sAI d21u9LtVOb91RL5P9i7TEFhAYUC1uWlJZExHDyBbf0G/CooeDvbFqHMmVEzU6GQd95FU Wx/8sWYKMIWnmhkfC5uXLNN1UDxKSJ4xMIIIpLv52SE0yiBeqm30w6gEWDxUDbc95Bsk EiWBOc8CZltn6Jm6rwqWRY3QGkCPCGd2nRgU21SclPdRp5IUurmrJ/u+c08XMjut3b5l N++g== X-Gm-Message-State: AJIora+eNXRvEj/PivDOiKIA39ME95Gxii0UUKMYVtf+CcyYHdQ250wX tHWMS2puqs4UqQNtAhnfiOY= X-Google-Smtp-Source: AGRyM1uHkDPLNtow7mlHuT3vEsm6WqDkMh7IiFO6vjhr1yvn1SGYHeKxZBdSgzpbEMCUnq/V5KUNhg== X-Received: by 2002:a05:6402:40c3:b0:439:6b72:483e with SMTP id z3-20020a05640240c300b004396b72483emr29020472edb.154.1656969855036; Mon, 04 Jul 2022 14:24:15 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:14 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 09/12] pinctrl: qcom-pmic-gpio: add support for PMP8074 Date: Mon, 4 Jul 2022 23:23:59 +0200 Message-Id: <20220704212402.1715182-9-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org PMP8074 has 12 GPIO-s with holes on GPIO1 and GPIO12. Signed-off-by: Robert Marko --- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index fd5fff9adff0..c3255b0bece4 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -1178,6 +1178,8 @@ static const struct of_device_id pmic_gpio_of_match[] = { { .compatible = "qcom,pmi8998-gpio", .data = (void *) 14 }, { .compatible = "qcom,pmk8350-gpio", .data = (void *) 4 }, { .compatible = "qcom,pmm8155au-gpio", .data = (void *) 10 }, + /* pmp8074 has 12 GPIOs with holes on 1 and 12 */ + { .compatible = "qcom,pmp8074-gpio", .data = (void *) 12 }, { .compatible = "qcom,pmr735a-gpio", .data = (void *) 4 }, { .compatible = "qcom,pmr735b-gpio", .data = (void *) 4 }, /* pms405 has 12 GPIOs with holes on 1, 9, and 10 */ From patchwork Mon Jul 4 21:24:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587542 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 CDF84CCA487 for ; Mon, 4 Jul 2022 21:24:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234301AbiGDVYh (ORCPT ); Mon, 4 Jul 2022 17:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233922AbiGDVYV (ORCPT ); Mon, 4 Jul 2022 17:24:21 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99BD611838; Mon, 4 Jul 2022 14:24:17 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id pk21so18583443ejb.2; Mon, 04 Jul 2022 14:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LnamX1gew1r1q0GcrIpZt4+urN+4Mq6nhqE3N2XaYR4=; b=XLZ785HHB6mv+qYnSjQY+HnZfgvV+Ec7XEdVchP7tl1d3JBz+ziZqHPzjcYVBi0lfS U1J4YLPSSH2hu+TFDwTACHubDz2DxIh8I6cEosF89O/PZrGAN0CbmoXnXqjNwfzJ6NA7 3HPa3jxNnmztV+TcrcQ64CVgFHMwHf2+8HgR9B5Ly+v69Rtp+hV4//+xMjw/AnkMHmBZ iXCVlnxwh9cWqgkMw+sJ9fnZyQQMhIw7q4O9LkSlXB+1n9hB2ap03DixVawLMTHpzRJe FG7dk20V1JnG7m7WcVDWLgPBoT9gZZpFZzMknFMqWgwD28Tjb8zyZLJvISWkTS6pIWKi k6pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LnamX1gew1r1q0GcrIpZt4+urN+4Mq6nhqE3N2XaYR4=; b=dVVFVY9iuz2/wLCymEueBXI200Iz5aNbJyHTAurl7kNgcouQ6L6/GGFxsZebXd8akN zq1y9c16WYqX635OXtSz/AWtzpUdSjUjTg4HHHsrpNj8NZPW6ecrF4VrMLHLCwF2iybg OiuZIeAj0dn4VS0rf7r98PiCCgzA7v+OqwAIig6j8cL4yq+QIz+zWJd96qElDFR9QPxJ kd3E/epzFfgsRIXui+YauM6Kl/wzFqCMuEZHMLqciNz6WC5nWlDQL08SO+9AwOmFj2Ks sd+OEITTwDdhIJQTVLRM4WxheSNlQZIcfDk2U+TAM5eGGx8HuoDf6KzL60wF0GAz9I+K JUow== X-Gm-Message-State: AJIora/pq7yxUs8FPlT/D+MeH33/jr9inuqciycSFjW4y03tffQBNXpe i9F6oVg2vQRh12kJV680bCJ+aPZqR6xtXA== X-Google-Smtp-Source: AGRyM1t9CPlzYzeJS465exWF324D+VyMdrNX8+amewcJWlqu0rgaY1NAKJWmxmb8TnCWhFUJ5Lr80Q== X-Received: by 2002:a17:907:3f0f:b0:726:8efa:ba81 with SMTP id hq15-20020a1709073f0f00b007268efaba81mr29637797ejc.535.1656969856197; Mon, 04 Jul 2022 14:24:16 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:15 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 10/12] iio: adc: qcom-spmi-adc5: add ADC5_VREF_VADC to rev2 ADC5 Date: Mon, 4 Jul 2022 23:24:00 +0200 Message-Id: <20220704212402.1715182-10-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for ADC5_VREF_VADC channel to rev2 ADC5 channel list. This channel measures the VADC reference LDO output. Signed-off-by: Robert Marko Acked-by: Jonathan Cameron --- drivers/iio/adc/qcom-spmi-adc5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 87438d1e5c0b..7bd3745884f0 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -589,6 +589,8 @@ static const struct adc5_channels adc5_chans_rev2[ADC5_MAX_CHANNEL] = { SCALE_HW_CALIB_DEFAULT) [ADC5_1P25VREF] = ADC5_CHAN_VOLT("vref_1p25", 0, SCALE_HW_CALIB_DEFAULT) + [ADC5_VREF_VADC] = ADC5_CHAN_VOLT("vref_vadc", 0, + SCALE_HW_CALIB_DEFAULT) [ADC5_VPH_PWR] = ADC5_CHAN_VOLT("vph_pwr", 1, SCALE_HW_CALIB_DEFAULT) [ADC5_VBAT_SNS] = ADC5_CHAN_VOLT("vbat_sns", 1, From patchwork Mon Jul 4 21:24:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587543 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 E3BEFCCA483 for ; Mon, 4 Jul 2022 21:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234283AbiGDVYg (ORCPT ); Mon, 4 Jul 2022 17:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233688AbiGDVYV (ORCPT ); Mon, 4 Jul 2022 17:24:21 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2C7E1208C; Mon, 4 Jul 2022 14:24:18 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id lw20so18555876ejb.4; Mon, 04 Jul 2022 14:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EUw3PSSlRTJ8Siy/LpJ4qyCzqMEIQDLkLGSj0kGh4nM=; b=L5Ru2/Iq910N1D2vdLEiHACiTAAlEbrbQY47KcrgJbPqdg0oPPlG5vS1CaIEsxXD4y 0MZVCtC1+z+S5t6zYDOQoK/sduI4IK6B67hMNMTwepZWlMcqMqisIvkbdVp2WGH0+xzg 26AMrIJBgWhMxyWyUNjge3ky5FWVlRoVjc1FCqOwOlf6tB3/Mx3r1dln5GeFfXUsI09C bKlNCZ6MHbOKN6uCq9zX/iSiw+sQJhqLtkjNa0biRnf7wuwPXBXDISkiXubpEHq2eJm6 8B9fkTW8tEeTc3Yiti5X+YTTNhMl305hbd4LT6P/TYLKBrtK3RCqaq62/CV9s0tsVUk+ LO0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EUw3PSSlRTJ8Siy/LpJ4qyCzqMEIQDLkLGSj0kGh4nM=; b=xcsV8OESne1nFO1U43K14uNa20OQOJwbPKUmFbMmxEHwATwUzPp2kShv46HzCYU4Ue E8lTNcEbRM7V2IOetrDhw3Y7kw8LK/7+stao8spST7q54mqWqPSkkLAxlspfTfGulKg5 DBodwKLb530BL+0r05cdVhjN/UQGH/4R/CLJrFrc53RZTJbhSAJ13ABykr4WXaL6GDtU HwtbC8DZ1BJd1EgbREVXmSrfLlaJnbNWaw1Ob4ym3wf8NoBX0kJczuJjh3RaTeS5yMz/ AbU9hqu78BQzGUZzdc51+19nY2JjBUTPNbIVk3WdqcX4INOHMB7XVjFLRCnnCiL/fN6Q pgyg== X-Gm-Message-State: AJIora/idi+t7FRFOrbMxfuo9OwoybC3vcmL7pE121aG8L4QIharbnl6 E1oovcn8i2NsHnRuutfHRJQ= X-Google-Smtp-Source: AGRyM1v63nDbrX9Q49PmZPCQ06w390iIO7lnus7X1xPf2Uihbwg56K1h7Osvi1C5xIwBcdL5GBC1nw== X-Received: by 2002:a17:906:b048:b0:6fe:be4a:3ecf with SMTP id bj8-20020a170906b04800b006febe4a3ecfmr31420321ejb.104.1656969857394; Mon, 04 Jul 2022 14:24:17 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:17 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 11/12] arm64: dts: qcom: add PMP8074 DTSI Date: Mon, 4 Jul 2022 23:24:01 +0200 Message-Id: <20220704212402.1715182-11-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org PMP8074 is a companion PMIC to the Qualcomm IPQ8074 series that is controlled via SPMI. Add DTSI for it providing GPIO, regulator and RTC support. RTC is disabled by default as there is no built-in battery so it will loose time unless board vendor added a battery, so make it optional. Signed-off-by: Robert Marko --- Changes in v6: * Add RTC and GPIO nodes Changes in v5: * Remove #address-cells and #size-cells as they are not required for regulator subnodes --- arch/arm64/boot/dts/qcom/pmp8074.dtsi | 125 ++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pmp8074.dtsi diff --git a/arch/arm64/boot/dts/qcom/pmp8074.dtsi b/arch/arm64/boot/dts/qcom/pmp8074.dtsi new file mode 100644 index 000000000000..a3b395e4d78f --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pmp8074.dtsi @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include +#include + +&spmi_bus { + pmic@0 { + compatible = "qcom,pmp8074", "qcom,spmi-pmic"; + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pmp8074_adc: adc@3100 { + compatible = "qcom,spmi-adc-rev2"; + reg = <0x3100>; + interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; + #address-cells = <1>; + #size-cells = <0>; + #io-channel-cells = <1>; + + ref_gnd@0 { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + vref_1p25@1 { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + vref_vadc@2 { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + pmic_die: die_temp@6 { + reg = ; + qcom,pre-scaling = <1 1>; + }; + + xo_therm: xo_temp@76 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pa_therm1: thermistor1@77 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pa_therm2: thermistor2@78 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pa_therm3: thermistor3@79 { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + vph_pwr@131 { + reg = ; + qcom,pre-scaling = <1 3>; + }; + }; + + pmp8074_rtc: rtc@6000 { + compatible = "qcom,pm8941-rtc"; + reg = <0x6000>; + reg-names = "rtc", "alarm"; + interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; + allow-set-time; + status = "disabled"; + }; + + pmp8074_gpios: gpio@c000 { + compatible = "qcom,pmp8074-gpio", "qcom,spmi-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pmp8074_gpios 0 0 12>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@1 { + compatible = "qcom,pmp8074", "qcom,spmi-pmic"; + reg = <0x1 SPMI_USID>; + + regulators { + compatible = "qcom,pmp8074-regulators"; + + s3: s3 { + regulator-name = "vdd_s3"; + regulator-min-microvolt = <592000>; + regulator-max-microvolt = <1064000>; + regulator-always-on; + regulator-boot-on; + }; + + s4: s4 { + regulator-name = "vdd_s4"; + regulator-min-microvolt = <712000>; + regulator-max-microvolt = <992000>; + regulator-always-on; + regulator-boot-on; + }; + + l11: l11 { + regulator-name = "l11"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + }; + }; +}; From patchwork Mon Jul 4 21:24:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 587149 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 662AECCA489 for ; Mon, 4 Jul 2022 21:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234341AbiGDVYi (ORCPT ); Mon, 4 Jul 2022 17:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbiGDVYV (ORCPT ); Mon, 4 Jul 2022 17:24:21 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F143612096; Mon, 4 Jul 2022 14:24:18 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id c65so13049423edf.4; Mon, 04 Jul 2022 14:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HDQxB7Fy3SfPJmcU/nMuUlTiaBaKupFDi/Um612kFO8=; b=UH0nEw+JDVS5JB6oX+Zir/ZDPriDB2qIkWp3OB9DiL8PcStuZljt2kKBfxZz/8jX6D u7YDSxPLoZlxmZVW2P2dFylf644p7ogvHsIkVCv70cRwCakTtt8xdYFAELTMdSM52KT+ cXxcvyQ528WCJrZ1rYO/BJ9IAf/KKT79kFtLYZRllKMFLfUSnwSD4to8YYmWxWRN1iNW AD0UpgYUrz9B1KMpzQQ95XFlruayVWtP9xHEDr+6W8hJhzujT0VT0HaKif3AMyHFB3AK 7nuifcHrnWWWhB5S/Ev6MsmfVwzaz+DcsmhcbtDa66TaDxMFH6c2/Kp9xxyClJAnKqEA U+Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HDQxB7Fy3SfPJmcU/nMuUlTiaBaKupFDi/Um612kFO8=; b=2TdIyE/zt7Pu/9B/0lwxANXszgGj5yPQrcFkBNrpQ9CApYjh6lzPIffeVnYkRKgsXt mAswhyRgnkEzl6z2Fn34IZB4pX9kUmQeMkac/n9ZQtMLOuqD1JC/jBHTvd/WSwXzZoKt TEHRw+q04cf8VlS2shvUrL//NxOOAaCymOIPFK9lwUl3+30pxkXqQ333ikNL+dMnuweC +PoJA8ugiACylsA/dFZarp7BEdd5PabO7jaU+G+yaAOILxmZ4xDFpeqb1JTnbsYjIYmV pzd1FyrqlaKyFJrvwFBohi9FfMD/dGqmjWIFvjnijtjIgI9XwqdMKPhOdvDkVRRLSzmE ZCBw== X-Gm-Message-State: AJIora/LCYW2Zf1QodbjQ0wXxgmuh3ij+DPvdD/iUJ2Ap3A2nDWUGdly XY7zk3Cf7yWMI29KG8J4iyo= X-Google-Smtp-Source: AGRyM1tmVI0Dsj6e4UIWi3qajxeF82gbxgVA/AT2jS1VqUufrtB9MP25vkcoNu2lIxrfjYdYZgdfnw== X-Received: by 2002:aa7:c486:0:b0:435:5d50:ab39 with SMTP id m6-20020aa7c486000000b004355d50ab39mr42209716edq.104.1656969858619; Mon, 04 Jul 2022 14:24:18 -0700 (PDT) Received: from fedora.robimarko.hr (dh207-99-90.xnet.hr. [88.207.99.90]) by smtp.googlemail.com with ESMTPSA id k18-20020a056402049200b0042dcbc3f302sm20131117edv.36.2022.07.04.14.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 14:24:18 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, konrad.dybcio@somainline.org, lee.jones@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, jic23@kernel.org, lars@metafoo.de, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org Cc: Robert Marko Subject: [PATCH v6 12/12] arm64: dts: qcom: ipq8074-hk01: add VQMMC supply Date: Mon, 4 Jul 2022 23:24:02 +0200 Message-Id: <20220704212402.1715182-12-robimarko@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220704212402.1715182-1-robimarko@gmail.com> References: <20220704212402.1715182-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since now we have control over the PMP8074 PMIC providing various system voltages including L11 which provides the SDIO/eMMC I/O voltage set it as the SDHCI VQMMC supply. This allows SDHCI controller to switch to 1.8V I/O mode and support high speed modes like HS200 and HS400. Signed-off-by: Robert Marko --- arch/arm64/boot/dts/qcom/ipq8074-hk01.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq8074-hk01.dts b/arch/arm64/boot/dts/qcom/ipq8074-hk01.dts index de20cb98acd3..a73909a24935 100644 --- a/arch/arm64/boot/dts/qcom/ipq8074-hk01.dts +++ b/arch/arm64/boot/dts/qcom/ipq8074-hk01.dts @@ -3,6 +3,7 @@ /* Copyright (c) 2017, The Linux Foundation. All rights reserved. */ #include "ipq8074.dtsi" +#include "pmp8074.dtsi" / { #address-cells = <0x2>; @@ -87,6 +88,7 @@ nand@0 { &sdhc_1 { status = "okay"; + vqmmc-supply = <&l11>; }; &qusb_phy_0 {