Commit 8350e833 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for Maxim MAX77714 PMIC

  Removed Drivers:
   - Remove support for ST-Ericsson AB8500 DebugFS

  New Device Support:
   - Add support for Silergy SY7636A to Simple MFD I2C
   - Add support for MediaTek MT6366 PMIC to MT6358 IRQ
   - Add support for Charger to Intel PMIC CRC
   - Add support for Raptor Lake to Intel LPSS PCI

  New Functionality:
   - Add support for Reboot to Rockchip RK808

  Fix-ups:
   - Device Tree changes (includcing YAML conversion) for
     silergy,sy7636a, maxim,max77843, google,cros-ec, maxim,max14577,
     maxim,max77802, maxim,max77714, qcom,tcsr, qcom,spmi-pmic,
     stericsson,ab8500, stericsson,db8500-prcmu,
     samsung,exynos5433-lpass, mt6397, syscon, brcm,cru
   - Visible to menuconfig; simple-mfd-i2c
   - Clean-up or clarify code; max77686, intel_soc_pmic_crc
   - Improve error handling; mc13xxx-core, stmfx, asic3
   - Pass device information to child devices; iqs62x, intel-lpss-acpi
   - Individually identify IRQ domains; intel_soc_pmic_core
   - Remove superfluous code; dbx500-prcmu, exynos-lpass
   - Staticify and constify; arizona-i2c
   - Mark sometimes used data as __maybe_unused; atmel-flexcom
   - Account for different ACPI tables on AOSP/Windows platforms; arizona-spi
   - Use provided (platform) APIs; ab8500-core
   - Trivial (whitespace, spelling); rohm-bd9576"

* tag 'mfd-next-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (50 commits)
  dt-bindings: mfd: syscon: Add microchip,lan966x-cpu-syscon compatible
  mfd: bd9576: fix typos in comments
  mfd: Use platform_get_irq() to get the interrupt
  mfd: db8500-prcmu: Remove unused inline function
  mfd: arizona-spi: Add Android board ACPI table handling
  mfd: arizona-spi: Split Windows ACPI init code into its own function
  mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
  MAINTAINERS: Rectify entry for ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
  mfd: intel-lpss: Provide an SSP type to the driver
  dt-bindings: mfd: brcm,cru: Rename pinctrl node
  dt-bindings: Add compatibles for undocumented trivial syscons
  mfd: atmel-flexcom: Fix compilation warning
  dt-bindings: mfd: Add compatible for the MediaTek MT6366 PMIC
  dt-bindings: mfd: samsung,exynos5433-lpass: Convert to dtschema
  mfd: exynos-lpass: Drop unneeded syscon.h include
  mfd: intel-lpss: Add Intel Raptor Lake PCH-S PCI IDs
  mfd: ab8500: Drop debugfs module
  mfd: sta2x11: Use GFP_KERNEL instead of GFP_ATOMIC
  mfd: ab8500: Rewrite bindings in YAML
  mfd: qcom-spmi-pmic: Add pm8953 compatible
  ...
parents e35a4a4e d99460ed
Loading
Loading
Loading
Loading
+105 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/maxim,max77693.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX77693 MicroUSB and Companion Power Management IC LEDs

maintainers:
  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

description: |
  This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
  Circuit (MUIC).

  There are two LED outputs available - FLED1 and FLED2. Each of them can
  control a separate LED or they can be connected together to double the
  maximum current for a single connected LED. One LED is represented by one
  child node.

  See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
  additional information and example.

properties:
  compatible:
    const: maxim,max77693-led

  maxim,boost-mode:
    description:
      In boost mode the device can produce up to 1.2A of total current on both
      outputs. The maximum current on each output is reduced to 625mA then. If
      not enabled explicitly, boost setting defaults to LEDS_BOOST_FIXED in
      case both current sources are used.
      See LEDS_BOOST_* in include/dt-bindings/leds/common.h.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1, 2]

  maxim,boost-mvout:
    description: |
      Output voltage of the boost module in millivolts.
      Valid values: 3300 - 5500, step by 25 (rounded down)
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 3300
    maximum: 5500
    default: 3300

  maxim,mvsys-min:
    description: |
      Low input voltage level in millivolts. Flash is not fired if chip
      estimates that system voltage could drop below this level due to flash
      power consumption.
      Valid values: 2400 - 3400, step by 33 (rounded down)
    $ref: /schemas/types.yaml#/definitions/uint32
    minimum: 2400
    maximum: 3400
    default: 2400

