From patchwork Mon Mar 27 12:53:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 75421 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1496213vqo; Mon, 27 Mar 2023 06:06:38 -0700 (PDT) X-Google-Smtp-Source: AKy350YnyVaLAk4EoYSPIILhI5Lo1sm988ZuIRnc0CZfU4NAtC18tUbTqlMr2fC9OIII8y7CVASs X-Received: by 2002:aa7:9521:0:b0:628:4a3:f22c with SMTP id c1-20020aa79521000000b0062804a3f22cmr11410232pfp.31.1679922397972; Mon, 27 Mar 2023 06:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679922397; cv=none; d=google.com; s=arc-20160816; b=YjTnnxILxKN5nH/ZIW1vYNr0Av9701On6DQ4MrQJheP9DEqhr9aFfhGJrdzBeFCwNU FUCmNadFf4+zS+6r4d3w837eFDQ1ahPcAGoRL9QPCAp5KBi7eXZzqZs3ltnnMNX2E0Eb DiMMjbbcQoPFRtASj3HE40XSOzqzyTnG3tixcEZ6AiwZldXpaqng6+BYerEgxShX8R5I 62CZsD+fQUGb2oV7r0bb+78yByvnTP0Ejj7a9HPx8zKc25wNGQ1N9rScau4yhDYheEEM TSGZpyOBG0LCI7nqQGmDYrzkIYlaIBFPMM2G+mH32nUuVoM6HyC7hOWcivDbCZwHipfJ PZNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pPMAUYdbY6hOjN4eQPpp7qBGkZ/ynFVOak8OmetiXdk=; b=XwH8sONeCtOVWOPfB8EAOd+xN4OnKK0iuLCIjBa5/BoWoxkljmXMNFJv/G9/Sf/h0v 7FmnI91t/vx7z6zHv7e7Y/s8IJ/tkFLZiJzXmLGt4oW+HAWfknddEHJTnavbqqmMdqGr LvchwTyvf9ZWOw9WfdCbMrFRGKvVAX35KrwMzjVY92ToreTeJmpwjCDY6kaLnEMUGMH+ iohcsNAZGVRM1b3d4W3n0Rt7H+2l+DynvK0v95JtRspZCeXQdk7SqGtM55lcJmwmbqn3 CVK/CLYU9QMt3gmh1BnnvMqKtAmA9wgATxfE/CWM0IjsUjKrvVIl+Grtf5Ezg5G3DOcq Yx1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=4HE6ljNJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a056a00088300b005dd4ab3a2c3si11352748pfj.182.2023.03.27.06.06.17; Mon, 27 Mar 2023 06:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=4HE6ljNJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232753AbjC0Myg (ORCPT + 99 others); Mon, 27 Mar 2023 08:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232661AbjC0Mxj (ORCPT ); Mon, 27 Mar 2023 08:53:39 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2028198 for ; Mon, 27 Mar 2023 05:53:36 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id s13so4985170wmr.4 for ; Mon, 27 Mar 2023 05:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1679921616; 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=pPMAUYdbY6hOjN4eQPpp7qBGkZ/ynFVOak8OmetiXdk=; b=4HE6ljNJhhUfeGw3+QRq3JZPAil67DC2B30usu9+5rgo4KbvQ/MpHExRYYCNXbNAZP 1x98mjwls3uxyFcs5p/M0pBeSnJi2oDHLbAsutihoz77XcPAw6/mYC5jN3+0ZzpMC/xw V1NJG41VpJ4R8+cdkJhJpJ/NbCyfCA7Ndbpgiqfp1d0+rMy7WqHViPGdjHi0WXXAT5gM yxUom91+GA4T0gXVfaUWRjJK2jn/S0wHSPjfz9eebVrOgEM6oGpsjFBJPaVypHd/T2i5 SM4sgtdTTe466DcP1YiQPSO2QRkmZgt2A4y6bTfJuexlVhqReyZ69fbqb1463N3j9p+f cPXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679921616; 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=pPMAUYdbY6hOjN4eQPpp7qBGkZ/ynFVOak8OmetiXdk=; b=E5eMojRUnyOPDNGwgsEg6lSVsfZqcTrPjGDMMuYSbri1dBDuXKBApKKr1ELmvilS4X ZqwbHDNnid8vWZL8rqH+j7lpejXUdiaeKx7CsF51VXQ14cylO2w+tYn8zStwctbxv+oo q7XMQ3MC5NfNTxPvbPSuShbU5RgXkYHUFPGYl7NjvsgMqp3zyqspAxo5f1G5AbjS3+B1 P6/HihBUJnM4EKe8Y2Lipz5UruFiiRcyNOZjvOG3L72H5Xs+ZsIg2HtEX3rX06iP4Ip7 FaeItRt/zkw+yiBT1CuP3fkHs6r3zhpY1HuSe87Jfp+28KmuKV/gsFk3J4VEAM0W+xCR uKcw== X-Gm-Message-State: AO0yUKWZf+r+kK/VEjE/J/8S7uqUHKjn9kRt4Ce4r9kZD/fkiyaclMHc jiNgVeBVg/iYMML9nALnbLwzMw== X-Received: by 2002:a05:600c:2254:b0:3df:e41f:8396 with SMTP id a20-20020a05600c225400b003dfe41f8396mr9115538wmm.37.1679921616262; Mon, 27 Mar 2023 05:53:36 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:313d:a304:2790:a949]) by smtp.gmail.com with ESMTPSA id q25-20020a1ce919000000b003ee58e8c971sm13572220wmc.14.2023.03.27.05.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 05:53:35 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 18/18] arm64: dts: qcom: sa8775p-ride: add PMIC regulators Date: Mon, 27 Mar 2023 14:53:16 +0200 Message-Id: <20230327125316.210812-19-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230327125316.210812-1-brgl@bgdev.pl> References: <20230327125316.210812-1-brgl@bgdev.pl> MIME-Version: 1.0 X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761526308398580255?= X-GMAIL-MSGID: =?utf-8?q?1761526308398580255?= 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..fdd229d232d1 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 = <2400000>; + 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 the 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>;