From patchwork Wed May 17 18:48:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245535 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 BCC10C7EE2D for ; Wed, 17 May 2023 18:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbjEQStk (ORCPT ); Wed, 17 May 2023 14:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjEQStS (ORCPT ); Wed, 17 May 2023 14:49:18 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [81.169.146.166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 155687D91; Wed, 17 May 2023 11:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349339; cv=none; d=strato.com; s=strato-dkim-0002; b=sMJinl9jPPb4B0BSgKyF3YwlV1bEN92U6d5YDe/D8LjXQ3EjrYEfsipwv+StuYIOBd T04+0KOCC+9I13rXdxynAvik+xU+q3nyP7XriE2e2OCMoEESkcVZxLIeq9kGfHWc5MG6 MTz4xFA46x46eTdoDaytPOC93pPh6Mltg2YFppw+Wytrl81cRqHdlrX4wgf4kYQUYPiN odP7IIe17O6aPaOwf1YhdglPbrduShJXuWtonSUBoc0w/c7CgqZhrxGDqp9DsY+s0PY3 UAoQl8PlUKv0CniWC4vGaYeuBCqchvV8x5Gm1Mpu/xxy4X1lsBrWBlrwzitvm9/oylRA G4+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=l9iE9VGPppJX17kxbqq5MxvFOS7R0avpW6hvgCqt6UPJA/KKHY6/Vr8zRz+K0qFMed 7pTm+7+eSkVobMp62NloCAj7SHjwECwaFxoBVFiX8nH66hSIIAUS5bREhIa+ga/nkPQJ wwEzHlICEspkr48ntrH7bvWiT1jNuBRi3WCGSqpeRCKS4TXXAQjmmdSw6QUb2pWBEj7x CConHBjvIF8EO0eKzzA8sLVjG/5G8BbePBBLfmNwkMoAXCMbDOfB1zrHYWhaIMFe66xc kMbFoFDQ0xioFZFrCUhr4h7FeoZySczHeHvb/9UDF6EeZHk8Hd75VCK+G6amiCjaHMfQ OTBA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=AvOkLwRa+DIkKGqnFyhmHOhsE9yp51vm4ydLkD7wEXOmq40WuGUWF7QBanAJUWIm8l Qy5TJdR1HTGpDHxpVEJvX8flbV7ZQY05l6Uqhu61FhQb6ZUgn8sa5KCpPAKWtuHrXKF8 +4KjD1jZr8iEjbtYsGcrlaXBJ75JWQ5Wn/jjyU1sOdmUiPjm/qYSW3KMmiBvnnr+2pbv d60F5plLbsw0MUsBCzaaBRvr8lOIb4I/QIdwuZ9FKuXWZju6X1hWw++dqoRoKQB82+xc Bgj9pULJ5iwPSbDmx9AB09LITdjMf4SIzJGyAOu+qfGGhQIWtc95J/I1Ez1qMyzYHMsp idsA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=ux2jTm9ywx4RFqZbeoAIFtv1/HNAnykX3Cb1jiyy79kSHIsO22H7hOxPtrUUO8lza0 8KBi76JqA3lw1xxUKIBA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HImwBIG (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:48:58 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:40 +0200 Subject: [PATCH 1/8] arm64: dts: qcom: apq8016-sbc: Fix regulator constraints MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-1-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org For some reason DB410c has completely bogus regulator constraints that actually just correspond to the programmable voltages which are already provided by the regulator driver. Some of them are not just outside the recommended operating conditions of the APQ8016E SoC but even exceed the absolute maximum ratings, potentially risking permanent device damage. In practice it's not quite as dangerous thanks to the RPM firmware: It turns out that it has its own voltage constraints and silently clamps all regulator requests. For example, requesting 3.3V for L5 (allowed by the current regulator constraints!) still results in 1.8V being programmed in the actual regulator hardware. Experimentation with various voltages shows that the internal RPM voltage constraints roughly correspond to the safe "specified range" in the PM8916 Device Specification (rather than the "programmable range" used inside apq8016-sbc.dtsi right now). Combine those together with some fixed voltages used in the old msm-3.10 device tree from Qualcomm to give DB410c some actually valid voltage constraints. Cc: Srinivas Kandagatla Fixes: 4c7d53d16d77 ("arm64: dts: apq8016-sbc: add regulators support") Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 64 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 59860a2223b8..14cb217a13c1 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -447,21 +447,21 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <375000>; - regulator-max-microvolt = <1562000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; regulator-always-on; regulator-boot-on; }; l1 { - regulator-min-microvolt = <375000>; - regulator-max-microvolt = <1525000>; + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; }; l2 { @@ -470,13 +470,13 @@ l2 { }; l4 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; }; l5 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; l6 { @@ -485,45 +485,45 @@ l6 { }; l7 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; l8 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; }; l9 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; }; l10 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; }; l12 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; }; l13 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; }; l14 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; }; /** @@ -531,14 +531,14 @@ l14 { * for mezzanine boards */ l15 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; regulator-always-on; }; l16 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; }; l17 { @@ -547,8 +547,8 @@ l17 { }; l18 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; }; }; From patchwork Wed May 17 18:48:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245575 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 540CAC77B7A for ; Wed, 17 May 2023 19:18:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbjEQTSS (ORCPT ); Wed, 17 May 2023 15:18:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbjEQTSR (ORCPT ); Wed, 17 May 2023 15:18:17 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12EA3AAF for ; Wed, 17 May 2023 12:18:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684351093; cv=pass; d=strato.com; s=strato-dkim-0002; b=FdKkR4z1d/2iQ87qlez5+/FKyUou6K/vaKoTf3yjcBaVililWLCpUOq0jRm9mDfqed O1LSfkMUG3buWSH0vu2C1afkmSPyG1hHFY7/zNVrk5c2C+xrQy5GMpDXUYCO/i+Koxdj ShK8odz1LeA2SK6xSydAWidUemM9Uw9qkP/ohjVeiT4RXDwBcDO23AxJWvZkXMzVVKRP 8d2RULW8flZ83nIua249ToM+sF6afTwVZLrJ9lUdLnGj2E2a+bfnnp9PHg+phxnDP4Cw YHOfnGhLZiZVsbDRGbV3L3Gfk+L2ZF5+dXjC2EHyw9guNIlSK6rzt5QBpHVz4XmvAYo+ FLOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; t=1684351093; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Resent-To: Resent-Date:Resent-From:Cc:Date:From:Subject:Sender; bh=RzJCW5rwyoVlDeXe+0eK8YDHrRyc3l6qHJ+N7bVS/zI=; b=bIKp/mqVJALPY4c5NvDWPbqQ2UAw4otxw+UTn8Qx/wxAQzN+EPPuR9dV9UtkjyE3th RlDCyW1N3YNwwBi0xY5uaZndR8DZ8tR9awHjmGJhxYth4PXoDI8O2oHTjC4wFk5UqYX7 IkAkYI8Jh3Ihpgat0x6p9NNc50EMtijTbSnWrZW1SWqj36tuYI38EUKFPsqVosbj0WfB kH+UuW8nByl7cHF3lDtPAaoSF7WDCGffLfz3h+nz4+2cRUyf9tYU7ptHBSs6fYzDdVqT z/TnQpqKuJBzeEwgfCsM9V/2rf95cP1DiEYrPThbsvYXOV3CPPvsMA2WG1rHx9Ja6qsN noYA== ARC-Authentication-Results: i=2; strato.com; arc=pass (i=1); dkim=pass header.d="gerhold.net" header.s="strato-dkim-0003" header.a="ed25519-sha256"; dkim=pass header.d="gerhold.net" header.s="strato-dkim-0002" header.a="rsa-sha256" X-RZG-CLASS-ID: mo03 X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u261EJF5OxJD4peA8pqP1A==" Received: from gerhold.net by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HJICBKU (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Wed, 17 May 2023 21:18:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1684349339; cv=none; d=strato.com; s=strato-dkim-0002; b=ASCmdiWWzS0b3pRvrBe/Dy6eCVgG6v1Jt2Y1imDVbieCBQWvE2ypYViMSFbFyQtqzp Cn1L6oZt7pFH6W3Vc1n2Y32+tY5iXQ6b09qjd3X1EPrjnDPbn5MeVLSCRpSnlmUQ6kn2 2i7TWH71E5Iubh+s/9vQA7UmU4KELJDTrGCoptP0nm0oMz9TuwBfvXF/ATcEnrnuadif 5HfZHLO4f63X66NwVNq7EIiocKcLQxKyPfYqQNXdKtdSyUgU4SO0YiMCC8K2/0wUL/Qr EPsGTpybw9gBwg9jy5LGZ4YkhNIYYzKXeZsuIwEH5G/HOR9gC+p9H5tWEH8DN16FoO/2 7VGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=RzJCW5rwyoVlDeXe+0eK8YDHrRyc3l6qHJ+N7bVS/zI=; b=fgD6GHh0OhHwm8AT3NwU862+nB1Rd0F9scy6Q1C6d/hEXrSpYYnLUh2Kfp99Z/URub ezzkiL1ggPBaeV67ZMiIMGs7XG/rWYWpzxHpMp7emIxh3/4wlb7iMh2C9nVpkXCvFjvF LCmZebNxPhw7YlolnvQcz2VtE9Ehg01/SocDPRRghRXcu5jSmh4S9FuPMQH/wYdZ2fp3 1zaXzZ9YPYlb9aiDL3T23KPfBfmV1cQFwmno8npZsNho3wfaoWrj2BPXVTweLNoTPuyN OYIMv9n+McRZepXue7yjoIUj7rz5lSFlMqy9hVcYz8w7lDp+xLOby5YnmDKsIcGh+PJn g3lw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=RzJCW5rwyoVlDeXe+0eK8YDHrRyc3l6qHJ+N7bVS/zI=; b=MHx0fU3xUzR0hAfPbNFvNsGRQszoKFnA9tSjffcMXrzEcc/nCrgriLJhxDxfK30//h BzTMlReFERxsWqJvCCs8Ufq/KiVkTo5TkjM4YoVT9TRC9fXne2+IqOQuN9qo5OLZbgcX nmgse71lwiFfKXQGTL9symTg5Mqx7Zyflxir3MPMLsHKVwLUNdGZ1pKoazJr0ElAQWtw KHuYNnddvJRUh8ZszcoedsIUT5cScBU+olRCeThEPJfCHBwGfymlhyKzztcOSF1jAnDd pqP1BUc1kcqbWyBLOkthr9r31tg7bHMjtnKBwdHyXyWPVh3QWc765utwmtOMwdncjYXT AgpQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=RzJCW5rwyoVlDeXe+0eK8YDHrRyc3l6qHJ+N7bVS/zI=; b=y+kfvhbZa25zvhvqx2ZBcZyCb6X8U6/Ihi0wmYScLC+CVkXegzVCvypL0QSf6kNfrQ j2JbQGdcXlt6qHHGSRAQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HImxBIH (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:48:59 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:41 +0200 Subject: [PATCH 2/8] arm64: dts: qcom: apq8016-sbc: Fix 1.8V power rail on LS expansion MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-2-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The 96Boards specification expects a 1.8V power rail on the low-speed expansion connector that is able to provide at least 0.18W / 100 mA. According to the DB410c hardware user manual this is done by connecting both L15 and L16 in parallel with up to 55mA each (for 110 mA total) [1]. Unfortunately the current regulator setup in the DB410c device tree does not implement the specification correctly and only provides 5 mA: - Only L15 is marked always-on, so L16 is never enabled. - Without specifying a load the regulator is put into LPM where it can only provide 5 mA. Fix this by: - Adding proper voltage constraints for L16. - Making L16 always-on. - Adding regulator-system-load for both L15 and L16. 100 mA should be available in total, so specify 50 mA for each. (The regulator hardware can only be in normal (55 mA) or low-power mode (5 mA) so this will actually result in the expected 110 mA total...) [1]: https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/hardware-docs/hardware-user-manual.md.html#power-supplies Cc: Srinivas Kandagatla Fixes: 828dd5d66f0f ("arm64: dts: apq8016-sbc: make 1.8v available on LS expansion") Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 14cb217a13c1..3ec449f5cab7 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -526,19 +526,27 @@ l14 { regulator-max-microvolt = <3300000>; }; - /** - * 1.8v required on LS expansion - * for mezzanine boards + /* + * The 96Boards specification expects a 1.8V power rail on the low-speed + * expansion connector that is able to provide at least 0.18W / 100 mA. + * L15/L16 are connected in parallel to provide 55 mA each. A minimum load + * must be specified to ensure the regulators are not put in LPM where they + * would only provide 5 mA. */ l15 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-system-load = <50000>; + regulator-allow-set-load; regulator-always-on; }; l16 { regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; + regulator-max-microvolt = <1800000>; + regulator-system-load = <50000>; + regulator-allow-set-load; + regulator-always-on; }; l17 { From patchwork Wed May 17 18:48:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245536 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 67037C7EE31 for ; Wed, 17 May 2023 18:49:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229624AbjEQStl (ORCPT ); Wed, 17 May 2023 14:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbjEQStR (ORCPT ); Wed, 17 May 2023 14:49:17 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D18C76BA; Wed, 17 May 2023 11:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349339; cv=none; d=strato.com; s=strato-dkim-0002; b=Yiez2FwUfKE5YcDJD3TJ1RiTTYaROAolh/7BpXVlL53PGsiVl0ELTfp/Tn82uUgCyq r2nyIQ9dDZ5WahkI21OjShrtJHsuL1gb8iLU3I/vr4gv/gXvxEHO5qOKhSBw98ntKSqF qVisqzinmwe5q/toSX6cddtYsQVGa0juZw16VyhmLC61xNd26FxxOVend1Mo/ptfTXmv zSLk4CU6IWREE94uVijpZfSYauYCCS7tvDvTHfz+YAO5vGn+3Fzh0UT2uD23/7EoXFEz g3Y9wQi9cJ8F5mkrfI04qMpBg+ke6YnyuAYVzn4zvDffCjMXhhlUkM9DMWaWSZX8Wb0z /syA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Q72gAZwrgAyQdwaXPFWfknvMiEMn9jleNzwpNjYRXJI=; b=DjOJF8/aJcqJdksbZj/gHTZ7/T169cEYGnwyuOXHRcXtTwdOscsoKHWRy1VqP5IkOy z1aD7N0v2krrtIfGwfhASkl3vHnjDeeBdxSlUYjs+VgGgvlEvCD9E9qK4SR4HNnxGMbj BNws3Dgc6mpLxZWS8JxeMPqrJWI+8HVFjJKB+gdVZ2bpWY6GUi2FrNjYpianyQcxknYn rShDSaS8FLeAvuHxd6bvkJnM4pVchTAlMG2tTG6BtdsHOk4HQVm0Nz/9QoltfHlT/dlb Ckj1Eqc14u2xmkW6zlf4c20Ja/ewY0FSj3Jhgukk2WvuU/C8bI+459B1wq5fSb3wklCE 5Epw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Q72gAZwrgAyQdwaXPFWfknvMiEMn9jleNzwpNjYRXJI=; b=XkHgje8nuyn2G+j61Q+t24/8AaQJYiq6pR2yVphDonOpQ5SDy4jIEJizk/KCkKyXUs Ybflzpv6znyY0CZIwUPO/+fscnj/Jo9nV5Tcwk3h3lrpoEbPgfDzNO7OolUImxZkY0Pj UXSi4OrMBRQZgO9GgXZtbQBySRkn6/8g5SStqtpG0DpDb984U5ECrOl1NIG9I3VUgzYw 3niZPSI0I0AfwiClU4XmoitfCkCyqri4ioZ5d+bbl90eOYXDqTIQCtKMpHuq3kqnMzsr MEgvJV8Fl+Kcr7r41/TOIRnEVHw10i+lUn4p148k8/wVbCmaKr2x2CF6e6DQL+n71S/F a4jg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Q72gAZwrgAyQdwaXPFWfknvMiEMn9jleNzwpNjYRXJI=; b=e5+Uj/LbKfEEVgneV3pW0tHh7M5/ry6Qh2RjxjNZ3pDTdNCG1ZAzDXttglV5NNVkDe 4bGTJlQaKlXHGotbnpAw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HImxBII (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:48:59 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:42 +0200 Subject: [PATCH 3/8] arm64: dts: qcom: msm8916: Fix regulator constraints MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-3-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The regulator constraints for most MSM8916 devices (except DB410c) were originally taken from Qualcomm's msm-3.10 vendor device tree (for lack of better documentation). Unfortunately it turns out that Qualcomm's voltages are slightly off as well and do not match the voltage constraints applied by the RPM firmware. This means that we sometimes request a specific voltage but the RPM firmware actually applies a much lower or higher voltage. This is particularly critical for pm8916_l11 which is used as SD card VMMC regulator: The SD card can choose a voltage from the current range of 1.8 - 2.95V. If it chooses to run at 1.8V we pretend that this is fine but the RPM firmware will still silently end up configuring 2.95V. This can be easily reproduced with a multimeter or by checking the SPMI hardware registers of the regulator. Fix this by making the voltages match the actual "specified range" in the PM8916 Device Specification which is enforced by the RPM firmware. Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue Reviewed-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 12 ++++++------ arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 14 +++++++------- arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts | 12 ++++++------ 13 files changed, 89 insertions(+), 89 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts index 13cd9ad167df..0d517804e44e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts @@ -159,13 +159,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -199,7 +199,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -209,12 +209,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-system-load = <200000>; regulator-allow-set-load; diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index fecb69944cfa..ddd64cc46998 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -201,13 +201,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -241,7 +241,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -251,12 +251,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts index 91284a1d0966..982457503a3c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts @@ -169,13 +169,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -209,7 +209,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -219,12 +219,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts index 525ec76efeeb..9584d271c526 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -159,13 +159,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -199,7 +199,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -209,12 +209,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-system-load = <200000>; regulator-allow-set-load; diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts index 5b1bac8f5122..baa7bb86cdd5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts @@ -322,13 +322,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -372,12 +372,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index f1dd625e1822..68d1b76aaf77 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -273,13 +273,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -313,7 +313,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -323,12 +323,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts index b79e80913af9..5ef51d3e9098 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts @@ -140,13 +140,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -180,7 +180,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -190,12 +190,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 16d67749960e..b362a76eebc9 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -285,13 +285,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -325,7 +325,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -335,12 +335,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 74ffd04db8d8..4464beeeaab1 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -168,13 +168,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -208,7 +208,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -218,12 +218,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-system-load = <200000>; regulator-allow-set-load; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index adeee0830e76..6e231e92e675 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -134,13 +134,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -174,7 +174,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -184,12 +184,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index 1a41a4db874d..fa5b330aaeae 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -326,13 +326,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -366,7 +366,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -376,12 +376,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index 50bae6f214f1..b27896e83a0e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -132,13 +132,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -172,7 +172,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -182,12 +182,12 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1800000>; + regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; regulator-system-load = <200000>; regulator-allow-set-load; diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts index ac56c7595f78..78020a0db4e4 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts @@ -194,13 +194,13 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2100000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; }; l1 { @@ -234,7 +234,7 @@ l7 { }; l8 { - regulator-min-microvolt = <2850000>; + regulator-min-microvolt = <2900000>; regulator-max-microvolt = <2900000>; }; @@ -244,7 +244,7 @@ l9 { }; l10 { - regulator-min-microvolt = <2700000>; + regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; }; From patchwork Wed May 17 18:48:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245539 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 89CDBC7EE2A for ; Wed, 17 May 2023 18:52:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbjEQSwv (ORCPT ); Wed, 17 May 2023 14:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjEQSwc (ORCPT ); Wed, 17 May 2023 14:52:32 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B4CFD2CB; Wed, 17 May 2023 11:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349340; cv=none; d=strato.com; s=strato-dkim-0002; b=JE2a4Q39VW0eBS9d63No9rcptrfd78Cm6kliAwVABGOjR5dZRTUXyOzyK4vEUFi9rW MYH7b+gdvfzscwAwYUKOduyOO0XFp5Y5hE9skriOGfAIc6nDu/aA/zN50Wd3jUhoiNPh uSmMtWD9vVNmsF/Jrj27bpNLkBinvaHyrPX1R9bikaXRImbYfJQAb3j/HV20H4jtFDhU v0bSj7RrFBhQxpihoJHpaYe85EMzG7Rc15U7htZZRmIrJOyFby41rbB6//wKYyJImYwj 7T8kOQ5iJaMzzM1MlMCzELGUuo3ndcPQnusjoSbHmSRLR3eKtMf3hsYUDF5maTHnb6mL IR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=kSDibsfXvcjxJwPSa/CVD/6nKN31PibjUuNmZSeTZYGLQWHHFFkk6DQy8kiLmXP8uN CTXZIJk7dR8BenEmZ7fBZoA5nmUVOigkHwsjGihEEmdlUK6hsEuE8Wws9iIxpv5c1Y8I 0p1YEMGYnEOj87bqQRIGXqLUpiQEn7gFkmOa3vH76PJVRg0pXz9o+j+W/e9GF3N8OJx4 ssSCaYX6PldcJuwvG/aJ9mzONHvLgqgj2Qkm1ei4CDahaYXnJbIJfUaaBb6Akbt0XQVU iGGG32uhcH6NUtm6S9KKKgbFL6CDHAsFHh3n7JS4G8z6usuWgnWoDCxg7TL/Ml08gCfg 3caA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=GFgFhZ1nwokA3Dz5QjEQ+MYK2yVkN+w0pDpRhCcxATBdZsFIpJxUBuMvlq4fwS+t13 ECAMuZPmvfbHyiIUpl+kYChefB2uJDPNbWIja85/YNznmdBPVxBuDNbt2Coq0r6P8Uyd fsW2cPpnrVZeCXb2YfXvCXPxoXRVDZbjEv1uSB2RzWbXaPbUdNlY0nRI8v/txg94a7LB Te1WOMUNywVNXVZJPl/luEawwT3t6XfXceqXwt36KWhMpUpB0TO5dbpj8rpqgDTeBbsa bbchM3V0A249Zx7CCKu5vss8GEcYOLm0pjiyI69K1+tsczge+xytSpqial68c/j6bkhH Ek9Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=eBw36avkcF1NlC9Q+AdC60Ya2duLHm1SSkGCgO+Ot6IewiweDC5FUg8UueKAy5VqPr SLoDoKCDF0FjMZdHOlAg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HImxBIJ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:48:59 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:43 +0200 Subject: [PATCH 4/8] arm64: dts: qcom: msm8916: Disable audio codecs by default MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-4-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Not every device has something connected to the digital audio codec in MSM8916 and/or the analog audio codec in PM8916. Disable those by default so the hardware is only powered up when necessary. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 5 +++++ arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 5 +++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8916.dtsi | 1 + 4 files changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 3ec449f5cab7..7d7af6406c39 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -310,6 +310,10 @@ &lpass { status = "okay"; }; +&lpass_codec { + status = "okay"; +}; + &mdss { status = "okay"; }; @@ -399,6 +403,7 @@ &usb_hs_phy { }; &wcd_codec { + status = "okay"; clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "mclk"; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts index baa7bb86cdd5..8197710372ad 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts @@ -218,6 +218,10 @@ &lpass { status = "okay"; }; +&lpass_codec { + status = "okay"; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -302,6 +306,7 @@ &usb_hs_phy { }; &wcd_codec { + status = "okay"; qcom,micbias-lvl = <2800>; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; qcom,mbhc-vthreshold-high = <75 150 237 450 500>; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 7e0fa37a3adf..d5081a356288 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -1551,6 +1551,7 @@ lpass_codec: audio-codec@771c000 { <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "ahbix-clk", "mclk"; #sound-dai-cells = <1>; + status = "disabled"; }; sdhc_1: mmc@7824000 { diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index f4fb1a92ab55..33ca1002fb75 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -178,6 +178,7 @@ wcd_codec: audio-codec@f000 { vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; vdd-micbias-supply = <&pm8916_l13>; #sound-dai-cells = <1>; + status = "disabled"; }; }; }; From patchwork Wed May 17 18:48:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245532 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 03FE8C77B7D for ; Wed, 17 May 2023 18:49:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229564AbjEQStQ (ORCPT ); Wed, 17 May 2023 14:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjEQStP (ORCPT ); Wed, 17 May 2023 14:49:15 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B38C37ED0; Wed, 17 May 2023 11:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349340; cv=none; d=strato.com; s=strato-dkim-0002; b=Kb9ATq8cgnXihHjfx6fsgp545NsgOhevt6NK59jICYosRWQQjB+oDeaBgAmz3YUv/F rrJ8ifUUyy2h54Tezj6E4bHCJjOLzmXo+jY6feM20gIT32XhHCeRJUkIFbgYW5W8DeRI 38rfd7gd4ErtLAw19pDdIlu23Ix89Vjv2ODY/vjCSLgqT3CjY2WtNFZpnIoonVBSh2NI MJiO+jGC2kdAudWYUQEoXHvtr4rUcVyvsLrE8cDx9BnLsQzn+KgBr7rrRxn2igF2RBqA PfsW1p/hy3ri5CQA/sC3V3F0caRCgeulqD9KSrw1bcm14QKOLu7OgvWJI+ZnESWZGj9f VsaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Hk0tnh+hTFfXKNgIR8FDn7Sblt76hroYTDj/mKNNR1U=; b=IbhyqwmZB+GRWuBmqxUHV6/7KvrYehwnlSoA5//qh2md76i1LMDu7xIzwW+BRkfA8H VsWFasmTnijAkS/gZP97S4yX8iq8CX7NRoR01EkMsDiK0276OvDQLFySLhkAk4fd8BxQ 5Q2WpGllRLcFEzq9y8SRlHes7AMYcyS/58oIEakNXNdqBQ1XSpnczzaMZUIfyXIy40Uh 4cARroRRv1Xu1oc/DS0VI+c+JPgY3wjUqGxf7LRz7k3Pmnl9oQquuHDlEPyMz5zLmu8t GZHhSghQDrlOyK4zy6IAkVxa/65Ef46V6a6p1PkSOa3K2YfXQb0BA5SxiRBCl2IALmPh 6X2w== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Hk0tnh+hTFfXKNgIR8FDn7Sblt76hroYTDj/mKNNR1U=; b=FuMhPSALi43p29a5Ao0/R+2Qd+Ai31Wx8Fz40DqN7O6lgcFt4FczM5bT5WPWT5WTOd r0apNc0tWpOjoQgQiEIxF5hMtcV12Iy1WZt/K1Na4sw4EYg6d0UWZhWwXzR7sG8y17lz DXgDzIkdVP22cE32kPO1qAMvfUkwyoFxse4g37uan/NxWz83agwKE0FgvHeULk1o07HZ Nj3vt+YI+tZq8B/gtmKbQkP3YpDYI1VAsUS+wI3MGhsif/jglB3jVjdK3pMNYfe8oEGQ ImvzfA//Si4Y2PRekd4F2oBuU3mDuPFJ4uSpsm1/66wIW0Q1J9SErapdcIL105Cip5yZ CIRw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Hk0tnh+hTFfXKNgIR8FDn7Sblt76hroYTDj/mKNNR1U=; b=T6KLFs+R/4k17oV4zYUqxypHzQbT+n7RhhsR86eGWBtiyqRPJsdSx2m4/NFlXpDJ04 uCifT7ErmnAAuOojcLCQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HIn0BIK (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:49:00 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:44 +0200 Subject: [PATCH 5/8] arm64: dts: qcom: pm8916: Move default regulator "-supply"s MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-5-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Some of the power supplies for the analog audio codec in PM8916 are wired externally. While most boards use the regulators currently specified in pm8916.dtsi, in theory it could be connected differently. We already have msm8916-pm8916.dtsi that models that standard setup used by most devices so move the -supply properties there and keep the base pm8916.dtsi independent. Currently all MSM8916 boards in mainline make use of msm8916-pm8916.dtsi, so it is not necessary to adjust any other boards. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi | 6 ++++++ arch/arm64/boot/dts/qcom/pm8916.dtsi | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi index 6eb5e0a39510..5b3ed7137e1f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi @@ -35,6 +35,12 @@ &usb_hs_phy { v3p3-supply = <&pm8916_l13>; }; +&wcd_codec { + vdd-cdc-io-supply = <&pm8916_l5>; + vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; + vdd-micbias-supply = <&pm8916_l13>; +}; + &wcnss { vddpx-supply = <&pm8916_l7>; }; diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index 33ca1002fb75..864bb1cd68db 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -174,9 +174,6 @@ wcd_codec: audio-codec@f000 { "cdc_ear_cnp_int", "cdc_hphr_cnp_int", "cdc_hphl_cnp_int"; - vdd-cdc-io-supply = <&pm8916_l5>; - vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; - vdd-micbias-supply = <&pm8916_l13>; #sound-dai-cells = <1>; status = "disabled"; }; From patchwork Wed May 17 18:48:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245533 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 7C7FAC7EE23 for ; Wed, 17 May 2023 18:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229701AbjEQStQ (ORCPT ); Wed, 17 May 2023 14:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjEQStP (ORCPT ); Wed, 17 May 2023 14:49:15 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F215983C2; Wed, 17 May 2023 11:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349340; cv=none; d=strato.com; s=strato-dkim-0002; b=M5GWUMN0EEzPZsLNvNrjnO0io3WTqLo/6vRK8PdlVP19uH0N+L7dBR1QTCLF1aoLos iPifJcKiWWJ+XaCqRFCpPZgYSvNyWSYVjNBuwl7fLY8jrs7amEhsErcpeEy0h064Fk1g 4da34HdjZnZPnFjruU2nGa/jf6kvB2vHmPgOwynBqH+vcGUFDmCDKc5UyxQ7MdPRyIkg 9SWPOAYGSx0+qvNl1FxfxJQDFvLNw3Sk7HA3q8p8c4fya7yM+ulsOFGcC9gblWxIyU4T tuci2ouAwA8Q9UrrQCTOs+CxU+ik59LiVK+Ycje9dFnvrIQcCNrHhlzWFsQSpOBMTDe6 Z7jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=ZrQjSgU14tTkQLjGaI27JNsEFdquU2ofszinBct+ih8u+m6V+iyH/Iz06a6/0OeiP9 F2dbtalio7fup8yoP07PJ7bm8NopjWXmn4JSUZ/Pz8FH6CHYn8YcT+NSWyZw33kxOYDc by+BUceSVFK3F/WkgjrS/rG8zeoCoY62iXtTad5gGlp2NMZUBj9QYz18DyoTCJekK/vF UfByQGfabNDl/daxEcI/lHIKSlaXFq+oOwkAmGe2WlCGsfjjqm3LcXQoyu0ZMZgK5JKb 7QDa+pZF05dqqldUAdurVFmwLmapTe6bJBNYUHJWcMzdNWwBJEo6/HrHbobTPML0vRl6 ghIQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=qdGYTiHVtvluXOGpep78DSShguuxZ80kFTKXgo9OTaylv1U8lALmsG90J+iP5TWFS2 mrR5UJheywZsgPhswC9qNKSV0t6l2tNHcCahOmxbyK22GbYWtTymw1CH6kfaJCoLAZaf Pa6Tu6zVmPeKJCIl67j7iLFBSsIk00sFEltEfQN4FmAmzbpl9KZGjoo3gi9CqqRyMEM1 57W4T9wQ3/vjSXkBWqTqs05KIxTi0thPuDIjXV4CSzoPnxRkbgCpreub9f3FxfQo6C43 xpvGvZWdAA0NCYuC4xpjVO1aFgIHmzZ1+YfGeUVEd3B2gNbW2AXYHThsjGTT5K9AbMYo xVHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=NWPhlgBodgHN9M+vyxAZFodMqB2pmWiLsFRlYycKbzZ/9U391Mx1bvNqxXdY0hGoum ll1dkGM7W/IMtHzmxLBw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HIn0BIL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:49:00 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:45 +0200 Subject: [PATCH 6/8] arm64: dts: qcom: msm8916-pm8916: Clarify purpose MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-6-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Goal of the msm8916-pm8916.dtsi is to reduce the boilerplate necessary to create a device tree for a typical board with the MSM8916 SoC combined with the PM8916 PMIC. > 99% of all MSM8916 boards use the same standard setup where many of the PM8916 regulators have a fixed purpose and only some are left up for board-specific use. While MSM8916 (and perhaps MSM8939 soon) is currently the only platform with such an include, it has definitely proven useful. With more than 30 boards using it (not all of them upstream yet) it simplifies the review a lot and reduces the chance of configuring the standard components incorrectly. In preparation of extending its scope slightly, add a comment at the top that clearly explains what the .dtsi represents and when it should (or should not) be used. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi index 5b3ed7137e1f..29ef46c33350 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi @@ -1,4 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-only +/* + * msm8916-pm8916.dtsi describes common properties (e.g. regulator connections) + * that apply to most devices that make use of the MSM8916 SoC and PM8916 PMIC. + * Many regulators have a fixed purpose in the original reference design and + * were rarely re-used for different purposes. Devices that deviate from the + * typical reference design should not make use of this include and instead add + * the necessary properties in the board-specific device tree. + */ #include "msm8916.dtsi" #include "pm8916.dtsi" From patchwork Wed May 17 18:48:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245538 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 889A9C7EE2D for ; Wed, 17 May 2023 18:49:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229511AbjEQStm (ORCPT ); Wed, 17 May 2023 14:49:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjEQStX (ORCPT ); Wed, 17 May 2023 14:49:23 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38FF69008; Wed, 17 May 2023 11:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349341; cv=none; d=strato.com; s=strato-dkim-0002; b=OV31iI3x0nlwBnbEIpE9MUjiiWqsibIr8j1rn8E3FCDfuvirf/ImBVicPzUKC+If8U rDWlTccv/e9Y6iVGRaB8FGlPefKKO2d0e1YIXV1AOpsk9v2VEi4YcTDU3i1wXGFhfa0M DzPTh+sAp0LmA4C8mc1bG1NkNaUn68e7BZjHQIX/hvZ6KH2Y0SU48496XwULkcB+LQhL +xtJHvZ6pV3lQF4do840pqzKa0q6yFgMcXPzpFsOYlwovgykGj/RsmIx99ED8OZ3DH2H zLtXsv553L5765A6pVjiMNi4+6s7xb0cIYcNyuYdv79kInvDg8A0+8rghczgjMxMSlkV uSRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349341; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=PXWpZ5tgEqKeOEf/ZUamMeA78U8Yjuz6DbwWWDB6Tcc=; b=i5S957B2h+oH5CJaJXGO9OVfN8G24YAzzx/+GbEqLp8SUaTT3On2e6SvGymnQid3p+ jUoEX1mczoa2OEYjNHZNXANKvfvRi5w02q/WLGLVhPySrD12LQ/+xOBFzPfax8+IHGD1 LiyQBlW4eS0g+wcait2BteFhTUTyEvgcT+7kgDR6Vq9JWHZHWX7CHva0GmZbP4ygDOnJ x6FqQZH71AkxxegCuvsQ+D97SnKkKttIcJ5DPR3DkNqV0DVGXAwrrQ86Y0d4b3nfGjYR Plq3rj+TMLtSmudN6JW0XZ0WPFDm4BJvHZAM69qE+6YmAwMwAEmLilPi8zSBYnMOWqA5 hx7g== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349341; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=PXWpZ5tgEqKeOEf/ZUamMeA78U8Yjuz6DbwWWDB6Tcc=; b=E8bG6F08JRCmf/mBC9vQMn+pkFLh3H7P8GxMM8vf7ROZzRjX4tsvguQyAlf2xDfQTy +pkzQqcWfkRLiCis/r92HupgiMrUaMGR8mgFotRN2Nmto9JLzcpZKORN94uX9MDop8Jv 76Ai+hyhBdSErbmNc759i3cYZvNIrpF78CjDYiSuSHYKEGX1+HRYZt4HDS9IiUZ/ua4c KBeOOYto/AU8f6Fscgn9dyCQKuZTtQmvdAl6VskCkbgsTCqgFoamlXi74paJNwovz8KT +1kW7oW1Tt+o2GPC81OKa38yfPYh0UXcc/NTOlHQ3Y+HgFoc13jdnuXeO7L/DMVJ4Xhn /WQw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349341; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=PXWpZ5tgEqKeOEf/ZUamMeA78U8Yjuz6DbwWWDB6Tcc=; b=RmoURF0XycPOKiDDofEWa/4jQhruYKrYBMF7pmmRrn+UaYnaJ9GDYkn7VwefPOEnPO 4Y5JMEesTZ7k008bppDA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HIn0BIM (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:49:00 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:46 +0200 Subject: [PATCH 7/8] arm64: dts: qcom: msm8916: Define regulator constraints next to usage MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-7-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Right now each MSM8916 device has a huge block of regulator constraints with allowed voltages for each regulator. For lack of better documentation these voltages are often copied as-is from the vendor device tree, without much extra thought. Unfortunately, the voltages in the vendor device trees are often misleading or even wrong, e.g. because: - There is a large voltage range allowed and the actual voltage is only set somewhere hidden in some messy vendor driver. This is often the case for pm8916_{l14,l15,l16} because they have a broad range of 1.8-3.3V by default. - The voltage is actually wrong but thanks to the voltage constraints in the RPM firmware it still ends up applying the correct voltage. To have proper regulator constraints it is important to review them in context of the usage. The current setup in the MSM8916 device trees makes this quite hard because each device duplicates the standard voltages for components of the SoC and mixes those with minor device-specific additions and dummy voltages for completely unused regulators. The actual usage of the regulators for the SoC components is in msm8916-pm8916.dtsi, so it can and should also define the related voltage constraints. These are not board-specific but defined in the APQ8016E/PM8916 Device Specification. The board DT can then focus on describing the actual board-specific regulators, which makes it much easier to review and spot potential mistakes there. Note that this commit does not make any functional change. All used regulators still have the same regulator constraints as before. Unused regulators do not have regulator constraints anymore because most of these were too broad or even entirely wrong. They should be added back with proper voltage constraints when there is an actual usage. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 153 +++++---------------- arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts | 115 ++-------------- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 110 +-------------- arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 110 +-------------- arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts | 110 +-------------- arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 120 +++------------- .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 110 +-------------- .../boot/dts/qcom/msm8916-longcheer-l8910.dts | 110 +-------------- arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi | 102 +++++++++++--- .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 110 +-------------- .../boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 110 +-------------- .../boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 103 -------------- .../boot/dts/qcom/msm8916-samsung-serranove.dts | 103 -------------- arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 103 -------------- .../boot/dts/qcom/msm8916-wingtech-wt88047.dts | 119 +++------------- 15 files changed, 210 insertions(+), 1478 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 7d7af6406c39..ab8dfd858025 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -329,6 +329,40 @@ &pm8916_resin { linux,code = ; }; +&pm8916_rpm_regulators { + /* + * The 96Boards specification expects a 1.8V power rail on the low-speed + * expansion connector that is able to provide at least 0.18W / 100 mA. + * L15/L16 are connected in parallel to provide 55 mA each. A minimum load + * must be specified to ensure the regulators are not put in LPM where they + * would only provide 5 mA. + */ + pm8916_l15: l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-system-load = <50000>; + regulator-allow-set-load; + regulator-always-on; + }; + pm8916_l16: l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-system-load = <50000>; + regulator-allow-set-load; + regulator-always-on; + }; + + pm8916_l17: l17 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&pm8916_s4 { + regulator-always-on; + regulator-boot-on; +}; + &sdhc_1 { status = "okay"; @@ -446,125 +480,6 @@ &wcnss_iris { &stm { status = "okay"; }; &tpiu { status = "okay"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - - regulator-always-on; - regulator-boot-on; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - /* - * The 96Boards specification expects a 1.8V power rail on the low-speed - * expansion connector that is able to provide at least 0.18W / 100 mA. - * L15/L16 are connected in parallel to provide 55 mA each. A minimum load - * must be specified to ensure the regulators are not put in LPM where they - * would only provide 5 mA. - */ - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-system-load = <50000>; - regulator-allow-set-load; - regulator-always-on; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-system-load = <50000>; - regulator-allow-set-load; - regulator-always-on; - }; - - l17 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - /* * 2mA drive strength is not enough when connecting multiple * I2C devices with different pull up resistors. diff --git a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts index 0d517804e44e..753413b48751 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts @@ -114,6 +114,18 @@ &pm8916_resin { status = "okay"; }; +&pm8916_rpm_regulators { + pm8916_l16: l16 { + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; + }; + + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_vib { status = "okay"; }; @@ -153,109 +165,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-system-load = <200000>; - regulator-allow-set-load; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index ddd64cc46998..4bfbad669b1e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -156,6 +156,13 @@ &pm8916_resin { linux,code = ; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_vib { status = "okay"; }; @@ -195,109 +202,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { accel_int_default: accel-int-default-state { pins = "gpio31"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts index 982457503a3c..37755e885395 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts @@ -128,6 +128,13 @@ &blsp1_uart2 { status = "okay"; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &sdhc_1 { status = "okay"; @@ -163,109 +170,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio117"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts index 9584d271c526..4a6bf99c755f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts @@ -114,6 +114,13 @@ &pm8916_resin { status = "okay"; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_vib { status = "okay"; }; @@ -153,109 +160,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-system-load = <200000>; - regulator-allow-set-load; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { camera_flash_default: camera-flash-default-state { pins = "gpio31", "gpio32"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts index 8197710372ad..29aaa35438a3 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts @@ -222,11 +222,28 @@ &lpass_codec { status = "okay"; }; +&pm8916_l8 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; }; +&pm8916_rpm_regulators { + pm8916_l16: l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_vib { status = "okay"; }; @@ -321,109 +338,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { accel_irq_default: accel-irq-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index 68d1b76aaf77..b7b1f1ceaf1f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -223,6 +223,13 @@ &pm8916_resin { linux,code = ; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_usbin { status = "okay"; }; @@ -267,109 +274,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { accel_int_default: accel-int-default-state { pins = "gpio116"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts index 5ef51d3e9098..d1eb3f2ecf3f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts @@ -95,6 +95,13 @@ &pm8916_resin { linux,code = ; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_vib { status = "okay"; }; @@ -134,109 +141,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { button_backlight_default: button-backlight-default-state { pins = "gpio17"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi index 29ef46c33350..b38eecbd6253 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi @@ -61,30 +61,92 @@ &wcnss_iris { }; &rpm_requests { - smd_rpm_regulators: regulators { + pm8916_rpm_regulators: regulators { compatible = "qcom,rpm-pm8916-regulators"; + vdd_l1_l2_l3-supply = <&pm8916_s3>; + vdd_l4_l5_l6-supply = <&pm8916_s4>; + vdd_l7-supply = <&pm8916_s4>; /* pm8916_s1 is managed by rpmpd (MSM8916_VDDCX) */ - pm8916_s3: s3 {}; - pm8916_s4: s4 {}; - pm8916_l1: l1 {}; - pm8916_l2: l2 {}; + pm8916_s3: s3 { + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; + }; + + pm8916_s4: s4 { + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; + }; + + /* + * Some of the regulators are unused or managed by another + * processor (e.g. the modem). We should still define nodes for + * them to ensure the vote from the application processor can be + * dropped in case the regulators are already on during boot. + * + * The labels for these nodes are omitted on purpose because + * boards should configure a proper voltage before using them. + */ + l1 {}; + + pm8916_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + /* pm8916_l3 is managed by rpmpd (MSM8916_VDDMX) */ - pm8916_l4: l4 {}; - pm8916_l5: l5 {}; - pm8916_l6: l6 {}; - pm8916_l7: l7 {}; - pm8916_l8: l8 {}; - pm8916_l9: l9 {}; - pm8916_l10: l10 {}; - pm8916_l11: l11 {}; - pm8916_l12: l12 {}; - pm8916_l13: l13 {}; - pm8916_l14: l14 {}; - pm8916_l15: l15 {}; - pm8916_l16: l16 {}; - pm8916_l17: l17 {}; - pm8916_l18: l18 {}; + + l4 {}; + + pm8916_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8916_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8916_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8916_l8: l8 { + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; + }; + + pm8916_l9: l9 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + l10 {}; + + pm8916_l11: l11 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; + }; + + pm8916_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8916_l13: l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + l14 {}; + l15 {}; + l16 {}; + l17 {}; + l18 {}; }; }; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index b362a76eebc9..37a872949851 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -252,6 +252,13 @@ &pm8916_resin { linux,code = ; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &sdhc_1 { status = "okay"; @@ -279,109 +286,6 @@ &usb_hs_phy { extcon = <&muic>; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 4464beeeaab1..a49e1641e59b 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -120,6 +120,13 @@ &pm8916_resin { status = "okay"; }; +&pm8916_rpm_regulators { + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + /* FIXME: Replace with MAX77849 MUIC when driver is available */ &pm8916_usbin { status = "okay"; @@ -162,109 +169,6 @@ &wcnss_iris { compatible = "qcom,wcn3660b"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-system-load = <200000>; - regulator-allow-set-load; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { accel_int_default: accel-int-default-state { pins = "gpio115"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index 6e231e92e675..6192d04a58ae 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -128,109 +128,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { gpio_hall_sensor_default: gpio-hall-sensor-default-state { pins = "gpio52"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index fa5b330aaeae..fc4c61c4e1e6 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -320,109 +320,6 @@ &wcnss_iris { compatible = "qcom,wcn3660b"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { fg_alert_default: fg-alert-default-state { pins = "gpio121"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi index b27896e83a0e..c8ea2f6f6b3d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi @@ -126,109 +126,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-system-load = <200000>; - regulator-allow-set-load; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { /* pins are board-specific */ button_default: button-default-state { diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts index 78020a0db4e4..323590598113 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts @@ -149,6 +149,22 @@ &pm8916_resin { linux,code = ; }; +&pm8916_rpm_regulators { + pm8916_l16: l16 { + /* + * L16 is only used for AW2013 which is fine with 2.5-3.3V. + * Use the recommended typical voltage of 2.8V as minimum. + */ + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <3300000>; + }; + + pm8916_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; +}; + &pm8916_vib { status = "okay"; }; @@ -188,109 +204,6 @@ &wcnss_iris { compatible = "qcom,wcn3620"; }; -&smd_rpm_regulators { - vdd_l1_l2_l3-supply = <&pm8916_s3>; - vdd_l4_l5_l6-supply = <&pm8916_s4>; - vdd_l7-supply = <&pm8916_s4>; - - s3 { - regulator-min-microvolt = <1250000>; - regulator-max-microvolt = <1350000>; - }; - - s4 { - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <2150000>; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l4 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l8 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <2900000>; - }; - - l9 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - }; - - l10 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - }; - - l11 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - regulator-allow-set-load; - regulator-system-load = <200000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l13 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l15 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3300000>; - }; - - l16 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <3300000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; -}; - &msmgpio { camera_flash_default: camera-flash-default-state { pins = "gpio31", "gpio32"; From patchwork Wed May 17 18:48:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 13245534 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 68923C7EE23 for ; Wed, 17 May 2023 18:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbjEQStR (ORCPT ); Wed, 17 May 2023 14:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjEQStQ (ORCPT ); Wed, 17 May 2023 14:49:16 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6B97171A; Wed, 17 May 2023 11:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349341; cv=none; d=strato.com; s=strato-dkim-0002; b=sujEGaU2LtqwQEXig1SJPnzwVZjlI4/HdAf+ckkD4+gxIpLQlrbxeZEfsnqCcSDZhN LH2f9ZE0BL769WqPCBCDHdxcHRzu1FyUUPbRq9buW+XR2YuQq1iSjdM2zW2cbcsDjEFG L2KTElS2NdfJpmTle4jBfwZFp+pBDpJvr+XSWRkyYmOMMtKGF8dksg1+4rlEVPOnyNJ+ rj2ax/prsoglzYAcLbcfW8pn0QcxCaQtys2QQD6Tl56jp9EVE0MWjVc7fQs0ftX5FNPD 2DBNxJOqol1wFdwXZEJpxuKamqPoxZEKi9XcK2Bkt/qGjtqJ5uE2LSpPEEfdAusoX8zb U/5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349341; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=wA5JA5aTgG5tPkRsBk2d9ad8ys2Ecjc8lpm75dE5DTs=; b=S2G5G8siY9AKNYAOkcZtMY9AKStklC8iuNxd56tkNJ1zNcpD8t5gevtLTOx5DcGRz9 9DFGenh2rL5f6ica+cU0LftGLWtrAnD5oGqC1pGgmV6Got3mz5RmV7sGUs3adwFL/kCe K1GUPZu/mwDLMo9zfTLcODbpBRA/K2MIqaFGmQaGoJ7OChfuuxzU3DBRiBrdxMz94YO8 VdXrwqaFfHCsueoHy3mpjpacXPj//TkMiaPLCNS+j+UOne0kOpOxc5PzA2VZGLcjZQBz YRpsQtkcOWFBop0CMvIQYels9gdgkcVq3nDFJ9jQw5xMJixLIi6TKlY8/RMxNLdo8bq+ gJVQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349341; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=wA5JA5aTgG5tPkRsBk2d9ad8ys2Ecjc8lpm75dE5DTs=; b=D/eh1UHOAi5S5ZulIwBZQR48JzrncAOA+eHiIcttyuQ4139i4tY2CYNdYVpRoogOVn lmaAak3GI8YT7qoXinFizlWSJp9qGxQSxzPk3JvFTml0A9eCPBgwxruGNBvj0XfocCMU QwZKi/XT03pl6x1q/yms71c6stEFf+dVF0YBYl5ffzSSXFml5JPzkZKkCejlqB0FsUO+ wfP/sQ02tBCVPhZPQrTDNY9uZ44+ls3JI3SYyxJDhNbU/XUvFZj2nkDs3B4HeMKJJzqy Z/AFKJbZXlGnyzt8mrpphj7bhR0kHaJjRMHholU8wjejnvEkdIsDMOzpS+KligkDG1Vj 3ylA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349341; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=wA5JA5aTgG5tPkRsBk2d9ad8ys2Ecjc8lpm75dE5DTs=; b=ABjxH+PkY/l5iS5ggLe/bNvhiAANxTd0N9RI+iccSlJw96s33oboyVfH9b1krr9f64 dtSx8ctBnhVDkKDc/WBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HIn1BIN (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:49:01 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:47 +0200 Subject: [PATCH 8/8] arm64: dts: qcom: msm8916-pm8916: Mark always-on regulators MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-8-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Some of the regulators must be always-on to ensure correct operation of the system, e.g. PM8916 L2 for the LPDDR RAM, L5 for most digital I/O and L7 for the CPU PLL (strictly speaking the CPU PLL might only need an active-only vote but this is not supported for regulators in mainline currently). The RPM firmware seems to enforce that internally, these supplies stay on even if we vote for them to power off (and there is no other processor running). This means it's pointless to keep sending enable/disable requests because they will just be ignored. Also, drivers are much more likely to get a wrong impression of the regulator status, because regulator_is_enabled() will return false when there are no users, even though the regulator is always on. Describe this properly by marking the regulators as always-on. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 5 ----- arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index ab8dfd858025..1c5d55854893 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -358,11 +358,6 @@ pm8916_l17: l17 { }; }; -&pm8916_s4 { - regulator-always-on; - regulator-boot-on; -}; - &sdhc_1 { status = "okay"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi index b38eecbd6253..64d7228bee07 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi @@ -72,11 +72,13 @@ pm8916_rpm_regulators: regulators { pm8916_s3: s3 { regulator-min-microvolt = <1250000>; regulator-max-microvolt = <1350000>; + regulator-always-on; /* Needed for L2 */ }; pm8916_s4: s4 { regulator-min-microvolt = <1850000>; regulator-max-microvolt = <2150000>; + regulator-always-on; /* Needed for L5/L7 */ }; /* @@ -93,6 +95,7 @@ pm8916_s4: s4 { pm8916_l2: l2 { regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; + regulator-always-on; /* Needed for LPDDR RAM */ }; /* pm8916_l3 is managed by rpmpd (MSM8916_VDDMX) */ @@ -102,6 +105,7 @@ pm8916_l2: l2 { pm8916_l5: l5 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; /* Needed for most digital I/O */ }; pm8916_l6: l6 { @@ -112,6 +116,7 @@ pm8916_l6: l6 { pm8916_l7: l7 { regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; /* Needed for CPU PLL */ }; pm8916_l8: l8 {