2023-10-30 21:33:04

by Elliot Berman

[permalink] [raw]
Subject: [PATCH RFC 1/2] dt-bindings: arm: Document reboot mode magic

Add bindings to describe vendor-specific reboot modes. Values here
correspond to valid parameters to vendor-specific reset types in PSCI
SYSTEM_RESET2 call.

Signed-off-by: Elliot Berman <[email protected]>
---
Documentation/devicetree/bindings/arm/psci.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml
index 0c5381e081bd..dc23e901bd0a 100644
--- a/Documentation/devicetree/bindings/arm/psci.yaml
+++ b/Documentation/devicetree/bindings/arm/psci.yaml
@@ -122,6 +122,19 @@ patternProperties:
[3] Documentation/devicetree/bindings/power/power-domain.yaml
[4] Documentation/devicetree/bindings/power/domain-idle-state.yaml

+ "^reboot-mode-.*$":
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 2
+ description: |
+ Describes a vendor-specific reset type. The string after "reboot-mode-"
+ maps a reboot mode to the parameters in the PSCI SYSTEM_RESET2 call.
+
+ Parameters are named reboot-mode-xxx = <type[, cookie]>, where xxx
+ is the name of the magic reboot mode, type is the lower 31 bits
+ of the reset_type, and, optionally, the cookie value. If the cookie
+ is not provided, it is defaulted to zero.
+
required:
- compatible
- method

--
2.41.0


2023-10-31 17:49:09

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH RFC 1/2] dt-bindings: arm: Document reboot mode magic

On Mon, Oct 30, 2023 at 02:31:33PM -0700, Elliot Berman wrote:
> Add bindings to describe vendor-specific reboot modes. Values here
> correspond to valid parameters to vendor-specific reset types in PSCI
> SYSTEM_RESET2 call.
>
> Signed-off-by: Elliot Berman <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/psci.yaml | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml
> index 0c5381e081bd..dc23e901bd0a 100644
> --- a/Documentation/devicetree/bindings/arm/psci.yaml
> +++ b/Documentation/devicetree/bindings/arm/psci.yaml
> @@ -122,6 +122,19 @@ patternProperties:
> [3] Documentation/devicetree/bindings/power/power-domain.yaml
> [4] Documentation/devicetree/bindings/power/domain-idle-state.yaml
>
> + "^reboot-mode-.*$":
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + minItems: 1
> + maxItems: 2
> + description: |
> + Describes a vendor-specific reset type. The string after "reboot-mode-"
> + maps a reboot mode to the parameters in the PSCI SYSTEM_RESET2 call.
> +
> + Parameters are named reboot-mode-xxx = <type[, cookie]>, where xxx
> + is the name of the magic reboot mode, type is the lower 31 bits
> + of the reset_type, and, optionally, the cookie value. If the cookie
> + is not provided, it is defaulted to zero.

Please use and possibly extend the existing reboot-mode binding.

> +
> required:
> - compatible
> - method
>
> --
> 2.41.0
>

2023-10-31 21:25:51

by Elliot Berman

[permalink] [raw]
Subject: Re: [PATCH RFC 1/2] dt-bindings: arm: Document reboot mode magic



On 10/31/2023 10:48 AM, Rob Herring wrote:
> On Mon, Oct 30, 2023 at 02:31:33PM -0700, Elliot Berman wrote:
>> Add bindings to describe vendor-specific reboot modes. Values here
>> correspond to valid parameters to vendor-specific reset types in PSCI
>> SYSTEM_RESET2 call.
>>
>> Signed-off-by: Elliot Berman <[email protected]>
>> ---
>> Documentation/devicetree/bindings/arm/psci.yaml | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentation/devicetree/bindings/arm/psci.yaml
>> index 0c5381e081bd..dc23e901bd0a 100644
>> --- a/Documentation/devicetree/bindings/arm/psci.yaml
>> +++ b/Documentation/devicetree/bindings/arm/psci.yaml
>> @@ -122,6 +122,19 @@ patternProperties:
>> [3] Documentation/devicetree/bindings/power/power-domain.yaml
>> [4] Documentation/devicetree/bindings/power/domain-idle-state.yaml
>>
>> + "^reboot-mode-.*$":
>> + $ref: /schemas/types.yaml#/definitions/uint32-array
>> + minItems: 1
>> + maxItems: 2
>> + description: |
>> + Describes a vendor-specific reset type. The string after "reboot-mode-"
>> + maps a reboot mode to the parameters in the PSCI SYSTEM_RESET2 call.
>> +
>> + Parameters are named reboot-mode-xxx = <type[, cookie]>, where xxx
>> + is the name of the magic reboot mode, type is the lower 31 bits
>> + of the reset_type, and, optionally, the cookie value. If the cookie
>> + is not provided, it is defaulted to zero.
>
> Please use and possibly extend the existing reboot-mode binding.
>

Sure, I can do that. I noticed most of the reboot-mode devices not doing that, but they probably should.

I've sent patches to fix that:

https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/

>> +
>> required:
>> - compatible
>> - method
>>
>> --
>> 2.41.0
>>