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: 95489 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1351138vqo; Wed, 17 May 2023 11:52:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7x98hdlGDrR8es9RDO7Xv27o/YqPpdR488gJyJgspgi8j4yuFyU2cb9OaJHi566pmUbFXP X-Received: by 2002:aa7:88c9:0:b0:64c:f4f9:de87 with SMTP id k9-20020aa788c9000000b0064cf4f9de87mr498909pff.18.1684349557828; Wed, 17 May 2023 11:52:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684349557; cv=pass; d=google.com; s=arc-20160816; b=X5K0syoO3AnpxYziLhDPxpAiGSgYs+vcv/rltkK6y49hPkFqAUnAkKy7Zp++2PXNPu +ANKpV17vRdBzOatLiCPvKrGvWF6czW0Y8PMHgTeiOdLpzdKpOjIIE1Js3PfqaxBNAeC bzCrygk6IzqLVhtP10EOxs9DJhrXWTf0KcIiJB8HztQsK7C85A0luJzZYgxEiuvwLf/8 ygE4ve7OS0csf7AuC4c6T+XLr1JF+jDqLm583AwQc9OAZUYqmFLAdJzpj9TOlaYu6Yua 8+M5zJcGS6iEJ8daLaJQPe7yvwZnTpAXvGL8l0REYzoFzMdPfiRAp+oeUBqUMwd9Gx2K jEow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=04I7DZNNvN0nQm/HpCiGPokgrpXvA5qDU2M2Zxo74gvCC7PjSxCDGWCo2Y0vH6o+2H kMgaaRdwh42tVFeneNdnBk9Z0C/umQaPboGfCTawbw3kVgZ1da/FIVKTNKGW0/Yk0PZx CYnW/n8DsA6Xmt0MfZxqV7/dQB+RskedtTTaqxKP7zo5h1Y3ELL5zbttZzblUbMtJfi5 R2Kgycx1VKNOI5OsRFi+h4MKe9hipzkSw8CRPtmBfbOTr07ZkP6M5EMvRzKMyD00sOnm RE33hEY9oAC3oHCmGCn7yFuWFhUpbUg8L0G1CyiMXloAvK3SeIPU8f/Og/2B+rVLVQKX qcTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=AvOkLwRa; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020aa78ece000000b0063b8935bcbasi22082738pfr.310.2023.05.17.11.52.22; Wed, 17 May 2023 11:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=AvOkLwRa; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbjEQStl (ORCPT + 99 others); Wed, 17 May 2023 14:49:41 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766168522048347459?= X-GMAIL-MSGID: =?utf-8?q?1766168522048347459?= 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: 95491 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1351500vqo; Wed, 17 May 2023 11:53:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7esAivNwszsWV1oq1RyeseFHRFhseEO75PMUE3cP13B56zimHJjDtm9iUdHAGOybKdynMo X-Received: by 2002:a05:6a21:6d97:b0:101:d031:9a41 with SMTP id wl23-20020a056a216d9700b00101d0319a41mr35743880pzb.24.1684349606477; Wed, 17 May 2023 11:53:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684349606; cv=pass; d=google.com; s=arc-20160816; b=xloH6tqvdDSsQqZtccjDpEk1LWv+Vye3vIIHWsy3CGzIctAz9HjDgQUB+hx4m3Ob75 m+fLGqRtYsL1PWUF+3XAFUuAS/BgwYsHyGqMryy8xTgFsG31rEiJkGtbyZ/0JRYso0fa HWKuhMmiUr2msDncYBpVGbZrnLy7Pp54wy+0pn4yoGhFw7xlNY6QsQyp+2hCwTaYEFfD VW4B/71FDfJHWyBsumWnGWP6UdkRjD6ehB9CUsN+GaZ+KJnKndtHiZ7M7VDr2ml0hFsU kYTsy8p1Gw/qQV8Bhq0kUcIN7Oa6WeWa9z5pMfodvciqWLL+H0FiPRPF2tvbsnXM1b3k WbLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=RzJCW5rwyoVlDeXe+0eK8YDHrRyc3l6qHJ+N7bVS/zI=; b=z27/7RcM90mrMRCa+Km56vixiAV1QVGJfmHRDIf6rivnIWADY786q9sxhEhNC/EEzw InDDTImCsyYAKVgpW3fAQvdhpECwGR7Ug8/vJoneudmZTceKtZ0hBA1gY3bkIbvTGPaU QUOlVv0n8ui4oEpK8TcFyB3G3Bc3DcssEkQNniCa7mNUkxvnv57eEXNyJELiiki8TGFx KcvJHvZbksRQK6Ft5o2CDrRF7KqEM8IfvNyOAtpBsgp4qBGZCd0xV6HJPUZhNPYRNpEg ioRqDgPHRETPyqoR0834m2GJXdeyZzQZmRd6VF1w1yA5Buu+wzu0cfRMAtFhVCYMI2UZ UwZQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=MHx0fU3x; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h185-20020a6383c2000000b0053439240224si4931819pge.771.2023.05.17.11.53.12; Wed, 17 May 2023 11:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=MHx0fU3x; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229592AbjEQSwZ (ORCPT + 99 others); Wed, 17 May 2023 14:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjEQSwX (ORCPT ); Wed, 17 May 2023 14:52:23 -0400 X-Greylist: delayed 169 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 17 May 2023 11:52:02 PDT Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 497D7A5D3; Wed, 17 May 2023 11:52:01 -0700 (PDT) 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766168573416777652?= X-GMAIL-MSGID: =?utf-8?q?1766168573416777652?= 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: 95492 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1351602vqo; Wed, 17 May 2023 11:53:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4CX6zu+L8ZiFIzkNG4etiOPdlb6ql6w9QIz2thaAUb6yEcrBBL0HPLWqh9y7MK/iWlUTK7 X-Received: by 2002:a17:90b:3118:b0:253:510e:130a with SMTP id gc24-20020a17090b311800b00253510e130amr375939pjb.19.1684349619402; Wed, 17 May 2023 11:53:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684349619; cv=pass; d=google.com; s=arc-20160816; b=P8jOtTJfxpLtmBHQ+8j4Q1OWo9SAjzBuCx6tIwE1vtOwjxHWqK5Vdg5uJryjnoQr06 6J5nPw+YAFrdzFxkCePJmcHXyH2sAZme8y0Niwqrihma7BFqkVr9+wSiiVVWM6v8nde7 Wpd33JZySuWZWoeh9vIQB4tgt/8AW4uETMYmt/37596XXkLcsTl4v9xIpHd7M7XLRsaT ef5Wo9w6NvCgTT557k3wbgQqa1PHRza47n/0Rx15C4Yr0RKmoPrEK/UFE9ZFc20oLDAL C5k31jAiNi9tT6xNvQKctfgXR8r/TQPBLxzTZVKRSkFeNSAdLV2GhVsX/o1/dHa944Qo ozDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=Q72gAZwrgAyQdwaXPFWfknvMiEMn9jleNzwpNjYRXJI=; b=y9U7InYRHXKSVPd9Y3IEks8dG9XxGWZ6RaLzFMwA/ehh1259v3xNdVmRCUag5J9kfs M2Iyxod45Qp5Dwoj97yEdCTwOV/E7no5cXp9WILTQdC9QNdCs7RR0rmJlyWHMQFfXie1 O3ZXNyq+ZvTXJgPbkZOGbICVQoUaTrRbcATzLmE/u0hSZMczIiyRFlQkyiBRyukuQUwm rfP1RboByTq6CIBwobs+d2tuJMPrxnv2A6PrurAd7CKRQ85vEsCykxL4gipuXmWUhiJp DWcgKWeeDmu5KWt4lM29vRAew5eZjkktpZt+kNYqzgTNS2vTELXk87/I33yf8q1tdNmm wi4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=XkHgje8n; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y192-20020a638ac9000000b00527d158ec73si22358754pgd.3.2023.05.17.11.53.24; Wed, 17 May 2023 11:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=XkHgje8n; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbjEQStv (ORCPT + 99 others); Wed, 17 May 2023 14:49:51 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766168586548720136?= X-GMAIL-MSGID: =?utf-8?q?1766168586548720136?= 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: 95493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1351928vqo; Wed, 17 May 2023 11:54:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6xltvejo7Txyr8SIu19plH3gImMslQ5iFP/1vxSbWsVDzKRTFpEC7myam6dQJZdCdIocAt X-Received: by 2002:a05:6a20:2447:b0:106:c9b7:c92f with SMTP id t7-20020a056a20244700b00106c9b7c92fmr10470115pzc.49.1684349661941; Wed, 17 May 2023 11:54:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684349661; cv=pass; d=google.com; s=arc-20160816; b=NXO31xWskvPvTE5/o6rQYiNJlGw5sXhNk3vwzXrVx5FZYH2gwvxuWKs4JV3GwS86i4 8pEv9qB/iwmnSo1Owhu98fteNaVazgX4BYxxYPN6COoVTKUt9XV5Ps/T9qbsur+Xoxdm Q8bn4a50Ph8tpY/VpgUiJ1rI5ZR3idTWexafaQi/1CHiUuA3QeGXu+yvQSsvf/4U5xUW aSyNKbSml1kTG7KoXJNRZhb2Ij51PbtJQag295fowemZDcP2dNd+O38hUFshc9rR0NZ2 KuDTr3D/w+f+HLRtAE7MsUB5LEvvqWnT82JSEOQGKKWxptwN11hPWF729tuOkV+I5VAf gp7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=dZLhFfLD3hZgwPm/Iy8HcDkWoncD1Qq3KSgl7NzgGpQ989E/MJiuEF8p1xnxb7ixht /8+/o4atNzrAJlKMw2s/gq680zxf5BveXKc/zWmnXn3loMcDztGU2ozFxQ331tM5fGqE F0sZ9ZzhTunxtGcMA6lr53Itcx6LaaOkE2ODmHOIPnEbQLJ8vmQklSfwIlvDhQbYzSW9 QdCoWQbGnHQcHUB4ZJn+rLwCFYBXVbEtK/41kFCfjQ5Ns3Adf0lFf6Bgaw8WYLSFn82u DEqXMNaZVccFdYk77H/vCXeteRduoKQLKkUVP0NfMiCyl1b8NQPS1nxMvxr7+QLtH1vv hzlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=GFgFhZ1n; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a638c51000000b00520e69b7439si22120309pgn.560.2023.05.17.11.54.06; Wed, 17 May 2023 11:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=GFgFhZ1n; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229491AbjEQSww (ORCPT + 99 others); Wed, 17 May 2023 14:52:52 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766168630875193944?= X-GMAIL-MSGID: =?utf-8?q?1766168630875193944?= 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: 95487 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1350735vqo; Wed, 17 May 2023 11:51:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Jf0Z7bPykkPGAObyIljWdpSa4YWRuguTrh3TYReu9vxlRaGTjxiOwwCoJD7x7pGInJHKO X-Received: by 2002:a05:6a20:729c:b0:104:387a:bbaf with SMTP id o28-20020a056a20729c00b00104387abbafmr27058387pzk.53.1684349512468; Wed, 17 May 2023 11:51:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684349512; cv=pass; d=google.com; s=arc-20160816; b=h+oCfe2VUd/jBgr/w2gmJdfdtv3hXuRbpKUL0bLfMwyev73nM0Tc7ff+4OrzfmhvCS nsgURSh7BA3c+kEOEoxW5lrP5zlf9+OcnmmhE6lOntCTRZrSlt//t0sX798RI6X0QE8L /WhpfUW4cKsH38dya0k+QcslKApTzIO+lxpsGiDumgJQ4SSQyi8aJvXFkMoKfZXMdtEi X9nyNKyAXteZV7Ei3/CNuajgCSroK5OF9UGR0ooX924pRPecNLcgTYhBqlLLBzbE/jhY CsG34LRBHgfRDlg3sSOrvzBOzMg20u0fS79opQiorkrAQPQim6cYEjyYz92jD5iAoAYI Oizg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=Hk0tnh+hTFfXKNgIR8FDn7Sblt76hroYTDj/mKNNR1U=; b=TxnanI53d/IM1MykVBDA6Eq1fWsnCSu5BQIpeNvqva+fCNbBP3WbAvxDvLxvzKhre6 JK9hu/nthV77u7hSvoKmsvSvixH0hZWiEuElRjyQ+vs4Q2Dyrn0guqEaHCmGEbwwD+hb ZAwYYCVw1qXzCs4v9PFOn99i8OS9JAmEVzU6xDaPXVMJgjYThOxEgDmRNDVrIDyYWn89 UoI83RBrwLChCKlEoxtNyBSwf/A/Nc1Oiy0Ozkqyr10j4c3jFiEY07MuQUjWy+5ikv0s LbjnWR46rPKwcQt6Undy/eZfZT2yzkVtkrkE5AuW3APXR84g6UOrS7U6GUrs1QcUvUcC CQug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=FuMhPSAL; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=T6KLFs+R; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a63e444000000b004df18fa49aesi20590295pgk.796.2023.05.17.11.51.36; Wed, 17 May 2023 11:51:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=FuMhPSAL; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=T6KLFs+R; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229739AbjEQStQ (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766168474251582225?= X-GMAIL-MSGID: =?utf-8?q?1766168474251582225?= 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: 95488 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1350808vqo; Wed, 17 May 2023 11:51:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4P8CQtKy1N1brvF3lmObOTQXcKtRSIlD1cZ5tLFOU75y19vVWY5wAhFAdy0ziedlTcilon X-Received: by 2002:a05:6a00:1582:b0:63d:24d0:2c32 with SMTP id u2-20020a056a00158200b0063d24d02c32mr788708pfk.33.1684349518692; Wed, 17 May 2023 11:51:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684349518; cv=pass; d=google.com; s=arc-20160816; b=Xosnq2qlBRVzT1XiKvVhWluxYFv4ZdzMSbSEGNeVAntspqdMSwV5g3FqgJJnv/5hs3 VtoZAuNlYwBvEHpmb8YSIVNyEJJYr9SRvSbuoxsfkLokMsvtp45R7qrg4sd2EW24v/s9 2WPacU5tn4wz5lAwvQh2Ssi4VpqhW9yW7NUlm9875lnaz249P25xR1RCiFyY6vEazDzX HFFVhILe4tO5zeAfNaI8lwOY/qs3GaIqF89OCwf2+49r5p8n8i5Lsysd3ZXnTA0+x7TP oqpM86d6FIM0cXAp/Foa+AK8Wzg5wBLJeyZjJznyzgpX4Ae0k/sespzgmIi8YjwJQKTx 4b6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=DObmzFLbTvQ/yHEfaTtDepTvUqiIFTbRIxs6UN7LLQb9qd2WKWxKN+lytKSOi9EgzQ +ecxJfaC/S/dxovlWLbpfHOTx/DyQW//1QTA0H4zA7Cbad+S+qoZqGMVhdfHMVsrf3jS GV6whFlm2k6w5UGN7uAu4IHE+eC3LkGB3NIU3KidrOkDfpEZpl7CVlhzbmumJRHu7ts1 5+PwbeJPIZ4Ee/TBAvm6gCceehmiTjri5lqP07mD9oG0gmMuM9scM8s6sf74gqdLvkUx UAXPjKiV76PYcm31gPbLPIODPTAp6zSC97poBOo9/4Ld5ORdpbA+7+t634rawEcZmun+ OdBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=qdGYTiHV; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 65-20020a630244000000b00524b0295005si21582638pgc.558.2023.05.17.11.51.42; Wed, 17 May 2023 11:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=qdGYTiHV; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbjEQStS (ORCPT + 99 others); Wed, 17 May 2023 14:49:18 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766168481070901061?= X-GMAIL-MSGID: =?utf-8?q?1766168481070901061?= 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: 95496 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1360157vqo; Wed, 17 May 2023 12:08:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ729Zm2nP0r6gNI1fe9ED1GM7zPm0sLKREtpOIBmJmOj1ns6fuNmuXFmD79H/K+a1wPVyNJ X-Received: by 2002:a05:6a00:2da5:b0:643:9ca:3c7d with SMTP id fb37-20020a056a002da500b0064309ca3c7dmr962913pfb.4.1684350485091; Wed, 17 May 2023 12:08:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684350485; cv=pass; d=google.com; s=arc-20160816; b=iI5N1mhXzXuzHeUqFKtt+2NBEwDjKlVeTL6V4fRWQ07qY3ZfbpwGbhpmrUdxkId9tt Jj+zU2oL7tjHulIB8aqx+FSZvxErQd0x/You8qAMPjc4cDvb1sQbeYHzlOf7RhtJXtyQ +R+uUwd8/Kjvbbc8OYOzA1F7dTG1IiImolnNPBQ4qmNx0AV+JYA0qk5NI3DWTjiobaJZ cNwaMURL0qdL/akjf5L+GkvOYakoPENX2Pqf9ltNRqonJ6tdg/peMwZ/YG83oAVJ7Mj0 9rLlrTpJLMlDqWYCXFgKCZzDj+pFJlBAvtrIucXGfZUQTVOFhbaLHXBFRyZ5ms+DzMlR lCdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=PXWpZ5tgEqKeOEf/ZUamMeA78U8Yjuz6DbwWWDB6Tcc=; b=j/YMaDMMF3fLJTjRUZicJKFIF3jLUvNAjZre3be2PbQPVM5YHnUi9hmTaNJIjT7Om1 ZhHP7XagX4rzBwvJ0VV/f6KqRuycuiGC6ZZRlntqC0aplNbgZGO5lRG/o92vCQCopXO7 iJqN2/qwX9D5t6FLMGxu7rVUF+RrEq0FS+U0bG0sBA0YeMMd+yYrwjuo8+2zklDy3mnL VVKX1jN1+0p7J1hrGQWJeSRO0PL9hRM+rPobGnHEIVkbj++niF1ZRDYFMfkE9oHE8RVS egdB780s8WqB71x0abn1yE+5268mQ6qr9wraC+QLMP5nzJU/pPsfZXKMaTCym28oAaXQ GAuA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=E8bG6F08; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a63aa05000000b00528595a1390si21655574pgf.588.2023.05.17.12.07.33; Wed, 17 May 2023 12:08:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=E8bG6F08; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjEQSt7 (ORCPT + 99 others); Wed, 17 May 2023 14:49:59 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766169494443603685?= X-GMAIL-MSGID: =?utf-8?q?1766169494443603685?= 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: 95494 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1357464vqo; Wed, 17 May 2023 12:04:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KXFTY4UqFTE0hfi3mWAEU6FFQgjpgdvBG0rlT2RE4V81vkGIVQSrZBvtf0aCWkSiXSP6R X-Received: by 2002:a05:6a20:144b:b0:105:63b0:5c05 with SMTP id a11-20020a056a20144b00b0010563b05c05mr19024357pzi.15.1684350248667; Wed, 17 May 2023 12:04:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684350248; cv=pass; d=google.com; s=arc-20160816; b=nfSdmbSRs+4EVXgvUALTC3+tP3obiumxq3mXR8fGNktV7Hmapvh6n2ZWGD+K0K6f9p utPlzryauTL6Z68hax5PE53h+xlefPPGW76jmFzEfC8161IU0luffKQ4ySDgYS77mNFY xzexg+j8T3GErLPUE4s/EhZp4nEGTf864+XRNfh+FBzGTHf0PSKX/JL5DCN1TJN54MNH yJf7+uG3RKfa0a8d7uHBqEyNFjT8OQNk601aXkxe/ygxNaT7g73uOIIvwsfTj9SdTaB0 j6Pbw4uNeGRkBVsrWlDPpI1N1fj9/hEvRQdk8qX7W7QRgg47EALmSImrvfm3SYiAdNXq 2t9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=wA5JA5aTgG5tPkRsBk2d9ad8ys2Ecjc8lpm75dE5DTs=; b=oV1PwYn5dBZQi/EJ2yXchqPNuLl4uZawbj+EddlG+VrDDVSDZEpKhy1AhT1Qce+3Zy GG+0vvASd8BMUT+4R93vosYlqJq8OqcIfWggolEZ8lo/XC77tOO2l2N5d5HflEu2o4s3 9TTve/iBVALmeXbxA6urxg0xIeSw6sEkR1emim5VDMdvE96FGaYBeja+z4rC0qUqxAjs egAxylkZzE7Gwv/QpMxc4/nctwjrDnAfu19GC7iyh/brvXDsaJ2QIjBFVxx3OcbF4+12 BUE8e70VBNfoBrskIVEc1P7mF8uZYAuNcxrad0fYguNvjt/c0S0kM5OCUkQAf6jltX40 kMsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b="D/eh1UHO"; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a63aa05000000b00528595a1390si21655574pgf.588.2023.05.17.12.03.53; Wed, 17 May 2023 12:04:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b="D/eh1UHO"; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbjEQStV (ORCPT + 99 others); Wed, 17 May 2023 14:49:21 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766169246396501775?= X-GMAIL-MSGID: =?utf-8?q?1766169246396501775?= 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 {