From: Kwanghoon Son <[email protected]>
This patchset adds initial support for reset driver.
Register information is from vendor kernel [1].
I sent an e-mail to get permission the original author,
but there was no answer. So I upload patch since it has GPL license.
This patch also can be tested with watchdog simply with
```
watchdog0: watchdog@ffefc30000 {
compatible = "snps,dw-wdt";
reg = <0xff 0xefc30000 0x0 0x1000>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&osc>;
resets = <&rst TH1520_RESET_WDT0>;
status = "okay";
};
```
[1] https://github.com/revyos/thead-kernel.git
Changelog:
rfc:
https://lore.kernel.org/linux-riscv/[email protected]/
- dt_binding_check
- enable reset controller default
Kwanghoon Son (3):
dt-bindings: reset: Document th1520 reset control
reset: Add th1520 reset driver support
riscv: dts: Add th1520 reset device tree
.../bindings/reset/thead,th1520-reset.yaml | 47 ++++++++
arch/riscv/boot/dts/thead/th1520.dtsi | 8 ++
drivers/reset/Kconfig | 10 ++
drivers/reset/Makefile | 1 +
drivers/reset/reset-th1520.c | 109 ++++++++++++++++++
include/dt-bindings/reset/th1520-reset.h | 9 ++
6 files changed, 184 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/thead,th1520-reset.yaml
create mode 100644 drivers/reset/reset-th1520.c
create mode 100644 include/dt-bindings/reset/th1520-reset.h
--
2.34.1
From: Kwanghoon Son <[email protected]>
Add reset device tree for th1520 SoC
Signed-off-by: Kwanghoon Son <[email protected]>
---
arch/riscv/boot/dts/thead/th1520.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
index ce708183b6f6..7e592449b5e4 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -5,6 +5,7 @@
*/
#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/reset/th1520-reset.h>
/ {
compatible = "thead,th1520";
@@ -418,5 +419,12 @@ portf: gpio-controller@0 {
interrupts = <55 IRQ_TYPE_LEVEL_HIGH>;
};
};
+
+ rst: reset-controller@ffef014000 {
+ compatible = "thead,th1520-reset", "syscon";
+ reg = <0xff 0xef014000 0x0 0x1000>;
+ #reset-cells = <1>;
+ status = "okay";
+ };
};
};
--
2.34.1
> From: Kwanghoon Son <[email protected]>
>
Oops, my mail config has from option.
Sorry, I will fix in next version after get feedback.
Kwang.