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: 683017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCC10C7EE2D for ; Wed, 17 May 2023 18:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229911AbjEQStk (ORCPT ); Wed, 17 May 2023 14:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjEQStS (ORCPT ); Wed, 17 May 2023 14:49:18 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [81.169.146.166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 155687D91; Wed, 17 May 2023 11:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349339; cv=none; d=strato.com; s=strato-dkim-0002; b=sMJinl9jPPb4B0BSgKyF3YwlV1bEN92U6d5YDe/D8LjXQ3EjrYEfsipwv+StuYIOBd T04+0KOCC+9I13rXdxynAvik+xU+q3nyP7XriE2e2OCMoEESkcVZxLIeq9kGfHWc5MG6 MTz4xFA46x46eTdoDaytPOC93pPh6Mltg2YFppw+Wytrl81cRqHdlrX4wgf4kYQUYPiN odP7IIe17O6aPaOwf1YhdglPbrduShJXuWtonSUBoc0w/c7CgqZhrxGDqp9DsY+s0PY3 UAoQl8PlUKv0CniWC4vGaYeuBCqchvV8x5Gm1Mpu/xxy4X1lsBrWBlrwzitvm9/oylRA G4+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=l9iE9VGPppJX17kxbqq5MxvFOS7R0avpW6hvgCqt6UPJA/KKHY6/Vr8zRz+K0qFMed 7pTm+7+eSkVobMp62NloCAj7SHjwECwaFxoBVFiX8nH66hSIIAUS5bREhIa+ga/nkPQJ wwEzHlICEspkr48ntrH7bvWiT1jNuBRi3WCGSqpeRCKS4TXXAQjmmdSw6QUb2pWBEj7x CConHBjvIF8EO0eKzzA8sLVjG/5G8BbePBBLfmNwkMoAXCMbDOfB1zrHYWhaIMFe66xc kMbFoFDQ0xioFZFrCUhr4h7FeoZySczHeHvb/9UDF6EeZHk8Hd75VCK+G6amiCjaHMfQ OTBA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=AvOkLwRa+DIkKGqnFyhmHOhsE9yp51vm4ydLkD7wEXOmq40WuGUWF7QBanAJUWIm8l Qy5TJdR1HTGpDHxpVEJvX8flbV7ZQY05l6Uqhu61FhQb6ZUgn8sa5KCpPAKWtuHrXKF8 +4KjD1jZr8iEjbtYsGcrlaXBJ75JWQ5Wn/jjyU1sOdmUiPjm/qYSW3KMmiBvnnr+2pbv d60F5plLbsw0MUsBCzaaBRvr8lOIb4I/QIdwuZ9FKuXWZju6X1hWw++dqoRoKQB82+xc Bgj9pULJ5iwPSbDmx9AB09LITdjMf4SIzJGyAOu+qfGGhQIWtc95J/I1Ez1qMyzYHMsp idsA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349339; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=I+LZB86CM7vwY0RR16eIEE4ZmY+DpP5PdqtJil83xK0=; b=ux2jTm9ywx4RFqZbeoAIFtv1/HNAnykX3Cb1jiyy79kSHIsO22H7hOxPtrUUO8lza0 8KBi76JqA3lw1xxUKIBA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HImwBIG (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:48:58 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:40 +0200 Subject: [PATCH 1/8] arm64: dts: qcom: apq8016-sbc: Fix regulator constraints MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-1-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org For some reason DB410c has completely bogus regulator constraints that actually just correspond to the programmable voltages which are already provided by the regulator driver. Some of them are not just outside the recommended operating conditions of the APQ8016E SoC but even exceed the absolute maximum ratings, potentially risking permanent device damage. In practice it's not quite as dangerous thanks to the RPM firmware: It turns out that it has its own voltage constraints and silently clamps all regulator requests. For example, requesting 3.3V for L5 (allowed by the current regulator constraints!) still results in 1.8V being programmed in the actual regulator hardware. Experimentation with various voltages shows that the internal RPM voltage constraints roughly correspond to the safe "specified range" in the PM8916 Device Specification (rather than the "programmable range" used inside apq8016-sbc.dtsi right now). Combine those together with some fixed voltages used in the old msm-3.10 device tree from Qualcomm to give DB410c some actually valid voltage constraints. Cc: Srinivas Kandagatla Fixes: 4c7d53d16d77 ("arm64: dts: apq8016-sbc: add regulators support") Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 64 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 59860a2223b8..14cb217a13c1 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -447,21 +447,21 @@ &smd_rpm_regulators { vdd_l7-supply = <&pm8916_s4>; s3 { - regulator-min-microvolt = <375000>; - regulator-max-microvolt = <1562000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; }; s4 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <2150000>; regulator-always-on; regulator-boot-on; }; l1 { - regulator-min-microvolt = <375000>; - regulator-max-microvolt = <1525000>; + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; }; l2 { @@ -470,13 +470,13 @@ l2 { }; l4 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; }; l5 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; l6 { @@ -485,45 +485,45 @@ l6 { }; l7 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; l8 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; }; l9 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; }; l10 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; }; l11 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; regulator-allow-set-load; regulator-system-load = <200000>; }; l12 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; }; l13 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; }; l14 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; }; /** @@ -531,14 +531,14 @@ l14 { * for mezzanine boards */ l15 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; regulator-always-on; }; l16 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; }; l17 { @@ -547,8 +547,8 @@ l17 { }; l18 { - regulator-min-microvolt = <1750000>; - regulator-max-microvolt = <3337000>; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; }; }; From patchwork Wed May 17 18:48: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: 683015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89CDBC7EE2A for ; Wed, 17 May 2023 18:52:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbjEQSwv (ORCPT ); Wed, 17 May 2023 14:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjEQSwc (ORCPT ); Wed, 17 May 2023 14:52:32 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B4CFD2CB; Wed, 17 May 2023 11:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349340; cv=none; d=strato.com; s=strato-dkim-0002; b=JE2a4Q39VW0eBS9d63No9rcptrfd78Cm6kliAwVABGOjR5dZRTUXyOzyK4vEUFi9rW MYH7b+gdvfzscwAwYUKOduyOO0XFp5Y5hE9skriOGfAIc6nDu/aA/zN50Wd3jUhoiNPh uSmMtWD9vVNmsF/Jrj27bpNLkBinvaHyrPX1R9bikaXRImbYfJQAb3j/HV20H4jtFDhU v0bSj7RrFBhQxpihoJHpaYe85EMzG7Rc15U7htZZRmIrJOyFby41rbB6//wKYyJImYwj 7T8kOQ5iJaMzzM1MlMCzELGUuo3ndcPQnusjoSbHmSRLR3eKtMf3hsYUDF5maTHnb6mL IR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=kSDibsfXvcjxJwPSa/CVD/6nKN31PibjUuNmZSeTZYGLQWHHFFkk6DQy8kiLmXP8uN CTXZIJk7dR8BenEmZ7fBZoA5nmUVOigkHwsjGihEEmdlUK6hsEuE8Wws9iIxpv5c1Y8I 0p1YEMGYnEOj87bqQRIGXqLUpiQEn7gFkmOa3vH76PJVRg0pXz9o+j+W/e9GF3N8OJx4 ssSCaYX6PldcJuwvG/aJ9mzONHvLgqgj2Qkm1ei4CDahaYXnJbIJfUaaBb6Akbt0XQVU iGGG32uhcH6NUtm6S9KKKgbFL6CDHAsFHh3n7JS4G8z6usuWgnWoDCxg7TL/Ml08gCfg 3caA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=GFgFhZ1nwokA3Dz5QjEQ+MYK2yVkN+w0pDpRhCcxATBdZsFIpJxUBuMvlq4fwS+t13 ECAMuZPmvfbHyiIUpl+kYChefB2uJDPNbWIja85/YNznmdBPVxBuDNbt2Coq0r6P8Uyd fsW2cPpnrVZeCXb2YfXvCXPxoXRVDZbjEv1uSB2RzWbXaPbUdNlY0nRI8v/txg94a7LB Te1WOMUNywVNXVZJPl/luEawwT3t6XfXceqXwt36KWhMpUpB0TO5dbpj8rpqgDTeBbsa bbchM3V0A249Zx7CCKu5vss8GEcYOLm0pjiyI69K1+tsczge+xytSpqial68c/j6bkhH Ek9Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=X46tblRzBgSr7BihipJNIfc87cSRxLaTk9bOHAuw2I0=; b=eBw36avkcF1NlC9Q+AdC60Ya2duLHm1SSkGCgO+Ot6IewiweDC5FUg8UueKAy5VqPr SLoDoKCDF0FjMZdHOlAg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HImxBIJ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:48:59 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:43 +0200 Subject: [PATCH 4/8] arm64: dts: qcom: msm8916: Disable audio codecs by default MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-4-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Not every device has something connected to the digital audio codec in MSM8916 and/or the analog audio codec in PM8916. Disable those by default so the hardware is only powered up when necessary. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 5 +++++ arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 5 +++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 1 + arch/arm64/boot/dts/qcom/pm8916.dtsi | 1 + 4 files changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index 3ec449f5cab7..7d7af6406c39 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -310,6 +310,10 @@ &lpass { status = "okay"; }; +&lpass_codec { + status = "okay"; +}; + &mdss { status = "okay"; }; @@ -399,6 +403,7 @@ &usb_hs_phy { }; &wcd_codec { + status = "okay"; clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "mclk"; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts index baa7bb86cdd5..8197710372ad 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts @@ -218,6 +218,10 @@ &lpass { status = "okay"; }; +&lpass_codec { + status = "okay"; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -302,6 +306,7 @@ &usb_hs_phy { }; &wcd_codec { + status = "okay"; qcom,micbias-lvl = <2800>; qcom,mbhc-vthreshold-low = <75 150 237 450 500>; qcom,mbhc-vthreshold-high = <75 150 237 450 500>; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 7e0fa37a3adf..d5081a356288 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -1551,6 +1551,7 @@ lpass_codec: audio-codec@771c000 { <&gcc GCC_CODEC_DIGCODEC_CLK>; clock-names = "ahbix-clk", "mclk"; #sound-dai-cells = <1>; + status = "disabled"; }; sdhc_1: mmc@7824000 { diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index f4fb1a92ab55..33ca1002fb75 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -178,6 +178,7 @@ wcd_codec: audio-codec@f000 { vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>; vdd-micbias-supply = <&pm8916_l13>; #sound-dai-cells = <1>; + status = "disabled"; }; }; }; From patchwork Wed May 17 18:48: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: 683018 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C7FAC7EE23 for ; Wed, 17 May 2023 18:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229701AbjEQStQ (ORCPT ); Wed, 17 May 2023 14:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjEQStP (ORCPT ); Wed, 17 May 2023 14:49:15 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F215983C2; Wed, 17 May 2023 11:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349340; cv=none; d=strato.com; s=strato-dkim-0002; b=M5GWUMN0EEzPZsLNvNrjnO0io3WTqLo/6vRK8PdlVP19uH0N+L7dBR1QTCLF1aoLos iPifJcKiWWJ+XaCqRFCpPZgYSvNyWSYVjNBuwl7fLY8jrs7amEhsErcpeEy0h064Fk1g 4da34HdjZnZPnFjruU2nGa/jf6kvB2vHmPgOwynBqH+vcGUFDmCDKc5UyxQ7MdPRyIkg 9SWPOAYGSx0+qvNl1FxfxJQDFvLNw3Sk7HA3q8p8c4fya7yM+ulsOFGcC9gblWxIyU4T tuci2ouAwA8Q9UrrQCTOs+CxU+ik59LiVK+Ycje9dFnvrIQcCNrHhlzWFsQSpOBMTDe6 Z7jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=ZrQjSgU14tTkQLjGaI27JNsEFdquU2ofszinBct+ih8u+m6V+iyH/Iz06a6/0OeiP9 F2dbtalio7fup8yoP07PJ7bm8NopjWXmn4JSUZ/Pz8FH6CHYn8YcT+NSWyZw33kxOYDc by+BUceSVFK3F/WkgjrS/rG8zeoCoY62iXtTad5gGlp2NMZUBj9QYz18DyoTCJekK/vF UfByQGfabNDl/daxEcI/lHIKSlaXFq+oOwkAmGe2WlCGsfjjqm3LcXQoyu0ZMZgK5JKb 7QDa+pZF05dqqldUAdurVFmwLmapTe6bJBNYUHJWcMzdNWwBJEo6/HrHbobTPML0vRl6 ghIQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=qdGYTiHVtvluXOGpep78DSShguuxZ80kFTKXgo9OTaylv1U8lALmsG90J+iP5TWFS2 mrR5UJheywZsgPhswC9qNKSV0t6l2tNHcCahOmxbyK22GbYWtTymw1CH6kfaJCoLAZaf Pa6Tu6zVmPeKJCIl67j7iLFBSsIk00sFEltEfQN4FmAmzbpl9KZGjoo3gi9CqqRyMEM1 57W4T9wQ3/vjSXkBWqTqs05KIxTi0thPuDIjXV4CSzoPnxRkbgCpreub9f3FxfQo6C43 xpvGvZWdAA0NCYuC4xpjVO1aFgIHmzZ1+YfGeUVEd3B2gNbW2AXYHThsjGTT5K9AbMYo xVHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1684349340; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fVtyqhrRJ5UbBMQWImjynUVkIpRXG8Ma+YZD4PD5Xk4=; b=NWPhlgBodgHN9M+vyxAZFodMqB2pmWiLsFRlYycKbzZ/9U391Mx1bvNqxXdY0hGoum ll1dkGM7W/IMtHzmxLBw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4ly9TY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.4.0 DYNA|AUTH) with ESMTPSA id j6420az4HIn0BIL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 17 May 2023 20:49:00 +0200 (CEST) From: Stephan Gerhold Date: Wed, 17 May 2023 20:48:45 +0200 Subject: [PATCH 6/8] arm64: dts: qcom: msm8916-pm8916: Clarify purpose MIME-Version: 1.0 Message-Id: <20230510-msm8916-regulators-v1-6-54d4960a05fc@gerhold.net> References: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> In-Reply-To: <20230510-msm8916-regulators-v1-0-54d4960a05fc@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Goal of the msm8916-pm8916.dtsi is to reduce the boilerplate necessary to create a device tree for a typical board with the MSM8916 SoC combined with the PM8916 PMIC. > 99% of all MSM8916 boards use the same standard setup where many of the PM8916 regulators have a fixed purpose and only some are left up for board-specific use. While MSM8916 (and perhaps MSM8939 soon) is currently the only platform with such an include, it has definitely proven useful. With more than 30 boards using it (not all of them upstream yet) it simplifies the review a lot and reduces the chance of configuring the standard components incorrectly. In preparation of extending its scope slightly, add a comment at the top that clearly explains what the .dtsi represents and when it should (or should not) be used. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi index 5b3ed7137e1f..29ef46c33350 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pm8916.dtsi @@ -1,4 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-only +/* + * msm8916-pm8916.dtsi describes common properties (e.g. regulator connections) + * that apply to most devices that make use of the MSM8916 SoC and PM8916 PMIC. + * Many regulators have a fixed purpose in the original reference design and + * were rarely re-used for different purposes. Devices that deviate from the + * typical reference design should not make use of this include and instead add + * the necessary properties in the board-specific device tree. + */ #include "msm8916.dtsi" #include "pm8916.dtsi"