From patchwork Thu Apr 6 19:28:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 671604 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 ACD2BC76196 for ; Thu, 6 Apr 2023 19:28:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbjDFT2Z (ORCPT ); Thu, 6 Apr 2023 15:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjDFT2Y (ORCPT ); Thu, 6 Apr 2023 15:28:24 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 013A05272 for ; Thu, 6 Apr 2023 12:28:22 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id m2so40574930wrh.6 for ; Thu, 06 Apr 2023 12:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1680809301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TovaMoNXmH9olijKp9TzGAILwIizt6Ev5VA4GI6JW9U=; b=sn2YJQMZ57QrO/ByEheQoj+2yMet1GIGkI+xIJHZMiDrSF06mW+ZLZ8okC8x35PZox rnGpTvzfsWQ9lxbMRw21uHIlWNQReAMzp4lhdj8m7AwEI7P5iVuxctBBANxag7zBRDG2 Xz/pTtcVGpMDu2bvH1kYKJXyVGoXWi55KJycnpeeV5dL7kiKJutHP+boBfQEErgZTv2C iuJYRcIF0fTcTMewRVVH6sDNwSD+9OHq2Q4bnHozoM3O2U7Zmt4GgjjaLwvkQdyyrV7G s+q4FjBES5MkFwyafeWEPYwpB0H3c89driolMepgNCPxEioQCAnARKXEzK6iAlimRbc3 2qGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680809301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TovaMoNXmH9olijKp9TzGAILwIizt6Ev5VA4GI6JW9U=; b=PgW9kimM0jccktzmigJYSFiTbkXyWUp70BafKrQUWhDQx5c3HIKehtBoGjJ8lZRJ1P cM66aFJD74ZZdOKtI2mDbiLDb51kk0gLv+TmCjsp5JQx7M+LWmN7osH0fCxOzdYpD0LJ baIwi+BjKP/D51ZAy3UEcuGnOrJLnFslH+It/6n0L3jRN3V6EBF7x83255tQbsOoh2IP uahrjj7Uc0aB/nfdbAWUTWT+ZnT2TrnLWpyAPlIspB+G5B0vFQoY8P1tozcOygOL5gDB 8BKp28HpHCXQQIwvlLGggn3tvKaEDNxQfv3qz7KK79ArjZ8nFZofqBXoz/NCPvDLowkp bSXg== X-Gm-Message-State: AAQBX9dTcex7dt/TZ0XtfXctudT7CIZJE52Z1cBihKG2hGWmd0XQHRTW eHDSK92UIGvx9kfIVhw81DbkPg== X-Google-Smtp-Source: AKy350YX0pmv5BdbpIbsSq+hglTSaqFhVo6RZPYoJcU5bh1J1HOt1vUe93bXOpq3F+RvuOQ2KWbBOg== X-Received: by 2002:adf:e841:0:b0:2df:7c0a:df33 with SMTP id d1-20020adfe841000000b002df7c0adf33mr7468485wrn.30.1680809301359; Thu, 06 Apr 2023 12:28:21 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:4793:cb9a:340b:2f72]) by smtp.gmail.com with ESMTPSA id c11-20020adfe74b000000b002d89e113691sm2489321wrn.52.2023.04.06.12.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 12:28:20 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 1/3] dt-bindings: regulator: qcom,rpmh: add compatible for pmm8654au RPMH Date: Thu, 6 Apr 2023 21:28:09 +0200 Message-Id: <20230406192811.460888-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230406192811.460888-1-brgl@bgdev.pl> References: <20230406192811.460888-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Bartosz Golaszewski Add the compatible for the pmm8654au RPMH regulators present on the sa8775p-ride development board. Signed-off-by: Bartosz Golaszewski --- .../bindings/regulator/qcom,rpmh-regulator.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml index 7002d2654382..f879ccbb3767 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml @@ -80,6 +80,7 @@ properties: - qcom,pmg1110-rpmh-regulators - qcom,pmi8998-rpmh-regulators - qcom,pmm8155au-rpmh-regulators + - qcom,pmm8654au-rpmh-regulators - qcom,pmr735a-rpmh-regulators - qcom,pmx55-rpmh-regulators - qcom,pmx65-rpmh-regulators @@ -247,6 +248,22 @@ allOf: patternProperties: "^vdd-s([1-9]|10)-supply$": true + - if: + properties: + compatible: + enum: + - qcom,pmm8654au-rpmh-regulators + then: + properties: + vdd-l1-supply: true + vdd-l2-l3-supply: true + vdd-l4-supply: true + vdd-l5-supply: true + vdd-l6-l7-supply: true + vdd-l8-l9-supply: true + patternProperties: + "^vdd-s[1-9]-supply$": true + - if: properties: compatible: From patchwork Thu Apr 6 19:28:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 670826 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 236F5C7618D for ; Thu, 6 Apr 2023 19:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjDFT20 (ORCPT ); Thu, 6 Apr 2023 15:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbjDFT2Z (ORCPT ); Thu, 6 Apr 2023 15:28:25 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F314ED2 for ; Thu, 6 Apr 2023 12:28:24 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id i9so40586755wrp.3 for ; Thu, 06 Apr 2023 12:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1680809302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/PPxvwTg/e/yb+Kfzl1iykhLb1sl3Cb0/2wn1AONayg=; b=sQa/9WxwWd5KAFprBAXbGxsg3qZEhuUNoAQ4KEz7VZ0upRzkNELtnZbEd+g6iqHyRn GXhvJAjk7sRrh/LuC8thKWC48dyDT7LtIpxNdQo/aX11BeqTWzKtwtCl643mdwnRg78O e4dcVEzP92GcmPzY401ZpXqJSJbBIgbf06x3pfujk7nDZ5ZT1/XZA34eMtgPxAvk8lM2 n9VaqX5UaqvL2s/HUNIPTc0dxOmfbcjQk4D218qxiaDMdDybiLPsD/qiViy+411zpsij wSH6kiy5W3+Mw5zVu9PbAViAMibspr91iIL7agv0jos82QL4pjSsb9Af9CUDoa5RvUi6 bv5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680809302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/PPxvwTg/e/yb+Kfzl1iykhLb1sl3Cb0/2wn1AONayg=; b=D+ioLlEAN4XRnqp5QhtPdxc01tIUzg9TMKIU5mtsfrtDSesFgE9wwBEhJT6izFxrCx QSVJX3TghFKb72VkACo/IK4qrg5WVU//+1XCdEj9Ho0TKpqqepdxu7XNyNJ+MBy6VYEs owOaJ2DPbiu+qbwSBj2DpU+JNsQoMYT/qgZghfNlGX4Uy8R/ojL0Em+9Xe9wUB9J/4rW k85flPQxyCu9CsyV89+xJ1AVwOXdGTlfmdU/BhpDzkZzBLUQYrzBR9ywRndPztIzzeLI 7viTOv/ZXLF9VgvcioHlUsxvldpZFMNZR5UcOUu8C5X2w0EzoJtxNfydhyfaCeT8+WJM tR8w== X-Gm-Message-State: AAQBX9fozeqHi4B28RGqJw0rJaHqf96J1UNGfbkbOSqVN0Ba0iQY0x7x MDODY61pD6hh94CvtgymtJ9UVQ== X-Google-Smtp-Source: AKy350Yg5lwb9zNHl4+HxZwFw8D9HrfadSwkRINjo6lLzbbyQHA3FcDc49x8wWfUxYH4Q9rNqWmm+g== X-Received: by 2002:adf:f10f:0:b0:2e6:1b9a:8cc8 with SMTP id r15-20020adff10f000000b002e61b9a8cc8mr7008457wro.29.1680809302493; Thu, 06 Apr 2023 12:28:22 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:4793:cb9a:340b:2f72]) by smtp.gmail.com with ESMTPSA id c11-20020adfe74b000000b002d89e113691sm2489321wrn.52.2023.04.06.12.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 12:28:22 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/3] regulator: qcom-rpmh: add support for pmm8654au regulators Date: Thu, 6 Apr 2023 21:28:10 +0200 Message-Id: <20230406192811.460888-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230406192811.460888-1-brgl@bgdev.pl> References: <20230406192811.460888-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Bartosz Golaszewski Add the RPMH regulators exposed by the PMM8654au PMIC and its variants. Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio --- drivers/regulator/qcom-rpmh-regulator.c | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 4826d60e5d95..b0a58c62b1e2 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -694,6 +694,16 @@ static const struct rpmh_vreg_hw_data pmic5_pldo_lv = { .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_pldo515_mv = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_drms_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(1800000, 0, 187, 8000), + .n_voltages = 188, + .hpm_min_load_uA = 10000, + .pmic_mode_map = pmic_mode_map_pmic5_ldo, + .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_nldo = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_drms_ops, @@ -704,6 +714,16 @@ static const struct rpmh_vreg_hw_data pmic5_nldo = { .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_nldo515 = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_drms_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 210, 8000), + .n_voltages = 211, + .hpm_min_load_uA = 30000, + .pmic_mode_map = pmic_mode_map_pmic5_ldo, + .of_map_mode = rpmh_regulator_pmic4_ldo_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_hfsmps510 = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_ops, @@ -749,6 +769,15 @@ static const struct rpmh_vreg_hw_data pmic5_ftsmps525_mv = { .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, }; +static const struct rpmh_vreg_hw_data pmic5_ftsmps527 = { + .regulator_type = VRM, + .ops = &rpmh_regulator_vrm_ops, + .voltage_range = REGULATOR_LINEAR_RANGE(320000, 0, 215, 8000), + .n_voltages = 215, + .pmic_mode_map = pmic_mode_map_pmic5_smps, + .of_map_mode = rpmh_regulator_pmic4_smps_of_map_mode, +}; + static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = { .regulator_type = VRM, .ops = &rpmh_regulator_vrm_ops, @@ -937,6 +966,28 @@ static const struct rpmh_vreg_init_data pmm8155au_vreg_data[] = { {} }; +static const struct rpmh_vreg_init_data pmm8654au_vreg_data[] = { + RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps527, "vdd-s1"), + RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps527, "vdd-s2"), + RPMH_VREG("smps3", "smp%s3", &pmic5_ftsmps527, "vdd-s3"), + RPMH_VREG("smps4", "smp%s4", &pmic5_ftsmps527, "vdd-s4"), + RPMH_VREG("smps5", "smp%s5", &pmic5_ftsmps527, "vdd-s5"), + RPMH_VREG("smps6", "smp%s6", &pmic5_ftsmps527, "vdd-s6"), + RPMH_VREG("smps7", "smp%s7", &pmic5_ftsmps527, "vdd-s7"), + RPMH_VREG("smps8", "smp%s8", &pmic5_ftsmps527, "vdd-s8"), + RPMH_VREG("smps9", "smp%s9", &pmic5_ftsmps527, "vdd-s9"), + RPMH_VREG("ldo1", "ldo%s1", &pmic5_nldo515, "vdd-s9"), + RPMH_VREG("ldo2", "ldo%s2", &pmic5_nldo515, "vdd-l2-l3"), + RPMH_VREG("ldo3", "ldo%s3", &pmic5_nldo515, "vdd-l2-l3"), + RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo515, "vdd-s9"), + RPMH_VREG("ldo5", "ldo%s5", &pmic5_nldo515, "vdd-s9"), + RPMH_VREG("ldo6", "ldo%s6", &pmic5_nldo515, "vdd-l6-l7"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_nldo515, "vdd-l6-l7"), + RPMH_VREG("ldo8", "ldo%s8", &pmic5_pldo515_mv, "vdd-l8-l9"), + RPMH_VREG("ldo9", "ldo%s9", &pmic5_pldo, "vdd-l8-l9"), + {} +}; + static const struct rpmh_vreg_init_data pm8350_vreg_data[] = { RPMH_VREG("smps1", "smp%s1", &pmic5_ftsmps510, "vdd-s1"), RPMH_VREG("smps2", "smp%s2", &pmic5_ftsmps510, "vdd-s2"), @@ -1431,6 +1482,10 @@ static const struct of_device_id __maybe_unused rpmh_regulator_match_table[] = { .compatible = "qcom,pmm8155au-rpmh-regulators", .data = pmm8155au_vreg_data, }, + { + .compatible = "qcom,pmm8654au-rpmh-regulators", + .data = pmm8654au_vreg_data, + }, { .compatible = "qcom,pmx55-rpmh-regulators", .data = pmx55_vreg_data, From patchwork Thu Apr 6 19:28:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 671603 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 99EE8C77B6C for ; Thu, 6 Apr 2023 19:28:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230091AbjDFT21 (ORCPT ); Thu, 6 Apr 2023 15:28:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235437AbjDFT20 (ORCPT ); Thu, 6 Apr 2023 15:28:26 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94E15FC8 for ; Thu, 6 Apr 2023 12:28:24 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id d17so40554817wrb.11 for ; Thu, 06 Apr 2023 12:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1680809303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UScSyF/9yEg+A+J27SvMF7EuXswm03inLw2PjZuGBjo=; b=j0B+CJu9c+VLrNQhDuTysYaA+454n1tYHdWjFhG1aKymQ30c6fCvit0cWNj+7dOD7J a0rs+nT7kfwWdt6aunpkcTRWrcQWxHhd5XgLsLisMhgWw+HgxmwpXDtFOrwszM+l06IV rKyFcYEvtEX0W7V9fKRrIDBiXFPzLOtIq3OoXhRiI9kw5Q7vb3xa1X8DnCZHzLI9WStQ quX8rB552TLybcvNZqWpIFHqQeaD5nWMNhbn1BVs/4w7KTAxAJehj9QT8C3PNiQYCXoR 7HPgXfzSNwRR9U/te3Z8kXIbVdnKXxQSTm82CYdmMR2TnYFw3/YInz39+j4A8Y77Rjus +X9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680809303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UScSyF/9yEg+A+J27SvMF7EuXswm03inLw2PjZuGBjo=; b=njhXr8jxY9Nrx1vN6phpAxbxqXTBQRp0SpLZgkBchHaBFNt6z0E3LMfqNa7/HAjGDK 3qnNiaTpAmpTposzcBWqlgRdAcWFJn7hUIkQSSSVDpCO+VX6Pe2ZxxC0WZNV+AKo3HtM 6Frg9qamvB8YzjCxrYQEQtVolYpyWa6CYLq3k/EnmN8Ae3mMtX0D8K2DSs0N7T+QWUSR HyTVfkH8BRPJzyoET8PBlYcxEaAbdBLbkReuqVDuhkXm0fCv3VIN8SOOh5UgF50XFuMJ JpMRmqYz+IypAI3g34KHCcJITTjm4OaQA1rliRtfK6xM4klEhzOnEDRpNP0gVuD0ROPb 4INg== X-Gm-Message-State: AAQBX9fojX4bXIOxNjVJyS2zi/9jetdB6pDoKe66qKRo/pgkGsazkkT7 Rb0wfQvbOWjM4EJ/t9xRGAWwXA== X-Google-Smtp-Source: AKy350YVe9VObZl+bSTAuzIJIauD8tgrZatglE43VVckkYmxGh9XOdt1T2AOdaNZn2N/Zj8d3sVXDQ== X-Received: by 2002:adf:cc8e:0:b0:2e3:99d3:7a5 with SMTP id p14-20020adfcc8e000000b002e399d307a5mr8525092wrj.24.1680809303490; Thu, 06 Apr 2023 12:28:23 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:4793:cb9a:340b:2f72]) by smtp.gmail.com with ESMTPSA id c11-20020adfe74b000000b002d89e113691sm2489321wrn.52.2023.04.06.12.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 12:28:23 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 3/3] arm64: dts: qcom: sa8775p-ride: add PMIC regulators Date: Thu, 6 Apr 2023 21:28:11 +0200 Message-Id: <20230406192811.460888-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230406192811.460888-1-brgl@bgdev.pl> References: <20230406192811.460888-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Bartosz Golaszewski Add PMIC regulators for sa8775p-ride. Signed-off-by: Bartosz Golaszewski --- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 233 ++++++++++++++++++++++ 1 file changed, 233 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts index a0d2024a69df..f238a02a5448 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts @@ -5,6 +5,8 @@ /dts-v1/; +#include + #include "sa8775p.dtsi" #include "sa8775p-pmics.dtsi" @@ -25,6 +27,237 @@ chosen { }; }; +&apps_rsc { + regulators-0 { + compatible = "qcom,pmm8654au-rpmh-regulators"; + qcom,pmic-id = "a"; + + vreg_s4a: smps4 { + regulator-name = "vreg_s4a"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1816000>; + regulator-initial-mode = ; + }; + + vreg_s5a: smps5 { + regulator-name = "vreg_s5a"; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <1996000>; + regulator-initial-mode = ; + }; + + vreg_s9a: smps9 { + regulator-name = "vreg_s9a"; + regulator-min-microvolt = <535000>; + regulator-max-microvolt = <1120000>; + regulator-initial-mode = ; + }; + + vreg_l4a: ldo4 { + regulator-name = "vreg_l4a"; + regulator-min-microvolt = <788000>; + regulator-max-microvolt = <1050000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l5a: ldo5 { + regulator-name = "vreg_l5a"; + regulator-min-microvolt = <870000>; + regulator-max-microvolt = <950000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l6a: ldo6 { + regulator-name = "vreg_l6a"; + regulator-min-microvolt = <870000>; + regulator-max-microvolt = <970000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l7a: ldo7 { + regulator-name = "vreg_l7a"; + regulator-min-microvolt = <720000>; + regulator-max-microvolt = <950000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l8a: ldo8 { + regulator-name = "vreg_l8a"; + regulator-min-microvolt = <2504000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l9a: ldo9 { + regulator-name = "vreg_l9a"; + regulator-min-microvolt = <2970000>; + regulator-max-microvolt = <3544000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-1 { + compatible = "qcom,pmm8654au-rpmh-regulators"; + qcom,pmic-id = "c"; + + vreg_l1c: ldo1 { + regulator-name = "vreg_l1c"; + regulator-min-microvolt = <1140000>; + regulator-max-microvolt = <1260000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l2c: ldo2 { + regulator-name = "vreg_l2c"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1100000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l3c: ldo3 { + regulator-name = "vreg_l3c"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l4c: ldo4 { + regulator-name = "vreg_l4c"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-initial-mode = ; + /* + * FIXME: This should have regulator-allow-set-load but + * we're getting an over-current fault from the PMIC + * when switching to LPM. + */ + }; + + vreg_l5c: ldo5 { + regulator-name = "vreg_l5c"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l6c: ldo6 { + regulator-name = "vreg_l6c"; + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <1980000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l7c: ldo7 { + regulator-name = "vreg_l7c"; + regulator-min-microvolt = <1620000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l8c: ldo8 { + regulator-name = "vreg_l8c"; + regulator-min-microvolt = <2400000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l9c: ldo9 { + regulator-name = "vreg_l9c"; + regulator-min-microvolt = <1650000>; + regulator-max-microvolt = <2700000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-2 { + compatible = "qcom,pmm8654au-rpmh-regulators"; + qcom,pmic-id = "e"; + + vreg_s4e: smps4 { + regulator-name = "vreg_s4e"; + regulator-min-microvolt = <970000>; + regulator-max-microvolt = <1520000>; + regulator-initial-mode = ; + }; + + vreg_s7e: smps7 { + regulator-name = "vreg_s7e"; + regulator-min-microvolt = <1010000>; + regulator-max-microvolt = <1170000>; + regulator-initial-mode = ; + }; + + vreg_s9e: smps9 { + regulator-name = "vreg_s9e"; + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <570000>; + regulator-initial-mode = ; + }; + + vreg_l6e: ldo6 { + regulator-name = "vreg_l6e"; + regulator-min-microvolt = <1280000>; + regulator-max-microvolt = <1450000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + vreg_l8e: ldo8 { + regulator-name = "vreg_l8e"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1950000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; +}; + &i2c18 { clock-frequency = <400000>; pinctrl-0 = <&qup_i2c18_default>;