patternProperties:
  "^([a-z]+-)?led[01]?$":
    type: object
    $ref: common.yaml#
    unevaluatedProperties: false

    properties:
      led-sources:
        allOf:
          - minItems: 1
            maxItems: 2
            items:
              minimum: 0
              maximum: 1

      led-max-microamp:
        description: |
          Valid values for a LED connected to one FLED output:
            15625 - 250000, step by 15625 (rounded down)
          Valid values for a LED connected to both FLED outputs:
            15625 - 500000, step by 15625 (rounded down)

      flash-max-microamp:
        description: |
          Valid values for a single LED connected to one FLED output
          (boost mode must be turned off):
            15625 - 1000000, step by 15625 (rounded down)
          Valid values for a single LED connected to both FLED outputs:
            15625 - 1250000, step by 15625 (rounded down)
          Valid values for two LEDs case:
            15625 - 625000, step by 15625 (rounded down)

      flash-max-timeout-us:
        description: |
          Valid values: 62500 - 1000000, step by 62500 (rounded down)
        minimum: 62500
        maximum: 1000000

    required:
      - flash-max-microamp
      - flash-max-timeout-us
      - led-max-microamp
      - led-sources

required:
  - compatible

additionalProperties: false
+0 −282
Original line number Diff line number Diff line
* AB8500 Multi-Functional Device (MFD)

Required parent device properties:
- compatible             : contains "stericsson,ab8500" or "stericsson,ab8505";
- interrupts             : contains the IRQ line for the AB8500
- interrupt-controller   : describes the AB8500 as an Interrupt Controller (has its own domain)
- #interrupt-cells       : should be 2, for 2-cell format
                            - The first cell is the AB8500 local IRQ number
                            - The second cell is used to specify optional parameters
                              - bits[3:0] trigger type and level flags:
                                  1 = low-to-high edge triggered
                                  2 = high-to-low edge triggered
                                  4 = active high level-sensitive
                                  8 = active low level-sensitive

The AB8500 consists of a large and varied group of sub-devices:

Device                     IRQ Names              Supply Names   Description
------                     ---------              ------------   -----------
ab8500-bm                :                      :              : Battery Manager
ab8500-btemp             :                      :              : Battery Temperature
ab8500-charger           :                      :              : Battery Charger
ab8500-codec             :                      :              : Audio Codec
ab8500-fg                : 			: vddadc       : Fuel Gauge
			 : NCONV_ACCU           :	       : Accumulate N Sample Conversion
			 : BATT_OVV		:	       : Battery Over Voltage
			 : LOW_BAT_F		:	       : LOW threshold battery voltage
			 : CC_INT_CALIB		:	       : Coulomb Counter Internal Calibration
			 : CCEOC		:	       : Coulomb Counter End of Conversion
ab8500-btemp		 :			: vtvout       : Battery Temperature
			 : BAT_CTRL_INDB        :              : Battery Removal Indicator
			 : BTEMP_LOW            :              : Btemp < BtempLow, if battery temperature is lower than -10°C
			 : BTEMP_LOW_MEDIUM     :              : BtempLow < Btemp < BtempMedium,if battery temperature is between -10 and 0°C
			 : BTEMP_MEDIUM_HIGH    :	       : BtempMedium < Btemp < BtempHigh,if battery temperature is between 0°C and MaxTemp
			 : BTEMP_HIGH           :              : Btemp > BtempHigh, if battery temperature is higher than MaxTemp
ab8500-charger		 :			: vddadc       : Charger interface
			 : MAIN_CH_UNPLUG_DET	:	       : main charger unplug detection management (not in 8505)
			 : MAIN_CHARGE_PLUG_DET	:	       : main charger plug detection management (not in 8505)
			 : MAIN_EXT_CH_NOT_OK	:	       : main charger not OK
			 : MAIN_CH_TH_PROT_R	:	       : Die temp is above main charger
			 : MAIN_CH_TH_PROT_F	:	       : Die temp is below main charger
			 : VBUS_DET_F		:	       : VBUS falling detected
			 : VBUS_DET_R		:	       : VBUS rising detected
			 : USB_LINK_STATUS	:	       : USB link status has changed
			 : USB_CH_TH_PROT_R	:	       : Die temp is above usb charger
			 : USB_CH_TH_PROT_F	:	       : Die temp is below usb charger
			 : USB_CHARGER_NOT_OKR	:	       : allowed USB charger not ok detection
			 : VBUS_OVV		:	       : Overvoltage on Vbus ball detected (USB charge is stopped)
			 : CH_WD_EXP		:	       : Charger watchdog detected
