Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a746568e authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'simple-mfd' of...

Merge tag 'simple-mfd' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/drivers

Merge "Simple MFD base patches and cleanups" from Linus Walleij:

- Document MFD DT bindings
- Instantiate subdevices for simple MFDs
- Switch Integrator and RealView to use the simple MFD
- Augment LED driver to probe from platform device
- Add LEDs to Juno Vexpress64

* tag 'simple-mfd' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  arm64: add LEDs and some trigger support to defconfig
  arm64: juno: Add APB registers and LEDs using syscon
  leds: syscon: instantiate from platform device
  ARM: dts: update syscons to use simple-mfd
  MFD/OF: document MFD devices and handle simple-mfd
parents 030bbdbf 48f1a9a4
Loading
Loading
Loading
Loading
+41 −0
Original line number Original line Diff line number Diff line
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 devices akin to how
  "simple-bus" inidicates 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.

Example:

foo@1000 {
	compatible = "syscon", "simple-mfd";
	reg = <0x01000 0x1000>;

	led@08.0 {
		compatible = "register-bit-led";
		offset = <0x08>;
		mask = <0x01>;
		label = "myled";
		default-state = "on";
	};
};
+1 −1
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@
		ranges;
		ranges;


		syscon: syscon@10000000 {
		syscon: syscon@10000000 {
			compatible = "arm,realview-pb1176-syscon", "syscon";
			compatible = "arm,realview-pb1176-syscon", "syscon", "simple-mfd";
			reg = <0x10000000 0x1000>;
			reg = <0x10000000 0x1000>;


			led@08.0 {
			led@08.0 {
+2 −2
Original line number Original line Diff line number Diff line
@@ -6,7 +6,7 @@


/ {
/ {
	core-module@10000000 {
	core-module@10000000 {
		compatible = "arm,core-module-integrator", "syscon";
		compatible = "arm,core-module-integrator", "syscon", "simple-mfd";
		reg = <0x10000000 0x200>;
		reg = <0x10000000 0x200>;


		/* Use core module LED to indicate CPU load */
		/* Use core module LED to indicate CPU load */
@@ -95,7 +95,7 @@


		syscon {
		syscon {
			/* Debug registers mapped as syscon */
			/* Debug registers mapped as syscon */
			compatible = "syscon";
			compatible = "syscon", "simple-mfd";
			reg = <0x1a000000 0x10>;
			reg = <0x1a000000 0x10>;


			led@04.0 {
			led@04.0 {
+68 −0
Original line number Original line Diff line number Diff line
@@ -66,6 +66,74 @@
				#size-cells = <1>;
				#size-cells = <1>;
				ranges = <0 3 0 0x200000>;
				ranges = <0 3 0 0x200000>;


				apbregs@010000 {
					compatible = "syscon", "simple-mfd";
					reg = <0x010000 0x1000>;

					led@08.0 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x01>;
						label = "vexpress:0";
						linux,default-trigger = "heartbeat";
						default-state = "on";
					};
					led@08.1 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x02>;
						label = "vexpress:1";
						linux,default-trigger = "mmc0";
						default-state = "off";
					};
					led@08.2 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x04>;
						label = "vexpress:2";
						linux,default-trigger = "cpu0";
						default-state = "off";
					};
					led@08.3 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x08>;
						label = "vexpress:3";
						linux,default-trigger = "cpu1";
						default-state = "off";
					};
					led@08.4 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x10>;
						label = "vexpress:4";
						linux,default-trigger = "cpu2";
						default-state = "off";
					};
					led@08.5 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x20>;
						label = "vexpress:5";
						linux,default-trigger = "cpu3";
						default-state = "off";
					};
					led@08.6 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x40>;
						label = "vexpress:6";
						default-state = "off";
					};
					led@08.7 {
						compatible = "register-bit-led";
						offset = <0x08>;
						mask = <0x80>;
						label = "vexpress:7";
						default-state = "off";
					};
				};

				mmci@050000 {
				mmci@050000 {
					compatible = "arm,pl180", "arm,primecell";
					compatible = "arm,pl180", "arm,primecell";
					reg = <0x050000 0x1000>;
					reg = <0x050000 0x1000>;
+6 −0
Original line number Original line Diff line number Diff line
@@ -138,6 +138,12 @@ CONFIG_MMC_ARMMMCI=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SPI=y
CONFIG_MMC_SPI=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_SYSCON=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RTC_DRV_XGENE=y
CONFIG_RTC_DRV_XGENE=y
Loading