From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Yan Subject: Re: [PATCH v3 0/5] Add reboot notifier driver for rockchip platform Date: Mon, 14 Dec 2015 18:30:31 +0800 Message-ID: <566E9A47.8010004@rock-chips.com> References: <1447840044-19689-1-git-send-email-andy.yan@rock-chips.com> <45323116.BWNAaZT5p4@diego> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <45323116.BWNAaZT5p4@diego> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?UTF-8?Q?Heiko_St=c3=bcbner?= , John Stultz , Arnd Bergmann Cc: mark.rutland-5wv7dgnIgG8@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, benchan-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org List-Id: linux-rockchip.vger.kernel.org Hi John: On 2015=E5=B9=B412=E6=9C=8812=E6=97=A5 05:29, Heiko St=C3=BCbner wrote: > Am Mittwoch, 18. November 2015, 17:47:24 schrieb Andy Yan: >> rockchip platform have a protocol to pass the kernel reboot >> mode to bootloader by some special registers when system reboot. >> By this way the bootloader can take different action according >> to the different kernel reboot mode, for example, command >> "reboot loader" will reboot the board to rockusb mode, this is >> a very convenient way to get the board enter download mode. >> And Android system also use this protocol to pass "recovery"=E3=80=81 >> =E2=80=9Cfastboot=E2=80=9D reboot mode to bootloader. In upstream la= nd, We found >> tegra platform also use this mechanism. >> >> Before this version, I have sent two Series, which can be found >> at [0] [1] >> [0] https://patchwork.kernel.org/patch/7140751/ >> [1] https://patchwork.kernel.org/patch/7153531/ > just so it doesn't get lost, this ties into a slightly more generic a= pproach, > John Stultz is doing for the android reboot reasons: > > http://thread.gmane.org/gmane.linux.kernel/2103447 > > The only difference is that we'd need to use the pmu syscon for it. > > Very glad to see your work on this. And your work is more generic=20 than my. So hope we can share the code. As you can see, the rockchip=20 platform use a GRF or PMU register to store the reboot reason. So maybe we nee= d=20 a phandle in the DT node to describe it. >> Changes in v3: >> - rename a pinctrl node in rk3288-veyron, the original name will b= e >> used in the incoming reboot notifier driver >> - add dt binding >> - move from mach-rockchip to drivers/soc/rockchip, as the tegra do= es >> - use dts pass the related register >> - add DT node >> >> Changes in v2: >> - check cpu dt node >> - remove a unnecessary of_put_node in function rockchip_get_pmu_r= egmap >> - fix a align issue >> - use reboot_notifier instead of restart_handler >> >> Andy Yan (5): >> ARM: dts: rockchip: rk3288-veyron: rename pinctrl node reboot to = reset >> dt-bindings: soc: add document for rockchip reboot notifier drive= r >> soc: rockchip: add reboot notifier driver >> ARM: dts: rockchip: add reboot node >> ARM64: dts: rockchip: add reboot node >> >> .../bindings/soc/rockchip/rockchip-reboot.txt | 18 ++++ >> arch/arm/boot/dts/rk3288-veyron.dtsi | 2 +- >> arch/arm/boot/dts/rk3288.dtsi | 6 ++ >> arch/arm/boot/dts/rk3xxx.dtsi | 6 ++ >> arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 ++ >> drivers/soc/rockchip/Kconfig | 7 ++ >> drivers/soc/rockchip/Makefile | 1 + >> drivers/soc/rockchip/loader.h | 22 +++++ >> drivers/soc/rockchip/reboot.c | 98 >> ++++++++++++++++++++++ 9 files changed, 165 insertions(+), 1 deletio= n(-) >> create mode 100644 >> Documentation/devicetree/bindings/soc/rockchip/rockchip-reboot.txt c= reate >> mode 100644 drivers/soc/rockchip/loader.h >> create mode 100644 drivers/soc/rockchip/reboot.c > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip -- 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: Mon, 14 Dec 2015 18:30:31 +0800 Subject: [PATCH v3 0/5] Add reboot notifier driver for rockchip platform In-Reply-To: <45323116.BWNAaZT5p4@diego> References: <1447840044-19689-1-git-send-email-andy.yan@rock-chips.com> <45323116.BWNAaZT5p4@diego> Message-ID: <566E9A47.8010004@rock-chips.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi John: On 2015?12?12? 05:29, Heiko St?bner wrote: > Am Mittwoch, 18. November 2015, 17:47:24 schrieb Andy Yan: >> rockchip platform have a protocol to pass the kernel reboot >> mode to bootloader by some special registers when system reboot. >> By this way the bootloader can take different action according >> to the different kernel reboot mode, for example, command >> "reboot loader" will reboot the board to rockusb mode, this is >> a very convenient way to get the board enter download mode. >> And Android system also use this protocol to pass "recovery"? >> ?fastboot? reboot mode to bootloader. In upstream land, We found >> tegra platform also use this mechanism. >> >> Before this version, I have sent two Series, which can be found >> at [0] [1] >> [0] https://patchwork.kernel.org/patch/7140751/ >> [1] https://patchwork.kernel.org/patch/7153531/ > just so it doesn't get lost, this ties into a slightly more generic approach, > John Stultz is doing for the android reboot reasons: > > http://thread.gmane.org/gmane.linux.kernel/2103447 > > The only difference is that we'd need to use the pmu syscon for it. > > Very glad to see your work on this. And your work is more generic than my. So hope we can share the code. As you can see, the rockchip platform use a GRF or PMU register to store the reboot reason. So maybe we need a phandle in the DT node to describe it. >> Changes in v3: >> - rename a pinctrl node in rk3288-veyron, the original name will be >> used in the incoming reboot notifier driver >> - add dt binding >> - move from mach-rockchip to drivers/soc/rockchip, as the tegra does >> - use dts pass the related register >> - add DT node >> >> Changes in v2: >> - check cpu dt node >> - remove a unnecessary of_put_node in function rockchip_get_pmu_regmap >> - fix a align issue >> - use reboot_notifier instead of restart_handler >> >> Andy Yan (5): >> ARM: dts: rockchip: rk3288-veyron: rename pinctrl node reboot to reset >> dt-bindings: soc: add document for rockchip reboot notifier driver >> soc: rockchip: add reboot notifier driver >> ARM: dts: rockchip: add reboot node >> ARM64: dts: rockchip: add reboot node >> >> .../bindings/soc/rockchip/rockchip-reboot.txt | 18 ++++ >> arch/arm/boot/dts/rk3288-veyron.dtsi | 2 +- >> arch/arm/boot/dts/rk3288.dtsi | 6 ++ >> arch/arm/boot/dts/rk3xxx.dtsi | 6 ++ >> arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 ++ >> drivers/soc/rockchip/Kconfig | 7 ++ >> drivers/soc/rockchip/Makefile | 1 + >> drivers/soc/rockchip/loader.h | 22 +++++ >> drivers/soc/rockchip/reboot.c | 98 >> ++++++++++++++++++++++ 9 files changed, 165 insertions(+), 1 deletion(-) >> create mode 100644 >> Documentation/devicetree/bindings/soc/rockchip/rockchip-reboot.txt create >> mode 100644 drivers/soc/rockchip/loader.h >> create mode 100644 drivers/soc/rockchip/reboot.c > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932259AbbLNKan (ORCPT ); Mon, 14 Dec 2015 05:30:43 -0500 Received: from regular1.263xmail.com ([211.150.99.133]:46758 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932140AbbLNKal (ORCPT ); Mon, 14 Dec 2015 05:30:41 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: andy.yan@rock-chips.com X-FST-TO: wxt@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: andy.yan@rock-chips.com X-UNIQUE-TAG: <2b84567ebf09f1f2f59ac0590f6ec2a4> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH v3 0/5] Add reboot notifier driver for rockchip platform To: =?UTF-8?Q?Heiko_St=c3=bcbner?= , John Stultz , Arnd Bergmann References: <1447840044-19689-1-git-send-email-andy.yan@rock-chips.com> <45323116.BWNAaZT5p4@diego> Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, khilman@linaro.org, linux@arm.linux.org.uk, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, benchan@google.com, sjg@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, galak@codeaurora.org, treding@nvidia.com, linux-arm-kernel@lists.infradead.org, wxt@rock-chips.com From: Andy Yan Message-ID: <566E9A47.8010004@rock-chips.com> Date: Mon, 14 Dec 2015 18:30:31 +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: <45323116.BWNAaZT5p4@diego> 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 2015年12月12日 05:29, Heiko Stübner wrote: > Am Mittwoch, 18. November 2015, 17:47:24 schrieb Andy Yan: >> rockchip platform have a protocol to pass the kernel reboot >> mode to bootloader by some special registers when system reboot. >> By this way the bootloader can take different action according >> to the different kernel reboot mode, for example, command >> "reboot loader" will reboot the board to rockusb mode, this is >> a very convenient way to get the board enter download mode. >> And Android system also use this protocol to pass "recovery"、 >> “fastboot” reboot mode to bootloader. In upstream land, We found >> tegra platform also use this mechanism. >> >> Before this version, I have sent two Series, which can be found >> at [0] [1] >> [0] https://patchwork.kernel.org/patch/7140751/ >> [1] https://patchwork.kernel.org/patch/7153531/ > just so it doesn't get lost, this ties into a slightly more generic approach, > John Stultz is doing for the android reboot reasons: > > http://thread.gmane.org/gmane.linux.kernel/2103447 > > The only difference is that we'd need to use the pmu syscon for it. > > Very glad to see your work on this. And your work is more generic than my. So hope we can share the code. As you can see, the rockchip platform use a GRF or PMU register to store the reboot reason. So maybe we need a phandle in the DT node to describe it. >> Changes in v3: >> - rename a pinctrl node in rk3288-veyron, the original name will be >> used in the incoming reboot notifier driver >> - add dt binding >> - move from mach-rockchip to drivers/soc/rockchip, as the tegra does >> - use dts pass the related register >> - add DT node >> >> Changes in v2: >> - check cpu dt node >> - remove a unnecessary of_put_node in function rockchip_get_pmu_regmap >> - fix a align issue >> - use reboot_notifier instead of restart_handler >> >> Andy Yan (5): >> ARM: dts: rockchip: rk3288-veyron: rename pinctrl node reboot to reset >> dt-bindings: soc: add document for rockchip reboot notifier driver >> soc: rockchip: add reboot notifier driver >> ARM: dts: rockchip: add reboot node >> ARM64: dts: rockchip: add reboot node >> >> .../bindings/soc/rockchip/rockchip-reboot.txt | 18 ++++ >> arch/arm/boot/dts/rk3288-veyron.dtsi | 2 +- >> arch/arm/boot/dts/rk3288.dtsi | 6 ++ >> arch/arm/boot/dts/rk3xxx.dtsi | 6 ++ >> arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 ++ >> drivers/soc/rockchip/Kconfig | 7 ++ >> drivers/soc/rockchip/Makefile | 1 + >> drivers/soc/rockchip/loader.h | 22 +++++ >> drivers/soc/rockchip/reboot.c | 98 >> ++++++++++++++++++++++ 9 files changed, 165 insertions(+), 1 deletion(-) >> create mode 100644 >> Documentation/devicetree/bindings/soc/rockchip/rockchip-reboot.txt create >> mode 100644 drivers/soc/rockchip/loader.h >> create mode 100644 drivers/soc/rockchip/reboot.c > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip