public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Elliot Berman <quic_eberman@quicinc.com>
To: Rob Herring <robh@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Sebastian Reichel <sre@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<kernel@quicinc.com>,
	Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>,
	Melody Olvera <quic_molvera@quicinc.com>,
	"Prasad Sodagudi" <quic_psodagud@quicinc.com>,
	Mukesh Ojha <quic_mojha@quicinc.com>
Subject: Re: [RFC PATCH 3/4] dt-bindings: power: reset: Document arm,psci-vendor-reset
Date: Tue, 25 Jul 2023 13:26:46 -0700	[thread overview]
Message-ID: <586f2ea2-d74e-78f5-4959-4fbbe23ddbae@quicinc.com> (raw)
In-Reply-To: <0e72a1a0-611c-9667-866e-a4a1f67f10f6@quicinc.com>



On 7/25/2023 11:01 AM, Elliot Berman wrote:
> 
> 
> On 7/24/2023 4:23 PM, Rob Herring wrote:
>> On Mon, Jul 24, 2023 at 03:30:53PM -0700, Elliot Berman wrote:
>>> Add devicetree bindings for using PSCI SYSTEM_RESET2 with vendor 
>>> reset  types.
>>>
>>> Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
>>> ---
>>>   .../power/reset/arm,psci-vendor-reset.yaml    | 35 +++++++++++++++++++
>>>   MAINTAINERS                                   |  1 +
>>>   2 files changed, 36 insertions(+)
>>>   create mode 100644 
>>> Documentation/devicetree/bindings/power/reset/arm,psci-vendor-reset.yaml
>>>
>>> diff --git 
>>> a/Documentation/devicetree/bindings/power/reset/arm,psci-vendor-reset.yaml b/Documentation/devicetree/bindings/power/reset/arm,psci-vendor-reset.yaml
>>> new file mode 100644
>>> index 000000000000..18b0b8c167a1
>>> --- /dev/null
>>> +++ 
>>> b/Documentation/devicetree/bindings/power/reset/arm,psci-vendor-reset.yaml
>>> @@ -0,0 +1,35 @@
>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>>> +# Copyright 2023 Qualcomm Innovation Center, Inc. All Rights Reserved.
>>> +%YAML 1.2
>>> +---
>>> +$id: 
>>> http://devicetree.org/schemas/power/reset/arm,psci-vendor-reset.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: PSCI SYSTEM_RESET2 Vendor Resets
>>> +
>>> +maintainers:
>>> +  - Elliot Berman <quic_eberman@quicinc.com>
>>> +
>>> +description: |
>>> +  PSCI SYSTEM_RESET2 supports vendor-defined reset types. This 
>>> describes
>>> +  the conversion of reboot modes to the reset types.
>>> +
>>> +properties:
>>> +  compatible:
>>> +    const: arm,psci-vendor-reset
>>> +
>>> +allOf:
>>> +  - $ref: reboot-mode.yaml#
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    firmware {
>>> +      psci-vendor-resets {
>>> +        compatible = "arm,psci-vendor-reset";
>>
>> We already have a node for PSCI, we don't need a second one. You can
>> have a separate driver without a separate node.
>>
> 
> I could also place the reboot-mode functionality straight into 
> drivers/firwmare/psci/? I thought that might be more controversial than 
> separate driver, but maybe not?
> 
> Mark/Loreno, do you have any concerns to add the reboot-mode driver 
> functionality directly in drivers/firmware/psci/psci.c?
> 
> Sebastian, do you have any concerns to have this reboot-mode driver 
> outside drivers/power/reset/?
> 

Sebastian, please disregard this question.

Mukesh pointed out that reboot-mode framework isn't the right option 
here since this driver does the actual reset and, as I understand, 
reboot-mode isn't intended to do actual reset. I'm going to implement 
something similar to what reboot-mode framework does but register 
against the restart_handler_list instead of reboot_notifier_list.

>>> +        reboot-normal = <0x100>;
>>
>> Wouldn't 'normal' be the normal PSCI reset?
>>
> 
> Ah, right. I had my head buried in the reboot-mode code when creating 
> the example. I can remove from the example.
> 
>>> +        reboot-bootloader = <0x101>;
>>> +        reboot-fastboot = <0x102>;
>>> +      };
>>> +    };
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index d516295978a4..2da4c5f1917b 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -16982,6 +16982,7 @@ M:    Mark Rutland <mark.rutland@arm.com>
>>>   M:    Lorenzo Pieralisi <lpieralisi@kernel.org>
>>>   L:    linux-arm-kernel@lists.infradead.org (moderated for 
>>> non-subscribers)
>>>   S:    Maintained
>>> +F:    
>>> Documentation/devicetree/bindings/power/reset/arm,psci-vendor-reset.yaml
>>>   F:    drivers/firmware/psci/
>>>   F:    include/linux/psci.h
>>>   F:    include/uapi/linux/psci.h
>>> -- 
>>> 2.41.0
>>>

  reply	other threads:[~2023-07-25 20:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 22:30 [RFC PATCH 0/4] Implement a PSCI SYSTEM_RESET2 reboot-mode driver Elliot Berman
2023-07-24 22:30 ` [RFC PATCH 1/4] power: reset: reboot-mode: Allow magic to be 0 Elliot Berman
2023-07-26  5:06   ` Pavan Kondeti
2023-07-24 22:30 ` [RFC PATCH 2/4] power: reset: reboot-mode: Wire reboot_mode enum to magic Elliot Berman
2023-07-25 10:03   ` Mukesh Ojha
2023-07-25 21:04     ` Elliot Berman
2023-07-26  5:10       ` Pavan Kondeti
2023-07-24 22:30 ` [RFC PATCH 3/4] dt-bindings: power: reset: Document arm,psci-vendor-reset Elliot Berman
2023-07-24 23:23   ` Rob Herring
2023-07-25 18:01     ` Elliot Berman
2023-07-25 20:26       ` Elliot Berman [this message]
2023-07-26 13:45       ` Rob Herring
2023-07-26 17:18         ` Elliot Berman
2023-07-25  8:29   ` Mukesh Ojha
2023-07-24 22:30 ` [RFC PATCH 4/4] power: reset: Implement a PSCI SYSTEM_RESET2 reboot-mode driver Elliot Berman
2023-07-25  5:44   ` Krzysztof Kozlowski
2023-07-26 10:41   ` Pavan Kondeti
2023-07-26 17:19     ` Elliot Berman
2023-07-27  3:00       ` Pavan Kondeti
2023-07-25 19:12 ` [RFC PATCH 0/4] " Florian Fainelli
2023-07-25 20:27   ` Elliot Berman
2023-07-26 17:38     ` Florian Fainelli

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=586f2ea2-d74e-78f5-4959-4fbbe23ddbae@quicinc.com \
    --to=quic_eberman@quicinc.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@quicinc.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=quic_mojha@quicinc.com \
    --cc=quic_molvera@quicinc.com \
    --cc=quic_psodagud@quicinc.com \
    --cc=quic_satyap@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    /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