* [PATCH v2 0/3] Add support for hwspinlock on A64 SoC
@ 2020-02-11 12:26 Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 1/3] hwspinlock: sunxi: Implement support for Allwinner's " Nikolay Borisov
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Nikolay Borisov @ 2020-02-11 12:26 UTC (permalink / raw)
To: mripard, bjorn.andersson
Cc: Nikolay Borisov, devicetree, wens, robh+dt, linux-arm-kernel
Here's v2 of hwspinlock support in A64 SoC. Main changes:
* Rewrote dt bindings in yaml
* Re-arranged hwspinlock node in dts to follow ascending address order
* Sorted includes alphabetically
* Minor style changes
* Use GENMASK/FIELD_GET to query number of locks from mmio register
* Separate hwspinlock_device from sun50i_hwspinlock. This enables to utilize
devm_add_action_or_reset, which results in cleaner error handling in the probe
function.
* Switched to device managed resources where applicable.
This was tested on a pine64 board. I loadeded/unloaded the driver checking the
state of clock/reset/sysstatus registers as well as trying lock/unlock operations
(using the devmem busybox utility).
Nikolay Borisov (3):
hwspinlock: sunxi: Implement support for Allwinner's A64 SoC
arm64: dts: allwinner: a64: Add hwspinlock node
dt-bindings: hwlock: Document A64 hwspinlock bindings
.../allwinner,sun50i-a64-hwspinlock.yaml | 47 +++++
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 +
drivers/hwspinlock/Kconfig | 9 +
drivers/hwspinlock/Makefile | 1 +
drivers/hwspinlock/sun50i_hwspinlock.c | 163 ++++++++++++++++++
5 files changed, 229 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
create mode 100644 drivers/hwspinlock/sun50i_hwspinlock.c
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/3] hwspinlock: sunxi: Implement support for Allwinner's A64 SoC
2020-02-11 12:26 [PATCH v2 0/3] Add support for hwspinlock on A64 SoC Nikolay Borisov
@ 2020-02-11 12:26 ` Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 2/3] arm64: dts: allwinner: a64: Add hwspinlock node Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings Nikolay Borisov
2 siblings, 0 replies; 8+ messages in thread
From: Nikolay Borisov @ 2020-02-11 12:26 UTC (permalink / raw)
To: mripard, bjorn.andersson
Cc: Nikolay Borisov, devicetree, wens, robh+dt, linux-arm-kernel
Based on the datasheet this implements support for the hwspinlock IP
block.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
drivers/hwspinlock/Kconfig | 9 ++
drivers/hwspinlock/Makefile | 1 +
drivers/hwspinlock/sun50i_hwspinlock.c | 163 +++++++++++++++++++++++++
3 files changed, 173 insertions(+)
create mode 100644 drivers/hwspinlock/sun50i_hwspinlock.c
diff --git a/drivers/hwspinlock/Kconfig b/drivers/hwspinlock/Kconfig
index 37740e992cfa..aff39bad3e90 100644
--- a/drivers/hwspinlock/Kconfig
+++ b/drivers/hwspinlock/Kconfig
@@ -68,3 +68,12 @@ config HSEM_U8500
SoC.
If unsure, say N.
+
+config HWSPINLOCK_SUN50I
+ tristate "Allwinner Hardware Spinlock device"
+ depends on ARCH_SUNXI
+ depends on HWSPINLOCK
+ help
+ Say y here to support the SUNXI Hardware Spinlock device.
+
+ If unsure, say N.
diff --git a/drivers/hwspinlock/Makefile b/drivers/hwspinlock/Makefile
index ed053e3f02be..ebabe5c7b7ef 100644
--- a/drivers/hwspinlock/Makefile
+++ b/drivers/hwspinlock/Makefile
@@ -8,5 +8,6 @@ obj-$(CONFIG_HWSPINLOCK_OMAP) += omap_hwspinlock.o
obj-$(CONFIG_HWSPINLOCK_QCOM) += qcom_hwspinlock.o
obj-$(CONFIG_HWSPINLOCK_SIRF) += sirf_hwspinlock.o
obj-$(CONFIG_HWSPINLOCK_SPRD) += sprd_hwspinlock.o
+obj-$(CONFIG_HWSPINLOCK_SUN50I) += sun50i_hwspinlock.o
obj-$(CONFIG_HWSPINLOCK_STM32) += stm32_hwspinlock.o
obj-$(CONFIG_HSEM_U8500) += u8500_hsem.o
diff --git a/drivers/hwspinlock/sun50i_hwspinlock.c b/drivers/hwspinlock/sun50i_hwspinlock.c
new file mode 100644
index 000000000000..2b54c0a0148d
--- /dev/null
+++ b/drivers/hwspinlock/sun50i_hwspinlock.c
@@ -0,0 +1,163 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Author: Nikolay Borisov <nborisov@suse.com> */
+
+#include <linux/bitfield.h>
+#include <linux/bits.h>
+#include <linux/clk.h>
+#include <linux/hwspinlock.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/reset.h>
+
+#include "hwspinlock_internal.h"
+
+/* Bits containing number of locks in SPINLOCK_SYSSTATUS_REG */
+#define SPINLOCK_LOCKS_NUM GENMASK(29, 28)
+
+/* Spinlock register offsets */
+#define SPINLOCK_ID(X) (0x100 + 0x4 * X)
+
+/* Possible values of SPINLOCK_LOCK_REG */
+#define SPINLOCK_NOTTAKEN (0) /* free */
+#define SPINLOCK_TAKEN (1) /* locked */
+
+struct sun50i_hwspinlock {
+ struct clk *clk;
+ struct reset_control *reset;
+ struct hwspinlock_device *bank;
+};
+
+static int sun50i_hwspinlock_trylock(struct hwspinlock *lock)
+{
+ void __iomem *lock_addr = lock->priv;
+
+ /* attempt to acquire the lock by reading its value */
+ return readl(lock_addr) == SPINLOCK_NOTTAKEN;
+}
+
+static void sun50i_hwspinlock_unlock(struct hwspinlock *lock)
+{
+ void __iomem *lock_addr = lock->priv;
+
+ /* release the lock by writing 0 to it */
+ writel(SPINLOCK_NOTTAKEN, lock_addr);
+}
+
+static const struct hwspinlock_ops sun50i_hwspinlock_ops = {
+ .trylock = sun50i_hwspinlock_trylock,
+ .unlock = sun50i_hwspinlock_unlock,
+};
+
+static int sun50i_get_num_locks(void __iomem *io_base)
+{
+ u32 i = readl(io_base);
+ i = FIELD_GET(SPINLOCK_LOCKS_NUM, i);
+
+ switch (i) {
+ case 0x1: return 32;
+ case 0x2: return 64;
+ case 0x3: return 128;
+ case 0x4: return 256;
+ }
+
+ return 0;
+}
+
+static int sun50i_hwspinlock_probe(struct platform_device *pdev)
+{
+ struct sun50i_hwspinlock *hw;
+ void __iomem *io_base;
+ struct clk *clk;
+ struct reset_control *reset;
+ int i, ret, num_locks;
+
+ io_base = devm_platform_ioremap_resource(&pdev->dev, 0);
+ if (IS_ERR(io_base))
+ return PTR_ERR(io_base);
+
+ hw = devm_kzalloc(&pdev->dev, sizeof(*hw), GFP_KERNEL);
+ if (!hw)
+ return -ENOMEM;
+
+ hw->clk = devm_clk_get(&pdev->dev, NULL);
+ if (IS_ERR(hw->clk))
+ return PTR_ERR(hw->clk);
+
+ ret = clk_prepare_enable(hw->clk);
+ if (ret) {
+ dev_err(&pdev->dev, "Cannot enable clock\n");
+ return ret;
+ }
+
+ /* Disable soft reset */
+ hw->reset= devm_reset_control_get_exclusive(&pdev->dev, NULL);
+ if (IS_ERR(hw->reset)) {
+ clk_disable_unprepare(hw->clk);
+ return PTR_ERR(hw->reset);
+ }
+ reset_control_deassert(hw->reset);
+
+ ret = devm_add_action_or_reset(&pdev->dev, sun50i_hwpinlock_disable,
+ hw);
+ if (ret) {
+ dev_err(&pdev->dev, "Failed to add hwspinlock disable action\n");
+ return ret;
+ }
+
+ num_locks = sun50i_get_num_locks(io_base);
+ if (!num_locks) {
+ dev_err(&pdev->dev, "Unrecognised sun50i hwspinlock device\n");
+ ret = -EINVAL;
+ goto out_reset;
+ }
+
+ hw->bank = devm_kzalloc(&pdev->dev,
+ struct_size(hw->bank, lock, num_locks),
+ GFP_KERNEL);
+ if (!hw) {
+ ret = -ENOMEM;
+ goto out_reset;
+ }
+
+ for (i = 0; i < num_locks; i++)
+ hw->bank.lock[i].priv = io_base + SPINLOCK_ID(i);
+
+ platform_set_drvdata(pdev, hw);
+
+ return devm_hwspin_lock_register(&pdev->dev, &hw->bank,
+ &sun50i_hwspinlock_ops, 0, num_locks);
+}
+
+static int sun50i_hwspinlock_disable(struct platform_device *pdev)
+{
+ struct sun50i_hwspinlock *hw = platform_get_drvdata(pdev);
+ int ret;
+
+ reset_control_assert(hw->reset);
+ clk_disable_unprepare(hw->clk);
+
+ return 0;
+}
+
+static const struct of_device_id sun50i_hwpinlock_ids[] = {
+ { .compatible = "allwinner,sun50i-a64-hwspinlock", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, sun50i_hwpinlock_ids);
+
+static struct platform_driver sun50i_hwspinlock_driver = {
+ .probe = sun50i_hwspinlock_probe,
+ .driver = {
+ .name = "sun50i_hwspinlock",
+ .of_match_table = sun50i_hwpinlock_ids,
+ },
+};
+
+module_platform_driver(sun50i_hwspinlock_driver);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("Hardware spinlock driver for sun50i SoCs");
+MODULE_AUTHOR("Nikolay Borisov <nborisov@suse.com>");
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] arm64: dts: allwinner: a64: Add hwspinlock node
2020-02-11 12:26 [PATCH v2 0/3] Add support for hwspinlock on A64 SoC Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 1/3] hwspinlock: sunxi: Implement support for Allwinner's " Nikolay Borisov
@ 2020-02-11 12:26 ` Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings Nikolay Borisov
2 siblings, 0 replies; 8+ messages in thread
From: Nikolay Borisov @ 2020-02-11 12:26 UTC (permalink / raw)
To: mripard, bjorn.andersson
Cc: Nikolay Borisov, devicetree, wens, robh+dt, linux-arm-kernel
Add a node describing the hwspinlock on A64.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 27e48234f1c2..834f2f7f60bc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -496,6 +496,15 @@
resets = <&ccu RST_BUS_CE>;
};
+ hwspinlock: spinlock@1c18000 {
+ compatible = "allwinner,sun50i-a64-hwspinlock";
+ reg = <0x01c18000 0x1000>;
+ clocks = <&ccu CLK_BUS_SPINLOCK>;
+ resets = <&ccu RST_BUS_SPINLOCK>;
+ #hwlock-cells = <1>;
+ status = "ok";
+ };
+
usb_otg: usb@1c19000 {
compatible = "allwinner,sun8i-a33-musb";
reg = <0x01c19000 0x0400>;
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings
2020-02-11 12:26 [PATCH v2 0/3] Add support for hwspinlock on A64 SoC Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 1/3] hwspinlock: sunxi: Implement support for Allwinner's " Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 2/3] arm64: dts: allwinner: a64: Add hwspinlock node Nikolay Borisov
@ 2020-02-11 12:26 ` Nikolay Borisov
2020-02-12 2:00 ` Rob Herring
2020-02-12 11:54 ` [PATCH v3] " Nikolay Borisov
2 siblings, 2 replies; 8+ messages in thread
From: Nikolay Borisov @ 2020-02-11 12:26 UTC (permalink / raw)
To: mripard, bjorn.andersson
Cc: Nikolay Borisov, devicetree, wens, robh+dt, linux-arm-kernel
Add binding for the hwspinlock found on Allwinner A64 SoC.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
.../allwinner,sun50i-a64-hwspinlock.yaml | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
new file mode 100644
index 000000000000..46bfff2541d6
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwlock/allwinner,sun50i-a64-hwspinlock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A64 SoC Hardware Spinlock bindings
+
+maintainers:
+ - Nikolay Borisov <nborisov@suse.com>
+
+properties:
+ "#hwlock-cells":
+ const: 1
+
+ compatible:
+ const: allwinner,sun50i-a64-hwspinlock
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+required:
+ - "#hwlock-cells"
+ - compatible
+ - reg
+ - clocks
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ hwspinlock@1c18000 {
+ compatible = "allwinner,sun50i-a64-hwspinlock";
+ #hwlock-cells = <1>;
+ reg = <0x01c18000 0x1000>;
+ clocks = <&ccu CLK_BUS_SPINLOCK>;
+ resets = <&ccu RST_BUS_SPINLOCK>;
+ };
+
+...
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings
2020-02-11 12:26 ` [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings Nikolay Borisov
@ 2020-02-12 2:00 ` Rob Herring
2020-02-12 10:45 ` Nikolay Borisov
2020-02-12 11:54 ` [PATCH v3] " Nikolay Borisov
1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring @ 2020-02-12 2:00 UTC (permalink / raw)
To: Nikolay Borisov
Cc: devicetree, Nikolay Borisov, mripard, bjorn.andersson, wens,
robh+dt, linux-arm-kernel
On Tue, 11 Feb 2020 14:26:24 +0200, Nikolay Borisov wrote:
> Add binding for the hwspinlock found on Allwinner A64 SoC.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
> .../allwinner,sun50i-a64-hwspinlock.yaml | 47 +++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
Error: Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dts:21.28-29 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dt.yaml] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1236266
Please check and re-submit.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings
2020-02-12 2:00 ` Rob Herring
@ 2020-02-12 10:45 ` Nikolay Borisov
0 siblings, 0 replies; 8+ messages in thread
From: Nikolay Borisov @ 2020-02-12 10:45 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, mripard, bjorn.andersson, wens, robh+dt, linux-arm-kernel
On 12.02.20 г. 4:00 ч., Rob Herring wrote:
> On Tue, 11 Feb 2020 14:26:24 +0200, Nikolay Borisov wrote:
>> Add binding for the hwspinlock found on Allwinner A64 SoC.
>>
>> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
>> ---
>> .../allwinner,sun50i-a64-hwspinlock.yaml | 47 +++++++++++++++++++
>> 1 file changed, 47 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
>>
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
> Error: Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dts:21.28-29 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:300: recipe for target 'Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dt.yaml' failed
> make[1]: *** [Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dt.yaml] Error 1
> Makefile:1263: recipe for target 'dt_binding_check' failed
> make: *** [dt_binding_check] Error 2
>
> See https://patchwork.ozlabs.org/patch/1236266
> Please check and re-submit.
>
I'm not able to build this schema at all:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- allmodconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
This results in a allwinner,sun50i-a64-hwspinlock.example.dts
file and:
make[1]: *** No rule to make target 'Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.example.dt.yaml', needed by '__build'. Stop.
Makefile:1263: recipe for target 'dt_binding_check' failed
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3] dt-bindings: hwlock: Document A64 hwspinlock bindings
2020-02-11 12:26 ` [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings Nikolay Borisov
2020-02-12 2:00 ` Rob Herring
@ 2020-02-12 11:54 ` Nikolay Borisov
2020-02-18 23:05 ` Rob Herring
1 sibling, 1 reply; 8+ messages in thread
From: Nikolay Borisov @ 2020-02-12 11:54 UTC (permalink / raw)
To: mripard, bjorn.andersson
Cc: Nikolay Borisov, devicetree, wens, robh+dt, linux-arm-kernel
Add binding for the hwspinlock found on Allwinner A64 SoC.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
V3: Added #include directive. This makes the patch pass schema validation.
.../allwinner,sun50i-a64-hwspinlock.yaml | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
diff --git a/Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
new file mode 100644
index 000000000000..54270c8bb351
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwlock/allwinner,sun50i-a64-hwspinlock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A64 SoC Hardware Spinlock bindings
+
+maintainers:
+ - Nikolay Borisov <nborisov@suse.com>
+
+properties:
+ "#hwlock-cells":
+ const: 1
+
+ compatible:
+ const: allwinner,sun50i-a64-hwspinlock
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+required:
+ - "#hwlock-cells"
+ - compatible
+ - reg
+ - clocks
+ - resets
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/sun50i-a64-ccu.h>
+ #include <dt-bindings/reset/sun50i-a64-ccu.h>
+ hwspinlock@1c18000 {
+ compatible = "allwinner,sun50i-a64-hwspinlock";
+ #hwlock-cells = <1>;
+ reg = <0x01c18000 0x1000>;
+ clocks = <&ccu CLK_BUS_SPINLOCK>;
+ resets = <&ccu RST_BUS_SPINLOCK>;
+ };
+
+...
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3] dt-bindings: hwlock: Document A64 hwspinlock bindings
2020-02-12 11:54 ` [PATCH v3] " Nikolay Borisov
@ 2020-02-18 23:05 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2020-02-18 23:05 UTC (permalink / raw)
To: Nikolay Borisov
Cc: devicetree, Nikolay Borisov, mripard, bjorn.andersson, wens,
robh+dt, linux-arm-kernel
On Wed, 12 Feb 2020 13:54:19 +0200, Nikolay Borisov wrote:
> Add binding for the hwspinlock found on Allwinner A64 SoC.
>
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>
> V3: Added #include directive. This makes the patch pass schema validation.
>
> .../allwinner,sun50i-a64-hwspinlock.yaml | 49 +++++++++++++++++++
> 1 file changed, 49 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/hwlock/allwinner,sun50i-a64-hwspinlock.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-02-18 23:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 12:26 [PATCH v2 0/3] Add support for hwspinlock on A64 SoC Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 1/3] hwspinlock: sunxi: Implement support for Allwinner's " Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 2/3] arm64: dts: allwinner: a64: Add hwspinlock node Nikolay Borisov
2020-02-11 12:26 ` [PATCH v2 3/3] dt-bindings: hwlock: Document A64 hwspinlock bindings Nikolay Borisov
2020-02-12 2:00 ` Rob Herring
2020-02-12 10:45 ` Nikolay Borisov
2020-02-12 11:54 ` [PATCH v3] " Nikolay Borisov
2020-02-18 23:05 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).