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

Commit cf8d7e38 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MFD updates from Lee Jones:
 "New Device Support:
   - Add support for s2mps15; sec-core
   - Add support for Lewisburg; lpc_ich
   - Add support for cs47l24 and wm1831; arizona

  New Functionality:
   - Allow user to select syscon register width; syscon

  Fix-ups:
   - Lots of Checkpatch fixes
   - Rename -pmic/-regulator; s2mps11
   - Build driver components into a single module; wm8994-*
   - Better handing of IRQ during suspend/resume; as3722
   - Constify things; da903x
   - Remove unused code; ab8500-core
   - Improve error handing; qcom_rpm
   - Simplify code: wm831x-otp, sta2x11-mfd
   - Improve locking; cros_ec_spi
   - Fix incorrect DT binding filename reference; arizona, palmas,
     snps-dwapb-gpio, wm8994

  Bug Fixes:
   - Fix broken SYSFS 'show ID' call; wm831x-otp
   - Protect reads from non-existent registers; qcom-spmi-pmic
   - Repair build warnings; as3722
   - Fix IRQ request ordering; arizona-irq
   - Ensure return value is boolean; ucb1x00-core, tps65010, tc6393xb,
     htc-egpio, dm355evm_msp, asic3"

* tag 'mfd-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (58 commits)
  mfd: davinci_voicecodec: Remove pointless 'out of memory' error message
  mfd: da9052-irq: Fix trivial 'space before comma' error
  mfd: da9052-i2c: Fix tabbing/whitespace issue
  mfd: da903x: Fix white space and split string issues
  mfd: cs5535-mfd: Add missing line spacing and make local array static
  mfd: cros_ec_spi: Repair comparison ordering issue
  mfd: cros_ec_i2c: Fix trivial 'tabs before spaces' whitespace issue.
  mfd: asic3: Fix a plethora of Checkpatch errors and warnings
  mfd: as3711: Repair OOM and 'line over 80 chars' formatting warnings
  mfd: arizona-i2c: Add blank line formatting after declaration
  mfd: arizona-core: msleep() is unreliable for anything <20ms use usleep_range() instead
  mfd: adp5520: Some trivial 'no space before tab' fixes
  mfd: ab8500-sysctrl: Fix Constify, printk => pr_info and formatting issues
  mfd: ab8500-gpadc: Squash a whole bunch of Checkpatch warnings and one error
  mfd: ab8500-debugfs: Clean-up non-conforming commenting and print formatting
  mfd: ab8500-core: Fix many warnings reported by Checkpatch
  mfd: ab2100-otp: Remove pointless 'out of memory' error message
  mfd: ab3100-core.c: Fix multiple warnings reported by Checkpatch
  mfd: aat2870-core: Remove unnecessary 'out of memory' message
  mfd: 88pm860x-core: Fix commenting and declaration spacing
  ...
parents 5c43019f 9fb41166
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
Binding for Samsung S2M and S5M family clock generator block
============================================================

This is a part of device tree bindings for S2M and S5M family multi-function
devices.
More information can be found in bindings/mfd/sec-core.txt file.

The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.

To register these as clocks with common clock framework instantiate under
main device node a sub-node named "clocks".

It uses the common clock binding documented in:
 - Documentation/devicetree/bindings/clock/clock-bindings.txt


Required properties of the "clocks" sub-node:
 - #clock-cells: should be 1.
 - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
   clocks.


Each clock is assigned an identifier and client nodes use this identifier
to specify the clock which they consume.
    Clock               ID           Devices
    ----------------------------------------------------------
    32KhzAP		0            S2MPS11/13/14/15, S5M8767
    32KhzCP		1            S2MPS11/13/15, S5M8767
    32KhzBT		2            S2MPS11/13/14/15, S5M8767

Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
in device tree sources.


Example:

	s2mps11_pmic@66 {
		compatible = "samsung,s2mps11-pmic";
		reg = <0x66>;

		s2m_osc: clocks {
			compatible = "samsung,s2mps11-clk";
			#clock-cells = <1>;
			clock-output-names = "xx", "yy", "zz";
		};
	};
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ controller.
- #interrupt-cells : Specifies the number of cells needed to encode an
  interrupt.  Shall be set to 2.  The first cell defines the interrupt number,
  the second encodes the triger flags encoded as described in
  Documentation/devicetree/bindings/interrupts.txt
  Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- interrupt-parent : The parent interrupt controller.
