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