From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Yan Subject: Re: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver Date: Tue, 19 Jan 2016 16:31:27 +0800 Message-ID: <569DF45F.3050908@rock-chips.com> References: <1452598029-8222-1-git-send-email-andy.yan@rock-chips.com> <1452598189-8272-1-git-send-email-andy.yan@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: John Stultz Cc: =?UTF-8?Q?Heiko_St=c3=bcbner?= , Arnd Bergmann , linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org, Kumar Gala , Ian Campbell , Rob Herring , Catalin Marinas , geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org, sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Olof Johansson , dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Alexandre Belloni , jun.nie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, =?UTF-8?Q?Pawe=c5=82_Moll?= , f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, Will Deacon , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux PM list , Russell King - ARM Linux , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org, moritz.fischer-+aYTwkv1SeIAvxtiuMwx3w@public.gmane.org, cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, lkml List-Id: linux-pm@vger.kernel.org Hi John: On 2016=E5=B9=B401=E6=9C=8816=E6=97=A5 06:41, John Stultz wrote: > On Tue, Jan 12, 2016 at 3:29 AM, Andy Yan w= rote: >> add device tree binding document for reboot-mode driver >> >> Signed-off-by: Andy Yan >> >> --- >> >> 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/r= eboot-mode.txt >> create mode 100644 Documentation/devicetree/bindings/power/reset/s= yscon-reboot-mode.txt >> >> diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mo= de.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", "fa= stboot". >> +- loader,magic: magic number for the mode, this is vendor specific. >> + >> +Example: >> + reboot_mode { >> + compatible =3D "syscon-reboot-mode"; >> + offset =3D <0x40>; >> + >> + loader { >> + linux,mode =3D "loader"; >> + loader,magic =3D ; >> + }; >> + >> + maskrom { >> + linux,mode =3D "maskrom"; >> + loader,magic =3D ; >> + }; >> + >> + recovery { >> + linux,mode =3D "recovery"; >> + loader,magic =3D ; >> + }; >> + >> + fastboot { >> + linux,mode =3D "fastboot"; >> + loader,magic =3D ; >> + }; >> + }; > > 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=20 into the bootloader or recovery program adb reboot-bootloader - reboots the device into the bootloade= r It only says "adb reboot-bootloader" will reboot the device into=20 bootloader, not specific to fastboot. I add @Simon from Google here, maybe he can give some suggestions. -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: andy.yan@rock-chips.com (Andy Yan) Date: Tue, 19 Jan 2016 16:31:27 +0800 Subject: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver In-Reply-To: References: <1452598029-8222-1-git-send-email-andy.yan@rock-chips.com> <1452598189-8272-1-git-send-email-andy.yan@rock-chips.com> Message-ID: <569DF45F.3050908@rock-chips.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi John: On 2016?01?16? 06:41, John Stultz wrote: > On Tue, Jan 12, 2016 at 3:29 AM, Andy Yan wrote: >> add device tree binding document for reboot-mode driver >> >> Signed-off-by: Andy Yan >> >> --- >> >> 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 = ; >> + }; >> + >> + maskrom { >> + linux,mode = "maskrom"; >> + loader,magic = ; >> + }; >> + >> + recovery { >> + linux,mode = "recovery"; >> + loader,magic = ; >> + }; >> + >> + fastboot { >> + linux,mode = "fastboot"; >> + loader,magic = ; >> + }; >> + }; > > 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757498AbcASIbl (ORCPT ); Tue, 19 Jan 2016 03:31:41 -0500 Received: from regular1.263xmail.com ([211.150.99.130]:58235 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757302AbcASIbg (ORCPT ); Tue, 19 Jan 2016 03:31:36 -0500 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:S;ATT:S;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-MAE-MAIL_UID: 00569df45f011f1f@maes@6a057af68cd7938e X-MAE-ID: 223.6.254.61 X-RL-SENDER: andy.yan@rock-chips.com X-LOGIN-NAME: andy.yan@rock-chips.com X-SENDER-IP: 121.15.173.1 Subject: Re: [PATCH v2 1/4] dt-bindings: power: reset: add document for reboot-mode driver To: John Stultz References: <1452598029-8222-1-git-send-email-andy.yan@rock-chips.com> <1452598189-8272-1-git-send-email-andy.yan@rock-chips.com> Cc: =?UTF-8?Q?Heiko_St=c3=bcbner?= , Arnd Bergmann , linux@roeck-us.net, Kumar Gala , Ian Campbell , Rob Herring , Catalin Marinas , geert+renesas@glider.be, sre@kernel.org, Olof Johansson , dbaryshkov@gmail.com, Alexandre Belloni , jun.nie@linaro.org, =?UTF-8?Q?Pawe=c5=82_Moll?= , f.fainelli@gmail.com, Will Deacon , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Linux PM list , Russell King - ARM Linux , "linux-arm-kernel@lists.infradead.org" , lorenzo.pieralisi@arm.com, moritz.fischer@ettus.com, cernekee@gmail.com, lkml , dwmw2@infradead.org, Mark Rutland , maxime.ripard@free-electrons.com, Simon Glass From: Andy Yan Message-ID: <569DF45F.3050908@rock-chips.com> Date: Tue, 19 Jan 2016 16:31:27 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John: On 2016年01月16日 06:41, John Stultz wrote: > On Tue, Jan 12, 2016 at 3:29 AM, Andy Yan wrote: >> add device tree binding document for reboot-mode driver >> >> Signed-off-by: Andy Yan >> >> --- >> >> 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 = ; >> + }; >> + >> + maskrom { >> + linux,mode = "maskrom"; >> + loader,magic = ; >> + }; >> + >> + recovery { >> + linux,mode = "recovery"; >> + loader,magic = ; >> + }; >> + >> + fastboot { >> + linux,mode = "fastboot"; >> + loader,magic = ; >> + }; >> + }; > > 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.