2019-07-24 00:36:35

by Luis de Oliveira

[permalink] [raw]
Subject: [RESEND V2 0/2] 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 (1):
reset: Add DesignWare IP support to simple reset

Luis Oliveira (1):
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

--
2.7.4


2019-07-24 00:37:36

by Luis de Oliveira

[permalink] [raw]
Subject: [RESEND V2 2/2] reset: Add DesignWare IP support to simple reset

From: Gustavo Pimentel <[email protected]>

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

Signed-off-by: Gustavo Pimentel <[email protected]>
Signed-off-by: Luis Oliveira <[email protected]>
---
Changelog
-no changes

drivers/reset/Kconfig | 2 +-
drivers/reset/reset-simple.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index 2c8c23d..2ee69f2 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -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,
diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c
index 77fbba3..79e73be 100644
--- a/drivers/reset/reset-simple.c
+++ b/drivers/reset/reset-simple.c
@@ -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 */ },
};

--
2.7.4

2019-07-24 02:22:39

by Luis de Oliveira

[permalink] [raw]
Subject: [RESEND V2 1/2] dt-bindings: Document the DesignWare IP reset bindings

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

Signed-off-by: Gustavo Pimentel <[email protected]>
Signed-off-by: Luis Oliveira <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
Changelog
-no changes

.../devicetree/bindings/reset/snps,dw-reset.txt | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/snps,dw-reset.txt

diff --git a/Documentation/devicetree/bindings/reset/snps,dw-reset.txt b/Documentation/devicetree/bindings/reset/snps,dw-reset.txt
new file mode 100644
index 0000000..f94f911
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/snps,dw-reset.txt
@@ -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_1: reset-controller@0000 {
+ compatible = "snps,dw-high-reset";
+ reg = <0x0000 0x4>;
+ #reset-cells = <1>;
+ };
+
+ dw_rst_2: reset-controller@1000 {i
+ compatible = "snps,dw-low-reset";
+ reg = <0x1000 0x8>;
+ #reset-cells = <1>;
+ };
--
2.7.4

2019-08-06 13:34:23

by Philipp Zabel

[permalink] [raw]
Subject: Re: [RESEND V2 1/2] dt-bindings: Document the DesignWare IP reset bindings

Hi Luis,

On Tue, 2019-07-23 at 17:17 +0200, Luis Oliveira wrote:
> This adds documentation of device tree bindings for the
> DesignWare IP reset controller.
>
> Signed-off-by: Gustavo Pimentel <[email protected]>
> Signed-off-by: Luis Oliveira <[email protected]>
> Reviewed-by: Rob Herring <[email protected]>

Thank you, both applied to reset/next.

regards
Philipp