* [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics
@ 2022-04-08 11:53 Luca Weiss
2022-04-08 11:53 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Add " Luca Weiss
2022-04-08 15:05 ` [PATCH 1/3] dt-bindings: input: Add bindings for Awinic " Krzysztof Kozlowski
0 siblings, 2 replies; 7+ messages in thread
From: Luca Weiss @ 2022-04-08 11:53 UTC (permalink / raw)
To: linux-input
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss,
Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, devicetree,
linux-kernel
Add a document describing the bindings for the AW8695 LRA Haptic Driver.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
.../bindings/input/awinic,aw8695-haptics.yaml | 133 ++++++++++++++++++
1 file changed, 133 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/awinic,aw8695-haptics.yaml
diff --git a/Documentation/devicetree/bindings/input/awinic,aw8695-haptics.yaml b/Documentation/devicetree/bindings/input/awinic,aw8695-haptics.yaml
new file mode 100644
index 000000000000..9f573daaba0e
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/awinic,aw8695-haptics.yaml
@@ -0,0 +1,133 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/awinic,aw8695-haptics.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic AW8695 LRA Haptic Driver
+
+maintainers:
+ - Luca Weiss <luca.weiss@fairphone.com>
+
+properties:
+ compatible:
+ const: awinic,aw8695
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+ description: GPIO connected to INTN pin (edge falling)
+
+ reset-gpios:
+ maxItems: 1
+ description: GPIO connected to RSTN pin (active high)
+
+ awinic,f0-preset:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Default value for the f0 of LRA
+
+ awinic,f0-coefficient:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Coefficient between actual f0 and the value in the registers
+
+ awinic,f0-calibration-percent:
+ maxItems: 1
+ description: Limit of f0 deviation from awinic,f0-preset
+
+ awinic,drive-level:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Level of drive waveform in normal driving
+
+ awinic,f0-detection-play-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Drive waveform play times in the first period in the f0 detection
+
+ awinic,f0-detection-wait-time:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Waveform wait times in the f0 detection
+
+ awinic,f0-detection-repeat:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Repeat times in the f0 detection
+
+ awinic,f0-detection-trace:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Drive waveform play times in the second period and later in the f0 detection
+
+ awinic,boost-debug:
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ minItems: 3
+ maxItems: 3
+ description: Values for BSTDBG1-3 registers
+
+ awinic,tset:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: Value for TSET register
+
+ awinic,r-spare:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description: Value for R_SPARE register
+
+ awinic,bemf-upper-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Back EMF (electromotive force) upper threshold
+
+ awinic,bemf-lower-threshold:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Back EMF (electromotive force) lower threshold
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - reset-gpios
+ - awinic,f0-preset
+ - awinic,f0-coefficient
+ - awinic,f0-calibration-percent
+ - awinic,drive-level
+ - awinic,f0-detection-play-time
+ - awinic,f0-detection-wait-time
+ - awinic,f0-detection-repeat
+ - awinic,f0-detection-trace
+ - awinic,boost-debug
+ - awinic,tset
+ - awinic,r-spare
+ - awinic,bemf-upper-threshold
+ - awinic,bemf-lower-threshold
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ haptics@5a {
+ compatible = "awinic,aw8695";
+ reg = <0x5a>;
+ interrupts-extended = <&tlmm 85 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&tlmm 90 GPIO_ACTIVE_HIGH>;
+
+ awinic,f0-preset = <2350>;
+ awinic,f0-coefficient = <260>;
+ awinic,f0-calibration-percent = <7>;
+ awinic,drive-level = <125>;
+
+ awinic,f0-detection-play-time = <5>;
+ awinic,f0-detection-wait-time = <3>;
+ awinic,f0-detection-repeat = <2>;
+ awinic,f0-detection-trace = <15>;
+
+ awinic,boost-debug = /bits/ 8 <0x30 0xeb 0xd4>;
+ awinic,tset = /bits/ 8 <0x12>;
+ awinic,r-spare = /bits/ 8 <0x68>;
+
+ awinic,bemf-upper-threshold = <4104>;
+ awinic,bemf-lower-threshold = <1016>;
+ };
+ };
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Add AW8695 haptics
2022-04-08 11:53 [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics Luca Weiss
@ 2022-04-08 11:53 ` Luca Weiss
2022-04-08 19:49 ` kernel test robot
2022-04-08 15:05 ` [PATCH 1/3] dt-bindings: input: Add bindings for Awinic " Krzysztof Kozlowski
1 sibling, 1 reply; 7+ messages in thread
From: Luca Weiss @ 2022-04-08 11:53 UTC (permalink / raw)
To: linux-input
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Rob Herring, Krzysztof Kozlowski, linux-arm-msm,
devicetree, linux-kernel
Add a node for the haptics driver found on the phone.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
This patch depends on the i2c10 node introduced in this patch:
https://lore.kernel.org/linux-arm-msm/20220408114205.234635-2-luca.weiss@fairphone.com/
For reference, the dt properties are based on the following properties
from the original vendor driver:
vib_f0_pre = < 2350 >;
=> awinic,f0-preset = <2350>;
vib_f0_coeff = < 260 >;
=> awinic,f0-coefficient = <260>;
vib_f0_cali_percen = < 7 >;
=> awinic,f0-calibration-percent = <7>;
vib_cont_drv_lev = < 125 >;
=> awinic,drive-level = <125>;
vib_f0_trace_parameter = < 0x05 0x03 0x02 0x0f >;
=> awinic,f0-detection-play-time = <5>;
=> awinic,f0-detection-wait-time = <3>;
=> awinic,f0-detection-repeat = <2>;
=> awinic,f0-detection-trace = <15>;
vib_bstdbg = < 0x30 0xeb 0xd4 0 0 0 >;
=> awinic,boost-debug = /bits/ 8 <0x30 0xeb 0xd4>;
vib_tset = < 0x12 >;
=> awinic,tset = /bits/ 8 <0x12>;
vib_r_spare = < 0x68 >;
=> awinic,r-spare = /bits/ 8 <0x68>;
vib_bemf_config = < 0x10 0x08 0x03 0xf8 >;
(0x10 << 8) | 0x08
=> awinic,bemf-upper-threshold = <4104>;
(0x03 << 8) | 0xf8
=> awinic,bemf-lower-threshold = <1016>;
.../boot/dts/qcom/sm7225-fairphone-fp4.dts | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index 67d14bda3797..4691a5e5c8e5 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -296,6 +296,35 @@ &cdsp {
firmware-name = "qcom/sm7225/fairphone4/cdsp.mdt";
};
+&i2c10 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ haptics@5a {
+ compatible = "awinic,aw8695";
+ reg = <0x5a>;
+ interrupts-extended = <&tlmm 85 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&tlmm 90 GPIO_ACTIVE_HIGH>;
+
+ awinic,f0-preset = <2350>;
+ awinic,f0-coefficient = <260>;
+ awinic,f0-calibration-percent = <7>;
+ awinic,drive-level = <125>;
+
+ awinic,f0-detection-play-time = <5>;
+ awinic,f0-detection-wait-time = <3>;
+ awinic,f0-detection-repeat = <2>;
+ awinic,f0-detection-trace = <15>;
+
+ awinic,boost-debug = /bits/ 8 <0x30 0xeb 0xd4>;
+ awinic,tset = /bits/ 8 <0x12>;
+ awinic,r-spare = /bits/ 8 <0x68>;
+
+ awinic,bemf-upper-threshold = <4104>;
+ awinic,bemf-lower-threshold = <1016>;
+ };
+};
+
&mpss {
status = "okay";
firmware-name = "qcom/sm7225/fairphone4/modem.mdt";
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Add AW8695 haptics
2022-04-08 11:53 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Add " Luca Weiss
@ 2022-04-08 19:49 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2022-04-08 19:49 UTC (permalink / raw)
To: Luca Weiss, linux-input
Cc: kbuild-all, ~postmarketos/upstreaming, phone-devel, Luca Weiss,
Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree, linux-kernel
Hi Luca,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on dtor-input/next]
[also build test ERROR on hid/for-next robh/for-next v5.18-rc1 next-20220408]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Luca-Weiss/dt-bindings-input-Add-bindings-for-Awinic-AW8695-haptics/20220408-195432
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: arm64-randconfig-r015-20220408 (https://download.01.org/0day-ci/archive/20220409/202204090333.QZXMI2tu-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/3f233916afe417b8d4b9100f560892dff2c93f0c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Luca-Weiss/dt-bindings-input-Add-bindings-for-Awinic-AW8695-haptics/20220408-195432
git checkout 3f233916afe417b8d4b9100f560892dff2c93f0c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> Error: arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts:298.1-7 Label or path i2c10 not found
FATAL ERROR: Syntax error parsing input tree
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics
2022-04-08 11:53 [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics Luca Weiss
2022-04-08 11:53 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Add " Luca Weiss
@ 2022-04-08 15:05 ` Krzysztof Kozlowski
2022-04-11 8:15 ` Luca Weiss
1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-08 15:05 UTC (permalink / raw)
To: Luca Weiss, linux-input
Cc: ~postmarketos/upstreaming, phone-devel, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
On 08/04/2022 13:53, Luca Weiss wrote:
> Add a document describing the bindings for the AW8695 LRA Haptic Driver.
(...)
> + reset-gpios:
> + maxItems: 1
> + description: GPIO connected to RSTN pin (active high)
> +
> + awinic,f0-preset:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Default value for the f0 of LRA
> +
> + awinic,f0-coefficient:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Coefficient between actual f0 and the value in the registers
> +
> + awinic,f0-calibration-percent:
> + maxItems: 1
> + description: Limit of f0 deviation from awinic,f0-preset
> +
> + awinic,drive-level:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Level of drive waveform in normal driving
> +
> + awinic,f0-detection-play-time:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Drive waveform play times in the first period in the f0 detection
Use standard unit suffixes for known units (e.g. time).
> +
> + awinic,f0-detection-wait-time:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Waveform wait times in the f0 detection
Ditto.
> +
> + awinic,f0-detection-repeat:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Repeat times in the f0 detection
> +
> + awinic,f0-detection-trace:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Drive waveform play times in the second period and later in the f0 detection
> +
> + awinic,boost-debug:
> + $ref: /schemas/types.yaml#/definitions/uint8-array
> + minItems: 3
> + maxItems: 3
> + description: Values for BSTDBG1-3 registers
Do not encode device programming model (registers) into the binding. You
need to define it as a property related to hardware itself, not its
registers (e.g. boost value in mV).
> +
> + awinic,tset:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description: Value for TSET register
Ditto.
> +
> + awinic,r-spare:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description: Value for R_SPARE register
Ditto.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics
2022-04-08 15:05 ` [PATCH 1/3] dt-bindings: input: Add bindings for Awinic " Krzysztof Kozlowski
@ 2022-04-11 8:15 ` Luca Weiss
2022-04-11 12:52 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Luca Weiss @ 2022-04-11 8:15 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-input
Cc: ~postmarketos/upstreaming, phone-devel, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
Hi Krzysztof,
thanks for the review, replies are inline!
On Fri Apr 8, 2022 at 5:05 PM CEST, Krzysztof Kozlowski wrote:
> On 08/04/2022 13:53, Luca Weiss wrote:
> > Add a document describing the bindings for the AW8695 LRA Haptic Driver.
>
> (...)
>
> > + reset-gpios:
> > + maxItems: 1
> > + description: GPIO connected to RSTN pin (active high)
> > +
> > + awinic,f0-preset:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Default value for the f0 of LRA
> > +
> > + awinic,f0-coefficient:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Coefficient between actual f0 and the value in the registers
> > +
> > + awinic,f0-calibration-percent:
> > + maxItems: 1
> > + description: Limit of f0 deviation from awinic,f0-preset
> > +
> > + awinic,drive-level:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Level of drive waveform in normal driving
> > +
> > + awinic,f0-detection-play-time:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Drive waveform play times in the first period in the f0 detection
>
> Use standard unit suffixes for known units (e.g. time).
While the datasheet doesn't mention any time unit, the value is used to
calculate the f0_trace_ms variable (which is milliseconds) but the
result also depends on the awinic,f0-preset value, so it's not a raw
time value.
>
> > +
> > + awinic,f0-detection-wait-time:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Waveform wait times in the f0 detection
>
> Ditto.
>
> > +
> > + awinic,f0-detection-repeat:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Repeat times in the f0 detection
> > +
> > + awinic,f0-detection-trace:
> > + $ref: /schemas/types.yaml#/definitions/uint32
> > + description: Drive waveform play times in the second period and later in the f0 detection
> > +
> > + awinic,boost-debug:
> > + $ref: /schemas/types.yaml#/definitions/uint8-array
> > + minItems: 3
> > + maxItems: 3
> > + description: Values for BSTDBG1-3 registers
>
> Do not encode device programming model (registers) into the binding. You
> need to define it as a property related to hardware itself, not its
> registers (e.g. boost value in mV).
Unfortunately I couldn't figure the meaning for this and the two values
below.
The datasheet doesn't mention these registers at all and the downstream
driver doesn't do anything meaningful with them (other than setting them)
nor has any comment to indicate what they do.
In the datasheet there's only BSTDBG4 mentioned where bits [5:1] mean
PVDD output voltage setting so for these registers it could really be
anthing :(
Maybe someone with more knowledge about LRAs might be able to decipher
what tset and r_spare is at least? I unfortunately didn't manage.
Regards
Luca
>
> > +
> > + awinic,tset:
> > + $ref: /schemas/types.yaml#/definitions/uint8
> > + description: Value for TSET register
>
> Ditto.
>
> > +
> > + awinic,r-spare:
> > + $ref: /schemas/types.yaml#/definitions/uint8
> > + description: Value for R_SPARE register
>
> Ditto.
>
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics
2022-04-11 8:15 ` Luca Weiss
@ 2022-04-11 12:52 ` Krzysztof Kozlowski
2022-04-11 15:11 ` Luca Weiss
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-11 12:52 UTC (permalink / raw)
To: Luca Weiss, linux-input
Cc: ~postmarketos/upstreaming, phone-devel, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
On 11/04/2022 10:15, Luca Weiss wrote:
(...)
>>> + awinic,f0-detection-play-time:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description: Drive waveform play times in the first period in the f0 detection
>>
>> Use standard unit suffixes for known units (e.g. time).
>
> While the datasheet doesn't mention any time unit, the value is used to
> calculate the f0_trace_ms variable (which is milliseconds) but the
> result also depends on the awinic,f0-preset value, so it's not a raw
> time value.
I see, ok.
>
>>
>>> +
>>> + awinic,f0-detection-wait-time:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description: Waveform wait times in the f0 detection
>>
>> Ditto.
>>
>>> +
>>> + awinic,f0-detection-repeat:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description: Repeat times in the f0 detection
>>> +
>>> + awinic,f0-detection-trace:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description: Drive waveform play times in the second period and later in the f0 detection
>>> +
>>> + awinic,boost-debug:
>>> + $ref: /schemas/types.yaml#/definitions/uint8-array
>>> + minItems: 3
>>> + maxItems: 3
>>> + description: Values for BSTDBG1-3 registers
>>
>> Do not encode device programming model (registers) into the binding. You
>> need to define it as a property related to hardware itself, not its
>> registers (e.g. boost value in mV).
>
> Unfortunately I couldn't figure the meaning for this and the two values
> below.
>
> The datasheet doesn't mention these registers at all and the downstream
> driver doesn't do anything meaningful with them (other than setting them)
> nor has any comment to indicate what they do.
> In the datasheet there's only BSTDBG4 mentioned where bits [5:1] mean
> PVDD output voltage setting so for these registers it could really be
> anthing :(
>
> Maybe someone with more knowledge about LRAs might be able to decipher
> what tset and r_spare is at least? I unfortunately didn't manage.
Do you have to define them in such case in DT? Maybe it should be part
of driver?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics
2022-04-11 12:52 ` Krzysztof Kozlowski
@ 2022-04-11 15:11 ` Luca Weiss
0 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2022-04-11 15:11 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-input
Cc: ~postmarketos/upstreaming, phone-devel, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel
Hi Krzysztof,
On Mon Apr 11, 2022 at 2:52 PM CEST, Krzysztof Kozlowski wrote:
> On 11/04/2022 10:15, Luca Weiss wrote:
>
> (...)
>
> >>> + awinic,f0-detection-play-time:
> >>> + $ref: /schemas/types.yaml#/definitions/uint32
> >>> + description: Drive waveform play times in the first period in the f0 detection
> >>
> >> Use standard unit suffixes for known units (e.g. time).
> >
> > While the datasheet doesn't mention any time unit, the value is used to
> > calculate the f0_trace_ms variable (which is milliseconds) but the
> > result also depends on the awinic,f0-preset value, so it's not a raw
> > time value.
>
> I see, ok.
>
> >
> >>
> >>> +
> >>> + awinic,f0-detection-wait-time:
> >>> + $ref: /schemas/types.yaml#/definitions/uint32
> >>> + description: Waveform wait times in the f0 detection
> >>
> >> Ditto.
> >>
> >>> +
> >>> + awinic,f0-detection-repeat:
> >>> + $ref: /schemas/types.yaml#/definitions/uint32
> >>> + description: Repeat times in the f0 detection
> >>> +
> >>> + awinic,f0-detection-trace:
> >>> + $ref: /schemas/types.yaml#/definitions/uint32
> >>> + description: Drive waveform play times in the second period and later in the f0 detection
> >>> +
> >>> + awinic,boost-debug:
> >>> + $ref: /schemas/types.yaml#/definitions/uint8-array
> >>> + minItems: 3
> >>> + maxItems: 3
> >>> + description: Values for BSTDBG1-3 registers
> >>
> >> Do not encode device programming model (registers) into the binding. You
> >> need to define it as a property related to hardware itself, not its
> >> registers (e.g. boost value in mV).
> >
> > Unfortunately I couldn't figure the meaning for this and the two values
> > below.
> >
> > The datasheet doesn't mention these registers at all and the downstream
> > driver doesn't do anything meaningful with them (other than setting them)
> > nor has any comment to indicate what they do.
> > In the datasheet there's only BSTDBG4 mentioned where bits [5:1] mean
> > PVDD output voltage setting so for these registers it could really be
> > anthing :(
> >
> > Maybe someone with more knowledge about LRAs might be able to decipher
> > what tset and r_spare is at least? I unfortunately didn't manage.
>
> Do you have to define them in such case in DT? Maybe it should be part
> of driver?
As these parameters are part of the dts downstream, I assume they differ
per board or actual LRA used.
But I also found other downstream dts examples on github (e.g.
awinic,aw8697_haptic) and they also seemed to use the same values for
these couple of registers (r_spare, tset and bstdbg). Maybe I can gather
more info but it's unlikely I'll be able to get a concrete answer..
Regards
Luca
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-11 15:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-08 11:53 [PATCH 1/3] dt-bindings: input: Add bindings for Awinic AW8695 haptics Luca Weiss
2022-04-08 11:53 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Add " Luca Weiss
2022-04-08 19:49 ` kernel test robot
2022-04-08 15:05 ` [PATCH 1/3] dt-bindings: input: Add bindings for Awinic " Krzysztof Kozlowski
2022-04-11 8:15 ` Luca Weiss
2022-04-11 12:52 ` Krzysztof Kozlowski
2022-04-11 15:11 ` Luca Weiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).