* [PATCH v5 0/2] Add StarFive JH8100 watchdog
@ 2023-12-21 8:43 Ji Sheng Teoh
2023-12-21 8:43 ` [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100 Ji Sheng Teoh
2023-12-21 8:43 ` [PATCH v5 2/2] riscv: dts: starfive: jh8100: Add watchdog node Ji Sheng Teoh
0 siblings, 2 replies; 7+ messages in thread
From: Ji Sheng Teoh @ 2023-12-21 8:43 UTC (permalink / raw)
To: Xingyu Wu, Samin Guo, Wim Van Sebroeck, Guenter Roeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Emil Renner Berthing, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Ji Sheng Teoh, Ley Foon Tan, linux-watchdog, devicetree,
linux-kernel, linux-riscv
Changes since v4:
- Patch(1/2) expresses JH8100 compatibility to JH7110 in dt-binding,
and adds minItems to constrain reset property.
- Patch(2/2) adds watchdog node in jh8100.dtsi. This patch depends on
patch series [1] and [2].
[1]: Initial device tree support for StarFive JH8100 SoC
https://lore.kernel.org/all/20231201121410.95298-7-jeeheng.sia@starfivetech.com/
[2]: Basic clock and reset support for StarFive JH8100 RISC-V SoC
https://lore.kernel.org/all/20231206115000.295825-17-jeeheng.sia@starfivetech.com/
Changes since v3:
- Drop items in compatible field.
- Replace items with maxItems in reset field.
- Replace maxItems with items: -description in if else reset field
Changes since v2:
- Express JH8100 compatibility to JH7110 in dt-bindings.
- Rework min/maxItems constraint for JH8100 resets property.
Changes since v1:
- Drop "starfive,jh8100-wdt" compatible field in starfive-wdt.c,
and express them in dt-bindings.
- Use minItems in resets field to cater for single reset signal
in JH8100.
- Reword Watchdog reset to Core reset for JH8100.
StarFive's JH8100 watchdog reuses JH7100 register mapping.
DT-binding of JH7100 watchdog is extended to support JH8100.
Since JH8100 only uses 1 reset signal, update the binding to
support one reset for "starfive,jh8100-wdt" compatible.
Ji Sheng Teoh (2):
dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
riscv: dts: starfive: jh8100: Add watchdog node
.../watchdog/starfive,jh7100-wdt.yaml | 40 ++++++++++++++-----
arch/riscv/boot/dts/starfive/jh8100.dtsi | 9 +++++
2 files changed, 40 insertions(+), 9 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
2023-12-21 8:43 [PATCH v5 0/2] Add StarFive JH8100 watchdog Ji Sheng Teoh
@ 2023-12-21 8:43 ` Ji Sheng Teoh
2023-12-21 21:02 ` Rob Herring
2023-12-21 8:43 ` [PATCH v5 2/2] riscv: dts: starfive: jh8100: Add watchdog node Ji Sheng Teoh
1 sibling, 1 reply; 7+ messages in thread
From: Ji Sheng Teoh @ 2023-12-21 8:43 UTC (permalink / raw)
To: Xingyu Wu, Samin Guo, Wim Van Sebroeck, Guenter Roeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Emil Renner Berthing, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Ji Sheng Teoh, Ley Foon Tan, linux-watchdog, devicetree,
linux-kernel, linux-riscv
Add "starfive,jh8100-wdt" compatible string for StarFive's JH8100
watchdog.
Since JH8100 watchdog only has 1 reset signal, update binding
document to support one reset for "starfive,jh8100-wdt" compatible.
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
---
.../watchdog/starfive,jh7100-wdt.yaml | 40 ++++++++++++++-----
1 file changed, 31 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml b/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml
index 68f3f6fd08a6..e21f807b0b69 100644
--- a/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml
+++ b/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml
@@ -19,14 +19,16 @@ description:
isn't cleared, the watchdog will reset the system unless the watchdog
reset is disabled.
-allOf:
- - $ref: watchdog.yaml#
-
properties:
compatible:
- enum:
- - starfive,jh7100-wdt
- - starfive,jh7110-wdt
+ oneOf:
+ - enum:
+ - starfive,jh7100-wdt
+ - starfive,jh7110-wdt
+ - items:
+ - enum:
+ - starfive,jh8100-wdt
+ - const: starfive,jh7110-wdt
reg:
maxItems: 1
@@ -45,9 +47,8 @@ properties:
- const: core
resets:
- items:
- - description: APB reset
- - description: Core reset
+ minItems: 1
+ maxItems: 2
required:
- compatible
@@ -56,6 +57,27 @@ required:
- clock-names
- resets
+allOf:
+ - $ref: watchdog.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - starfive,jh8100-wdt
+ then:
+ properties:
+ resets:
+ items:
+ - description: Core reset
+ else:
+ properties:
+ resets:
+ items:
+ - description: APB reset
+ - description: Core reset
+
unevaluatedProperties: false
examples:
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
2023-12-21 8:43 ` [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100 Ji Sheng Teoh
@ 2023-12-21 21:02 ` Rob Herring
2024-02-27 1:57 ` JiSheng Teoh
0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2023-12-21 21:02 UTC (permalink / raw)
To: Ji Sheng Teoh
Cc: linux-watchdog, Ley Foon Tan, Samin Guo, Krzysztof Kozlowski,
Palmer Dabbelt, Rob Herring, linux-kernel, Emil Renner Berthing,
Albert Ou, Conor Dooley, Paul Walmsley, devicetree, Xingyu Wu,
Guenter Roeck, Wim Van Sebroeck, linux-riscv
On Thu, 21 Dec 2023 16:43:57 +0800, Ji Sheng Teoh wrote:
> Add "starfive,jh8100-wdt" compatible string for StarFive's JH8100
> watchdog.
> Since JH8100 watchdog only has 1 reset signal, update binding
> document to support one reset for "starfive,jh8100-wdt" compatible.
>
> Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
> Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
> ---
> .../watchdog/starfive,jh7100-wdt.yaml | 40 ++++++++++++++-----
> 1 file changed, 31 insertions(+), 9 deletions(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
2023-12-21 21:02 ` Rob Herring
@ 2024-02-27 1:57 ` JiSheng Teoh
2024-02-27 8:54 ` Conor Dooley
0 siblings, 1 reply; 7+ messages in thread
From: JiSheng Teoh @ 2024-02-27 1:57 UTC (permalink / raw)
To: Conor Dooley
Cc: Rob Herring, linux-watchdog, Leyfoon Tan, Krzysztof Kozlowski,
Palmer Dabbelt, Rob Herring, linux-kernel, Emil Renner Berthing,
Albert Ou, Conor Dooley, Paul Walmsley, devicetree, Xingyu Wu,
Guenter Roeck, Wim Van Sebroeck, linux-riscv
> On Thu, 21 Dec 2023 16:43:57 +0800, Ji Sheng Teoh wrote:
> > Add "starfive,jh8100-wdt" compatible string for StarFive's JH8100
> > watchdog.
> > Since JH8100 watchdog only has 1 reset signal, update binding document
> > to support one reset for "starfive,jh8100-wdt" compatible.
> >
> > Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
> > Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
> > ---
> > .../watchdog/starfive,jh7100-wdt.yaml | 40 ++++++++++++++-----
> > 1 file changed, 31 insertions(+), 9 deletions(-)
> >
>
> Reviewed-by: Rob Herring <robh@kernel.org>
Hi Conor, since this patch is reviewed, could you help to pick this dt-bindings patch for riscv-dt-for-next branch?
Thanks,
Ji Sheng
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
2024-02-27 1:57 ` JiSheng Teoh
@ 2024-02-27 8:54 ` Conor Dooley
2024-03-04 2:09 ` JiSheng Teoh
0 siblings, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2024-02-27 8:54 UTC (permalink / raw)
To: JiSheng Teoh
Cc: Conor Dooley, Rob Herring, linux-watchdog, Leyfoon Tan,
Krzysztof Kozlowski, Palmer Dabbelt, Rob Herring, linux-kernel,
Emil Renner Berthing, Albert Ou, Paul Walmsley, devicetree,
Xingyu Wu, Guenter Roeck, Wim Van Sebroeck, linux-riscv
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
On Tue, Feb 27, 2024 at 01:57:43AM +0000, JiSheng Teoh wrote:
> > On Thu, 21 Dec 2023 16:43:57 +0800, Ji Sheng Teoh wrote:
> > > Add "starfive,jh8100-wdt" compatible string for StarFive's JH8100
> > > watchdog.
> > > Since JH8100 watchdog only has 1 reset signal, update binding document
> > > to support one reset for "starfive,jh8100-wdt" compatible.
> > >
> > > Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
> > > Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
> > > ---
> > > .../watchdog/starfive,jh7100-wdt.yaml | 40 ++++++++++++++-----
> > > 1 file changed, 31 insertions(+), 9 deletions(-)
> > >
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
>
> Hi Conor, since this patch is reviewed, could you help to pick this
> dt-bindings patch for riscv-dt-for-next branch?
Ideally I would not and it would go via the watchdog tree.
Failing that, I'd rather Rob take it.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
2024-02-27 8:54 ` Conor Dooley
@ 2024-03-04 2:09 ` JiSheng Teoh
0 siblings, 0 replies; 7+ messages in thread
From: JiSheng Teoh @ 2024-03-04 2:09 UTC (permalink / raw)
To: Rob Herring
Cc: Conor Dooley, Conor Dooley, linux-watchdog, Leyfoon Tan,
Krzysztof Kozlowski, Palmer Dabbelt, Rob Herring, linux-kernel,
Emil Renner Berthing, Albert Ou, Paul Walmsley, devicetree,
Xingyu Wu, Guenter Roeck, Wim Van Sebroeck, linux-riscv
Hi Rob,
> On Tue, Feb 27, 2024 at 01:57:43AM +0000, JiSheng Teoh wrote:
> > > On Thu, 21 Dec 2023 16:43:57 +0800, Ji Sheng Teoh wrote:
> > > > Add "starfive,jh8100-wdt" compatible string for StarFive's JH8100
> > > > watchdog.
> > > > Since JH8100 watchdog only has 1 reset signal, update binding
> > > > document to support one reset for "starfive,jh8100-wdt" compatible.
> > > >
> > > > Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
> > > > Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
> > > > ---
> > > > .../watchdog/starfive,jh7100-wdt.yaml | 40 ++++++++++++++-----
> > > > 1 file changed, 31 insertions(+), 9 deletions(-)
> > > >
> > >
> > > Reviewed-by: Rob Herring <robh@kernel.org>
> >
> > Hi Conor, since this patch is reviewed, could you help to pick this
> > dt-bindings patch for riscv-dt-for-next branch?
>
> Ideally I would not and it would go via the watchdog tree.
>
> Failing that, I'd rather Rob take it.
Could you help to pick this dt-bindings patch for dt/next branch?
Thanks,
JiSheng
>
> Thanks,
> Conor.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 2/2] riscv: dts: starfive: jh8100: Add watchdog node
2023-12-21 8:43 [PATCH v5 0/2] Add StarFive JH8100 watchdog Ji Sheng Teoh
2023-12-21 8:43 ` [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100 Ji Sheng Teoh
@ 2023-12-21 8:43 ` Ji Sheng Teoh
1 sibling, 0 replies; 7+ messages in thread
From: Ji Sheng Teoh @ 2023-12-21 8:43 UTC (permalink / raw)
To: Xingyu Wu, Samin Guo, Wim Van Sebroeck, Guenter Roeck,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Emil Renner Berthing, Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: Ji Sheng Teoh, Ley Foon Tan, linux-watchdog, devicetree,
linux-kernel, linux-riscv
StarFive's JH8100 watchdog is based on JH7110, with JH8100 watchdog only
requiring one reset signal.
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
---
arch/riscv/boot/dts/starfive/jh8100.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/riscv/boot/dts/starfive/jh8100.dtsi b/arch/riscv/boot/dts/starfive/jh8100.dtsi
index 9863c61324a0..657d8b79e708 100644
--- a/arch/riscv/boot/dts/starfive/jh8100.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh8100.dtsi
@@ -360,6 +360,15 @@ uart4: serial@121a0000 {
status = "disabled";
};
+ watchdog@12270000 {
+ compatible = "starfive,jh8100-wdt", "starfive,jh7110-wdt";
+ reg = <0x0 0x12270000 0x0 0x10000>;
+ clocks = <&syscrg_ne SYSCRG_NE_CLK_WDT_APB>,
+ <&syscrg_ne SYSCRG_NE_CLK_WDT>;
+ clock-names = "apb", "core";
+ resets = <&syscrg_ne SYSCRG_NE_RSTN_WDT0>;
+ };
+
syscrg_ne: syscrg_ne@12320000 {
compatible = "starfive,jh8100-syscrg-ne";
reg = <0x0 0x12320000 0x0 0x10000>;
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-04 2:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 8:43 [PATCH v5 0/2] Add StarFive JH8100 watchdog Ji Sheng Teoh
2023-12-21 8:43 ` [PATCH v5 1/2] dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100 Ji Sheng Teoh
2023-12-21 21:02 ` Rob Herring
2024-02-27 1:57 ` JiSheng Teoh
2024-02-27 8:54 ` Conor Dooley
2024-03-04 2:09 ` JiSheng Teoh
2023-12-21 8:43 ` [PATCH v5 2/2] riscv: dts: starfive: jh8100: Add watchdog node Ji Sheng Teoh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®