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

Commit 9e705796 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "defconfig: Enable LEDS_QPNP_HAPTICS"

parents c3e2a7df 1cfb8867
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
Qualcomm Technologies PNP Flash LED
Qualcomm Technologies Inc. PNP Flash LED

QPNP (Qualcomm Technologies Plug N Play) Flash LED (Light
QPNP (Qualcomm Technologies Inc. Plug N Play) Flash LED (Light
Emitting Diode) driver is used to provide illumination to
camera sensor when background light is dim to capture good
picture. It can also be used for flashlight/torch application.
It is part of PMIC on Qualcomm Technologies reference platforms.
It is part of PMIC on Qualcomm Technologies Inc. reference platforms.
The PMIC is connected to the host processor via SPMI bus.

Required properties:
+262 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. Haptics driver

QPNP (Qualcomm Technologies, Inc. Plug N Play) Haptics is a peripheral on some
QTI PMICs. It can be interfaced with the host processor via SPMI or I2C bus.

Haptics peripheral can support different actuators or vibrators,
1. Eccentric Rotation Mass (ERM)
2. Linear Resonant Actuator (LRA)

Also, it can support multiple modes of operation: Direct, Buffer, PWM or Audio.

Haptics device is described under a single level of node.

Properties:

- compatible
  Usage:      required
  Value type: <string>
  Definition: "qcom,qpnp-haptics".

- reg
  Usage:      required
  Value type: <u32>
  Definition: Base address of haptics peripheral.

- interrupts
  Usage:      required
  Value type: <prop-encoded-array>
  Definition: Peripheral interrupt specifier.

- interrupt-names
  Usage:      required
  Value type: <stringlist>
  Definition: Interrupt names.  This list must match up 1-to-1 with the
		interrupts specified in the 'interrupts' property. Currently
		supported interrupts are short-circuit and play.

- qcom,pmic-revid
  Usage:      required
  Value type: <phandle>
  Definition: Should specify the phandle of PMIC's revid module. This is used to
		identify the PMIC subtype.

- qcom,pmic-misc
  Usage:      optional
  Value type: <phandle>
  Definition: Should specify the phandle of PMIC's misc module. This is used to
		read the clock trim error register under MISC peripheral.

- qcom,misc-clk-trim-error-reg
  Usage:      optional
  Value type: <u32>
  Definition: Register offset in MISC peripheral to read the clock trim error.
		If this is specified, then qcom,pmic-misc should be specified.

- qcom,actuator-type
  Usage:      optional
  Value type: <u32>
  Definition: Allowed values are 0 for LRA and 1 for ERM. If this is not
		specified, then LRA type will be used by default.

- qcom,play-mode
  Usage:      optional
  Value type: <string>
  Definition: Allowed values are: "direct", "buffer", "pwm", "auto". If not
		specified for LRA actuator, auto mode will be selected by
		default.

- qcom,wave-shape
  Usage:      optional
  Value type: <string>
  Definition: Wave shape to be played. Allowed values: "sine" or "square".
		Default value is "square".

- qcom,wave-play-rate-us
  Usage:      optional
  Value type: <u32>
  Definition: Wave sample duration in microseconds. This should match with
		the frequency the vibrator supports.
		Allowed values are: 0 to 20475. Default value is 5715.

- qcom,max-play-time-us
  Usage:      optional
  Value type: <u32>
  Definition: Maximum play time supported in microseconds. Default value is
		15000.

- qcom,vmax-mv
  Usage:      optional
  Value type: <u32>
  Definition: Maximum output voltage in millivolts. Value specified here will
		be rounded off to the closest multiple of 116 mV.
		Allowed values: 0 to 3596. Default value is 3596.

- qcom,ilim-ma
  Usage:      optional
  Value type: <u32>
  Definition: Output current limit in mA. Allowed values: 400 or 800. Default
		value is 400.

- qcom,en-brake
  Usage:      optional
  Value type: <empty>
  Definition: Enables internal reverse braking.

- qcom,brake-pattern
  Usage:      optional
  Value type: <prop-encoded-array>
  Definition: Brake pattern to be applied. If specified, should be having
		4 elements. Allowed values for each element are:
		0, 1: Vmax/4, 2: Vmax/2, 3: Vmax.

- qcom,sc-dbc-cycles
  Usage:      optional
  Value type: <u32>
  Definition: Short circuit debounce cycles for internal PWM.
		Allowed values: 0, 8, 16 or 32.

- vcc_pon-supply
  Usage:      optional
  Value type: <phandle>
  Definition: PON driver regulator required to force MBG_ON

Following properties are specific only to LRA vibrators.

- qcom,lra-auto-res-mode
  Usage:      optional
  Value type: <string>
  Definition: Auto resonance method. Allowed values are:
		For pmi8998 and chips earlier,
		"none" : No auto resonance
		"zxd" : Zero crossing detection method
		"qwd" : Quarter wave drive method
		"max-qwd" : Maximum QWD
		"zxd-eop" : ZXD + End of Pattern
		For pm660,
		"zxd" : Zero crossing detection method
		"qwd" : Quarter wave drive method

- qcom,lra-high-z
  Usage:      optional
  Value type: <string>
  Definition: High Z configuration for auto resonance. Allowed values are:
		"none", "opt1", "opt2" and "opt3".
		For pm660, "opt0" is valid value for 1 LRA period.

- qcom,lra-res-cal-period
  Usage:      optional
  Value type: <u32>
  Definition: Auto resonance calibration period. Allowed values are:
		For pmi8998 and chips earlier: 4, 8, 16, and 32.
		For pm660: 4, 8, 16, 32, 64, 128 and 256.

- qcom,lra-qwd-drive-duration
  Usage:      optional
  Value type: <u32>
  Definition: LRA drive duration in QWD mode. Applies only for pm660 currently.
		Allowed values are: 0 and 1, for 1/4 and 3/8 LRA period.
		respectively.

- qcom,lra-calibrate-at-eop
  Usage:      optional
  Value type: <u32>
  Definition: Enables calibration at end of pattern. Applies only for pm660
		currently. Allowed values are: 0 and 1.

- qcom,auto-res-err-recovery-hw
  Usage:      optional
  Value type: <empty>
  Definition: Enables Hardware auto resonance error recovery. Applies only for
		pm660 currently.

- qcom,drive-period-code-max-variation-pct
  Usage:      optional
  Value type: <u32>
  Definition: Maximum allowed variation of LRA drive period code in percentage
		above which RATE_CFG registers will not be updated by SW when
		auto resonance is enabled and auto resonance error correction
		algorithm is running. If not specified, default value is 25%.

- qcom,drive-period-code-min-variation-pct
  Usage:      optional
  Value type: <u32>
  Definition: Minimum allowed variation of LRA drive period code in percentage
		below which RATE_CFG registers will not be updated by SW when
		auto resonance is enabled and auto resonance error correction
		algorithm is running. If not specified, default value is 25%.

Following properties are applicable only when "qcom,play-mode" is set to
"buffer".

- qcom,wave-rep-cnt
  Usage:      optional
  Value type: <u32>
  Definition: Repetition count for wave form.
		Allowed values are: 1, 2, 4, 8, 16, 32, 64 and 128. Default
		value is 1.

- qcom,wave-samp-rep-cnt
  Usage:      optional
  Value type: <u32>
  Definition: Repetition count for each sample of wave form. Allowed values
		are: 1, 2, 4 and 8. Default value is 1.

- qcom,wave-samples
  Usage:      optional
  Value type: <prop-encoded-array>
  Definition: Wave samples in an array of 8 elements. Each element takes the
		following representation, bit 0: unused, bits[5:1] : amplitude,
		bit 6: overdrive, bit 7: sign. Default sample value is 0x3E.

Following properties are applicable only when "qcom,play-mode" is set to
"pwm".

- pwms
  Usage:      required, if "qcom,play-mode" is set to "pwm".
  Value type: <phandle>
  Definition: PWM device that is feeding its output to Haptics.

- qcom,period-us
  Usage:      required, if "qcom,play-mode" is set to "pwm".
  Value type: <u32>
  Definition: PWM period in us.

- qcom,duty-us
  Usage:      required, if "qcom,play-mode" is set to "pwm".
  Value type: <u32>
  Definition: PWM duty cycle in us.

- qcom,ext-pwm-freq-khz
  Usage:      optional
  Value type: <u32>
  Definition: Frequency for external PWM in KHz.
		Allowed values are: 25, 50, 75 and 100.

- qcom,ext-pwm-dtest-line
  Usage:      optional
  Value type: <u32>
  Definition: DTEST line which is used for external PWM.

Example:
	qcom,haptics@c000 {
		compatible = "qcom,qpnp-haptics";
		reg = <0xc000 0x100>;
		interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_RISING>,
			     <0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
		interrupt-names = "hap-sc-irq", "hap-play-irq";
		qcom,pmic-revid = <&pmi8998_revid>;
		qcom,pmic-misc = <&pmi8998_misc>;
		qcom,misc-clk-trim-error-reg = <0xf3>;
		qcom,actuator-type = <0>;
		qcom,play-mode = "direct";
		qcom,vmax-mv = <3200>;
		qcom,ilim-ma = <800>;
		qcom,sc-dbc-cycles = <8>;
		qcom,wave-play-rate-us = <6667>;
		qcom,en-brake;
		qcom,brake-pattern = <0x3 0x0 0x0 0x0>;
		qcom,lra-high-z = "opt1";
		qcom,lra-auto-res-mode = "qwd";
		qcom,lra-res-cal-period = <4>;
	};
+103 −0
Original line number Diff line number Diff line
@@ -109,6 +109,10 @@ Parent node optional properties:
					this. If this property is not specified,
					low battery voltage threshold will be
					configured to 4200 mV.
- qcom,fg-rconn-mohm:			Battery connector resistance (Rconn) in
					milliohms. If Rconn is specified, then
					Rslow values will be updated to account
					it for an accurate ESR.
- qcom,cycle-counter-en:		Boolean property which enables the cycle
					counter feature. If this property is
					present, then the following properties
@@ -143,6 +147,14 @@ Parent node optional properties:
					battery voltage shadow and the current
					predicted voltage in uV to initiate
					capacity learning.
- qcom,cl-max-limit-deciperc:		The maximum percent that the capacity
					cannot go above during any capacity
					learning cycle. This property is in the
					unit of .1% increments.
- qcom,cl-min-limit-deciperc:		The minimum percent that the capacity
					cannot go below during any capacity
					learning cycle. This property is in the
					unit of .1% increments.
- qcom,capacity-estimation-on:		A boolean property to have the fuel
					gauge driver attempt to estimate the
					battery capacity using battery
@@ -178,6 +190,97 @@ Parent node optional properties:
					settings will be different from default.
					Once SOC crosses 5%, ESR pulse timings
					will be restored back to default.
- qcom,fg-control-slope-limiter:	A boolean property to specify if SOC
					slope limiter coefficients needs to
					be modified based on charging status
					and battery temperature threshold.
- qcom,fg-slope-limit-temp-threshold:	Temperature threshold in decidegC used
					for applying the slope coefficient based
					on charging status and battery
					temperature. If this property is not
					specified, a default value of 100 (10C)
					will be applied by default.
- qcom,fg-slope-limit-low-temp-chg:	When the temperature goes below the
					specified temperature threshold and
					battery is charging, slope coefficient
					specified with this property will be
					applied. If this property is not
					specified, a default value of 45 will be
					applied.
- qcom,fg-slope-limit-low-temp-dischg:	Same as "qcom,fg-slope-limit-low-temp-chg"
					except this is when the battery is
					discharging.
- qcom,fg-slope-limit-high-temp-chg:	When the temperature goes above the
					specified temperature threshold and
					battery is charging, slope coefficient
					specified with this property will be
					applied. If this property is not
					specified, a default value of 2 will be
					applied.
- qcom,fg-slope-limit-high-temp-dischg:	Same as "qcom,fg-slope-limit-high-temp-chg"
					except this is when the battery is
					discharging.
- qcom,fg-dischg-voltage-gain-ctrl:	A boolean property to specify if the
					voltage gain needs to be modified
					during discharging based on monotonic
					soc.
- qcom,fg-dischg-voltage-gain-soc:	Array of monotonic SOC threshold values
					to change the voltage gain settings
					during discharge. This should be defined
					in the ascending order and in the range
					of 0-100. Array limit is set to 3.
					If qcom,fg-dischg-voltage-gain-ctrl is
					set, then this property should be
					specified to apply the gain settings.
- qcom,fg-dischg-med-voltage-gain:	Array of voltage gain values that needs
					to be applied to medC voltage gain when
					the monotonic SOC goes below the SOC
					threshold specified under
					qcom,fg-dischg-voltage-gain-soc. Array
					limit is set to 3.
					If qcom,fg-dischg-voltage-gain-ctrl is
					set, then this property should be
					specified to apply the gain setting.
- qcom,fg-dischg-high-voltage-gain:	Array of voltage gain values that needs
					to be applied to highC voltage gain when
					the monotonic SOC goes below the SOC
					threshold specified under
					qcom,fg-dischg-voltage-gain-soc. Array
					limit is set to 3.
					If qcom,fg-dischg-voltage-gain-ctrl is
					set, then this property should be
					specified to apply the gain setting.
- qcom,fg-use-vbat-low-empty-soc:	A boolean property to specify whether
					vbatt-low interrupt is used to handle
					empty battery condition. If this is
					not specified, empty battery condition
					is detected by empty-soc interrupt.
- qcom,fg-batt-temp-low-limit:		Battery temperature (in decidegC) low
					limit  which will be used to validate
					the battery temperature reading from FG.
					If the battery temperature goes below
					this limit, last read good temperature
					will be notified to userspace. If this
					limit is not specified, then the
					default limit would be -60C.
- qcom,fg-batt-temp-high-limit:		Battery temperature (in decidegC) high
					limit  which will be used to validate
					the battery temperature reading from FG.
					If the battery temperature goes above
					this limit, last read good temperature
					will be notified to userspace. If this
					limit is not specified, then the
					default limit would be 150C.
- qcom,fg-cc-soc-limit-pct:		Percentage of CC_SOC before resetting
					FG and restore the full CC_SOC value.
- qcom,fg-restore-batt-info:		A boolean property to specify whether
					battery parameters needs to be
					restored. If this feature is enabled,
					then validating the battery parameters
					by OCV/battery SOC, validation range
					in percentage should be specified via
					appropriate module parameters to make
					it work properly.

qcom,fg-soc node required properties:
- reg : offset and length of the PMIC peripheral register map.
+1 −0
Original line number Diff line number Diff line
@@ -468,6 +468,7 @@ CONFIG_MMC_SDHCI_MSM=y
CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_FLASH=y
CONFIG_LEDS_QPNP_WLED=y
CONFIG_LEDS_QPNP_HAPTICS=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_SWITCH=y
CONFIG_RTC_CLASS=y
+1 −0
Original line number Diff line number Diff line
@@ -457,6 +457,7 @@ CONFIG_LEDS_QPNP=y
CONFIG_LEDS_QPNP_FLASH=y
CONFIG_LEDS_QPNP_WLED=y
CONFIG_LEDS_SYSCON=y
CONFIG_LEDS_QPNP_HAPTICS=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
Loading