Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions Documentation/devicetree/bindings/input/cirrus,cs40l25a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/cirrus,cs40l25a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus Logic CS40L25A boosted haptic driver

maintainers:
- saiththerobo <the.tom.sharp@gmail.com>

description:
The CS40L25A is a boosted class-D amplifier with a Halo Core DSP that
drives a linear resonant actuator, controlled over I2C. It boots from
ROM into a basic mode; the host loads its RAM firmware and plays
effects through the firmware's mailbox.

properties:
compatible:
const: cirrus,cs40l25a

reg:
maxItems: 1

interrupts:
maxItems: 1

reset-gpios:
maxItems: 1
description: The chip's active-low RESET line; asserted holds it in reset.

cirrus,boost-peak-microamp:
description: Peak current limit of the boost inductor.
minimum: 1600000
maximum: 4500000
multipleOf: 50000
default: 4500000

cirrus,boost-ctl-microvolt:
description: Maximum boost converter output voltage.
minimum: 2550000
maximum: 11000000
multipleOf: 50000
default: 11000000

required:
- compatible
- reg
- reset-gpios

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

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

haptics@43 {
compatible = "cirrus,cs40l25a";
reg = <0x43>;
reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
cirrus,boost-peak-microamp = <4500000>;
cirrus,boost-ctl-microvolt = <7500000>;
};
};
15 changes: 15 additions & 0 deletions arch/arm64/boot/dts/exynos/google/gs101-raven.dts
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,18 @@
};
};
};

/*
* Haptics: a Cirrus Logic CS40L25A at 0x43 (Google's gs101-raviole-audio.dtsi),
* reset on gpp24-0, active low. Its interrupt (gpa6-5) isn't used yet.
*/
&hsi2c_8 {
haptics@43 {
compatible = "cirrus,cs40l25a";
reg = <0x43>;
reset-gpios = <&gpp24 0 GPIO_ACTIVE_LOW>;
/* stock's boost: 4.5 A peak, 7.5 V (CLAB) */
cirrus,boost-peak-microamp = <4500000>;
cirrus,boost-ctl-microvolt = <7500000>;
};
};
14 changes: 14 additions & 0 deletions drivers/input/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,20 @@ config INPUT_CS40L26_VIBRA
To compile this driver as a module, choose M here: the
module will be called cs40l26-vibra.

config INPUT_CS40L25_VIBRA
tristate "Cirrus Logic CS40L25A haptic driver"
depends on I2C
select REGMAP_I2C
select FW_CS_DSP
select INPUT_FF_MEMLESS
help
Say Y here to enable force feedback (FF_RUMBLE) on the Cirrus Logic
CS40L25A boosted haptic driver, as in the Pixel 6 Pro. Needs the
RAM firmware cs40l25a_clab.wmfw and the wavetable cs40l20.bin.

To compile this driver as a module, choose M here: the module will
be called cs40l25-vibra.

config INPUT_CS40L50_VIBRA
tristate "CS40L50 Haptic Driver support"
depends on MFD_CS40L50_CORE
Expand Down
1 change: 1 addition & 0 deletions drivers/input/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ obj-$(CONFIG_INPUT_CMA3000_I2C) += cma3000_d0x_i2c.o
obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o
obj-$(CONFIG_INPUT_CPCAP_PWRBUTTON) += cpcap-pwrbutton.o
obj-$(CONFIG_INPUT_CS40L26_VIBRA) += cs40l26-vibra.o
obj-$(CONFIG_INPUT_CS40L25_VIBRA) += cs40l25-vibra.o
obj-$(CONFIG_INPUT_CS40L50_VIBRA) += cs40l50-vibra.o
obj-$(CONFIG_INPUT_DA7280_HAPTICS) += da7280.o
obj-$(CONFIG_INPUT_DA9052_ONKEY) += da9052_onkey.o
Expand Down
Loading