ab8500-gpadc             : HW_CONV_END          : vddadc       : Analogue to Digital Converter
                           SW_CONV_END          :              :
ab8500-gpio              :                      :              : GPIO Controller (AB8500)
ab8505-gpio              :                      :              : GPIO Controller (AB8505)
ab8500-ponkey            : ONKEY_DBF            :              : Power-on Key
                           ONKEY_DBR            :              :
ab8500-pwm               :                      :              : Pulse Width Modulator
ab8500-regulator         :                      :              : Regulators (AB8500)
ab8505-regulator         :                      :              : Regulators (AB8505)
ab8500-rtc               : 60S                  :              : Real Time Clock
                         : ALARM                :              :
ab8500-sysctrl           :                      :              : System Control
ab8500-usb               : ID_WAKEUP_R          : vddulpivio18 : Universal Serial Bus
                         : ID_WAKEUP_F          : v-ape        :
                         : VBUS_DET_F           : musb_1v8     :
                         : VBUS_DET_R           :              :
                         : USB_LINK_STATUS      :              :
                         : USB_ADP_PROBE_PLUG   :              :
                         : USB_ADP_PROBE_UNPLUG :              :

Required child device properties:
- compatible             : "stericsson,ab8500-[bm|btemp|charger|fg|gpadc|gpio|ponkey|
                                               pwm|regulator|rtc|sysctrl|usb]";

  A few child devices require ADC channels from the GPADC node. Those follow the
  standard bindings from
  https://github.com/devicetree-org/dt-schema/blob/master/schemas/iio/iio-consumer.yaml
  and Documentation/devicetree/bindings/iio/adc/adc.yaml

  abx500-temp		 : io-channels "aux1" and "aux2" for measuring external
			   temperatures.
  ab8500-fg		 : io-channel "main_bat_v" for measuring main battery voltage,
  ab8500-btemp		 : io-channels "btemp_ball" and "bat_ctrl" for measuring the
			   battery voltage.
  ab8500-charger	 : io-channels "main_charger_v", "main_charger_c", "vbus_v",
			   "usb_charger_c" for measuring voltage and current of the
			   different charging supplies.

Optional child device properties:
- interrupts             : contains the device IRQ(s) using the 2-cell format (see above)
- interrupt-names        : contains names of IRQ resource in the order in which they were
                           supplied in the interrupts property
- <supply_name>-supply   : contains a phandle to the regulator supply node in Device Tree

Non-standard child device properties:
 - Audio CODEC:
   - stericsson,amic[1|2]-type-single-ended : Single-ended Analoge Mic (default: differential)
   - stericsson,amic1a-bias-vamic2          : Analoge Mic wishes to use a non-standard Vamic
   - stericsson,amic1b-bias-vamic2          : Analoge Mic wishes to use a non-standard Vamic
   - stericsson,amic2-bias-vamic1           : Analoge Mic wishes to use a non-standard Vamic
   - stericsson,earpeice-cmv                : Earpeice voltage (only: 950 | 1100 | 1270 | 1580)

