[PATCH v3 0/2] reset: canaan: add Kendryte K230 reset support

Junhui Liu posted 2 patches 7 months, 1 week ago
There is a newer version of this series
.../devicetree/bindings/reset/canaan,k230-rst.yaml |  39 +++
drivers/reset/Kconfig                              |   9 +
drivers/reset/Makefile                             |   1 +
drivers/reset/reset-k230.c                         | 371 +++++++++++++++++++++
include/dt-bindings/reset/canaan,k230-rst.h        |  90 +++++
5 files changed, 510 insertions(+)
[PATCH v3 0/2] reset: canaan: add Kendryte K230 reset support
Posted by Junhui Liu 7 months, 1 week ago
This patch series add reset controller support for the Canaan Kendryte
K230 SoC.

Tested on CanMV-K230-V1.1 board. Some of the HW_DONE and SW_DONE reset
type was tested by reseting the submodule and checking the reset
register value[1]. The CPU reset type was tested by a temporary rproc
driver[2][3].

link: https://gist.github.com/pigmoral/cc45de673775575750ac7fe49d4456a2 [1]
link: https://github.com/pigmoral/linux/tree/k230/rproc-cpu0 [2]
link: https://github.com/pigmoral/linux/tree/k230/rproc-cpu1 [3]

---
Changes in v3:
- Update copyright/license in driver and bindings headers
- Rename HS/LS to HISYS/LOSYS in DT bindings
- Add reset-timing notes at the top of reset-k230.c
- Replace long udelay(200) to fsleep(200) for HW_DONE paths
- Remove rstc->dev, store device in rstc->rcdev.dev
- Link to v2: https://lore.kernel.org/r/20250420-k230-reset-v2-0-f1b4a016e438@pigmoral.tech

Changes in v2:
- Turn to_k230_rst from macro to inline function
- Use guard to replace spin_lock_irqsave and spin_unlock_irqrestore
- Remove assert and deassert operations for self-clearing reset types,
  only reserve the reset operation
- Add delay to accommodate the reset time
- Remove blank line inside read-modify-write operations
- Remove redundant default case in enum switch
- Update copyright dates and my email address
- Link to v1: https://lore.kernel.org/r/20240924-k230-reset-v1-0-d0cdc11989eb@outlook.com

---
Junhui Liu (2):
      dt-bindings: reset: add support for canaan,k230-rst
      reset: canaan: add reset driver for Kendryte K230

 .../devicetree/bindings/reset/canaan,k230-rst.yaml |  39 +++
 drivers/reset/Kconfig                              |   9 +
 drivers/reset/Makefile                             |   1 +
 drivers/reset/reset-k230.c                         | 371 +++++++++++++++++++++
 include/dt-bindings/reset/canaan,k230-rst.h        |  90 +++++
 5 files changed, 510 insertions(+)
---
base-commit: 0d8d44db295ccad20052d6301ef49ff01fb8ae2d
change-id: 20250404-k230-reset-32987c6f0ed5

Best regards,
-- 
Junhui Liu <junhui.liu@pigmoral.tech>
Re: [PATCH v3 0/2] reset: canaan: add Kendryte K230 reset support
Posted by Junhui Liu 7 months ago
Hi Philipp,

On 07/05/2025 21:25, Junhui Liu wrote:
> This patch series add reset controller support for the Canaan Kendryte
> K230 SoC.
> 
> Tested on CanMV-K230-V1.1 board. Some of the HW_DONE and SW_DONE reset
> type was tested by reseting the submodule and checking the reset
> register value[1]. The CPU reset type was tested by a temporary rproc
> driver[2][3].
> 
> link: https://gist.github.com/pigmoral/cc45de673775575750ac7fe49d4456a2 [1]
> link: https://github.com/pigmoral/linux/tree/k230/rproc-cpu0 [2]
> link: https://github.com/pigmoral/linux/tree/k230/rproc-cpu1 [3]
> 
> ---
> Changes in v3:
> - Update copyright/license in driver and bindings headers
> - Rename HS/LS to HISYS/LOSYS in DT bindings
> - Add reset-timing notes at the top of reset-k230.c
> - Replace long udelay(200) to fsleep(200) for HW_DONE paths
> - Remove rstc->dev, store device in rstc->rcdev.dev
> - Link to v2: https://lore.kernel.org/r/20250420-k230-reset-v2-0-f1b4a016e438@pigmoral.tech
> 
> Changes in v2:
> - Turn to_k230_rst from macro to inline function
> - Use guard to replace spin_lock_irqsave and spin_unlock_irqrestore
> - Remove assert and deassert operations for self-clearing reset types,
>   only reserve the reset operation
> - Add delay to accommodate the reset time
> - Remove blank line inside read-modify-write operations
> - Remove redundant default case in enum switch
> - Update copyright dates and my email address
> - Link to v1: https://lore.kernel.org/r/20240924-k230-reset-v1-0-d0cdc11989eb@outlook.com
> 
> ---
> Junhui Liu (2):
>       dt-bindings: reset: add support for canaan,k230-rst
>       reset: canaan: add reset driver for Kendryte K230
> 
>  .../devicetree/bindings/reset/canaan,k230-rst.yaml |  39 +++
>  drivers/reset/Kconfig                              |   9 +
>  drivers/reset/Makefile                             |   1 +
>  drivers/reset/reset-k230.c                         | 371 +++++++++++++++++++++
>  include/dt-bindings/reset/canaan,k230-rst.h        |  90 +++++
>  5 files changed, 510 insertions(+)
> ---
> base-commit: 0d8d44db295ccad20052d6301ef49ff01fb8ae2d
> change-id: 20250404-k230-reset-32987c6f0ed5
> 
> Best regards,

I think this series is good to go, can you pick it and queue for 6.16?

Thanks!

-- 
Best regards,
Junhui Liu