xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/mfd.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunMulti-Function Devices (MFD)
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThese devices comprise a nexus for heterogeneous hardware blocks containing
4*4882a593Smuzhiyunmore than one non-unique yet varying hardware functionality.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunA typical MFD can be:
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun- A mixed signal ASIC on an external bus, sometimes a PMIC (Power Management
9*4882a593Smuzhiyun  Integrated Circuit) that is manufactured in a lower technology node (rough
10*4882a593Smuzhiyun  silicon) that handles analog drivers for things like audio amplifiers, LED
11*4882a593Smuzhiyun  drivers, level shifters, PHY (physical interfaces to things like USB or
12*4882a593Smuzhiyun  ethernet), regulators etc.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun- A range of memory registers containing "miscellaneous system registers" also
15*4882a593Smuzhiyun  known as a system controller "syscon" or any other memory range containing a
16*4882a593Smuzhiyun  mix of unrelated hardware devices.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunOptional properties:
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun- compatible : "simple-mfd" - this signifies that the operating system should
21*4882a593Smuzhiyun  consider all subnodes of the MFD device as separate devices akin to how
22*4882a593Smuzhiyun  "simple-bus" indicates when to see subnodes as children for a simple
23*4882a593Smuzhiyun  memory-mapped bus. For more complex devices, when the nexus driver has to
24*4882a593Smuzhiyun  probe registers to figure out what child devices exist etc, this should not
25*4882a593Smuzhiyun  be used. In the latter case the child devices will be determined by the
26*4882a593Smuzhiyun  operating system.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun- ranges: Describes the address mapping relationship to the parent. Should set
29*4882a593Smuzhiyun  the child's base address to 0, the physical address within parent's address
30*4882a593Smuzhiyun  space, and the length of the address map.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun- #address-cells: Specifies the number of cells used to represent physical base
33*4882a593Smuzhiyun  addresses. Must be present if ranges is used.
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun- #size-cells: Specifies the number of cells used to represent the size of an
36*4882a593Smuzhiyun  address. Must be present if ranges is used.
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunExample:
39*4882a593Smuzhiyun
40*4882a593Smuzhiyunfoo@1000 {
41*4882a593Smuzhiyun	compatible = "syscon", "simple-mfd";
42*4882a593Smuzhiyun	reg = <0x01000 0x1000>;
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun	led@8.0 {
45*4882a593Smuzhiyun		compatible = "register-bit-led";
46*4882a593Smuzhiyun		offset = <0x08>;
47*4882a593Smuzhiyun		mask = <0x01>;
48*4882a593Smuzhiyun		label = "myled";
49*4882a593Smuzhiyun		default-state = "on";
50*4882a593Smuzhiyun	};
51*4882a593Smuzhiyun};
52