Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2663418rwd; Wed, 14 Jun 2023 06:03:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LhbDMZO72btbmx5hvRWoENJvoy9XedORMfad4jkL7Fy8aBoqyr3RZS6OGK01yDYyqlPu6 X-Received: by 2002:a17:907:1c1f:b0:982:21a1:c4e0 with SMTP id nc31-20020a1709071c1f00b0098221a1c4e0mr8050770ejc.56.1686747812790; Wed, 14 Jun 2023 06:03:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686747812; cv=none; d=google.com; s=arc-20160816; b=KeraKHRwu/VkMz/TUG18bGXtFtilwZYjLMHaBQsyqmYXJ2ozX5HlAjS9vXbJubOi5I Hh8IlTDq0z1ATi41gbaoAJiijheDIk4Clmj3CPZXsD7pYpFNk8wWlMfyM5+z80xAR5Go HXDEUHPFJo/l9AUoVbdwCOWn/IWoKe2+65kzAyDCZcIqSWrswf41ZAUDBdZYD/2Sccaj vmvbDQhRyQpEeXomyQNW83ZbZb3P8IwsOX5SIZt/wnFgREcNykTusPmEHqtBmNTIn3HV SI4iV9f0O05v6SG4mYc59pOTN9bRwcczjhJkHfLWHWC38FKd60CqTXKj/UTXzaiurUc1 E3lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yV/2JI5MFWLOIVVC3zz2EQ4UGoIgXAQIkr+NgrjDxXU=; b=Kmxl04m90MiQ+n53aoM3T9n6QTKasMKjq6UcndLyrlDnOqvKbbcvMta6yjkGk6tAtc cSEDqV10PpNq5mcOQU5G4CoTmUA/bzOZh10Mx0/c6kEnVaPxCnAdHu8ei5AOVqb65ARh NlgS+GsOYIkJ2JlAkNjMgroySb1ir+b8eRGlZWbqz6pTzYTu76/iLkAQunDsn1Sm7fj0 96JJx9XQuLdX8hmTOy8/Lr0AUXKrgwhMiaIYCl1VWZi91Q3BR+hQZFmUYBCbkptO/n63 zVIEJv1CcH9ojSClH4Hf7f6W4mh6ZudlAtAB2CidVGOT/XtXqPfZJ0HmgCnY1uHipK1r MmYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=koSPBOI3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j18-20020a1709064b5200b009788c880ca4si8535941ejv.1049.2023.06.14.06.02.54; Wed, 14 Jun 2023 06:03:32 -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=@linaro.org header.s=google header.b=koSPBOI3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244753AbjFNMvP (ORCPT + 99 others); Wed, 14 Jun 2023 08:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244732AbjFNMvO (ORCPT ); Wed, 14 Jun 2023 08:51:14 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD70D19A5 for ; Wed, 14 Jun 2023 05:51:10 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f8cdb12719so5366165e9.1 for ; Wed, 14 Jun 2023 05:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686747069; x=1689339069; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yV/2JI5MFWLOIVVC3zz2EQ4UGoIgXAQIkr+NgrjDxXU=; b=koSPBOI3Bjps7GEXrxMDmMrvwQ9bQtVavp8Z8AnXsQMH0dKj9/GzL0t0fYoba9UU88 umqehauoSZt7M4f8QEvNkAlEaw+qtyXprWdY+nnsqDacGJLih7sC2n07MRKnTmDA5FfY d4Zm2P4CpDq+77I6g3sYO4sVKTmNey2QPrh80MirfVIQWIyJ+llw2NPDuCW9FxdHcPRR wxqgp2o0FeP2ngJo3UGRU8bmdkgrPsguEMB0bsWRFAakzpXYDfsbZSrQGIH/WJRVO+57 ZAN7F2+aQw4+S7DZt1kPr6YZ4r7iE5phERe53O3KkdeI6Wb+3c9NDOeIN3+Ey+iHKD8j vtRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686747069; x=1689339069; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yV/2JI5MFWLOIVVC3zz2EQ4UGoIgXAQIkr+NgrjDxXU=; b=KkMPmEvrYdmiDQAs+lJDA1bmbvnRtk6SLWiHlLtnd1NKpL2khypvVb4sF/GgoTDMCV TuijsNm6SzM4UEUWDYCouZCcDs1B51Uc2gkdB0CR80fQy9N3NPi0kPaZ/nL/rz6MUrT1 bqB5QsIo5KGOV8+y5tmseolQ8AvQR0lWsS1UGqORDL1iACgJQFOYEiWdNVQ5eos+MrWF ObaOqvaWbe8drptrwDqdfDFO7HZ3vGyOFbaSSm92XrTG33tohDrGj08kx9ABbG8cL/cI 3QALMNQEeyj4oqIH5NVtUU1mnHe55wDrnXDYeQwA7zuC8isd/hfIEk4jA9npIf3l+L/O 9MYA== X-Gm-Message-State: AC+VfDz4n7TWgZZot30k5FMEKAqDiNEwmuTXj7pT3JYbGVeOtw2eAZtH fgsVcWpZT/DdzrHGYtCNKuwTFA== X-Received: by 2002:a7b:c3ce:0:b0:3f8:c9a4:4998 with SMTP id t14-20020a7bc3ce000000b003f8c9a44998mr3327071wmj.28.1686747069206; Wed, 14 Jun 2023 05:51:09 -0700 (PDT) Received: from [192.168.0.162] (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id s14-20020adfeb0e000000b0030ae53550f5sm18180780wrn.51.2023.06.14.05.51.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jun 2023 05:51:08 -0700 (PDT) Message-ID: <71a05574-64f0-1f00-19a4-8962d84ccecf@linaro.org> Date: Wed, 14 Jun 2023 13:51:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 7/8] arm64: dts: qcom: msm8939: Define regulator constraints next to usage Content-Language: en-US To: Stephan Gerhold , Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230530-msm8939-regulators-v1-0-a3c3ac833567@gerhold.net> <20230530-msm8939-regulators-v1-7-a3c3ac833567@gerhold.net> From: Bryan O'Donoghue In-Reply-To: <20230530-msm8939-regulators-v1-7-a3c3ac833567@gerhold.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 On 14/06/2023 08:16, Stephan Gerhold wrote: > Right now each MSM8939 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 MSM8939 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 > msm8939-pm8916.dtsi, so it can and should also define the related > voltage constraints. These are not board-specific but defined in the > MSM8939/PM8916 specification. There is no documentation available for > MSM8939 but in practice it's almost identical to MSM8916. > > 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. > > The same changes were already made for MSM8916 in commit b0a8f16ae4a0 > ("arm64: dts: qcom: msm8916: Define regulator constraints next to usage"). > > Signed-off-by: Stephan Gerhold It makes sense to replicate the 8916 change. Reviewed-by: Bryan O'Donoghue