devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] syscon reboot/reboot_mode support for exynosautov9
       [not found] <CGME20220520115216epcas2p26c1e257460970bfecabd621bc733a85d@epcas2p2.samsung.com>
@ 2022-05-20 11:52 ` Chanho Park
       [not found]   ` <CGME20220520115216epcas2p20de68c07071435ae33b50c7b664a20eb@epcas2p2.samsung.com>
       [not found]   ` <CGME20220520115216epcas2p1de431047122f853ed129785653b787a5@epcas2p1.samsung.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Chanho Park @ 2022-05-20 11:52 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc,
	devicetree, Chanho Park

This adds to support syscon reboot and reboot_mode for Exynos Auto v9 SoC.

Changes from v1:
- Add samsung,boot-mode.h header which include reboot mode definitions
- syscon-reboot-mode -> reboot-mode

Chanho Park (2):
  dt-bindings: soc: add samsung,boot-mode definitions
  arm64: dts: exynoautov9: add syscon reboot/reboot_mode support

 arch/arm64/boot/dts/exynos/exynosautov9.dtsi | 17 +++++++++++++++++
 include/dt-bindings/soc/samsung,boot-mode.h  | 12 ++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 include/dt-bindings/soc/samsung,boot-mode.h

-- 
2.36.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] dt-bindings: soc: add samsung,boot-mode definitions
       [not found]   ` <CGME20220520115216epcas2p20de68c07071435ae33b50c7b664a20eb@epcas2p2.samsung.com>
@ 2022-05-20 11:52     ` Chanho Park
  2022-05-21 14:44       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Chanho Park @ 2022-05-20 11:52 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Alim Akhtar, Chanwoo Choi, Sam Protsenko, linux-samsung-soc,
	devicetree, Chanho Park

Adds samsung,boot-mode.h header file which contains boot mode
definitions for bootloader. As for now, there are only boot mode
definitions for Exynos Auto v9 SoC.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 include/dt-bindings/soc/samsung,boot-mode.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 include/dt-bindings/soc/samsung,boot-mode.h

diff --git a/include/dt-bindings/soc/samsung,boot-mode.h b/include/dt-bindings/soc/samsung,boot-mode.h
new file mode 100644
index 000000000000..f1d03d96f45c
--- /dev/null
+++ b/include/dt-bindings/soc/samsung,boot-mode.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __SAMSUNG_BOOT_MODE_H
+#define __SAMSUNG_BOOT_MODE_H
+
+/* Boot mode definitions for Exynos Auto v9 SoC */
+
+#define EXYNOSAUTOV9_BOOT_FASTBOOT	(0xfa)
+#define EXYNOSAUTOV9_BOOT_BOOTLOADER	(0xfc)
+#define EXYNOSAUTOV9_BOOT_RECOVERY	(0xff)
+
+#endif
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support
       [not found]   ` <CGME20220520115216epcas2p1de431047122f853ed129785653b787a5@epcas2p1.samsung.com>
@ 2022-05-20 11:52     ` Chanho Park
  0 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2022-05-20 11: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 | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
index 0ce46ec5cdc3..3e23db8f09d9 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov9.dtsi
@@ -8,6 +8,7 @@
 
 #include <dt-bindings/clock/samsung,exynosautov9.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/soc/samsung,boot-mode.h>
 #include <dt-bindings/soc/samsung,exynos-usi.h>
 
 / {
@@ -312,6 +313,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 {
+				compatible = "syscon-reboot-mode";
+				offset = <0x810>; /* SYSIP_DAT0 */
+				mode-bootloader = <EXYNOSAUTOV9_BOOT_BOOTLOADER>;
+				mode-fastboot = <EXYNOSAUTOV9_BOOT_FASTBOOT>;
+				mode-recovery = <EXYNOSAUTOV9_BOOT_RECOVERY>;
+			};
 		};
 
 		syscon_fsys2: syscon@17c20000 {
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: soc: add samsung,boot-mode definitions
  2022-05-20 11:52     ` [PATCH v2 1/2] dt-bindings: soc: add samsung,boot-mode definitions Chanho Park
@ 2022-05-21 14:44       ` Krzysztof Kozlowski
  2022-05-23 11:28         ` Chanho Park
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-21 14:44 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 13:52, Chanho Park wrote:
> Adds samsung,boot-mode.h header file which contains boot mode
> definitions for bootloader. As for now, there are only boot mode
> definitions for Exynos Auto v9 SoC.
> 
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>