- interrupts : The interrupt to the parent controller raised when GPIOs
  generate the interrupts.
+22 −2
Original line number Diff line number Diff line
Wolfson Arizona class audio SoCs
Cirrus Logic/Wolfson Microelectronics Arizona class audio SoCs

These devices are audio SoCs with extensive digital capabilites and a range
of analogue I/O.
@@ -6,12 +6,14 @@ of analogue I/O.
Required properties:

  - compatible : One of the following chip-specific strings:
        "cirrus,cs47l24"
        "wlf,wm5102"
        "wlf,wm5110"
        "wlf,wm8280"
        "wlf,wm8997"
        "wlf,wm8998"
        "wlf,wm1814"
        "wlf,wm1831"

  - reg : I2C slave address when connected using I2C, chip select number when
    using SPI.
@@ -24,7 +26,7 @@ Required properties:
  - #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
    The first cell is the IRQ number.
    The second cell is the flags, encoded as the trigger masks from
    Documentation/devicetree/bindings/interrupts.txt
    Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

  - gpio-controller : Indicates this device is a GPIO controller.
  - #gpio-cells : Must be 2. The first cell is the pin number and the
@@ -41,10 +43,21 @@ Required properties:

  - SPKVDD-supply : Speaker driver power supply (wm8997)

  - DCVDD-supply : Main power supply (cs47l24, wm1831)

  - MICVDD-supply : Microphone power supply (cs47l24, wm1831)

Optional properties:

  - wlf,reset : GPIO specifier for the GPIO controlling /RESET

  - clocks: Should reference the clocks supplied on MCLK1 and MCLK2
  - clock-names: Should contains two strings:
      "mclk1" for the clock supplied on MCLK1, recommended to be a high
      quality audio reference clock
      "mclk2" for the clock supplied on MCLK2, recommended to be an always on
      32k clock

  - wlf,gpio-defaults : A list of GPIO configuration register values. Defines
    for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If
    absent, no configuration of these registers is performed. If any entry has
@@ -59,6 +72,12 @@ Optional properties:
    that have not been specified are set to 0 by default. Entries are:
    <IN1, IN2, IN3, IN4> (wm5102, wm5110, wm8280, wm8997)
    <IN1A, IN2A, IN1B, IN2B> (wm8998, wm1814)
  - wlf,out-mono : A list of boolean values indicating whether each output is
    mono or stereo. Position within the list indicates the output affected
    (eg. First entry in the list corresponds to output 1). A non-zero value
    indicates a mono output. If present, the number of values should be less
    than or equal to the number of outputs, if less values are supplied the
    additional outputs will be treated as stereo.

  - wlf,dmic-ref : DMIC reference voltage source for each input, can be
    selected from either MICVDD or one of the MICBIAS's, defines
@@ -69,6 +88,7 @@ Optional properties:
  - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
    they are being externally supplied. As covered in
    Documentation/devicetree/bindings/regulator/regulator.txt
    (wm5102, wm5110, wm8280, wm8997, wm8998, wm1814)

Also see child specific device properties:
  Regulator - ../regulator/arizona-regulator.txt
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ and also the generic series names
- #interrupt-cells : should be set to 2 for IRQ number and flags
  The first cell is the IRQ number.
  The second cell is the flags, encoded as the trigger masks from
  Documentation/devicetree/bindings/interrupts.txt
  Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- interrupt-parent : The parent interrupt controller.

Optional properties:
+0 −153
Original line number Diff line number Diff line

* Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator

The Samsung S2MPS11 is a multi-function device which includes voltage and
current regulators, RTC, charger controller and other sub-blocks. It is
interfaced to the host controller using an I2C interface. Each sub-block is
addressed by the host system using different I2C slave addresses.

Required properties:
- compatible: Should be one of the following
	- "samsung,s2mps11-pmic"
	- "samsung,s2mps13-pmic"
	- "samsung,s2mps14-pmic"
	- "samsung,s2mps15-pmic"
	- "samsung,s2mpu02-pmic".
- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.

Optional properties:
- interrupt-parent: Specifies the phandle of the interrupt controller to which
  the interrupts from s2mps11 are delivered to.
- interrupts: Interrupt specifiers for interrupt sources.
- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
  down. When the system is suspended it will always go down thus triggerring
  unwanted buck warm reset (setting buck voltages to default values).
- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
  connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
  register to turn off the power. Usually the ACOKB is pulled up to VBATT so
  when PWRHOLD pin goes low, the rising ACOKB will trigger power off.

Optional nodes:
- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
  KHz outputs, so to register these as clocks with common clock framework
  instantiate a sub-node named "clocks". It uses the common clock binding
  documented in :
  [Documentation/devicetree/bindings/clock/clock-bindings.txt]
  The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
  - #clock-cells: should be 1.

  - The following is the list of clocks generated by the controller. Each clock
    is assigned an identifier and client nodes use this identifier to specify
    the clock which they consume.
    Clock               ID           Devices
    ----------------------------------------------------------
    32KhzAP		0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
    32KhzCP		1            S2MPS11, S2MPS13, S2MPS15, S5M8767
    32KhzBT		2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767

  - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
		"samsung,s2mps14-clk", "samsung,s5m8767-clk"
    The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.

- regulators: The regulators of s2mps11 that have to be instantiated should be
included in a sub-node named 'regulators'. Regulator nodes included in this
sub-node should be of the format as listed below.

	regulator_name {
		[standard regulator constraints....];
	};

 regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us

 BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
 regulator-ramp-delay = <0> can be used for them to disable ramp delay.
 In the absence of the regulator-ramp-delay property, the default ramp
 delay will be used.

NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
for a particular group of BUCKs. So provide same regulator-ramp-delay<value>.
Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
BUCK[3, 4], and BUCK[7, 8, 10]

On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
over GPIO. To turn this feature on this property must be added to the regulator
sub-node:
	- samsung,ext-control-gpios: GPIO specifier for one GPIO
		controlling this regulator (enable/disable);
Example:
	LDO12 {
		regulator-name = "V_EMMC_2.8V";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		samsung,ext-control-gpios = <&gpk0 2 0>;
	};


The regulator constraints inside the regulator nodes use the standard regulator
bindings which are documented elsewhere.

The following are the names of the regulators that the s2mps11 pmic block
supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
as per the datasheet of s2mps11.

	- LDOn
		  - valid values for n are:
			- S2MPS11: 1 to 38
			- S2MPS13: 1 to 40
			- S2MPS14: 1 to 25
			- S2MPS15: 1 to 27
			- S2MPU02: 1 to 28
		  - Example: LDO1, LDO2, LDO28
	- BUCKn
		  - valid values for n are:
			- S2MPS11: 1 to 10
			- S2MPS13: 1 to 10
			- S2MPS14: 1 to 5
			- S2MPS15: 1 to 10
			- S2MPU02: 1 to 7
		  - Example: BUCK1, BUCK2, BUCK9

Example:

	s2mps11_pmic@66 {
		compatible = "samsung,s2mps11-pmic";
		reg = <0x66>;

		s2m_osc: clocks {
			compatible = "samsung,s2mps11-clk";
			#clock-cells = <1>;
			clock-output-names = "xx", "yy", "zz";
		};

		regulators {
			ldo1_reg: LDO1 {
				regulator-name = "VDD_ABB_3.3V";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
			};

			ldo2_reg: LDO2 {
				regulator-name = "VDD_ALIVE_1.1V";
				regulator-min-microvolt = <1100000>;
				regulator-max-microvolt = <1100000>;
				regulator-always-on;
			};

			buck1_reg: BUCK1 {
				regulator-name = "vdd_mif";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-boot-on;
			};

			buck2_reg: BUCK2 {
				regulator-name = "vdd_arm";
				regulator-min-microvolt = <950000>;
				regulator-max-microvolt = <1350000>;
				regulator-always-on;
				regulator-boot-on;
				regulator-ramp-delay = <50000>;
			};
		};
	};
Loading