linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Sean Nyekjaer <sean@geanix.com>
Cc: Conor Dooley <conor.dooley@microchip.com>,
	robh+dt@kernel.org, Lee Jones <lee@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	pascal Paillet <p.paillet@foss.st.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] dt-bindings: mfd: stpmic1: add fsl,pmic-poweroff property
Date: Wed, 24 May 2023 20:57:16 +0100	[thread overview]
Message-ID: <20230524-cider-unarmored-b1141db1030b@spud> (raw)
In-Reply-To: <24418459-DE19-4575-835B-8673F279993C@geanix.com>

[-- Attachment #1: Type: text/plain, Size: 4091 bytes --]

Hey Sean, Lee,

On Wed, May 24, 2023 at 12:30:59PM +0200, Sean Nyekjaer wrote:
> > On 24 May 2023, at 12.08, Conor Dooley <conor.dooley@microchip.com> wrote:
> > On Wed, May 24, 2023 at 10:16:13AM +0200, Sean Nyekjær wrote:
> >>> On 23 May 2023, at 19.29, Conor Dooley <conor@kernel.org> wrote:
> >>> On Tue, May 23, 2023 at 11:55:50AM +0200, Sean Nyekjær wrote:
> >>>>> On 16 May 2023, at 20.06, Conor Dooley <conor@kernel.org> wrote:
> >>>>> On Tue, May 16, 2023 at 03:22:24PM +0200, Sean Nyekjaer wrote:

> >>>>>> +  st,pmic-poweroff:
> >>>>>> +    $ref: /schemas/types.yaml#/definitions/flag
> >>>>>> +    description: |
> >>>>>> +      if present, configure the PMIC to shutdown all power rails when
> >>>>>> +      power off sequence have finished.
> >>>>>> +      Use this option if the SoC should be powered off by external power management
> >>>>>> +      IC (PMIC).
> >>>>> 
> >>>>> Just reading this description, this is sounding quite like a "software
> >>>>> behaviour" type of property, which are not permitted, rather than
> >>>>> describing some element of the hardware. Clearly you are trying to solve
> >>>>> an actual problem though, so try re-phrasing the description (and
> >>>>> property name) to focus on what exact hardware configuration it is that
> >>>>> you are trying to special-case.
> >>>>> Krzysztof suggested that the samsung,s2mps11-acokb-ground property in
> >>>>> samsung,s2mps11.yaml is addressing a similar problem, so that could be
> >>>>> good to look at.

> >>> The description for the property that Krzysztof mentioned is
> >>> samsung,s2mps11-acokb-ground:
> >>>   description: |
> >>>     Indicates that ACOKB pin of S2MPS11 PMIC is connected to the ground so
> >>>     the PMIC must manually set PWRHOLD bit in CTRL1 register to turn off the
> >>>     power. Usually the ACOKB is pulled up to VBATT so when PWRHOLD pin goes
> >>>     low, the rising ACOKB will trigger power off.
> >>> 
> >>> In other words, I am asking what (abnormal?) scenario there is that means
> >>> you need the property, rather than what setting the property does.
> >>> Or am I totally off, and this is the only way this PMIC works?
> >> 
> >> Indicates that the power management IC (PMIC) turn-off condition is met
> >> by setting the SWOFF bit in the main control register (MAIN_CR) register.
> >> Turn-off condition can still be reached by the PONKEY input.
> >> 
> >> ?
> >> 
> >> I must admit I’m somewhat lost here :)
> > 
> > Sorry about that. I'm trying to understand what is different about your
> > hardware that it needs the property rather than what adding the property
> > does. If you look at the samsung one, it describes both the
> > configuration of the hardware ("ACOKB pin of S2MPS11 PMIC is connected to
> > the ground") and how that is different from normal ("Usually the ACOKB is
> > pulled up to VBATT so when PWRHOLD pin goes low, the rising ACOKB will
> > trigger power off.")
> > 
> > Looking at your datasheet, you don't have such a pin though - just the
> > sw poweroff bit & the PONKEY stuff. My angle is just that I am trying
> > to figure out why you need this property when it has not been needed
> > before. Or why you would not always want to "shutdown all power rails
> > when power-off sequence have finished". I'm sorry if these are silly
> > questions.
> > 
> 
> No silly questions, maybe they trick me to come up with the correct answer :D
> 
> Basically without this, you won’t be able to power off the system
> other than hitting the PONKEY.
> So it’s a new feature that wasn’t supported before.
> Maybe this feature should not be optional?

Yeah, I suppose that is the rabbit-hole that the silly questions lead
down. I don't know the answer to that though. Maybe Lee does?

> If st,pmic-poweroff == true:
> System will power off as the last step in the power off sequence.
> If st,pmic-powerof == false:
> System will reboot in the last step in the power off sequence.
> 
> I thought of this, as an always on system failsafe.
> 
> /Sean

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-05-24 19:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 13:22 [PATCH v2 1/3] mfd: stpmic1: fixup main control register and bits naming Sean Nyekjaer
2023-05-16 13:22 ` [PATCH v2 2/3] mfd: stpmic1: add pmic poweroff via sys-off handler Sean Nyekjaer
2023-05-25 11:46   ` Lee Jones
2023-05-16 13:22 ` [PATCH v2 3/3] dt-bindings: mfd: stpmic1: add fsl,pmic-poweroff property Sean Nyekjaer
2023-05-16 18:06   ` Conor Dooley
2023-05-23  9:55     ` Sean Nyekjær
2023-05-23 17:29       ` Conor Dooley
2023-05-24  8:16         ` Sean Nyekjær
2023-05-24 10:08           ` Conor Dooley
2023-05-24 10:30             ` Sean Nyekjaer
2023-05-24 19:57               ` Conor Dooley [this message]
2023-06-01  7:12               ` Krzysztof Kozlowski
2023-06-01 14:05                 ` Sean Nyekjaer
2023-06-01 15:25                   ` Krzysztof Kozlowski
2023-06-01 20:03                     ` Conor Dooley
2023-05-25 11:46 ` [PATCH v2 1/3] mfd: stpmic1: fixup main control register and bits naming Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230524-cider-unarmored-b1141db1030b@spud \
    --to=conor@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.paillet@foss.st.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@geanix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).