linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm: dts: syscon based reboot in DT
@ 2016-06-28 22:10 Jon Mason
  2016-06-28 22:10 ` [PATCH 1/2] arm: dts: bcm5301x: Add " Jon Mason
  2016-06-28 22:10 ` [PATCH 2/2] arm: dts: nsp: " Jon Mason
  0 siblings, 2 replies; 5+ messages in thread
From: Jon Mason @ 2016-06-28 22:10 UTC (permalink / raw)
  To: linux-arm-kernel

Splitting off the bcm5301x reset device tree changes from the patch
series (originally sent on http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/395155.html
and resent on https://lkml.org/lkml/2016/5/11/953) and adding a
Northstar Plus reset device tree change.

I'd like to get Arnd's ack/nack on these, as I am uncertain if I am
doing the correct thing based on the last email from him.  Per my
comment in the original email thread:

The CRU (Clock and Reset Unit) starts at 0x1800c100, with the
following layout:

CRU Clock Management at 0x1800c100-0x1800c180
CRU Reset at 0x1800c184
CRU Period Sample Clock at 0x1800c188
CRU Interrupt register at 0x1800c18c
CRU MDIO Control at 0x1800c190
CRU GPIO at 0x1800c1c0-0x1800c1e0
CRU SDIO 0x1800c200-0x1800c214
CRU RoboSW Interrupt at 0x1800c280
CRU Straps Control at 0x1800c2a0

The clock driver is already referencing the registers between
0x1800c100-0x1800c180, and the GPIO driver is referencing registers
between 0x1800c1c0-0x1800c1e0.

The reset part of the syscon seems to be the only useful thing in this
block.

So, are these patches acceptable given those constrains or am I better
off doing a reset driver that is more or less identical to
syscon-reboot?

Thanks,
Jon

Jon Mason (2):
  arm: dts: bcm5301x: Add syscon based reboot in DT
  arm: dts: nsp: Add syscon based reboot in DT

 arch/arm/boot/dts/bcm-nsp.dtsi  | 12 ++++++++++++
 arch/arm/boot/dts/bcm5301x.dtsi | 12 ++++++++++++
 2 files changed, 24 insertions(+)

-- 
1.9.1

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

* [PATCH 1/2] arm: dts: bcm5301x: Add syscon based reboot in DT
  2016-06-28 22:10 [PATCH 0/2] arm: dts: syscon based reboot in DT Jon Mason
@ 2016-06-28 22:10 ` Jon Mason
  2016-06-28 22:13   ` Scott Branden
  2016-06-28 22:10 ` [PATCH 2/2] arm: dts: nsp: " Jon Mason
  1 sibling, 1 reply; 5+ messages in thread
From: Jon Mason @ 2016-06-28 22:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jon Mason <jonmason@broadcom.com>

Add the ability to reboot via a reset of the processor.  This is
achieved via a write of 0x39 to the CRU Reset Register.  Unfortunately,
this only resets the core and not the other IP blocks.  So if possible,
other methods should be used on the individual boards.

Signed-off-by: Jon Mason <jonmason@broadcom.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 7d4d29b..f878d0d 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -260,6 +260,18 @@
 				     "sata2";
 	};
 
+	cru: system-controller at 1800c184 {
+		compatible = "brcm,bcm53010-cru", "syscon";
+		reg = <0x1800c184 0x4>;
+	};
+
+	reboot at 1800c184 {
+		compatible ="syscon-reboot";
+		regmap = <&cru>;
+		offset = <0>;
+		mask = <0x39>;
+	};
+
 	nand: nand at 18028000 {
 		compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
 		reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;
-- 
1.9.1

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

* [PATCH 2/2] arm: dts: nsp: Add syscon based reboot in DT
  2016-06-28 22:10 [PATCH 0/2] arm: dts: syscon based reboot in DT Jon Mason
  2016-06-28 22:10 ` [PATCH 1/2] arm: dts: bcm5301x: Add " Jon Mason
@ 2016-06-28 22:10 ` Jon Mason
  1 sibling, 0 replies; 5+ messages in thread
From: Jon Mason @ 2016-06-28 22:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jon Mason <jonmason@broadcom.com>

Add the ability to reboot via a reset of the processor.  This is
achieved via a write of 0x2f9 to the CRU Reset Register.  Unfortunately,
this only resets the core and not the other IP blocks.  So if possible,
other methods should be used on the individual boards.

Signed-off-by: Jon Mason <jonmason@broadcom.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 1759e65..d56166b 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -266,6 +266,18 @@
 			      <0x30028 0x04>,
 			      <0x3f408 0x04>;
 		};
+
+		cru: system-controller at 3f184 {
+			compatible = "brcm,nsp-cru", "syscon";
+			reg = <0x3f184 0x4>;
+		};
+
+		reboot: reboot at 3f184 {
+			compatible ="syscon-reboot";
+			regmap = <&cru>;
+			offset = <0>;
+			mask = <0x2f9>;
+		};
 	};
 
 	pcie0: pcie at 18012000 {
-- 
1.9.1

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

* [PATCH 1/2] arm: dts: bcm5301x: Add syscon based reboot in DT
  2016-06-28 22:10 ` [PATCH 1/2] arm: dts: bcm5301x: Add " Jon Mason
@ 2016-06-28 22:13   ` Scott Branden
  2016-06-28 22:28     ` Jon Mason
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Branden @ 2016-06-28 22:13 UTC (permalink / raw)
  To: linux-arm-kernel



On 16-06-28 03:10 PM, Jon Mason wrote:
> From: Jon Mason <jonmason@broadcom.com>
>
> Add the ability to reboot via a reset of the processor.  This is
> achieved via a write of 0x39 to the CRU Reset Register.  Unfortunately,
> this only resets the core and not the other IP blocks.  So if possible,
> other methods should be used on the individual boards.
Is it possible to force a watchdog reset instead for reboot?

>
> Signed-off-by: Jon Mason <jonmason@broadcom.com>
> ---
>   arch/arm/boot/dts/bcm5301x.dtsi | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
> index 7d4d29b..f878d0d 100644
> --- a/arch/arm/boot/dts/bcm5301x.dtsi
> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
> @@ -260,6 +260,18 @@
>   				     "sata2";
>   	};
>
> +	cru: system-controller at 1800c184 {
> +		compatible = "brcm,bcm53010-cru", "syscon";
> +		reg = <0x1800c184 0x4>;
> +	};
> +
> +	reboot at 1800c184 {
> +		compatible ="syscon-reboot";
> +		regmap = <&cru>;
> +		offset = <0>;
> +		mask = <0x39>;
> +	};
> +
>   	nand: nand at 18028000 {
>   		compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
>   		reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;
>

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

* [PATCH 1/2] arm: dts: bcm5301x: Add syscon based reboot in DT
  2016-06-28 22:13   ` Scott Branden
@ 2016-06-28 22:28     ` Jon Mason
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Mason @ 2016-06-28 22:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jun 28, 2016 at 6:13 PM, Scott Branden
<scott.branden@broadcom.com> wrote:
>
>
> On 16-06-28 03:10 PM, Jon Mason wrote:
>>
>> From: Jon Mason <jonmason@broadcom.com>
>>
>> Add the ability to reboot via a reset of the processor.  This is
>> achieved via a write of 0x39 to the CRU Reset Register.  Unfortunately,
>> this only resets the core and not the other IP blocks.  So if possible,
>> other methods should be used on the individual boards.
>
> Is it possible to force a watchdog reset instead for reboot?

There is a "Power Watchdog" in both NS and NSP (and possibly others).
This isn't a working driver to test, but it might be possible to use
that to reset the system if the syscon and a unique NS/NSP reset
driver are not acceptable solutions.

>>
>> Signed-off-by: Jon Mason <jonmason@broadcom.com>
>> ---
>>   arch/arm/boot/dts/bcm5301x.dtsi | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi
>> b/arch/arm/boot/dts/bcm5301x.dtsi
>> index 7d4d29b..f878d0d 100644
>> --- a/arch/arm/boot/dts/bcm5301x.dtsi
>> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
>> @@ -260,6 +260,18 @@
>>                                      "sata2";
>>         };
>>
>> +       cru: system-controller at 1800c184 {
>> +               compatible = "brcm,bcm53010-cru", "syscon";
>> +               reg = <0x1800c184 0x4>;
>> +       };
>> +
>> +       reboot at 1800c184 {
>> +               compatible ="syscon-reboot";
>> +               regmap = <&cru>;
>> +               offset = <0>;
>> +               mask = <0x39>;
>> +       };
>> +
>>         nand: nand at 18028000 {
>>                 compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1",
>> "brcm,brcmnand";
>>                 reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00
>> 0x20>;
>>
>

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

end of thread, other threads:[~2016-06-28 22:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-28 22:10 [PATCH 0/2] arm: dts: syscon based reboot in DT Jon Mason
2016-06-28 22:10 ` [PATCH 1/2] arm: dts: bcm5301x: Add " Jon Mason
2016-06-28 22:13   ` Scott Branden
2016-06-28 22:28     ` Jon Mason
2016-06-28 22:10 ` [PATCH 2/2] arm: dts: nsp: " Jon Mason

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