diff mbox

[non-pretimeout,3/7] ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsi

Message ID 1433958452-23721-4-git-send-email-fu.wei@linaro.org
State New
Headers show

Commit Message

Fu Wei Fu June 10, 2015, 5:47 p.m. UTC
From: Fu Wei <fu.wei@linaro.org>

This can be a example of adding SBSA Generic Watchdog device node
into some dts files for the Soc which contains SBSA Generic Watchdog.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Fu Wei Fu June 14, 2015, 10:05 a.m. UTC | #1
On 13 June 2015 at 04:54, Timur Tabi <timur@codeaurora.org> wrote:
> On 06/10/2015 12:47 PM, fu.wei@linaro.org wrote:
>>
>> +                       reg = <0x0 0xe0bb0000 0 0x10000>,
>> +                               <0x0 0xe0bc0000 0 0x10000>;
>
>
> I think the sizes are wrong.  They should be 0x1000 instead of 0x10000.

This has been proved by test, it works well on Seattle
Foundation model has same value. So I don't think it is wrong

otherwise someone has the data sheet of Seattle B0, and it shows that is wrong.


>
> --
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the
> Code Aurora Forum, a Linux Foundation Collaborative Project.
Fu Wei Fu June 15, 2015, 11 a.m. UTC | #2
Hi Guenter,

On 14 June 2015 at 21:57, Guenter Roeck <linux@roeck-us.net> wrote:
> On 06/14/2015 03:05 AM, Fu Wei wrote:
>>
>> On 13 June 2015 at 04:54, Timur Tabi <timur@codeaurora.org> wrote:
>>>
>>> On 06/10/2015 12:47 PM, fu.wei@linaro.org wrote:
>>>>
>>>>
>>>> +                       reg = <0x0 0xe0bb0000 0 0x10000>,
>>>> +                               <0x0 0xe0bc0000 0 0x10000>;
>>>
>>>
>>>
>>> I think the sizes are wrong.  They should be 0x1000 instead of 0x10000.
>>
>>
>> This has been proved by test, it works well on Seattle
>> Foundation model has same value. So I don't think it is wrong
>>
>> otherwise someone has the data sheet of Seattle B0, and it shows that is
>> wrong.
>>
>
> If only 0x1000 is used, why would you have to reserve 0x10000 ?
> You never access any higher addresses, so no matter what the datasheet
> says, 0x1000 should be sufficient. What matters is what the driver uses.

the reason for using 0x10000 before is :
(1)in <ARM v8-A Foundation Platform User Guide(Version: 9.1)> page 20
0x00_2A44_0000 0x00_2A44_FFFF - EL2 Generic Watchdog Control 64KB S/NS
0x00_2A45_0000 0x00_2A45_FFFF - EL2 Generic Watchdog Refresh 64KB S/NS
(2)It is also confirmed by Suravee, in Seattle,  the size is 64KB also.
(3) these configuration has passed the test in Foundation model and Seattle B0.

Not sure the reason, maybe because of the 64KB page size.

But, yes, in SBSA, the device only has 4KB register area, and the
driver only need to use 4KB.

So you are right,  "What matters is what the driver uses." , so will use 0x1000.
I think there is not problem, because ACPI uses this size.


>
> Guenter
>
>
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
index 2874d92..3fc2746 100644
--- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
+++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
@@ -84,6 +84,17 @@ 
 			clock-names = "uartclk", "apb_pclk";
 		};
 
+		watchdog0: watchdog@e0bb0000 {
+			compatible = "arm,sbsa-gwdt";
+			reg = <0x0 0xe0bb0000 0 0x10000>,
+				<0x0 0xe0bc0000 0 0x10000>;
+			reg-names = "refresh",
+				"control";
+			interrupts = <0 337 4>;
+			interrupt-names = "ws0";
+			timeout-sec = <10>;
+		};
+
 		spi0: ssp@e1020000 {
 			status = "disabled";
 			compatible = "arm,pl022", "arm,primecell";