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