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 E833DC76195 for ; Thu, 16 Mar 2023 19:18:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230139AbjCPTR7 (ORCPT ); Thu, 16 Mar 2023 15:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbjCPTRx (ORCPT ); Thu, 16 Mar 2023 15:17:53 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2BC2B32A7 for ; Thu, 16 Mar 2023 12:17:50 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id eh3so11679673edb.11 for ; Thu, 16 Mar 2023 12:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kali.org; s=google; t=1678994269; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xvbBMT7ofHzrbvXt+PN9x+UJpe8YiYYHtlZEo+jEfTM=; b=heuHIWUccDy7S2Y8CmxkFumgitLqUSXgd84is/kjJO7/dGJ1qBPGqCXJjlLv8aE+HA tGUKnK6FcsrZRrZ31SvxN0FxZgpDNTYlPBo2rOocBGTB+0Qk9HeNT32/uevX9z7FOzQN RggEnVbUY9SAbSRZnGTVcmrSAAs7tyK87gX96c2OArvgHIrcKyTscq4GK0KlwXuoQ8Wf lUtPskqfSzAtP/zCD8CP0lLMZ1JP/lLO/75gNgsuxT2KomkLX1sb3yQgXkT6CNHfjE5q KlLOyZBrhis2D/ab3w3tn/UqTu+Idu3zOUpnwWZiTIq9vCrJS5ClgtPNcl8KyCDvhtsW v5Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678994269; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xvbBMT7ofHzrbvXt+PN9x+UJpe8YiYYHtlZEo+jEfTM=; b=4JKv9wBWd9e26weJoqkjfF9Lx1Q/N5tjUxtVPY5BRZdsUrKBtTC9aNheGK/cTmhuTz ATL0clr/03qGRw9mYl2cb9dM+cCpwnvKuPYWlQ99tASwMjRSjZRHCI6FvFkpc6CMqQi8 WNGSaO5sY6acOtVfBBVoMqMSr8gCK0Rl20gpRRC3VE3Pttt5zux3rJW71/6YU7/0qplm x5BnhMw87jnlxd+qMM5P2J5pMQMYkhOKGm3r/DLcLApwRrJnAC7P/Fjcg+CnI0myxYYp xLyBFuQ70H92QZP976U7Hiq351pZm2r4XWxZEW5tXRUkiv02Evc66UwjznaXT06f98ka /qnQ== X-Gm-Message-State: AO0yUKWqF8w8+aElk9i4SSgNwZ3f+W/l+EOpn5J0txccr1OiGO2ihsgR GoYzDxImmIC4ryA4GmQrX7gI5ppH2g48Ot3Rm15bFkz+7v5zfVn7m98= X-Google-Smtp-Source: AK7set/kjprnV34qU3c1tgSinbRc90owaG+ycfoAtwQQ2Faa3s1pMXyrGprH3Sd/BLCv/uSuZUHRkGIxcWzoU10Kpho= X-Received: by 2002:a50:954e:0:b0:4fb:9735:f913 with SMTP id v14-20020a50954e000000b004fb9735f913mr400241eda.8.1678994269329; Thu, 16 Mar 2023 12:17:49 -0700 (PDT) MIME-Version: 1.0 References: <20230316034759.73489-1-steev@kali.org> <20230316034759.73489-5-steev@kali.org> In-Reply-To: From: Steev Klimaszewski Date: Thu, 16 Mar 2023 14:17:38 -0500 Message-ID: Subject: Re: [PATCH v6 4/4] arm64: dts: qcom: sc8280xp-x13s: Add bluetooth To: Johan Hovold Cc: Bjorn Andersson , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Andy Gross , Konrad Dybcio , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Sven Peter , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, Mark Pearson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Johan, On Thu, Mar 16, 2023 at 6:05=E2=80=AFAM Johan Hovold wro= te: > > On Thu, Mar 16, 2023 at 11:26:12AM +0100, Johan Hovold wrote: > > On Wed, Mar 15, 2023 at 10:47:58PM -0500, Steev Klimaszewski wrote: > > > The Lenovo Thinkpad X13s has a WCN6855 Bluetooth controller on uart2, > > > add this. > > > > > > Signed-off-by: Steev Klimaszewski > > > --- > > > > + vreg_s1c: smps1 { > > > + regulator-name =3D "vreg_s1c"; > > > + regulator-min-microvolt =3D <1880000>; > > > + regulator-max-microvolt =3D <1900000>; > > > + regulator-initial-mode =3D ; > > > + regulator-allowed-modes =3D , > > > + ; > > > + regulator-allow-set-load; > > > > So this does not look quite right still as you're specifying an initial > > mode which is not listed as allowed. > > > > Also there are no other in-tree users of RPMH_REGULATOR_MODE_RET and > > AUTO is used to switch mode automatically which seems odd to use with > > allow-set-load. > > > > This regulator is in fact also used by the wifi part of the chip and as > > that driver does not set any loads so we may end up with a regulator in > > retention mode while wifi is in use. > > > > Perhaps Bjorn can enlighten us, but my guess is that this should just b= e > > "intial-mode =3D AUTO" (or even HPM, but I have no idea where this came > > from originally). > > This one probably also needs to be marked as always-on as we don't > currently describe the fact that the wifi part also uses s1c. > > Johan I couldn't remember exactly why I chose HPM, and so I recreated what I'd done. I looked to see what modes were available by git grepping the kernel sources and since they are in include/dt-bindings/regulator/qcom,rpmh-regulator.h with a comment explaining what each mode is, I picked HPM since it starts it at the full rated current. As to why I chose the others... it was based on SMPS being mentioned in that comment block. Since I wasn't sure what PFM is (and admittedly, did not look it up) I skipped it. And you are right, we probably don't want to yank that regulator out from under the wifi... will add that in v7, so I guess for v7 we want HPM, LPM, AUTO with AUTO being initial. I guess I was trying to think that RET would allow as little power usage as possible when bluetooth isn't in use. --steev