linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
@ 2015-10-24  1:31 J. German Rivera
  2015-10-27 16:31 ` Stuart Yoder
  2015-10-27 16:34 ` Mark Rutland
  0 siblings, 2 replies; 7+ messages in thread
From: J. German Rivera @ 2015-10-24  1:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, devicetree, linux-arm-kernel, linux-kernel
  Cc: bhupesh.sharma, stuart.yoder, leoli, J. German Rivera

Added sys-reboot node to the FSL's LS2085A SoC DT to leverage
the ARM-generic reboot mechanism for this SoC. This mechanism
is enabled through CONFIG_POWER_RESET_SYSCON.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
---
 arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
index e281ceb..6f82163 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
@@ -131,6 +131,18 @@
 		interrupts = <1 9 0x4>;
 	};
 
+	rst_ccsr: rstccsr@1E60000 {
+	        compatible = "syscon";
+		reg = <0x0 0x1E60000 0x0 0x10000>;
+	};
+
+	reboot@65024000 {
+		compatible ="syscon-reboot";
+		regmap = <&rst_ccsr>;
+		offset = <0x0>;
+		mask = <0x2>;
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <1 13 0x8>, /* Physical Secure PPI, active-low */
-- 
2.3.3


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

* RE: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
  2015-10-24  1:31 [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC J. German Rivera
@ 2015-10-27 16:31 ` Stuart Yoder
  2015-10-27 16:34 ` Mark Rutland
  1 sibling, 0 replies; 7+ messages in thread
From: Stuart Yoder @ 2015-10-27 16:31 UTC (permalink / raw)
  To: Jose Rivera, robh+dt, mark.rutland, devicetree, linux-arm-kernel,
	linux-kernel
  Cc: Sharma Bhupesh, Li Leo, Jose Rivera



> -----Original Message-----
> From: J. German Rivera [mailto:German.Rivera@freescale.com]
> Sent: Friday, October 23, 2015 8:31 PM
> To: robh+dt@kernel.org; mark.rutland@arm.com; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Cc: Sharma Bhupesh-B45370; Yoder Stuart-B08248; Li Yang-Leo-R58472; Rivera Jose-B46482
> Subject: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
> 
> Added sys-reboot node to the FSL's LS2085A SoC DT to leverage
> the ARM-generic reboot mechanism for this SoC. This mechanism
> is enabled through CONFIG_POWER_RESET_SYSCON.
> 
> Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
> ---
>  arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> index e281ceb..6f82163 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> @@ -131,6 +131,18 @@
>  		interrupts = <1 9 0x4>;
>  	};
> 
> +	rst_ccsr: rstccsr@1E60000 {
> +	        compatible = "syscon";
> +		reg = <0x0 0x1E60000 0x0 0x10000>;
> +	};
> +
> +	reboot@65024000 {
> +		compatible ="syscon-reboot";
> +		regmap = <&rst_ccsr>;
> +		offset = <0x0>;
> +		mask = <0x2>;
> +	};
> +

Drop the unit address "65024000", since you have no "reg" property.

The ePAPR explicitly says: "If the node has no reg property, the
@ and unit-address must be omitted and the node-name alone differentiates
the node from other nodes at the same level in the tree.

Also, other examples in the kernel just use plain "reboot" as
the name:

arch/arm/boot/dts/hisi-x5hd2.dtsi
arch/arm/boot/dts/vfxxx.dtsi
arch/mips/boot/dts/brcm/bcm6328.dtsi

Also, Bhupesh's LS2080A DTS updates were just accepte4d, and the device tree
name is no longer fsl-ls2085a.dtsi.  You need to rebase on top of
those changes.

Thanks,
Stuart

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

* Re: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
  2015-10-24  1:31 [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC J. German Rivera
  2015-10-27 16:31 ` Stuart Yoder
@ 2015-10-27 16:34 ` Mark Rutland
  2015-10-27 18:25   ` Stuart Yoder
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Rutland @ 2015-10-27 16:34 UTC (permalink / raw)
  To: J. German Rivera
  Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel,
	bhupesh.sharma, stuart.yoder, leoli

On Fri, Oct 23, 2015 at 08:31:20PM -0500, J. German Rivera wrote:
> Added sys-reboot node to the FSL's LS2085A SoC DT to leverage
> the ARM-generic reboot mechanism for this SoC. This mechanism
> is enabled through CONFIG_POWER_RESET_SYSCON.

Per the comments in arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi, the
platform has PSCI 0.2+, and therefore already has system reset
functionality.

Given that, why is this necessary?

Thanks,
Mark.

> Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
> ---
>  arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> index e281ceb..6f82163 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> @@ -131,6 +131,18 @@
>  		interrupts = <1 9 0x4>;
>  	};
>  
> +	rst_ccsr: rstccsr@1E60000 {
> +	        compatible = "syscon";
> +		reg = <0x0 0x1E60000 0x0 0x10000>;
> +	};
> +
> +	reboot@65024000 {
> +		compatible ="syscon-reboot";
> +		regmap = <&rst_ccsr>;
> +		offset = <0x0>;
> +		mask = <0x2>;
> +	};
> +
>  	timer {
>  		compatible = "arm,armv8-timer";
>  		interrupts = <1 13 0x8>, /* Physical Secure PPI, active-low */
> -- 
> 2.3.3
> 

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

* RE: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
  2015-10-27 16:34 ` Mark Rutland
@ 2015-10-27 18:25   ` Stuart Yoder
  2015-10-30 13:36     ` Arnd Bergmann
  2015-10-30 14:32     ` Mark Rutland
  0 siblings, 2 replies; 7+ messages in thread
From: Stuart Yoder @ 2015-10-27 18:25 UTC (permalink / raw)
  To: Mark Rutland
  Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel,
	Sharma Bhupesh, Li Leo, Jose Rivera

I think that comment "Currently supported enable-method is psci v0.2" is a statement of
intent, not what is available currently.   And the only plan I am aware of is PSCI
with UEFI based firmware.

U-boot is a key firmware platform for us and has no PSCI implementation available.

So, we need this.  The device tree simply describes the hardware that is
there and that's what this patch exposes.

If down the road all firmware provides a PSCI based reset interface then
we will naturally use that.  But we need something in the meantime to
let us reboot the system.

Thanks,
Stuart

> -----Original Message-----
> From: Mark Rutland [mailto:mark.rutland@arm.com]
> Sent: Tuesday, October 27, 2015 11:35 AM
> To: Rivera Jose-B46482
> Cc: robh+dt@kernel.org; devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Sharma Bhupesh-B45370; Yoder Stuart-B08248; Li Yang-Leo-R58472
> Subject: Re: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
> 
> On Fri, Oct 23, 2015 at 08:31:20PM -0500, J. German Rivera wrote:
> > Added sys-reboot node to the FSL's LS2085A SoC DT to leverage
> > the ARM-generic reboot mechanism for this SoC. This mechanism
> > is enabled through CONFIG_POWER_RESET_SYSCON.
> 
> Per the comments in arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi, the
> platform has PSCI 0.2+, and therefore already has system reset
> functionality.
> 
> Given that, why is this necessary?
> 
> Thanks,
> Mark.
> 
> > Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
> > ---
> >  arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi b/arch/arm64/boot/dts/freescale/fsl-
> ls2085a.dtsi
> > index e281ceb..6f82163 100644
> > --- a/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/fsl-ls2085a.dtsi
> > @@ -131,6 +131,18 @@
> >  		interrupts = <1 9 0x4>;
> >  	};
> >
> > +	rst_ccsr: rstccsr@1E60000 {
> > +	        compatible = "syscon";
> > +		reg = <0x0 0x1E60000 0x0 0x10000>;
> > +	};
> > +
> > +	reboot@65024000 {
> > +		compatible ="syscon-reboot";
> > +		regmap = <&rst_ccsr>;
> > +		offset = <0x0>;
> > +		mask = <0x2>;
> > +	};
> > +
> >  	timer {
> >  		compatible = "arm,armv8-timer";
> >  		interrupts = <1 13 0x8>, /* Physical Secure PPI, active-low */
> > --
> > 2.3.3
> >

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

* Re: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
  2015-10-27 18:25   ` Stuart Yoder
@ 2015-10-30 13:36     ` Arnd Bergmann
  2015-10-30 16:15       ` Stuart Yoder
  2015-10-30 14:32     ` Mark Rutland
  1 sibling, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2015-10-30 13:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Stuart Yoder, Mark Rutland, devicetree, Sharma Bhupesh,
	Jose Rivera, linux-kernel, robh+dt, Li Leo

On Tuesday 27 October 2015 18:25:04 Stuart Yoder wrote:
> I think that comment "Currently supported enable-method is psci v0.2" is a statement of
> intent, not what is available currently.   And the only plan I am aware of is PSCI
> with UEFI based firmware.
> 
> U-boot is a key firmware platform for us and has no PSCI implementation available.

I believe U-boot has supported PSCI since 2013. Maybe you just need to update
to a newer version?

	Arnd

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

* Re: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
  2015-10-27 18:25   ` Stuart Yoder
  2015-10-30 13:36     ` Arnd Bergmann
@ 2015-10-30 14:32     ` Mark Rutland
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Rutland @ 2015-10-30 14:32 UTC (permalink / raw)
  To: Stuart Yoder
  Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel,
	Sharma Bhupesh, Li Leo, Jose Rivera

On Tue, Oct 27, 2015 at 06:25:04PM +0000, Stuart Yoder wrote:
> I think that comment "Currently supported enable-method is psci v0.2" is a statement of
> intent, not what is available currently.   And the only plan I am aware of is PSCI
> with UEFI based firmware.
> 
> U-boot is a key firmware platform for us and has no PSCI implementation available.

Please note that PSCI isn't implemented by UEFI. On ARM Juno (and other
platforms), PSCI is implemented by ARM Trusted Firmware [1], and the non-secure
side can be UEFI (EDK2), U-Boot, or something else entirely.

> So, we need this.  The device tree simply describes the hardware that is
> there and that's what this patch exposes.
>
> If down the road all firmware provides a PSCI based reset interface then
> we will naturally use that.  But we need something in the meantime to
> let us reboot the system.

I appreciate that you need this if you do not have a PSCI implementation. I was
mislead by the comment.

Thanks,
Mark.

[1] https://github.com/ARM-software/arm-trusted-firmware

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

* RE: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
  2015-10-30 13:36     ` Arnd Bergmann
@ 2015-10-30 16:15       ` Stuart Yoder
  0 siblings, 0 replies; 7+ messages in thread
From: Stuart Yoder @ 2015-10-30 16:15 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arm-kernel
  Cc: Mark Rutland, devicetree, Sharma Bhupesh, Jose Rivera,
	linux-kernel, robh+dt, Li Leo



> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Friday, October 30, 2015 8:36 AM
> To: linux-arm-kernel@lists.infradead.org
> Cc: Yoder Stuart-B08248; Mark Rutland; devicetree@vger.kernel.org; Sharma Bhupesh-B45370; Rivera Jose-B46482;
> linux-kernel@vger.kernel.org; robh+dt@kernel.org; Li Yang-Leo-R58472
> Subject: Re: [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC
> 
> On Tuesday 27 October 2015 18:25:04 Stuart Yoder wrote:
> > I think that comment "Currently supported enable-method is psci v0.2" is a statement of
> > intent, not what is available currently.   And the only plan I am aware of is PSCI
> > with UEFI based firmware.
> >
> > U-boot is a key firmware platform for us and has no PSCI implementation available.
> 
> I believe U-boot has supported PSCI since 2013. Maybe you just need to update
> to a newer version?

We are using a very recent u-boot.  U-boot for ARMv8, which is what this SoC is
based on, does not have PSCI as far as I can tell.  We (Freescale) plan to 
eventually have an EL3 firmware component that could remain resident for 
u-boot based systems, but it is a roadmap thing and I don't know when
we're going to get it.

So, for now, most straightforward thing is to get reboot functionality is
to expose the reset register via syscon-reboot in the DT...no new driver needed.

Once a PSCI component is available we'll move to it.

Thanks,
Stuart

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

end of thread, other threads:[~2015-10-30 16:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-24  1:31 [PATCH] arm64: dts: Added syscon-reboot node for FSL's LS2085A SoC J. German Rivera
2015-10-27 16:31 ` Stuart Yoder
2015-10-27 16:34 ` Mark Rutland
2015-10-27 18:25   ` Stuart Yoder
2015-10-30 13:36     ` Arnd Bergmann
2015-10-30 16:15       ` Stuart Yoder
2015-10-30 14:32     ` Mark Rutland

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).