ab8500 {
         compatible = "stericsson,ab8500";
         interrupts = <0 40 0x4>;
         interrupt-controller;
         #interrupt-cells = <2>;

         ab8500-rtc {
                 compatible = "stericsson,ab8500-rtc";
                 interrupts = <17 0x4
                               18 0x4>;
                 interrupt-names = "60S", "ALARM";
         };

        ab8500-gpadc {
                compatible = "stericsson,ab8500-gpadc";
                interrupts = <32 0x4
                              39 0x4>;
                interrupt-names = "HW_CONV_END", "SW_CONV_END";
                vddadc-supply = <&ab8500_ldo_tvout_reg>;
		#address-cells = <1>;
		#size-cells = <0>;
		#io-channel-cells = <1>;

		/* GPADC channels */
		bat_ctrl: channel@1 {
			reg = <0x01>;
		};
		btemp_ball: channel@2 {
			reg = <0x02>;
		};
		main_charger_v: channel@3 {
			reg = <0x03>;
		};
		acc_detect1: channel@4 {
			reg = <0x04>;
		};
		acc_detect2: channel@5 {
			reg = <0x05>;
		};
		adc_aux1: channel@6 {
			reg = <0x06>;
		};
		adc_aux2: channel@7 {
			reg = <0x07>;
		};
		main_batt_v: channel@8 {
			reg = <0x08>;
		};
		vbus_v: channel@9 {
			reg = <0x09>;
		};
		main_charger_c: channel@a {
			reg = <0x0a>;
		};
		usb_charger_c: channel@b {
			reg = <0x0b>;
		};
		bk_bat_v: channel@c {
			reg = <0x0c>;
		};
		die_temp: channel@d {
			reg = <0x0d>;
		};
		usb_id: channel@e {
			reg = <0x0e>;
		};
		xtal_temp: channel@12 {
			reg = <0x12>;
		};
		vbat_true_meas: channel@13 {
			reg = <0x13>;
		};
		bat_ctrl_and_ibat: channel@1c {
			reg = <0x1c>;
		};
		vbat_meas_and_ibat: channel@1d {
			reg = <0x1d>;
		};
		vbat_true_meas_and_ibat: channel@1e {
			reg = <0x1e>;
		};
		bat_temp_and_ibat: channel@1f {
			reg = <0x1f>;
		};
        };

	ab8500_temp {
		compatible = "stericsson,abx500-temp";
		io-channels = <&gpadc 0x06>,
			      <&gpadc 0x07>;
		io-channel-name = "aux1", "aux2";
	};

	ab8500_battery: ab8500_battery {
		stericsson,battery-type = "LIPO";
		thermistor-on-batctrl;
	};

	ab8500_fg {
		compatible = "stericsson,ab8500-fg";
		battery	   = <&ab8500_battery>;
		io-channels = <&gpadc 0x08>;
		io-channel-name = "main_bat_v";
	};

	ab8500_btemp {
		compatible = "stericsson,ab8500-btemp";
		battery	   = <&ab8500_battery>;
		io-channels = <&gpadc 0x02>,
			      <&gpadc 0x01>;
		io-channel-name = "btemp_ball",
				"bat_ctrl";
	};

	ab8500_charger {
		compatible	= "stericsson,ab8500-charger";
		battery		= <&ab8500_battery>;
		vddadc-supply	= <&ab8500_ldo_tvout_reg>;
		io-channels = <&gpadc 0x03>,
			      <&gpadc 0x0a>,
			      <&gpadc 0x09>,
			      <&gpadc 0x0b>;
		io-channel-name = "main_charger_v",
				"main_charger_c",
				"vbus_v",
				"usb_charger_c";
	};

        ab8500-usb {
                compatible = "stericsson,ab8500-usb";
                interrupts = < 90 0x4
                               96 0x4
                               14 0x4
                               15 0x4
                               79 0x4
                               74 0x4
                               75 0x4>;
                interrupt-names = "ID_WAKEUP_R",
                                  "ID_WAKEUP_F",
                                  "VBUS_DET_F",
                                  "VBUS_DET_R",
                                  "USB_LINK_STATUS",
                                  "USB_ADP_PROBE_PLUG",
                                  "USB_ADP_PROBE_UNPLUG";
                vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
                v-ape-supply = <&db8500_vape_reg>;
                musb_1v8-supply = <&db8500_vsmps2_reg>;
        };

        ab8500-ponkey {
                compatible = "stericsson,ab8500-ponkey";
                interrupts = <6 0x4
                              7 0x4>;
                interrupt-names = "ONKEY_DBF", "ONKEY_DBR";
        };

        ab8500-sysctrl {
                compatible = "stericsson,ab8500-sysctrl";
        };

        ab8500-pwm {
                compatible = "stericsson,ab8500-pwm";
        };

	codec: ab8500-codec {
		compatible = "stericsson,ab8500-codec";

		stericsson,earpeice-cmv = <950>; /* Units in mV. */
	};

        ab8500-regulators {
                compatible = "stericsson,ab8500-regulator";

                ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
                        /*
                         * See: Documentation/devicetree/bindings/regulator/regulator.txt
                         * for more information on regulators
                         */
                };
        };
};
+0 −194
Original line number Diff line number Diff line
Maxim MAX77693 multi-function device

MAX77693 is a Multifunction device with the following submodules:
- PMIC,
- CHARGER,
- LED,
- MUIC,
- HAPTIC

It is interfaced to host controller using i2c.
This document describes the bindings for the mfd device.

Required properties:
- compatible : Must be "maxim,max77693".
- reg : Specifies the i2c slave address of PMIC block.
- interrupts : This i2c device has an IRQ line connected to the main SoC.

Optional properties:
- regulators : The regulators of max77693 have to be instantiated under subnode
  named "regulators" using the following format.

	regulators {
		regulator-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
		standard regulator constraints[*].
	};

	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt

