mbox series

[RFC,0/3] Introduce reset driver for T-HEAD th1520 SoC

Message ID 20230904042559.2322997-1-k.son@samsung.com (mailing list archive)
Headers show
Series Introduce reset driver for T-HEAD th1520 SoC | expand

Message

Kwanghoon Son Sept. 4, 2023, 4:25 a.m. UTC
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 = "disabled";
		};
```

[1] https://github.com/revyos/thead-kernel.git

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    |  39 +++++++
 .../dts/thead/th1520-lichee-module-4a.dtsi    |   4 +
 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 ++
 7 files changed, 180 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

Comments

Philipp Zabel Sept. 6, 2023, 6:26 a.m. UTC | #1
Hi,

On Mo, 2023-09-04 at 04:25 +0000, Kwanghoon Son wrote:
> This patchset adds initial support for reset driver.

what is meant by "initial support"? Are there just more resets than the
two watchdog resets, or is there other functionality that might require
describing in the device tree? Is the dt-binding document complete?
Is this the only reset controller on TH1520? In the thead-kernel.git it
looks like there are at least two different ones.

regards
Philipp
Kwanghoon Son Sept. 7, 2023, 1:46 a.m. UTC | #2
> what is meant by "initial support"? Are there just more resets than the
> two watchdog resets, or is there other functionality that might require
> describing in the device tree? Is the dt-binding document complete?
> Is this the only reset controller on TH1520? In the thead-kernel.git it
> looks like there are at least two different ones.

True, in vendor kernel has more registers npu, vpsys reset.
But since I can't test other reset so I only added few register (CPU reset)
Also other reset can be added with same driver.

Best regards,
Kwang.

> 
> regards
> Philipp