From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9227CC388F7 for ; Thu, 5 Nov 2020 01:55:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3721F20715 for ; Thu, 5 Nov 2020 01:55:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dUppzHrD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733187AbgKEBzG (ORCPT ); Wed, 4 Nov 2020 20:55:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733185AbgKEBzF (ORCPT ); Wed, 4 Nov 2020 20:55:05 -0500 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61B1BC0613CF for ; Wed, 4 Nov 2020 17:55:04 -0800 (PST) Received: by mail-pl1-x644.google.com with SMTP id 1so7119ple.2 for ; Wed, 04 Nov 2020 17:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BIbhTyycJdg8v4aomXZ/rLjTbqfKa4wfwSkv3CiGgXs=; b=dUppzHrDtmOkl4va+Fx+WrFGpF1BztJf6JjZXyVmIr/spj4bPIo0htN3VmSAeRlYpD 6kc/iHPqNy5rhMW2ijvPu2k2PMHYTTBrg8tZW4Fz5jDWUhp//QRKIS9TygUprrITg3op ueEbEAwtbdgKZbbjyiVC1B7S81U+ybKp5pys8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BIbhTyycJdg8v4aomXZ/rLjTbqfKa4wfwSkv3CiGgXs=; b=TRNmsq69knzkYTNprrURhhNbli4QqlzU9IoWbVdieWH3wFhsvTL6y2vS6Qo4x27ZbU rN0spf7Xg85SVVb1wJZ97VCD3eUN/f5r49IgvQ8I4t5ghkSj7vRevinDEOUvxQak0Y1l cj+gdWp7qd2NHsy6JhsfdQnWJ3xPPQ/jqwvBeF16Cwc8hMp1v1RmTFIuYrG3BVYy970y 0VPa40vJQXahQh8xisgtxx9pGURc2EI1tXolD4i0dtcvaaz8yIjBY7GhCBDOr5uSPU8V e6N4R/+zgh89RW0WtYYsF2IaxSgqSke5Syx1tWb84SOQOrsARYzrAWSHYr/8Mk0Hin0+ 81ew== X-Gm-Message-State: AOAM532K3p5br8Rkx8YqlPLclmUYxkgQRejXBWWLu9iWjPDkfvI92Pxu Cx3rpR0dr4A0SaK0zWBkRlHi7A== X-Google-Smtp-Source: ABdhPJzR3PTjViA5QvU9CtF4+v3zgRkRd/mHdtENh2KW+Fxdc/5jmJ/eheYhfIkAyalWEwBzj03F2Q== X-Received: by 2002:a17:902:a60c:b029:d5:dc92:a1ca with SMTP id u12-20020a170902a60cb02900d5dc92a1camr237261plq.16.1604541303863; Wed, 04 Nov 2020 17:55:03 -0800 (PST) Received: from localhost ([2620:15c:202:1:f693:9fff:fef4:e70a]) by smtp.gmail.com with ESMTPSA id y8sm154592pfe.41.2020.11.04.17.55.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 17:55:03 -0800 (PST) Date: Wed, 4 Nov 2020 17:55:01 -0800 From: Matthias Kaehlcke To: Doug Anderson Cc: Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML Subject: Re: [PATCH] arm64: dts: qcom: sc7180-trogdor: Make pp3300_a the default supply for pp3300_hub Message-ID: <20201105015501.GA3079843@google.com> References: <20201103103749.1.I0ed4abdd2b2916fbedf76be254bc3457fb8b9655@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Doug, On Wed, Nov 04, 2020 at 04:29:50PM -0800, Doug Anderson wrote: > Hi, > > On Tue, Nov 3, 2020 at 10:38 AM Matthias Kaehlcke wrote: > > > > The trogdor design has two options for supplying the pp3300_hub power rail, > > it can be supplied by pp3300_l7c or pp3300_a. Initially pp3300_l7c was > > used, newer revisions (will) use pp3300_a as supply. > > > > Add a DT node for the pp3300_a path which includes a power switch that is > > controlled by a GPIO. Make this path the default and keep trogdor rev1, > > lazor rev0 and rev1 on pp3300_l7c. > > It might not hurt to mention that even on early hardware that GPIO84 > was allocated to this purpose but that it was a stuff option for what > actually provided power to the hub. This explains why it's OK to add > the fixed regulator (just with no clients) even on old hardware. If > GPIO84 had been used for something else on old hardware this would > have been bad. ok > > diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > > index bf875589d364..2d64e75a2d6d 100644 > > --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi > > @@ -174,6 +174,21 @@ pp3300_fp_tp: pp3300-fp-tp-regulator { > > vin-supply = <&pp3300_a>; > > }; > > > > + pp3300_hub: pp3300-hub { > > + compatible = "regulator-fixed"; > > + regulator-name = "pp3300_hub"; > > + > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + > > + gpio = <&tlmm 84 GPIO_ACTIVE_HIGH>; > > + enable-active-high; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&en_pp3300_hub>; > > + > > + vin-supply = <&pp3300_a>; > > You're leaving things in a bit of an inconsistent state here. The > "pp3300_hub_7c" is always_on / boot_on. This new one isn't. Actually the new "pp3300_hub" it is also on at boot, the Chrome OS bootloader asserts the GPIO. > I know this is slightly more complicated due to the fact that downstream we > have a way to control the hub power but didn't quite get that resolved > upstream, but the way you have it now, on new hardware upstream will > power off the hub but also keep "pp3300_hub_7c" powered on for no > reason. Seems like that should be fixed? Our EEs told me that it would be ok in terms of power to keep "pp3300_hub_7c" powered, since there would be no significant power consumption without load. In any case unused RPMH regulators are switched off by the kernel ~30s after boot, so I think we are ok: [ 31.202219] ldo7: disabling The above is from the l7c regulator on a Lazor rev2. > > + }; > > + > > /* BOARD-SPECIFIC TOP LEVEL NODES */ > > > > backlight: backlight { > > @@ -469,7 +484,7 @@ ppvar_l6c: ldo6 { > > regulator-initial-mode = ; > > }; > > > > - pp3300_hub: > > + pp3300_hub_7c: > > nit: If it were me, I probably wouldn't have bothered introducing the > "pp3300_hub_7c" alias since it's not a real thing in the schematic. I > would have just had the older revisions refer to "pp3300_l7c". If you > really love the "pp3300_hub_7c", though, I won't stand in your way. true, it's not really needed, I'll get rid of it in the next version. > > pp3300_l7c: ldo7 { > > regulator-min-microvolt = <3304000>; > > regulator-max-microvolt = <3304000>; > > @@ -1151,6 +1166,19 @@ pinconf { > > }; > > }; > > > > + en_pp3300_hub: en-pp3300-hub { > > + pinmux { > > + pins = "gpio84"; > > + function = "gpio"; > > + }; > > + > > + pinconf { > > + pins = "gpio84"; > > + drive-strength = <2>; > > + bias-disable; > > + }; > > + }; > > + > > en_pp3300_dx_edp: en-pp3300-dx-edp { > > "hub" sorts after "dx", so the ordering is slightly wrong here. ack, will change