- haptic : The MAX77693 haptic device utilises a PWM controlled motor to provide
  users with tactile feedback. PWM period and duty-cycle are varied in
  order to provide the appropriate level of feedback.

 Required properties:
	- compatible : Must be "maxim,max77693-haptic"
	- haptic-supply : power supply for the haptic motor
	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
	- pwms : phandle to the physical PWM(Pulse Width Modulation) device.
	 PWM properties should be named "pwms". And number of cell is different
	 for each pwm device.
	 To get more information, please refer to documentation.
	[*] refer Documentation/devicetree/bindings/pwm/pwm.txt

- charger : Node configuring the charger driver.
  If present, required properties:
  - compatible : Must be "maxim,max77693-charger".

  Optional properties (if not set, defaults will be used):
  - maxim,constant-microvolt : Battery constant voltage in uV. The charger
    will operate in fast charge constant current mode till battery voltage
    reaches this level. Then the charger will switch to fast charge constant
    voltage mode. Also vsys (system voltage) will be set to this value when
    DC power is supplied but charger is not enabled.
    Valid values: 3650000 - 4400000, step by 25000 (rounded down)
    Default: 4200000

  - maxim,min-system-microvolt : Minimal system voltage in uV.
    Valid values: 3000000 - 3700000, step by 100000 (rounded down)
    Default: 3600000

  - maxim,thermal-regulation-celsius : Temperature in Celsius for entering
    high temperature charging mode. If die temperature exceeds this value
    the charging current will be reduced by 105 mA/Celsius.
    Valid values: 70, 85, 100, 115
    Default: 100

  - maxim,battery-overcurrent-microamp : Overcurrent protection threshold
    in uA (current from battery to system).
    Valid values: 2000000 - 3500000, step by 250000 (rounded down)
    Default: 3500000

  - maxim,charge-input-threshold-microvolt : Threshold voltage in uV for
    triggering input voltage regulation loop. If input voltage decreases
    below this value, the input current will be reduced to reach the
    threshold voltage.
    Valid values: 4300000, 4700000, 4800000, 4900000
    Default: 4300000

- led : the LED submodule device node

There are two LED outputs available - FLED1 and FLED2. Each of them can
control a separate LED or they can be connected together to double
the maximum current for a single connected LED. One LED is represented
by one child node.

Required properties:
- compatible : Must be "maxim,max77693-led".

Optional properties:
- maxim,boost-mode :
	In boost mode the device can produce up to 1.2A of total current
	on both outputs. The maximum current on each output is reduced
	to 625mA then. If not enabled explicitly, boost setting defaults to
	LEDS_BOOST_FIXED in case both current sources are used.
	Possible values:
		LEDS_BOOST_OFF (0) - no boost,
		LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
		LEDS_BOOST_FIXED (2) - fixed mode.
- maxim,boost-mvout : Output voltage of the boost module in millivolts.
	Valid values: 3300 - 5500, step by 25 (rounded down)
	Default: 3300
- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
	if chip estimates that system voltage could drop below this level due
	to flash power consumption.
	Valid values: 2400 - 3400, step by 33 (rounded down)
	Default: 2400

Required properties for the LED child node:
- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
		device current output identifiers: 0 - FLED1, 1 - FLED2
- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
	Valid values for a LED connected to one FLED output:
		15625 - 250000, step by 15625 (rounded down)
	Valid values for a LED connected to both FLED outputs:
		15625 - 500000, step by 15625 (rounded down)
- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
	Valid values for a single LED connected to one FLED output
	(boost mode must be turned off):
		15625 - 1000000, step by 15625 (rounded down)
	Valid values for a single LED connected to both FLED outputs:
		15625 - 1250000, step by 15625 (rounded down)
	Valid values for two LEDs case:
		15625 - 625000, step by 15625 (rounded down)
- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
	Valid values: 62500 - 1000000, step by 62500 (rounded down)

Optional properties for the LED child node:
- label : see Documentation/devicetree/bindings/leds/common.txt

Optional nodes:
- max77693-muic :
	Node used only by extcon consumers.
	Required properties:
		- compatible : "maxim,max77693-muic"

