0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/proximity/ams,as3935.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Austrian Microsystems AS3935 Franklin lightning sensor
0008
0009 maintainers:
0010 - Matt Ranostay <matt.ranostay@konsulko.com>
0011
0012 description:
0013 This lightening distance sensor uses an I2C or SPI interface. The
0014 binding currently only covers the SPI option.
0015
0016 properties:
0017 compatible:
0018 const: ams,as3935
0019
0020 reg:
0021 maxItems: 1
0022
0023 spi-max-frequency:
0024 maximum: 2000000
0025
0026 spi-cpha: true
0027
0028 interrupts:
0029 maxItems: 1
0030
0031 ams,tuning-capacitor-pf:
0032 $ref: /schemas/types.yaml#/definitions/uint32
0033 description:
0034 Calibration tuning capacitor stepping value. This will require using
0035 the calibration data from the manufacturer.
0036 minimum: 0
0037 maximum: 120
0038
0039 ams,nflwdth:
0040 $ref: /schemas/types.yaml#/definitions/uint32
0041 description:
0042 Set the noise and watchdog threshold register on startup. This will
0043 need to set according to the noise from the MCU board, and possibly
0044 the local environment. Refer to the datasheet for the threshold settings.
0045
0046 required:
0047 - compatible
0048 - reg
0049 - spi-cpha
0050 - interrupts
0051
0052 additionalProperties: false
0053
0054 examples:
0055 - |
0056 spi {
0057 #address-cells = <1>;
0058 #size-cells = <0>;
0059
0060 lightning@0 {
0061 compatible = "ams,as3935";
0062 reg = <0>;
0063 spi-max-frequency = <400000>;
0064 spi-cpha;
0065 interrupt-parent = <&gpio1>;
0066 interrupts = <16 1>;
0067 ams,tuning-capacitor-pf = <80>;
0068 ams,nflwdth = <0x44>;
0069 };
0070 };
0071 ...