mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
b0a5cde57c
Common mistake of usage of 'simple-mfd' compatible is a dependency of children on resources acquired and managed by the parent, e.g. clocks. Extend the simple-mfd documentation to cover this case. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240623134600.115098-1-krzysztof.kozlowski@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
52 lines
1.9 KiB
Text
52 lines
1.9 KiB
Text
Multi-Function Devices (MFD)
|
|
|
|
These devices comprise a nexus for heterogeneous hardware blocks containing
|
|
more than one non-unique yet varying hardware functionality.
|
|
|
|
A typical MFD can be:
|
|
|
|
- A mixed signal ASIC on an external bus, sometimes a PMIC (Power Management
|
|
Integrated Circuit) that is manufactured in a lower technology node (rough
|
|
silicon) that handles analog drivers for things like audio amplifiers, LED
|
|
drivers, level shifters, PHY (physical interfaces to things like USB or
|
|
ethernet), regulators etc.
|
|
|
|
- A range of memory registers containing "miscellaneous system registers" also
|
|
known as a system controller "syscon" or any other memory range containing a
|
|
mix of unrelated hardware devices.
|
|
|
|
Optional properties:
|
|
|
|
- compatible : "simple-mfd" - this signifies that the operating system
|
|
should consider all subnodes of the MFD device as separate and independent
|
|
devices, so not needing any resources to be provided by the parent device.
|
|
Similarly to how "simple-bus" indicates when to see subnodes as children for
|
|
a simple memory-mapped bus.
|
|
For more complex devices, when the nexus driver has to probe registers to
|
|
figure out what child devices exist etc, this should not be used. In the
|
|
latter case the child devices will be determined by the operating system.
|
|
|
|
- ranges: Describes the address mapping relationship to the parent. Should set
|
|
the child's base address to 0, the physical address within parent's address
|
|
space, and the length of the address map.
|
|
|
|
- #address-cells: Specifies the number of cells used to represent physical base
|
|
addresses. Must be present if ranges is used.
|
|
|
|
- #size-cells: Specifies the number of cells used to represent the size of an
|
|
address. Must be present if ranges is used.
|
|
|
|
Example:
|
|
|
|
foo@1000 {
|
|
compatible = "syscon", "simple-mfd";
|
|
reg = <0x01000 0x1000>;
|
|
|
|
led@8.0 {
|
|
compatible = "register-bit-led";
|
|
offset = <0x08>;
|
|
mask = <0x01>;
|
|
label = "myled";
|
|
default-state = "on";
|
|
};
|
|
};
|