xref: /linux/Documentation/devicetree/bindings/iio/proximity/ams,as3935.yaml (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1d08a7187SJonathan Cameron# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2d08a7187SJonathan Cameron%YAML 1.2
3d08a7187SJonathan Cameron---
4d08a7187SJonathan Cameron$id: http://devicetree.org/schemas/iio/proximity/ams,as3935.yaml#
5d08a7187SJonathan Cameron$schema: http://devicetree.org/meta-schemas/core.yaml#
6d08a7187SJonathan Cameron
7d08a7187SJonathan Camerontitle: Austrian Microsystems AS3935 Franklin lightning sensor
8d08a7187SJonathan Cameron
9d08a7187SJonathan Cameronmaintainers:
10d08a7187SJonathan Cameron  - Matt Ranostay <matt.ranostay@konsulko.com>
11d08a7187SJonathan Cameron
12d08a7187SJonathan Camerondescription:
13*47aab533SBjorn Helgaas  This lightning distance sensor uses an I2C or SPI interface. The
14d08a7187SJonathan Cameron  binding currently only covers the SPI option.
15d08a7187SJonathan Cameron
16d08a7187SJonathan Cameronproperties:
17d08a7187SJonathan Cameron  compatible:
18d08a7187SJonathan Cameron    const: ams,as3935
19d08a7187SJonathan Cameron
20d08a7187SJonathan Cameron  reg:
21d08a7187SJonathan Cameron    maxItems: 1
22d08a7187SJonathan Cameron
23d08a7187SJonathan Cameron  spi-max-frequency:
24d08a7187SJonathan Cameron    maximum: 2000000
25d08a7187SJonathan Cameron
26d08a7187SJonathan Cameron  spi-cpha: true
27d08a7187SJonathan Cameron
28d08a7187SJonathan Cameron  interrupts:
29d08a7187SJonathan Cameron    maxItems: 1
30d08a7187SJonathan Cameron
31d08a7187SJonathan Cameron  ams,tuning-capacitor-pf:
32d08a7187SJonathan Cameron    $ref: /schemas/types.yaml#/definitions/uint32
33d08a7187SJonathan Cameron    description:
34d08a7187SJonathan Cameron      Calibration tuning capacitor stepping value. This will require using
35d08a7187SJonathan Cameron      the calibration data from the manufacturer.
36d08a7187SJonathan Cameron    minimum: 0
37d08a7187SJonathan Cameron    maximum: 120
38d08a7187SJonathan Cameron
39d08a7187SJonathan Cameron  ams,nflwdth:
40d08a7187SJonathan Cameron    $ref: /schemas/types.yaml#/definitions/uint32
41d08a7187SJonathan Cameron    description:
42d08a7187SJonathan Cameron      Set the noise and watchdog threshold register on startup. This will
43d08a7187SJonathan Cameron      need to set according to the noise from the MCU board, and possibly
44d08a7187SJonathan Cameron      the local environment. Refer to the datasheet for the threshold settings.
45d08a7187SJonathan Cameron
46d08a7187SJonathan Cameronrequired:
47d08a7187SJonathan Cameron  - compatible
48d08a7187SJonathan Cameron  - reg
49d08a7187SJonathan Cameron  - spi-cpha
50d08a7187SJonathan Cameron  - interrupts
51d08a7187SJonathan Cameron
52e91d4021SKrzysztof KozlowskiallOf:
53e91d4021SKrzysztof Kozlowski  - $ref: /schemas/spi/spi-peripheral-props.yaml#
54e91d4021SKrzysztof Kozlowski
55e91d4021SKrzysztof KozlowskiunevaluatedProperties: false
56d08a7187SJonathan Cameron
57d08a7187SJonathan Cameronexamples:
58d08a7187SJonathan Cameron  - |
59d08a7187SJonathan Cameron    spi {
60d08a7187SJonathan Cameron        #address-cells = <1>;
61d08a7187SJonathan Cameron        #size-cells = <0>;
62d08a7187SJonathan Cameron
63d08a7187SJonathan Cameron        lightning@0 {
64d08a7187SJonathan Cameron            compatible = "ams,as3935";
65d08a7187SJonathan Cameron            reg = <0>;
66d08a7187SJonathan Cameron            spi-max-frequency = <400000>;
67d08a7187SJonathan Cameron            spi-cpha;
68d08a7187SJonathan Cameron            interrupt-parent = <&gpio1>;
69d08a7187SJonathan Cameron            interrupts = <16 1>;
70d08a7187SJonathan Cameron            ams,tuning-capacitor-pf = <80>;
71d08a7187SJonathan Cameron            ams,nflwdth = <0x44>;
72d08a7187SJonathan Cameron        };
73d08a7187SJonathan Cameron    };
74d08a7187SJonathan Cameron...
75