* [PATCH] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support [not found] <CGME20220520045124epcas2p12235472b7e9f7588003a7c8c238e8866@epcas2p1.samsung.com> @ 2022-05-20 4:52 ` Chanho Park 2022-05-20 10:46 ` Krzysztof Kozlowski 0 siblings, 1 reply; 3+ messages in thread From: Chanho Park @ 2022-05-20 4:52 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc, devicetree, Chanho Park Reboot of exynosautov9 SoC can be handled by setting the bit( SWRESET_SYSTEM[1]) of SYSTEM_CONFIGURATION register(PMU + 0x3a00). syscon-reboot-mode can be used to indicate the reboot mode for bootloader. SYSIP_DAT0 register(PMU + 0x810) will not be cleared after reboot so bootloader can enter the boot mode according to the value. Signed-off-by: Chanho Park <chanho61.park@samsung.com> --- arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi index 0ce46ec5cdc3..d99e53406ee0 100644 --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi @@ -312,6 +312,22 @@ pinctrl_peric1: pinctrl@10830000 { pmu_system_controller: system-controller@10460000 { compatible = "samsung,exynos7-pmu", "syscon"; reg = <0x10460000 0x10000>; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x3a00>; /* SYSTEM_CONFIGURATION */ + value = <0x2>; + mask = <0x2>; + }; + + reboot_mode: syscon-reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x810>; /* SYSIP_DAT0 */ + mode-bootloader = <0xfc>; + mode-fastboot = <0xfa>; + mode-recovery = <0xff>; + }; }; syscon_fsys2: syscon@17c20000 { -- 2.36.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support 2022-05-20 4:52 ` [PATCH] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support Chanho Park @ 2022-05-20 10:46 ` Krzysztof Kozlowski 2022-05-20 11:15 ` Chanho Park 0 siblings, 1 reply; 3+ messages in thread From: Krzysztof Kozlowski @ 2022-05-20 10:46 UTC (permalink / raw) To: Chanho Park, Rob Herring, Krzysztof Kozlowski Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc, devicetree On 20/05/2022 06:52, Chanho Park wrote: > Reboot of exynosautov9 SoC can be handled by setting the bit( > SWRESET_SYSTEM[1]) of SYSTEM_CONFIGURATION register(PMU + 0x3a00). > syscon-reboot-mode can be used to indicate the reboot mode for > bootloader. SYSIP_DAT0 register(PMU + 0x810) will not be cleared after > reboot so bootloader can enter the boot mode according to the value. > > Signed-off-by: Chanho Park <chanho61.park@samsung.com> > --- > arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > index 0ce46ec5cdc3..d99e53406ee0 100644 > --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > @@ -312,6 +312,22 @@ pinctrl_peric1: pinctrl@10830000 { > pmu_system_controller: system-controller@10460000 { > compatible = "samsung,exynos7-pmu", "syscon"; > reg = <0x10460000 0x10000>; > + > + reboot: syscon-reboot { > + compatible = "syscon-reboot"; > + regmap = <&pmu_system_controller>; > + offset = <0x3a00>; /* SYSTEM_CONFIGURATION */ > + value = <0x2>; > + mask = <0x2>; > + }; > + > + reboot_mode: syscon-reboot-mode { Node name: just "reboot-mode" > + compatible = "syscon-reboot-mode"; > + offset = <0x810>; /* SYSIP_DAT0 */ > + mode-bootloader = <0xfc>; > + mode-fastboot = <0xfa>; > + mode-recovery = <0xff>; These are magic values understood by firmware, so please add a header for them (something like include/dt-bindings/soc/rockchip,boot-mode.h but with some prefixes like EXYNOSAUTOV9_BOOT_FASTBOOT)) > + }; > }; > > syscon_fsys2: syscon@17c20000 { Best regards, Krzysztof ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support 2022-05-20 10:46 ` Krzysztof Kozlowski @ 2022-05-20 11:15 ` Chanho Park 0 siblings, 0 replies; 3+ messages in thread From: Chanho Park @ 2022-05-20 11:15 UTC (permalink / raw) To: 'Krzysztof Kozlowski', 'Rob Herring', 'Krzysztof Kozlowski' Cc: 'Alim Akhtar', 'Chanwoo Choi', 'Sam Protsenko', linux-samsung-soc, devicetree > > diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > > b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > > index 0ce46ec5cdc3..d99e53406ee0 100644 > > --- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > > +++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi > > @@ -312,6 +312,22 @@ pinctrl_peric1: pinctrl@10830000 { > > pmu_system_controller: system-controller@10460000 { > > compatible = "samsung,exynos7-pmu", "syscon"; > > reg = <0x10460000 0x10000>; > > + > > + reboot: syscon-reboot { > > + compatible = "syscon-reboot"; > > + regmap = <&pmu_system_controller>; > > + offset = <0x3a00>; /* SYSTEM_CONFIGURATION */ > > + value = <0x2>; > > + mask = <0x2>; > > + }; > > + > > + reboot_mode: syscon-reboot-mode { > > Node name: just "reboot-mode" Okay. I'll just put "reboot-mode {" without the label. > > > + compatible = "syscon-reboot-mode"; > > + offset = <0x810>; /* SYSIP_DAT0 */ > > + mode-bootloader = <0xfc>; > > + mode-fastboot = <0xfa>; > > + mode-recovery = <0xff>; > > These are magic values understood by firmware, so please add a header for > them (something like include/dt-bindings/soc/rockchip,boot-mode.h > but with some prefixes like EXYNOSAUTOV9_BOOT_FASTBOOT)) Okay. I'll add samsung,boot-mode.h and put them with the prefix. Best Regards, Chanho Park ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-20 11:16 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CGME20220520045124epcas2p12235472b7e9f7588003a7c8c238e8866@epcas2p1.samsung.com> 2022-05-20 4:52 ` [PATCH] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support Chanho Park 2022-05-20 10:46 ` Krzysztof Kozlowski 2022-05-20 11:15 ` Chanho Park
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).