xref: /linux/Documentation/devicetree/bindings/hwlock/hwlock.txt (revision 0ce8cf2f31d661a27b7656e791acacb86eb58739)
1*0ce8cf2fSSuman AnnaGeneric hwlock bindings
2*0ce8cf2fSSuman Anna=======================
3*0ce8cf2fSSuman Anna
4*0ce8cf2fSSuman AnnaGeneric bindings that are common to all the hwlock platform specific driver
5*0ce8cf2fSSuman Annaimplementations.
6*0ce8cf2fSSuman Anna
7*0ce8cf2fSSuman AnnaPlease also look through the individual platform specific hwlock binding
8*0ce8cf2fSSuman Annadocumentations for identifying any additional properties specific to that
9*0ce8cf2fSSuman Annaplatform.
10*0ce8cf2fSSuman Anna
11*0ce8cf2fSSuman Annahwlock providers:
12*0ce8cf2fSSuman Anna=================
13*0ce8cf2fSSuman Anna
14*0ce8cf2fSSuman AnnaRequired properties:
15*0ce8cf2fSSuman Anna- #hwlock-cells:        Specifies the number of cells needed to represent a
16*0ce8cf2fSSuman Anna                        specific lock.
17*0ce8cf2fSSuman Anna
18*0ce8cf2fSSuman Annahwlock users:
19*0ce8cf2fSSuman Anna=============
20*0ce8cf2fSSuman Anna
21*0ce8cf2fSSuman AnnaConsumers that require specific hwlock(s) should specify them using the
22*0ce8cf2fSSuman Annaproperty "hwlocks", and an optional "hwlock-names" property.
23*0ce8cf2fSSuman Anna
24*0ce8cf2fSSuman AnnaRequired properties:
25*0ce8cf2fSSuman Anna- hwlocks:              List of phandle to a hwlock provider node and an
26*0ce8cf2fSSuman Anna                        associated hwlock args specifier as indicated by
27*0ce8cf2fSSuman Anna                        #hwlock-cells. The list can have just a single hwlock
28*0ce8cf2fSSuman Anna                        or multiple hwlocks, with each hwlock represented by
29*0ce8cf2fSSuman Anna                        a phandle and a corresponding args specifier.
30*0ce8cf2fSSuman Anna
31*0ce8cf2fSSuman AnnaOptional properties:
32*0ce8cf2fSSuman Anna- hwlock-names:         List of hwlock name strings defined in the same order
33*0ce8cf2fSSuman Anna                        as the hwlocks, with one name per hwlock. Consumers can
34*0ce8cf2fSSuman Anna                        use the hwlock-names to match and get a specific hwlock.
35*0ce8cf2fSSuman Anna
36*0ce8cf2fSSuman Anna
37*0ce8cf2fSSuman Anna1. Example of a node using a single specific hwlock:
38*0ce8cf2fSSuman Anna
39*0ce8cf2fSSuman AnnaThe following example has a node requesting a hwlock in the bank defined by
40*0ce8cf2fSSuman Annathe node hwlock1. hwlock1 is a hwlock provider with an argument specifier
41*0ce8cf2fSSuman Annaof length 1.
42*0ce8cf2fSSuman Anna
43*0ce8cf2fSSuman Anna	node {
44*0ce8cf2fSSuman Anna		...
45*0ce8cf2fSSuman Anna		hwlocks = <&hwlock1 2>;
46*0ce8cf2fSSuman Anna		...
47*0ce8cf2fSSuman Anna	};
48*0ce8cf2fSSuman Anna
49*0ce8cf2fSSuman Anna2. Example of a node using multiple specific hwlocks:
50*0ce8cf2fSSuman Anna
51*0ce8cf2fSSuman AnnaThe following example has a node requesting two hwlocks, a hwlock within
52*0ce8cf2fSSuman Annathe hwlock device node 'hwlock1' with #hwlock-cells value of 1, and another
53*0ce8cf2fSSuman Annahwlock within the hwlock device node 'hwlock2' with #hwlock-cells value of 2.
54*0ce8cf2fSSuman Anna
55*0ce8cf2fSSuman Anna	node {
56*0ce8cf2fSSuman Anna		...
57*0ce8cf2fSSuman Anna		hwlocks = <&hwlock1 2>, <&hwlock2 0 3>;
58*0ce8cf2fSSuman Anna		...
59*0ce8cf2fSSuman Anna	};
60