Skip to contentSkip to conversation

add DM based reset driver for SiFive SoC's

PATCH Superseded Sagar Shrikant Kadam 3 participants 13 messages Jul 24, 2020 – Jul 29, 2020 1 message not in the archive

Subsystems (5)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 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 re-based on mainline U-Boot commit 5d3a21df6694 ("Merge tag
'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on [1]

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

History:
==========================
V4:
-Rebased the series to u-boot/master.

V3:
-Add reset indexes in separate dt binding header instead of
updating the clock dt binding header which is synced from Linux

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

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

PATCH v4 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/reset/sifive-fu540-prci.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 include/dt-bindings/reset/sifive-fu540-prci.h
include/dt-bindings/reset/sifive-fu540-prci.h new file +19 -0
new file mode 100644
index 0000000..89aa5b6
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020 Sifive, Inc.
+ * Author: Sagar Kadam <[email protected]>
+ */
+
+#ifndef __DT_BINDINGS_RESET_SIFIVE_FU540_PRCI_H
+#define __DT_BINDINGS_RESET_SIFIVE_FU540_PRCI_H
+
+/* Reset indexes for use by device tree data and the PRCI 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 v4 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/reset/sifive-fu540-prci.h. So use those instead of defining new ones again within the fu540-prci driver.

---
 drivers/clk/sifive/fu540-prci.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/clk/sifive/fu540-prci.c +7 -10
index fe6e0d4..00c31fc 100644
@@ -41,6 +41,7 @@
 #include <linux/math64.h>
 #include <linux/clk/analogbits-wrpll-cln28hpc.h>
 #include <dt-bindings/clock/sifive-fu540-prci.h>
+#include <dt-bindings/reset/sifive-fu540-prci.h>
 
 /*
  * EXPECTED_CLK_PARENT_COUNT: how many parent clocks this driver expects:
@@ -131,21 +132,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
#3 lore raw

PATCH v4 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 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/riscv/dts/fu540-c000-u-boot.dtsi +12 -0
index afdb4f4..5302677 100644
@@ -3,6 +3,8 @@
  * (C) Copyright 2019 SiFive, Inc
  */
 
+#include <dt-bindings/reset/sifive-fu540-prci.h>
+
 / {
 	cpus {
 		assigned-clocks = <&prci PRCI_CLK_COREPLL>;
@@ -59,6 +61,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
#4 lore raw

PATCH v4 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 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/riscv/dts/fu540-c000-u-boot.dtsi +12 -0
index afdb4f4..5302677 100644
@@ -3,6 +3,8 @@
  * (C) Copyright 2019 SiFive, Inc
  */
 
+#include <dt-bindings/reset/sifive-fu540-prci.h>
+
 / {
 	cpus {
 		assigned-clocks = <&prci PRCI_CLK_COREPLL>;
@@ -59,6 +61,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
#5 lore raw

PATCH v4 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
#6 lore raw

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

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 9e00a56..31cf3b4 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 6d53561..253902f 100644
@@ -148,6 +148,15 @@ 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.
+
 config RESET_SYSCON
 	bool "Enable generic syscon reset driver support"
 	depends on DM_RESET
drivers/reset/Makefile +1 -0
index 8e0124b..3c7f066 100644
@@ -23,5 +23,6 @@ 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
 obj-$(CONFIG_RESET_SYSCON) += reset-syscon.o
 obj-$(CONFIG_RESET_RASPBERRYPI) += reset-raspberrypi.o
Signature · 1 line
2.7.4
#7 lore raw

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

In reply to Sagar Shrikant Kadam

Hi Rick,

Quoted 28 lines

-----Original Message-----
From: Sagar Kadam <[email protected]>
Sent: Friday, July 24, 2020 2:17 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; seanga2 at gmail.com; Sagar Kadam <[email protected]>
Subject: [PATCH v4 0/5] 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

Quoted 5 lines

This series is re-based on mainline U-Boot commit 5d3a21df6694 ("Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on [1]

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

I have rebased this series on u-boot/master.
Can you please pull it and let me know if any issues are there.

Thanks & BR,
Sagar

Quoted 37 lines

History:
==========================
V4:
-Rebased the series to u-boot/master.

V3:
-Add reset indexes in separate dt binding header instead of updating the clock dt binding header which is synced from Linux

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

 arch/riscv/dts/fu540-c000-u-boot.dtsi         |  12 +++
 arch/riscv/include/asm/arch-fu540/reset.h     |  13 +++
 configs/sifive_fu540_defconfig                |   2 +
 drivers/clk/sifive/fu540-prci.c               |  90 ++++++++++++++------
 drivers/reset/Kconfig                         |   9 ++
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sifive.c                  | 118 ++++++++++++++++++++++++++
 include/dt-bindings/reset/sifive-fu540-prci.h |  19 +++++
 8 files changed, 239 insertions(+), 25 deletions(-)  create mode 100644
arch/riscv/include/asm/arch-fu540/reset.h
 create mode 100644 drivers/reset/reset-sifive.c  create mode 100644

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

--
2.7.4

#8 lore raw

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

Hello Rick,

Quoted 46 lines

-----Original Message-----
From: Sagar Kadam
Sent: Monday, July 27, 2020 8:56 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hi Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam <[email protected]>
Sent: Friday, July 24, 2020 2:17 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

anup.patel at wdc.com;

Quoted 5 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines

seanga2 at gmail.com; Sagar Kadam <[email protected]>
Subject: [PATCH v4 0/5] 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.

Quoted 7 lines

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 re-based on mainline U-Boot commit 5d3a21df6694 ("Merge

Quoted 9 lines

tag

Quoted 4 lines

'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on [1]

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

I have rebased this series on u-boot/master.
Can you please pull it and let me know if any issues are there.

It seems that u-boot/master is moved ahead and the commit on which this series was based is reverted "Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm""
and will again conflict considering other patch's that are merged in u-boot/master. I can rebase it again, but would like to know what you would prefer me to rebase on u-boot/master or u-boot-riscv/master?

Thanks & BR,
Sagar

Quoted 40 lines

Thanks & BR,
Sagar

Quoted 37 lines

History:
==========================
V4:
-Rebased the series to u-boot/master.

V3:
-Add reset indexes in separate dt binding header instead of updating the clock dt binding header which is synced from Linux

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

 arch/riscv/dts/fu540-c000-u-boot.dtsi         |  12 +++
 arch/riscv/include/asm/arch-fu540/reset.h     |  13 +++
 configs/sifive_fu540_defconfig                |   2 +
 drivers/clk/sifive/fu540-prci.c               |  90 ++++++++++++++------
 drivers/reset/Kconfig                         |   9 ++
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sifive.c                  | 118 ++++++++++++++++++++++++++
 include/dt-bindings/reset/sifive-fu540-prci.h |  19 +++++
 8 files changed, 239 insertions(+), 25 deletions(-)  create mode 100644
arch/riscv/include/asm/arch-fu540/reset.h
 create mode 100644 drivers/reset/reset-sifive.c  create mode 100644

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

--
2.7.4

#9 lore raw

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

Hi Sagar,

Quoted 55 lines · Sagar Kadam

Hello Rick,

Quoted 52 lines

-----Original Message-----
From: Sagar Kadam
Sent: Monday, July 27, 2020 8:56 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hi Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam <[email protected]>
Sent: Friday, July 24, 2020 2:17 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

anup.patel at wdc.com;

Quoted 5 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines

seanga2 at gmail.com; Sagar Kadam <[email protected]>
Subject: [PATCH v4 0/5] 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.

Quoted 7 lines

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 re-based on mainline U-Boot commit 5d3a21df6694 ("Merge

tag

Quoted 4 lines

'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on [1]

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

Quoted 8 lines
Quoted 3 lines

I have rebased this series on u-boot/master.
Can you please pull it and let me know if any issues are there.

It seems that u-boot/master is moved ahead and the commit on which this series was based is reverted "Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm""
and will again conflict considering other patch's that are merged in u-boot/master. I can rebase it again, but would like to know what you would prefer me to rebase on u-boot/master or u-boot-riscv/master?

Can you take another look? The DM stuff landed again yesterday.

Regards,
Simon

#10 lore raw

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

Hi Simon,

Quoted 90 lines

-----Original Message-----
From: Simon Glass <[email protected]>
Sent: Wednesday, July 29, 2020 12:28 AM
To: Sagar Kadam <[email protected]>
Cc: u-boot at lists.denx.de; rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com;
weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; seanga2 at gmail.com
Subject: Re: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

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

Hi Sagar,

Quoted 9 lines · Sagar Kadam

Hello Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam
Sent: Monday, July 27, 2020 8:56 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

anup.patel at wdc.com;

Quoted 3 lines
Quoted 3 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; jagan at amarulasolutions.com; sjg at chromium.org;

twoerner at gmail.com;

Quoted 2 lines
Quoted 2 lines

patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines
Quoted 11 lines

seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hi Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam <[email protected]>
Sent: Friday, July 24, 2020 2:17 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

Quoted 4 lines
Quoted 4 lines

anup.patel at wdc.com;

Quoted 3 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; jagan at amarulasolutions.com; sjg at chromium.org;

twoerner at gmail.com;

Quoted 15 lines
Quoted 15 lines
Quoted 3 lines

patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines

seanga2 at gmail.com; Sagar Kadam <[email protected]>
Subject: [PATCH v4 0/5] 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.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Patch 1: Add necessary dt indexes for device reset register. Patch 2: Update macro's to use common dt indexes from binding

header.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Patch 3: Add reset producer and consumer entries within the device

tree.

Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

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 re-based on mainline U-Boot commit 5d3a21df6694 ("Merge

tag

Quoted 3 lines

'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on
[1]

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

I have rebased this series on u-boot/master.
Can you please pull it and let me know if any issues are there.

It seems that u-boot/master is moved ahead and the commit on which this series was based is reverted "Revert "Merge tag 'dm-pull-20jul20' of

Quoted 8 lines

git://git.denx.de/u-boot-dm""

Quoted 1 line

and will again conflict considering other patch's that are merged in u-

boot/master.

Quoted 2 lines

I can rebase it again, but would like to know what you would prefer me to rebase on u-boot/master or u-boot-riscv/master?

Can you take another look? The DM stuff landed again yesterday.

Yes sure, I will revisit it again.

BR,
Sagar

Quoted 2 lines

Regards,
Simon

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

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

Hi Sagar

Quoted 62 lines

From: Sagar Kadam [mailto:sagar.kadam at sifive.com]
Sent: Tuesday, July 28, 2020 11:19 PM
To: u-boot at lists.denx.de
Cc: Rick Jian-Zhi Chen(???); Paul Walmsley ( Sifive); palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel; bin.meng at windriver.com; jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hello Rick,

Quoted 54 lines

-----Original Message-----
From: Sagar Kadam
Sent: Monday, July 27, 2020 8:56 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hi Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam <[email protected]>
Sent: Friday, July 24, 2020 2:17 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

anup.patel at wdc.com;

Quoted 5 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com;
jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines

seanga2 at gmail.com; Sagar Kadam <[email protected]>
Subject: [PATCH v4 0/5] 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.

Quoted 8 lines

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 re-based on mainline U-Boot commit 5d3a21df6694 ("Merge

tag

Quoted 5 lines

'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on
[1]

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

Quoted 6 lines
Quoted 3 lines

I have rebased this series on u-boot/master.
Can you please pull it and let me know if any issues are there.

It seems that u-boot/master is moved ahead and the commit on which this series was based is reverted "Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm""
and will again conflict considering other patch's that are merged in u-boot/master.
I can rebase it again, but would like to know what you would prefer me to rebase on u-boot/master or u-boot-riscv/master?

Yes, it conflict again.
Applying: configs: reset: fu540: enable dm reset framework for SiFive
error: patch failed: configs/sifive_fu540_defconfig:21
error: configs/sifive_fu540_defconfig: patch does not apply
Patch failed at 0001 configs: reset: fu540: enable dm reset framework for SiFive

You can rebase on u-boot-riscv/master.

Thanks,
Rick

Quoted 50 lines

Thanks & BR,
Sagar

Quoted 38 lines

Thanks & BR,
Sagar

Quoted 35 lines

History:
==========================
V4:
-Rebased the series to u-boot/master.

V3:
-Add reset indexes in separate dt binding header instead of updating the clock dt binding header which is synced from Linux

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

 arch/riscv/dts/fu540-c000-u-boot.dtsi         |  12 +++
 arch/riscv/include/asm/arch-fu540/reset.h     |  13 +++
 configs/sifive_fu540_defconfig                |   2 +
 drivers/clk/sifive/fu540-prci.c               |  90 ++++++++++++++------
 drivers/reset/Kconfig                         |   9 ++
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sifive.c                  | 118 ++++++++++++++++++++++++++
 include/dt-bindings/reset/sifive-fu540-prci.h |  19 +++++
 8 files changed, 239 insertions(+), 25 deletions(-)  create mode
100644 arch/riscv/include/asm/arch-fu540/reset.h
 create mode 100644 drivers/reset/reset-sifive.c  create mode 100644

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

Quoted 2 lines
Quoted 2 lines

--
2.7.4

CONFIDENTIALITY NOTICE:

This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation.

Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved.

#13 lore raw

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

Hi Rick,

Quoted 110 lines

-----Original Message-----
From: Rick Chen <[email protected]>
Sent: Wednesday, July 29, 2020 7:26 AM
To: Sagar Kadam <[email protected]>
Cc: U-Boot Mailing List <[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; Jagan Teki <[email protected]>; Simon Glass <[email protected]>; Trevor Woerner <[email protected]>; patrick at blueri.se; mbrugger at suse.com; Eugeniy Paltsev <[email protected]>; weijie.gao at mediatek.com; nsaenzjulienne at suse.de; festevam at gmail.com; Sean Anderson <[email protected]>; rick <[email protected]>; Alan Kao <[email protected]>
Subject: Re: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

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

Hi Sagar

Quoted 9 lines

From: Sagar Kadam [mailto:sagar.kadam at sifive.com]
Sent: Tuesday, July 28, 2020 11:19 PM
To: u-boot at lists.denx.de
Cc: Rick Jian-Zhi Chen(???); Paul Walmsley ( Sifive);
palmer at dabbelt.com; anup.patel at wdc.com; atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel; bin.meng at windriver.com; jagan at amarulasolutions.com; sjg at chromium.org; twoerner at gmail.com; patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines

seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hello Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam
Sent: Monday, July 27, 2020 8:56 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

anup.patel at wdc.com;

Quoted 3 lines
Quoted 3 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; jagan at amarulasolutions.com; sjg at chromium.org;

twoerner at gmail.com;

Quoted 2 lines
Quoted 2 lines

patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines
Quoted 11 lines

seanga2 at gmail.com
Subject: RE: [PATCH v4 0/5] add DM based reset driver for SiFive SoC's

Hi Rick,

Quoted 6 lines

-----Original Message-----
From: Sagar Kadam <[email protected]>
Sent: Friday, July 24, 2020 2:17 PM
To: u-boot at lists.denx.de
Cc: rick at andestech.com; Paul Walmsley ( Sifive) <[email protected]>; palmer at dabbelt.com;

Quoted 4 lines
Quoted 4 lines

anup.patel at wdc.com;

Quoted 3 lines

atish.patra at wdc.com; lukma at denx.de; Pragnesh Patel <[email protected]>; bin.meng at windriver.com; jagan at amarulasolutions.com; sjg at chromium.org;

twoerner at gmail.com;

Quoted 15 lines
Quoted 15 lines
Quoted 3 lines

patrick at blueri.se; mbrugger at suse.com; Eugeniy.Paltsev at synopsys.com; weijie.gao at mediatek.com; nsaenzjulienne at suse.de;

festevam at gmail.com;

Quoted 11 lines

seanga2 at gmail.com; Sagar Kadam <[email protected]>
Subject: [PATCH v4 0/5] 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.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Patch 1: Add necessary dt indexes for device reset register. Patch 2: Update macro's to use common dt indexes from binding

header.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Patch 3: Add reset producer and consumer entries within the device

tree.

Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

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 re-based on mainline U-Boot commit 5d3a21df6694 ("Merge

tag

Quoted 3 lines

'dm-pull-20jul20' of git://git.denx.de/u-boot-dm") and depends on
[1]

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=190862

I have rebased this series on u-boot/master.
Can you please pull it and let me know if any issues are there.

It seems that u-boot/master is moved ahead and the commit on which this

series was based is reverted "Revert "Merge tag 'dm-pull-20jul20' of
git://git.denx.de/u-boot-dm""

Quoted 1 line

and will again conflict considering other patch's that are merged in u-

boot/master.

Quoted 1 line

I can rebase it again, but would like to know what you would prefer me to

rebase on u-boot/master or u-boot-riscv/master?

Quoted 8 lines

Yes, it conflict again.
Applying: configs: reset: fu540: enable dm reset framework for SiFive
error: patch failed: configs/sifive_fu540_defconfig:21
error: configs/sifive_fu540_defconfig: patch does not apply Patch failed at 0001 configs: reset: fu540: enable dm reset framework for SiFive

You can rebase on u-boot-riscv/master.

Thanks for confirmation. I will rebase on u-boot-riscv/master.

BR,
Sagar

Quoted 60 lines

Thanks,
Rick

Quoted 29 lines

Thanks & BR,
Sagar

Quoted 25 lines

Thanks & BR,
Sagar

Quoted 22 lines

History:
==========================
V4:
-Rebased the series to u-boot/master.

V3:
-Add reset indexes in separate dt binding header instead of updating the clock dt binding header which is synced from Linux

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

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
 arch/riscv/dts/fu540-c000-u-boot.dtsi         |  12 +++
 arch/riscv/include/asm/arch-fu540/reset.h     |  13 +++
 configs/sifive_fu540_defconfig                |   2 +
 drivers/clk/sifive/fu540-prci.c               |  90 ++++++++++++++------
 drivers/reset/Kconfig                         |   9 ++
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sifive.c                  | 118

++++++++++++++++++++++++++

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
 include/dt-bindings/reset/sifive-fu540-prci.h |  19 +++++
 8 files changed, 239 insertions(+), 25 deletions(-)  create mode
100644 arch/riscv/include/asm/arch-fu540/reset.h
 create mode 100644 drivers/reset/reset-sifive.c  create mode

100644 include/dt-bindings/reset/sifive-fu540-prci.h

Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

--
2.7.4

CONFIDENTIALITY NOTICE:

This e-mail (and its attachments) may contain confidential and legally

privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e- mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation.

Quoted 2 lines

Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved.