15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/proximity/ams,as3935.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: Austrian Microsystems AS3935 Franklin lightning sensor 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Matt Ranostay <matt.ranostay@konsulko.com> 115def4c47SEmmanuel Vadot 125def4c47SEmmanuel Vadotdescription: 13*aa1a8ff2SEmmanuel Vadot This lightning distance sensor uses an I2C or SPI interface. The 145def4c47SEmmanuel Vadot binding currently only covers the SPI option. 155def4c47SEmmanuel Vadot 165def4c47SEmmanuel Vadotproperties: 175def4c47SEmmanuel Vadot compatible: 185def4c47SEmmanuel Vadot const: ams,as3935 195def4c47SEmmanuel Vadot 205def4c47SEmmanuel Vadot reg: 215def4c47SEmmanuel Vadot maxItems: 1 225def4c47SEmmanuel Vadot 235def4c47SEmmanuel Vadot spi-max-frequency: 245def4c47SEmmanuel Vadot maximum: 2000000 255def4c47SEmmanuel Vadot 265def4c47SEmmanuel Vadot spi-cpha: true 275def4c47SEmmanuel Vadot 285def4c47SEmmanuel Vadot interrupts: 295def4c47SEmmanuel Vadot maxItems: 1 305def4c47SEmmanuel Vadot 315def4c47SEmmanuel Vadot ams,tuning-capacitor-pf: 325def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 335def4c47SEmmanuel Vadot description: 345def4c47SEmmanuel Vadot Calibration tuning capacitor stepping value. This will require using 355def4c47SEmmanuel Vadot the calibration data from the manufacturer. 365def4c47SEmmanuel Vadot minimum: 0 375def4c47SEmmanuel Vadot maximum: 120 385def4c47SEmmanuel Vadot 395def4c47SEmmanuel Vadot ams,nflwdth: 405def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 415def4c47SEmmanuel Vadot description: 425def4c47SEmmanuel Vadot Set the noise and watchdog threshold register on startup. This will 435def4c47SEmmanuel Vadot need to set according to the noise from the MCU board, and possibly 445def4c47SEmmanuel Vadot the local environment. Refer to the datasheet for the threshold settings. 455def4c47SEmmanuel Vadot 465def4c47SEmmanuel Vadotrequired: 475def4c47SEmmanuel Vadot - compatible 485def4c47SEmmanuel Vadot - reg 495def4c47SEmmanuel Vadot - spi-cpha 505def4c47SEmmanuel Vadot - interrupts 515def4c47SEmmanuel Vadot 528bab661aSEmmanuel VadotallOf: 538bab661aSEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 548bab661aSEmmanuel Vadot 558bab661aSEmmanuel VadotunevaluatedProperties: false 565def4c47SEmmanuel Vadot 575def4c47SEmmanuel Vadotexamples: 585def4c47SEmmanuel Vadot - | 595def4c47SEmmanuel Vadot spi { 605def4c47SEmmanuel Vadot #address-cells = <1>; 615def4c47SEmmanuel Vadot #size-cells = <0>; 625def4c47SEmmanuel Vadot 635def4c47SEmmanuel Vadot lightning@0 { 645def4c47SEmmanuel Vadot compatible = "ams,as3935"; 655def4c47SEmmanuel Vadot reg = <0>; 665def4c47SEmmanuel Vadot spi-max-frequency = <400000>; 675def4c47SEmmanuel Vadot spi-cpha; 685def4c47SEmmanuel Vadot interrupt-parent = <&gpio1>; 695def4c47SEmmanuel Vadot interrupts = <16 1>; 705def4c47SEmmanuel Vadot ams,tuning-capacitor-pf = <80>; 715def4c47SEmmanuel Vadot ams,nflwdth = <0x44>; 725def4c47SEmmanuel Vadot }; 735def4c47SEmmanuel Vadot }; 745def4c47SEmmanuel Vadot... 75