Example:
#include <dt-bindings/leds/common.h>

	max77693@66 {
		compatible = "maxim,max77693";
		reg = <0x66>;
		interrupt-parent = <&gpx1>;
		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;

		regulators {
			esafeout@1 {
				regulator-compatible = "ESAFEOUT1";
				regulator-name = "ESAFEOUT1";
				regulator-boot-on;
			};
			esafeout@2 {
				regulator-compatible = "ESAFEOUT2";
				regulator-name = "ESAFEOUT2";
				};
			charger@0 {
				regulator-compatible = "CHARGER";
				regulator-name = "CHARGER";
				regulator-min-microamp = <60000>;
				regulator-max-microamp = <2580000>;
					regulator-boot-on;
			};
		};

		haptic {
			compatible = "maxim,max77693-haptic";
			haptic-supply = <&haptic_supply>;
			pwms = <&pwm 0 40000 0>;
			pwm-names = "haptic";
		};

		charger {
			compatible = "maxim,max77693-charger";

			maxim,constant-microvolt = <4200000>;
			maxim,min-system-microvolt = <3600000>;
			maxim,thermal-regulation-celsius = <75>;
			maxim,battery-overcurrent-microamp = <3000000>;
			maxim,charge-input-threshold-microvolt = <4300000>;
		};

		led {
			compatible = "maxim,max77693-led";
			maxim,boost-mode = <LEDS_BOOST_FIXED>;
			maxim,boost-mvout = <5000>;
			maxim,mvsys-min = <2400>;

			camera_flash: flash-led {
				label = "max77693-flash";
				led-sources = <0>, <1>;
				led-max-microamp = <500000>;
				flash-max-microamp = <1250000>;
				flash-max-timeout-us = <1000000>;
			};
		};
	};
+143 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/maxim,max77693.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Maxim MAX77693 MicroUSB and Companion Power Management IC

maintainers:
  - Chanwoo Choi <cw00.choi@samsung.com>
  - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

description: |
  This is a part of device tree bindings for Maxim MAX77693 MicroUSB
  Integrated Circuit (MUIC).

  The Maxim MAX77693 is a MicroUSB and Companion Power Management IC which
  includes voltage current regulators, charger, LED/flash, haptic motor driver
  and MicroUSB management IC.

properties:
  compatible:
    const: maxim,max77693

  interrupts:
    maxItems: 1

  reg:
    maxItems: 1

  charger:
    $ref: /schemas/power/supply/maxim,max77693.yaml

  led:
    $ref: /schemas/leds/maxim,max77693.yaml

  max77693-muic:
    type: object
    additionalProperties: false

    properties:
      compatible:
        const: maxim,max77693-muic

    required:
      - compatible

  motor-driver:
    type: object
    additionalProperties: false

    properties:
      compatible:
        const: maxim,max77693-haptic

      haptic-supply:
        description: Power supply to the haptic motor

      pwms:
        maxItems: 1

    required:
      - compatible
      - haptic-supply
      - pwms

  regulators:
    $ref: ../regulator/maxim,max77693.yaml
    description:
      List of child nodes that specify the regulators.

required:
  - compatible
  - interrupts
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/leds/common.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@66 {
            compatible = "maxim,max77693";
            reg = <0x66>;
            interrupt-parent = <&gpx1>;
            interrupts = <5 IRQ_TYPE_LEVEL_LOW>;

            regulators {
                ESAFEOUT1 {
                    regulator-name = "ESAFEOUT1";
                };

                ESAFEOUT2 {
                    regulator-name = "ESAFEOUT2";
                };

                CHARGER {
                    regulator-name = "CHARGER";
                    regulator-min-microamp = <60000>;
                    regulator-max-microamp = <2580000>;
                };
            };

            motor-driver {
                compatible = "maxim,max77693-haptic";
                haptic-supply = <&ldo26_reg>;
                pwms = <&pwm 0 38022 0>;
            };

            charger {
                compatible = "maxim,max77693-charger";

                maxim,constant-microvolt = <4350000>;
                maxim,min-system-microvolt = <3600000>;
                maxim,thermal-regulation-celsius = <100>;
                maxim,battery-overcurrent-microamp = <3500000>;
                maxim,charge-input-threshold-microvolt = <4300000>;
            };

            led {
                compatible = "maxim,max77693-led";
                maxim,boost-mode = <LEDS_BOOST_FIXED>;
                maxim,boost-mvout = <5000>;
                maxim,mvsys-min = <2400>;

                flash-led {
                    label = "max77693-flash";
                    function = LED_FUNCTION_FLASH;
                    color = <LED_COLOR_ID_WHITE>;
                    led-sources = <0>, <1>;
                    led-max-microamp = <500000>;
                    flash-max-microamp = <1250000>;
                    flash-max-timeout-us = <1000000>;
                };
            };
        };
    };
+68 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading