Add hwspinlock driver for StarFive JHB100 SoC
Subsystems (2)
v2 cover Add hwspinlock driver for StarFive JHB100 SoC
This patch serises are to add hardware spinlock driver for the StarFive JHB100 SoC. The first patch adds documentation for StarFive Hardware Spinlock. The subsequent patch adds hwspinlock driver and support JHB100 SoC.
The StarFive hwspinlock supports 16 channels for using by secur core and AP core to restrict access and protect the memory area.
Changes since v1:
- Simplified the subject.
- Added 'StarFive JHB100' in documentation title.
- Modified the name of example.
- Added the property of 'clocks'.
v1: https://lore.kernel.org/all/[email protected]/
Xingyu Wu (2):
dt-bindings: hwlock: Add StarFive JHB100 HW lock
hwspinlock: Add StarFive hwspinlock device
.../hwlock/starfive,jhb100-hwspinlock.yaml | 43 ++++++ MAINTAINERS | 6 + drivers/hwspinlock/Kconfig | 8 ++ drivers/hwspinlock/Makefile | 1 + drivers/hwspinlock/starfive_hwspinlock.c | 130 ++++++++++++++++++ 5 files changed, 188 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwlock/starfive,jhb100-hwspinlock.yaml create mode 100644 drivers/hwspinlock/starfive_hwspinlock.c
Signature · 1 line
2.34.1
PATCH v2 1/2 dt-bindings: hwlock: Add StarFive JHB100 HW lock
Add the new documentation of hardware spinlock for the StarFive JHB100 SoC.
--- .../hwlock/starfive,jhb100-hwspinlock.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwlock/starfive,jhb100-hwspinlock.yaml
Documentation/devicetree/bindings/hwlock/starfive,jhb100-hwspinlock.yaml new file +43 -0
@@ -0,0 +1,43 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwlock/starfive,jhb100-hwspinlock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 Hardware Spinlock + +maintainers: + - Xingyu Wu <[email protected]> + +properties: + compatible: + const: starfive,jhb100-hwspinlock + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + "#hwlock-cells": + const: 1 + +required: + - compatible + - reg + - resets + - "#hwlock-cells" + +additionalProperties: false + +examples: + - | + hwlock@13012000 { + compatible = "starfive,jhb100-hwspinlock"; + reg = <0x13012000 0x400>; + resets = <&sys0crg 0>; + #hwlock-cells = <1>; + };
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] dt-bindings: hwlock: Add StarFive JHB100 HW lock
pw-bot: not-applicable
PATCH v2 2/2 hwspinlock: Add StarFive hwspinlock device
In reply to Xingyu WuAdd support of hardware spinlock for the StarFive JHB100 SoC. The hwspinlock provides 16 channels for using by secur core and AP core.
--- MAINTAINERS | 6 ++ drivers/hwspinlock/Kconfig | 8 ++ drivers/hwspinlock/Makefile | 1 + drivers/hwspinlock/starfive_hwspinlock.c | 130 +++++++++++++++++++++++ 4 files changed, 145 insertions(+) create mode 100644 drivers/hwspinlock/starfive_hwspinlock.c
MAINTAINERS +6 -0
@@ -25275,6 +25275,12 @@ F: Documentation/devicetree/bindings/power/starfive* F: drivers/pmdomain/starfive/ F: include/dt-bindings/power/starfive,jh7110-pmu.h +STARFIVE JHB100 HARDWARE SPINLOCK DRIVER +M: Xingyu Wu <[email protected]> +S: Supported +F: Documentation/devicetree/bindings/hwlock/starfive,jhb100-hwspinlock.yaml +F: drivers/hwspinlock/starfive_hwspinlock.c + STARFIVE SOC DRIVERS M: Conor Dooley <[email protected]> S: Maintained
drivers/hwspinlock/Kconfig +8 -0
@@ -36,6 +36,14 @@ config HWSPINLOCK_SPRD If unsure, say N. +config HWSPINLOCK_STARFIVE + tristate "StarFive Hardware Spinlock device" + depends on ARCH_STARFIVE || COMPILE_TEST + help + Say y here to support the StarFive Hardware Spinlock device. + + If unsure, say N. + config HWSPINLOCK_STM32 tristate "STM32 Hardware Spinlock device" depends on MACH_STM32MP157 || COMPILE_TEST
drivers/hwspinlock/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_HWSPINLOCK) += hwspinlock_core.o obj-$(CONFIG_HWSPINLOCK_OMAP) += omap_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_QCOM) += qcom_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_SPRD) += sprd_hwspinlock.o +obj-$(CONFIG_HWSPINLOCK_STARFIVE) += starfive_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_STM32) += stm32_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_SUN6I) += sun6i_hwspinlock.o obj-$(CONFIG_HSEM_U8500) += u8500_hsem.o
drivers/hwspinlock/starfive_hwspinlock.c new file +130 -0
130 lines not on this page · raw message
Signature · 1 line
2.34.1