Thank you for your patch. There is something to discuss/improve.

> ---
>  include/dt-bindings/soc/samsung,boot-mode.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>  create mode 100644 include/dt-bindings/soc/samsung,boot-mode.h
> 
> diff --git a/include/dt-bindings/soc/samsung,boot-mode.h b/include/dt-bindings/soc/samsung,boot-mode.h
> new file mode 100644
> index 000000000000..f1d03d96f45c
> --- /dev/null
> +++ b/include/dt-bindings/soc/samsung,boot-mode.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

Dual license:
GPL-2.0-only OR BSD-2-Clause

> +
> +#ifndef __SAMSUNG_BOOT_MODE_H

__DT_BINDINGS_SAMSUNG_BOOT_MODE_H

> +#define __SAMSUNG_BOOT_MODE_H
> +
> +/* Boot mode definitions for Exynos Auto v9 SoC */
> +
> +#define EXYNOSAUTOV9_BOOT_FASTBOOT	(0xfa)
> +#define EXYNOSAUTOV9_BOOT_BOOTLOADER	(0xfc)
> +#define EXYNOSAUTOV9_BOOT_RECOVERY	(0xff)

No need for ().

> +
> +#endif


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v2 1/2] dt-bindings: soc: add samsung,boot-mode definitions
  2022-05-21 14:44       ` Krzysztof Kozlowski
@ 2022-05-23 11:28         ` Chanho Park
  0 siblings, 0 replies; 5+ messages in thread
From: Chanho Park @ 2022-05-23 11:28 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', 'Rob Herring',
	'Krzysztof Kozlowski'
  Cc: 'Alim Akhtar', 'Chanwoo Choi',
	'Sam Protsenko', linux-samsung-soc, devicetree

> > Adds samsung,boot-mode.h header file which contains boot mode
> > definitions for bootloader. As for now, there are only boot mode
> > definitions for Exynos Auto v9 SoC.
> >
> > Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> 
> Thank you for your patch. There is something to discuss/improve.
> 
> > ---
> >  include/dt-bindings/soc/samsung,boot-mode.h | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >  create mode 100644 include/dt-bindings/soc/samsung,boot-mode.h
> >
> > diff --git a/include/dt-bindings/soc/samsung,boot-mode.h
> > b/include/dt-bindings/soc/samsung,boot-mode.h
> > new file mode 100644
> > index 000000000000..f1d03d96f45c
> > --- /dev/null
> > +++ b/include/dt-bindings/soc/samsung,boot-mode.h
> > @@ -0,0 +1,12 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> 
> Dual license:
> GPL-2.0-only OR BSD-2-Clause

Okay. I'll update this on v3.

> 
> > +
> > +#ifndef __SAMSUNG_BOOT_MODE_H
> 
> __DT_BINDINGS_SAMSUNG_BOOT_MODE_H
> 
> > +#define __SAMSUNG_BOOT_MODE_H
> > +
> > +/* Boot mode definitions for Exynos Auto v9 SoC */
> > +
> > +#define EXYNOSAUTOV9_BOOT_FASTBOOT	(0xfa)
> > +#define EXYNOSAUTOV9_BOOT_BOOTLOADER	(0xfc)
> > +#define EXYNOSAUTOV9_BOOT_RECOVERY	(0xff)
> 
> No need for ().

Thanks. Will be removed on v3.

Best Regards,
Chanho Park


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-23 11:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20220520115216epcas2p26c1e257460970bfecabd621bc733a85d@epcas2p2.samsung.com>
2022-05-20 11:52 ` [PATCH v2 0/2] syscon reboot/reboot_mode support for exynosautov9 Chanho Park
     [not found]   ` <CGME20220520115216epcas2p20de68c07071435ae33b50c7b664a20eb@epcas2p2.samsung.com>
2022-05-20 11:52     ` [PATCH v2 1/2] dt-bindings: soc: add samsung,boot-mode definitions Chanho Park
2022-05-21 14:44       ` Krzysztof Kozlowski
2022-05-23 11:28         ` Chanho Park
     [not found]   ` <CGME20220520115216epcas2p1de431047122f853ed129785653b787a5@epcas2p1.samsung.com>
2022-05-20 11:52     ` [PATCH v2 2/2] arm64: dts: exynoautov9: add syscon reboot/reboot_mode support 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).