Skip to contentSkip to conversation

add DM based reset driver for SiFive SoC's

PATCH Superseded Sagar Shrikant Kadam 2 participants 14 messages Jun 25, 2020 – Jul 7, 2020

Subsystems (5)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v2 cover add DM based reset driver for SiFive SoC's

The FU540-C000 support in U-Boot is missing DM based reset driver, and is handling reset's to sub-system within the prci driver itself. The series here adds a generic DM reset driver for SiFive SoC's so as to leverage the U-Boot's reset framework and binds the reset driver with prci driver.
The PRCI driver takes care of triggering the consumers reset signals appropriately.

Patch 1: Add necessary dt indexes for device reset register. Patch 2: Update macro's to use common dt indexes from binding header. Patch 3: Add reset producer and consumer entries within the device tree. Patch 4: Add reset dm driver and bind it within prci module. Patch 5: Add Kconfig, Makefile entries and enable the driver

This series is based on mainline U-Boot commit 922c6d5d0090 ("Merge tag
'mmc-2020-6-24' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc")

History:
==========================
V2:
-Removed extra character in commit log of 2nd patch

V1:
-Base version.

Sagar Shrikant Kadam (5):
dt-bindings: prci: add indexes for reset signals available in prci
fu540: prci: use common reset indexes defined in binding header
fu540: dtsi: add reset producer and consumer entries
sifive: reset: add DM based reset driver for SiFive SoC's
configs: reset: fu540: enable dm reset framework for SiFive SoC

 arch/riscv/dts/fu540-c000-u-boot.dtsi         |  10 +++
 arch/riscv/include/asm/arch-fu540/reset.h     |  13 +++
 configs/sifive_fu540_defconfig                |   2 +
 drivers/clk/sifive/fu540-prci.c               |  89 +++++++++++++------
 drivers/reset/Kconfig                         |   9 ++
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sifive.c                  | 118 ++++++++++++++++++++++++++
 include/dt-bindings/clock/sifive-fu540-prci.h |   8 ++
 8 files changed, 225 insertions(+), 25 deletions(-)
 create mode 100644 arch/riscv/include/asm/arch-fu540/reset.h
 create mode 100644 drivers/reset/reset-sifive.c
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
index 6a0b70a..1c03b09 100644
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL	       2
 #define PRCI_CLK_TLCLK		       3
 
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N	0
+#define PRCI_RST_DDR_AXI_N	1
+#define PRCI_RST_DDR_AHB_N	2
+#define PRCI_RST_DDR_PHY_N	3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N		4
+#define PRCI_RST_GEMGXL_N	5
 #endif
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Quoted 20 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
index 6a0b70a..1c03b09 100644
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 10 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
 
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

Jagan.

#3 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Hi Jagan,

Quoted 43 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

include/dt-

Quoted 14 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 7 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3
 
Quoted 13 lines

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 9 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

No, these reset bindings are not synced from Linux.

Thanks & Regards,
Sagar

Quoted 1 line

Jagan.

#4 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Quoted 60 lines · Sagar Kadam

Hi Jagan,

Quoted 43 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

include/dt-

Quoted 14 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 7 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3
 
Quoted 13 lines

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 9 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

Quoted 1 line

No, these reset bindings are not synced from Linux.

This is synced file from Linux, better to inline with Linux files always, if these bindings are not related to Linux then maintain it in a separate file or support it in Linux first if they do require for Linux.

Jagan.

#5 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Hello Jagan,

Quoted 86 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, June 29, 2020 9:00 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 8 lines · Sagar Kadam

Hi Jagan,

Quoted 5 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen

<[email protected]>;

Quoted 2 lines
Quoted 2 lines

Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish

Patra

Quoted 2 lines
Quoted 2 lines

<[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon

Glass

Quoted 5 lines
Quoted 5 lines

<[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset

signals

Quoted 3 lines
Quoted 3 lines

available in prci

[External Email] Do not click links or attachments unless you recognize

the

Quoted 40 lines
Quoted 39 lines

sender and know the content is safe

include/dt-

Quoted 14 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 6 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 10 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
 
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

Quoted 7 lines
Quoted 1 line

No, these reset bindings are not synced from Linux.

This is synced file from Linux, better to inline with Linux files always, if these bindings are not related to Linux then maintain it in a separate file or support it in Linux first if they do require for Linux.

Ohh. Sorry I thought you were asking if reset-bindings are from Linux. Yes this file is synced from Linux but these reset-bindings are not related to Linux. So I can split it and place reset bindings into another file:
"include/dt-bindings/reset/sifive-fu540-reset.h"
and include it wherever required. Please let me know if this sounds okay.

Thanks & BR,
Sagar Kadam

Quoted 1 line

Jagan.

#6 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Quoted 120 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Sagar Kadam
Sent: Monday, June 29, 2020 9:37 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: RE: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

Hello Jagan,

Quoted 7 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, June 29, 2020 9:00 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>;

Anup

Quoted 2 lines

Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel

<[email protected]>;

Quoted 1 line

bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor

Woerner

Quoted 1 line

<[email protected]>; Eugeniy Paltsev

<[email protected]>;

Quoted 18 lines

Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 8 lines · Sagar Kadam

Hi Jagan,

Quoted 5 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen

Quoted 5 lines

<[email protected]>;

Quoted 2 lines
Quoted 2 lines

Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish

Patra

Quoted 1 line
Quoted 1 line

<[email protected]>; Lukasz Majewski <[email protected]>;

Pragnesh

Quoted 3 lines
Quoted 1 line
Quoted 1 line

Patel <[email protected]>; bin.meng at windriver.com; Simon

Glass

Quoted 1 line
Quoted 1 line

<[email protected]>; Trevor Woerner <[email protected]>;

Eugeniy

Quoted 52 lines
Quoted 5 lines
Quoted 5 lines

Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset

signals

Quoted 4 lines
Quoted 4 lines

available in prci

[External Email] Do not click links or attachments unless you recognize

the

Quoted 41 lines
Quoted 40 lines

sender and know the content is safe

include/dt-

Quoted 15 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 6 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 10 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
 
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

Quoted 7 lines
Quoted 1 line

No, these reset bindings are not synced from Linux.

This is synced file from Linux, better to inline with Linux files always, if these bindings are not related to Linux then maintain it in a separate file or support it in Linux first if they do require for Linux.

Quoted 4 lines

Ohh. Sorry I thought you were asking if reset-bindings are from Linux. Yes this file is synced from Linux but these reset-bindings are not related to Linux. So I can split it and place reset bindings into another file:
"include/dt-bindings/reset/sifive-fu540-reset.h"

It will be "include/dt-bindings/reset/sifive-fu540-prci.h"

BR,
Sagar

Quoted 6 lines

and include it wherever required. Please let me know if this sounds okay.

Thanks & BR,
Sagar Kadam

Quoted 1 line

Jagan.

#7 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Quoted 121 lines · Sagar Kadam
Quoted 121 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Sagar Kadam
Sent: Monday, June 29, 2020 9:37 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: RE: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

Hello Jagan,

Quoted 7 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, June 29, 2020 9:00 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>;

Anup

Quoted 2 lines

Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel

<[email protected]>;

Quoted 1 line

bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor

Woerner

Quoted 1 line

<[email protected]>; Eugeniy Paltsev

<[email protected]>;

Quoted 18 lines

Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 8 lines · Sagar Kadam

Hi Jagan,

Quoted 5 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen

Quoted 5 lines

<[email protected]>;

Quoted 2 lines
Quoted 2 lines

Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish

Patra

Quoted 1 line
Quoted 1 line

<[email protected]>; Lukasz Majewski <[email protected]>;

Pragnesh

Quoted 3 lines
Quoted 1 line
Quoted 1 line

Patel <[email protected]>; bin.meng at windriver.com; Simon

Glass

Quoted 1 line
Quoted 1 line

<[email protected]>; Trevor Woerner <[email protected]>;

Eugeniy

Quoted 59 lines
Quoted 5 lines
Quoted 5 lines

Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset

signals

Quoted 4 lines
Quoted 4 lines

available in prci

[External Email] Do not click links or attachments unless you recognize

the

Quoted 41 lines
Quoted 27 lines

sender and know the content is safe

include/dt-

Quoted 15 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 7 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3
 
Quoted 13 lines

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 9 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

Quoted 1 line

No, these reset bindings are not synced from Linux.

This is synced file from Linux, better to inline with Linux files always, if these bindings are not related to Linux then maintain it in a separate file or support it in Linux first if they do require for Linux.

Quoted 6 lines
Quoted 4 lines

Ohh. Sorry I thought you were asking if reset-bindings are from Linux. Yes this file is synced from Linux but these reset-bindings are not related to Linux. So I can split it and place reset bindings into another file:
"include/dt-bindings/reset/sifive-fu540-reset.h"

It will be "include/dt-bindings/reset/sifive-fu540-prci.h"

What if it would be the same directory structure and file name with -u-boot.h extension. This way we can identify these are u-boot related defines.

Jagan.

#8 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Hi Jagan,

Quoted 155 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Friday, July 3, 2020 12:04 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 4 lines · Sagar Kadam
Quoted 4 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Sagar

Kadam

Quoted 6 lines
Quoted 6 lines

Sent: Monday, June 29, 2020 9:37 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra

<[email protected]>;

Quoted 39 lines
Quoted 39 lines

Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: RE: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

Hello Jagan,

Quoted 7 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, June 29, 2020 9:00 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>;

Anup

Quoted 2 lines

Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel

<[email protected]>;

Quoted 1 line

bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor

Woerner

Quoted 1 line

<[email protected]>; Eugeniy Paltsev

<[email protected]>;

Quoted 14 lines

Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 3 lines · Sagar Kadam

Hi Jagan,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen

<[email protected]>;

Quoted 2 lines
Quoted 2 lines

Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel

<[email protected]>;

Quoted 63 lines
Quoted 63 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

Atish

Patra

Quoted 1 line
Quoted 1 line

<[email protected]>; Lukasz Majewski <[email protected]>;

Pragnesh

Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Patel <[email protected]>; bin.meng at windriver.com; Simon

Glass

Quoted 1 line
Quoted 1 line

<[email protected]>; Trevor Woerner <[email protected]>;

Eugeniy

Quoted 54 lines
Quoted 5 lines
Quoted 5 lines

Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset

signals

Quoted 4 lines
Quoted 4 lines

available in prci

[External Email] Do not click links or attachments unless you recognize

the

Quoted 42 lines
Quoted 27 lines

sender and know the content is safe

include/dt-

Quoted 15 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 7 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3
 
Quoted 13 lines

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 9 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

No, these reset bindings are not synced from Linux.

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

This is synced file from Linux, better to inline with Linux files always, if these bindings are not related to Linux then maintain it in a separate file or support it in Linux first if they do require for Linux.

Ohh. Sorry I thought you were asking if reset-bindings are from Linux. Yes this file is synced from Linux but these reset-bindings are not related to Linux. So I can split it and place reset bindings into another

file:

Quoted 2 lines
Quoted 1 line

"include/dt-bindings/reset/sifive-fu540-reset.h"

Quoted 7 lines
Quoted 1 line

It will be "include/dt-bindings/reset/sifive-fu540-prci.h"

What if it would be the same directory structure and file name with -u- boot.h extension. This way we can identify these are u-boot related defines.

Jagan.

That's a good suggestion. Having an -u-boot.h extension will make the point that it is needed only for u-boot.
Please correct me if I am wrong here, but I do see few references of similar clock / reset module's ( eg: sun5i-ccu.h or tegra124-car.h etc.) sharing header names in
1. Clock bindings in include/dt-bindings/clock/
2. reset bindings in include/dt-bindings/reset/
These headers provide respective clock and reset indexes.
So I was thinking similarly for prci to have clock indexes in dt-bindings/clock and reset indexes in dt-bindings/reset.

Thanks & BR,
Sagar

#9 lore raw

PATCH v2 1/5 dt-bindings: prci: add indexes for reset signals available in prci

Hi Jagan,

A gentle reminder here.

Quoted 185 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Sagar Kadam
Sent: Friday, July 3, 2020 12:25 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: RE: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

Hi Jagan,

Quoted 5 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Friday, July 3, 2020 12:04 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen

<[email protected]>;

Quoted 4 lines

Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon

Glass

Quoted 16 lines

<[email protected]>; Trevor Woerner <[email protected]>; Eugeniy Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 4 lines · Sagar Kadam
Quoted 4 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Sagar

Quoted 11 lines

Kadam

Quoted 6 lines
Quoted 6 lines

Sent: Monday, June 29, 2020 9:37 PM
To: Jagan Teki <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen <[email protected]>; Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel <[email protected]>; Atish Patra

<[email protected]>;

Quoted 3 lines
Quoted 3 lines

Lukasz Majewski <[email protected]>; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>;

Eugeniy

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: RE: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Hello Jagan,

Quoted 7 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Monday, June 29, 2020 9:00 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen
<[email protected]>; Paul Walmsley ( Sifive)
<[email protected]>; Palmer Dabbelt

<[email protected]>;

Quoted 105 lines
Quoted 22 lines
Quoted 22 lines

Anup

Quoted 2 lines

Patel <[email protected]>; Atish Patra <[email protected]>; Lukasz Majewski <[email protected]>; Pragnesh Patel

<[email protected]>;

Quoted 1 line

bin.meng at windriver.com; Simon Glass <[email protected]>; Trevor

Woerner

Quoted 1 line

<[email protected]>; Eugeniy Paltsev

<[email protected]>;

Quoted 14 lines

Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset signals available in prci

[External Email] Do not click links or attachments unless you recognize the sender and know the content is safe

Quoted 3 lines · Sagar Kadam

Hi Jagan,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

-----Original Message-----
From: Jagan Teki <[email protected]>
Sent: Thursday, June 25, 2020 11:13 PM
To: Sagar Kadam <[email protected]>
Cc: U-Boot-Denx <[email protected]>; Rick Chen

<[email protected]>;

Quoted 2 lines
Quoted 2 lines

Paul Walmsley ( Sifive) <[email protected]>; Palmer Dabbelt <[email protected]>; Anup Patel

<[email protected]>;

Quoted 63 lines
Quoted 63 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

Atish

Patra

Quoted 1 line
Quoted 1 line

<[email protected]>; Lukasz Majewski <[email protected]>;

Pragnesh

Quoted 4 lines
Quoted 2 lines
Quoted 2 lines

Patel <[email protected]>; bin.meng at windriver.com; Simon

Glass

Quoted 1 line
Quoted 1 line

<[email protected]>; Trevor Woerner <[email protected]>;

Eugeniy

Quoted 54 lines
Quoted 5 lines
Quoted 5 lines

Paltsev <[email protected]>; Patrick Wildt <[email protected]>; Weijie Gao <[email protected]>; Fabio Estevam <[email protected]>
Subject: Re: [PATCH v2 1/5] dt-bindings: prci: add indexes for reset

signals

Quoted 4 lines
Quoted 4 lines

available in prci

[External Email] Do not click links or attachments unless you recognize

the

Quoted 42 lines
Quoted 27 lines

sender and know the content is safe

include/dt-

Quoted 15 lines · Sagar Shrikant Kadam

Add bit indexes for reset signals within the PRCI module on FU540-C000 SoC.
The DDR and ethernet sub-system's have reset signals indicated by these reset indexes.

---
 include/dt-bindings/clock/sifive-fu540-prci.h | 8 ++++++++
 1 file changed, 8 insertions(+)
include/dt- renamed from include/dt-bindings/clock/sifive-fu540-prci.h +0 -0

bindings/clock/sifive-fu540-prci.h

Quoted 7 lines

index 6a0b70a..1c03b09 100644

include/dt-bindings/clock/sifive-fu540-prci.h +0 -0
@@ -15,4 +15,12 @@
 #define PRCI_CLK_GEMGXLPLL            2
 #define PRCI_CLK_TLCLK                3
 
Quoted 13 lines

include/dt-bindings/clock/sifive-fu540-prci.h line 26

Quoted 9 lines
include/dt-bindings/clock/sifive-fu540-prci.h +8 -0
+/* Reset bit indexes to be used by driver */
+#define PRCI_RST_DDR_CTRL_N    0
+#define PRCI_RST_DDR_AXI_N     1
+#define PRCI_RST_DDR_AHB_N     2
+#define PRCI_RST_DDR_PHY_N     3
+/* bit 4 is reserved bit */
+#define PRCI_RST_RSVD_N                4
+#define PRCI_RST_GEMGXL_N      5
 #endif

Do these bindings are synced from Linux? If Yes better to sync with a particular commit or tag rather than patch.

No, these reset bindings are not synced from Linux.

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

This is synced file from Linux, better to inline with Linux files always, if these bindings are not related to Linux then maintain it in a separate file or support it in Linux first if they do require for Linux.

Ohh. Sorry I thought you were asking if reset-bindings are from Linux. Yes this file is synced from Linux but these reset-bindings are not related to Linux. So I can split it and place reset bindings into another

file:

Quoted 2 lines
Quoted 1 line

"include/dt-bindings/reset/sifive-fu540-reset.h"

Quoted 7 lines
Quoted 1 line

It will be "include/dt-bindings/reset/sifive-fu540-prci.h"

What if it would be the same directory structure and file name with -u- boot.h extension. This way we can identify these are u-boot related defines.

Jagan.

Quoted 12 lines

That's a good suggestion. Having an -u-boot.h extension will make the point that it is needed only for u-boot.
Please correct me if I am wrong here, but I do see few references of similar clock / reset module's ( eg: sun5i-ccu.h or tegra124-car.h etc.) sharing header names in
1. Clock bindings in include/dt-bindings/clock/
2. reset bindings in include/dt-bindings/reset/
These headers provide respective clock and reset indexes.
So I was thinking similarly for prci to have clock indexes in dt- bindings/clock and
reset indexes in dt-bindings/reset.

Due to above understanding I am in a bit of dilemma, which approach can be more suitable.

Quoted 2 lines

Thanks & BR,
Sagar

Thanks & BR,
Sagar

#10 lore raw

PATCH v2 2/5 fu540: prci: use common reset indexes defined in binding header

In reply to Sagar Shrikant Kadam

Indexes of reset signals available in PRCI driver are also defined in include/dt-bindings/clock/sifive-fu540-prci.h. So use those instead of defining new ones again within the fu540-prci driver.

---
 drivers/clk/sifive/fu540-prci.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/clk/sifive/fu540-prci.c +6 -10
index fe6e0d4..57d811e 100644
@@ -131,21 +131,17 @@
 
 /* DEVICESRESETREG */
 #define PRCI_DEVICESRESETREG_OFFSET	0x28
-#define PRCI_DEVICESRESETREG_DDR_CTRL_RST_N_SHIFT 0
+
 #define PRCI_DEVICESRESETREG_DDR_CTRL_RST_N_MASK \
-			(0x1 << PRCI_DEVICESRESETREG_DDR_CTRL_RST_N_SHIFT)
-#define PRCI_DEVICESRESETREG_DDR_AXI_RST_N_SHIFT 1
+			(0x1 << PRCI_RST_DDR_CTRL_N)
 #define PRCI_DEVICESRESETREG_DDR_AXI_RST_N_MASK \
-			(0x1 << PRCI_DEVICESRESETREG_DDR_AXI_RST_N_SHIFT)
-#define PRCI_DEVICESRESETREG_DDR_AHB_RST_N_SHIFT 2
+			(0x1 << PRCI_RST_DDR_AXI_N)
 #define PRCI_DEVICESRESETREG_DDR_AHB_RST_N_MASK \
-			(0x1 << PRCI_DEVICESRESETREG_DDR_AHB_RST_N_SHIFT)
-#define PRCI_DEVICESRESETREG_DDR_PHY_RST_N_SHIFT 3
+			(0x1 << PRCI_RST_DDR_AHB_N)
 #define PRCI_DEVICESRESETREG_DDR_PHY_RST_N_MASK \
-			(0x1 << PRCI_DEVICESRESETREG_DDR_PHY_RST_N_SHIFT)
-#define PRCI_DEVICESRESETREG_GEMGXL_RST_N_SHIFT 5
+			(0x1 << PRCI_RST_DDR_PHY_N)
 #define PRCI_DEVICESRESETREG_GEMGXL_RST_N_MASK \
-			(0x1 << PRCI_DEVICESRESETREG_GEMGXL_RST_N_SHIFT)
+			(0x1 << PRCI_RST_GEMGXL_N)
 
 /* CLKMUXSTATUSREG */
 #define PRCI_CLKMUXSTATUSREG_OFFSET	0x2c
Signature · 1 line
2.7.4
#11 lore raw

PATCH v2 3/5 fu540: dtsi: add reset producer and consumer entries

In reply to Sagar Shrikant Kadam

The resets to DDR and ethernet sub-system are connected to PRCI device reset control register, these reset signals are active low and are held low at power-up. Add these reset producer and consumer details needed by the reset driver.

---
 arch/riscv/dts/fu540-c000-u-boot.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/riscv/dts/fu540-c000-u-boot.dtsi +10 -0
index 9bba554..b37241e 100644
@@ -59,6 +59,16 @@
 			reg = <0x0 0x2000000 0x0 0xc0000>;
 			u-boot,dm-spl;
 		};
+		prci: clock-controller at 10000000 {
+			#reset-cells = <1>;
+			resets = <&prci PRCI_RST_DDR_CTRL_N>,
+				 <&prci PRCI_RST_DDR_AXI_N>,
+				 <&prci PRCI_RST_DDR_AHB_N>,
+				 <&prci PRCI_RST_DDR_PHY_N>,
+				 <&prci PRCI_RST_GEMGXL_N>;
+			reset-names = "ddr_ctrl", "ddr_axi", "ddr_ahb",
+					"ddr_phy", "gemgxl_reset";
+		};
 		dmc: dmc at 100b0000 {
 			compatible = "sifive,fu540-c000-ddr";
 			reg = <0x0 0x100b0000 0x0 0x0800
Signature · 1 line
2.7.4
#12 lore raw

PATCH v2 4/5 sifive: reset: add DM based reset driver for SiFive SoC's

In reply to Sagar Shrikant Kadam

PRCI module within SiFive SoC's has register with which we can reset the sub-systems within the SoC. The resets to DDR and ethernet sub systems within FU540-C000 SoC are active low, and are hold low by default on power-up. Currently these are directly asserted within prci driver via register read/write.
With the DM based reset driver support here, we bind the reset driver with clock (prci) driver and assert the reset signals of both sub-system's appropriately.

---
 arch/riscv/include/asm/arch-fu540/reset.h |  13 ++++
 drivers/clk/sifive/fu540-prci.c           |  73 ++++++++++++++----
 drivers/reset/reset-sifive.c              | 118 ++++++++++++++++++++++++++++++
 3 files changed, 189 insertions(+), 15 deletions(-)
 create mode 100644 arch/riscv/include/asm/arch-fu540/reset.h
 create mode 100644 drivers/reset/reset-sifive.c
arch/riscv/include/asm/arch-fu540/reset.h new file +13 -0
new file mode 100644
index 0000000..e42797a
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2020 SiFive, Inc.
+ *
+ * Author: Sagar Kadam <[email protected]>
+ */
+
+#ifndef __RESET_SIFIVE_H
+#define __RESET_SIFIVE_H
+
+int sifive_reset_bind(struct udevice *dev, ulong count);
+
+#endif
drivers/clk/sifive/fu540-prci.c +58 -15

122 lines not on this page · raw message

drivers/reset/reset-sifive.c new file +118 -0

118 lines not on this page · raw message

Signature · 1 line
2.7.4
#13 lore raw

PATCH v2 5/5 configs: reset: fu540: enable dm reset framework for SiFive SoC

In reply to Sagar Shrikant Kadam

Add necessary defconfig and Kconfig entries to enable SiFive SoC's reset driver so as to utilise U-Boot's reset framework.

---
 configs/sifive_fu540_defconfig | 2 ++
 drivers/reset/Kconfig          | 9 +++++++++
 drivers/reset/Makefile         | 1 +
 3 files changed, 12 insertions(+)
configs/sifive_fu540_defconfig +2 -0
index 8d412f8..6d78943 100644
@@ -21,3 +21,5 @@ CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_CLK=y
 CONFIG_DM_MTD=y
+CONFIG_SPL_DM_RESET=y
+CONFIG_DM_RESET=y
drivers/reset/Kconfig +9 -0
index 88d3be1..627f8e8 100644
@@ -148,4 +148,13 @@ config RESET_IMX7
 	help
 	  Support for reset controller on i.MX7/8 SoCs.
 
+config RESET_SIFIVE
+	bool "Reset Driver for SiFive SoC's"
+	depends on DM_RESET && CLK_SIFIVE_FU540_PRCI && TARGET_SIFIVE_FU540
+	default y
+	help
+	  PRCI module within SiFive SoC's provides mechanism to reset
+	  different hw blocks like DDR, gemgxl. With this driver we leverage
+	  U-Boot's reset framework to reset these hardware blocks.
+
 endmenu
drivers/reset/Makefile +1 -0
index 0a044d5..e3c27c4 100644
@@ -23,3 +23,4 @@ obj-$(CONFIG_RESET_MTMIPS) += reset-mtmips.o
 obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
 obj-$(CONFIG_RESET_HISILICON) += reset-hisilicon.o
 obj-$(CONFIG_RESET_IMX7) += reset-imx7.o
+obj-$(CONFIG_RESET_SIFIVE) += reset-sifive.o
Signature · 1 line
2.7.4