Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310513 > unrolled thread

Re: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver

Started byJohn Stultz <john.stultz@linaro.org>
First post2016-01-15 23:50 +0100
Last post2016-01-19 09:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 1/4] dt-bindings: power: reset: add document for  reboot-mode driver John Stultz <john.stultz@linaro.org> - 2016-01-15 23:50 +0100
    Re: [PATCH v2 1/4] dt-bindings: power: reset: add document for  reboot-mode driver Andy Yan <andy.yan@rock-chips.com> - 2016-01-19 09:40 +0100

#1310513 — Re: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver

FromJohn Stultz <john.stultz@linaro.org>
Date2016-01-15 23:50 +0100
SubjectRe: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver
Message-ID<qRllU-42W-9@gated-at.bofh.it>
On Tue, Jan 12, 2016 at 3:29 AM, Andy Yan <andy.yan@rock-chips.com> wrote:
> add device tree binding document for reboot-mode driver
>
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>
> ---
>
> Changes in v2: None
> Changes in v1: None
>
>  .../bindings/power/reset/reboot-mode.txt           | 41 +++++++++++++++++
>  .../bindings/power/reset/syscon-reboot-mode.txt    | 52 ++++++++++++++++++++++
>  2 files changed, 93 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.txt
>  create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt
>
> diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt
> new file mode 100644
> index 0000000..81d9f66
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt
> @@ -0,0 +1,41 @@
> +Generic reboot mode core map driver
> +
> +This driver get reboot mode arguments and call the write
> +interface to stores the magic value in special register
> +or ram . Then the bootloader can read it and take different
> +action according to the argument stored.
> +
> +Required properties:
> +- compatible: only support "syscon-reboot-mode" now.
> +
> +Each mode is represented as a sub-node of reboot_mode:
> +
> +Subnode required properties:
> +- linux,mode: reboot mode command,such as "loader", "recovery", "fastboot".
> +- loader,magic: magic number for the mode, this is vendor specific.
> +
> +Example:
> +       reboot_mode {
> +               compatible = "syscon-reboot-mode";
> +               offset = <0x40>;
> +
> +               loader {
> +                       linux,mode = "loader";
> +                       loader,magic = <BOOT_LOADER>;
> +               };
> +
> +               maskrom {
> +                       linux,mode = "maskrom";
> +                       loader,magic = <BOOT_MASKROM>;
> +               };
> +
> +               recovery {
> +                       linux,mode = "recovery";
> +                       loader,magic = <BOOT_RECOVERY>;
> +               };
> +
> +               fastboot {
> +                       linux,mode = "fastboot";
> +                       loader,magic = <BOOT_FASTBOOT>;
> +               };
> +        };


So one minor thought here. While the commands are somewhat vendor
specific, would it be a good idea for the example commands to match
the common commands on Android devices?  For example, usually
"bootloader" is what gets you into fastboot mode on nexus devices.

thanks
-john

[toc] | [next] | [standalone]


#1311996

FromAndy Yan <andy.yan@rock-chips.com>
Date2016-01-19 09:40 +0100
Message-ID<qSzZw-5fh-5@gated-at.bofh.it>
In reply to#1310513
Hi John:

On 2016年01月16日 06:41, John Stultz wrote:
> On Tue, Jan 12, 2016 at 3:29 AM, Andy Yan <andy.yan@rock-chips.com> wrote:
>> add device tree binding document for reboot-mode driver
>>
>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>>
>> ---
>>
>> Changes in v2: None
>> Changes in v1: None
>>
>>   .../bindings/power/reset/reboot-mode.txt           | 41 +++++++++++++++++
>>   .../bindings/power/reset/syscon-reboot-mode.txt    | 52 ++++++++++++++++++++++
>>   2 files changed, 93 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.txt
>>   create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt
>>
>> diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt
>> new file mode 100644
>> index 0000000..81d9f66
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt
>> @@ -0,0 +1,41 @@
>> +Generic reboot mode core map driver
>> +
>> +This driver get reboot mode arguments and call the write
>> +interface to stores the magic value in special register
>> +or ram . Then the bootloader can read it and take different
>> +action according to the argument stored.
>> +
>> +Required properties:
>> +- compatible: only support "syscon-reboot-mode" now.
>> +
>> +Each mode is represented as a sub-node of reboot_mode:
>> +
>> +Subnode required properties:
>> +- linux,mode: reboot mode command,such as "loader", "recovery", "fastboot".
>> +- loader,magic: magic number for the mode, this is vendor specific.
>> +
>> +Example:
>> +       reboot_mode {
>> +               compatible = "syscon-reboot-mode";
>> +               offset = <0x40>;
>> +
>> +               loader {
>> +                       linux,mode = "loader";
>> +                       loader,magic = <BOOT_LOADER>;
>> +               };
>> +
>> +               maskrom {
>> +                       linux,mode = "maskrom";
>> +                       loader,magic = <BOOT_MASKROM>;
>> +               };
>> +
>> +               recovery {
>> +                       linux,mode = "recovery";
>> +                       loader,magic = <BOOT_RECOVERY>;
>> +               };
>> +
>> +               fastboot {
>> +                       linux,mode = "fastboot";
>> +                       loader,magic = <BOOT_FASTBOOT>;
>> +               };
>> +        };
>
> So one minor thought here. While the commands are somewhat vendor
> specific, would it be a good idea for the example commands to match
> the common commands on Android devices?  For example, usually
> "bootloader" is what gets you into fastboot mode on nexus devices.
>
> thanks
> -john
>
>
>
>

   When I run the "adb help" , I got the following message:
   adb reboot [bootloader|recovery] - reboots the device, optionally 
into the bootloader or recovery program
   adb reboot-bootloader        - reboots the device into the bootloader

   It  only says "adb reboot-bootloader" will reboot the device into 
bootloader, not specific to fastboot.

   I add @Simon from Google here, maybe he can give some suggestions.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web