1# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/hwlock/ti,omap-hwspinlock.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: TI HwSpinlock for OMAP and K3 based SoCs
8
9maintainers:
10  - Suman Anna <s-anna@ti.com>
11
12properties:
13  compatible:
14    enum:
15      - ti,omap4-hwspinlock  # for OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs
16      - ti,am654-hwspinlock  # for K3 AM65x, J721E and J7200 SoCs
17
18  reg:
19    maxItems: 1
20
21  "#hwlock-cells":
22    const: 1
23    description: |
24      The OMAP hwspinlock users will use a 0-indexed relative hwlock number as
25      the argument specifier value for requesting a specific hwspinlock within
26      a hwspinlock bank.
27
28      Please look at the generic hwlock binding for usage information for
29      consumers, "Documentation/devicetree/bindings/hwlock/hwlock.txt"
30
31required:
32  - compatible
33  - reg
34  - "#hwlock-cells"
35
36additionalProperties: false
37
38examples:
39
40  - |
41    /* OMAP4 SoCs */
42    hwspinlock: spinlock@4a0f6000 {
43        compatible = "ti,omap4-hwspinlock";
44        reg = <0x4a0f6000 0x1000>;
45        #hwlock-cells = <1>;
46    };
47
48  - |
49    / {
50        /* K3 AM65x SoCs */
51        model = "Texas Instruments K3 AM654 SoC";
52        compatible = "ti,am654-evm", "ti,am654";
53        #address-cells = <2>;
54        #size-cells = <2>;
55
56        bus@100000 {
57            compatible = "simple-bus";
58            #address-cells = <2>;
59            #size-cells = <2>;
60            ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
61                     <0x00 0x30800000 0x00 0x30800000 0x00 0x0bc00000>; /* Main NavSS */
62
63            bus@30800000 {
64                compatible = "simple-mfd";
65                #address-cells = <2>;
66                #size-cells = <2>;
67                ranges = <0x00 0x30800000 0x00 0x30800000 0x00 0x0bc00000>;
68
69                spinlock@30e00000 {
70                    compatible = "ti,am654-hwspinlock";
71                    reg = <0x00 0x30e00000 0x00 0x1000>;
72                    #hwlock-cells = <1>;
73                };
74            };
75        };
76    };
77