Skip to contentSkip to conversation

Add DesignWare IP support to simple reset

PATCH New Gustavo Pimentel 1 participant 3 messages May 13, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add DesignWare IP support to simple reset

This patch series adds a reset-simple compatible string for DesignWare IPs allowing active high and low resets inputs.

Also adds the corresponding documentation.

Gustavo Pimentel (2):
reset: Add DesignWare IP support to simple reset
dt-bindings: Document the DesignWare IP reset bindings

 .../devicetree/bindings/reset/snps,dw-reset.txt    | 30 ++++++++++++++++++++++
 drivers/reset/Kconfig                              |  2 +-
 drivers/reset/reset-simple.c                       |  3 +++
 3 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/reset/snps,dw-reset.txt
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 reset: Add DesignWare IP support to simple reset

The reset-simple driver can be now used on DesignWare IPs by default by selecting the following compatible strings:
- snps,dw-high-reset for active high resets inputs
- snps,dw-low-reset for active low resets inputs

---
 drivers/reset/Kconfig        | 2 +-
 drivers/reset/reset-simple.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/reset/Kconfig +1 -1
index 2c8c23d..2ee69f2 100644
@@ -117,7 +117,7 @@ config RESET_QCOM_PDC
 
 config RESET_SIMPLE
 	bool "Simple Reset Controller Driver" if COMPILE_TEST
-	default ARCH_STM32 || ARCH_STRATIX10 || ARCH_SUNXI || ARCH_ZX || ARCH_ASPEED
+	default ARCH_STM32 || ARCH_STRATIX10 || ARCH_SUNXI || ARCH_ZX || ARCH_ASPEED || ARC
 	help
 	  This enables a simple reset controller driver for reset lines that
 	  that can be asserted and deasserted by toggling bits in a contiguous,
drivers/reset/reset-simple.c +3 -0
index 77fbba3..79e73be 100644
@@ -129,6 +129,9 @@ static const struct of_device_id reset_simple_dt_ids[] = {
 		.data = &reset_simple_active_low },
 	{ .compatible = "aspeed,ast2400-lpc-reset" },
 	{ .compatible = "aspeed,ast2500-lpc-reset" },
+	{ .compatible = "snps,dw-high-reset" },
+	{ .compatible = "snps,dw-low-reset",
+		.data = &reset_simple_active_low },
 	{ /* sentinel */ },
 };
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 dt-bindings: Document the DesignWare IP reset bindings

In reply to Gustavo Pimentel

This adds documentation of device tree bindings for the DesignWare IP reset controller.

---
 .../devicetree/bindings/reset/snps,dw-reset.txt    | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/snps,dw-reset.txt
Documentation/devicetree/bindings/reset/snps,dw-reset.txt new file +30 -0
new file mode 100644
index 0000000..5316212
@@ -0,0 +1,30 @@
+Synopsys DesignWare Reset controller
+=======================================
+
+Please also refer to reset.txt in this directory for common reset
+controller binding usage.
+
+Required properties:
+
+- compatible: should be one of the following.
+	"snps,dw-high-reset" - for active high configuration
+	"snps,dw-low-reset" - for active low configuration
+
+- reg: physical base address of the controller and length of memory mapped
+	region.
+
+- #reset-cells: must be 1.
+
+example:
+
+	dw_rst: reset-controller@0000 {
+		compatible = "dw,dw-high-reset";
+		reg = <0x0000 0x4>;
+		#reset-cells = <1>;
+	};
+
+	dw_rst: reset-controller@1000 {
+		compatible = "dw,dw-low-reset";
+		reg = <0x1000 0x4>;
+		#reset-cells = <1>;
+	};
Signature · 1 line
2.7.4