xref: /freebsd/sys/contrib/device-tree/Bindings/iio/proximity/as3935.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotAustrian Microsystems AS3935 Franklin lightning sensor device driver
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot	- compatible: must be "ams,as3935"
5*c66ec88fSEmmanuel Vadot	- reg: SPI chip select number for the device
6*c66ec88fSEmmanuel Vadot	- spi-max-frequency: specifies maximum SPI clock frequency
7*c66ec88fSEmmanuel Vadot	- spi-cpha: SPI Mode 1. Refer to spi/spi-bus.txt for generic SPI
8*c66ec88fSEmmanuel Vadot	slave node bindings.
9*c66ec88fSEmmanuel Vadot	- interrupts : the sole interrupt generated by the device
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel Vadot	Refer to interrupt-controller/interrupts.txt for generic
12*c66ec88fSEmmanuel Vadot	interrupt client node bindings.
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel VadotOptional properties:
15*c66ec88fSEmmanuel Vadot	- ams,tuning-capacitor-pf: Calibration tuning capacitor stepping
16*c66ec88fSEmmanuel Vadot	  value 0 - 120pF. This will require using the calibration data from
17*c66ec88fSEmmanuel Vadot	  the manufacturer.
18*c66ec88fSEmmanuel Vadot	- ams,nflwdth: Set the noise and watchdog threshold register on
19*c66ec88fSEmmanuel Vadot	  startup. This will need to set according to the noise from the
20*c66ec88fSEmmanuel Vadot	  MCU board, and possibly the local environment. Refer to the
21*c66ec88fSEmmanuel Vadot	  datasheet for the threshold settings.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel VadotExample:
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel Vadotas3935@0 {
26*c66ec88fSEmmanuel Vadot	compatible = "ams,as3935";
27*c66ec88fSEmmanuel Vadot	reg = <0>;
28*c66ec88fSEmmanuel Vadot	spi-max-frequency = <400000>;
29*c66ec88fSEmmanuel Vadot	spi-cpha;
30*c66ec88fSEmmanuel Vadot	interrupt-parent = <&gpio1>;
31*c66ec88fSEmmanuel Vadot	interrupts = <16 1>;
32*c66ec88fSEmmanuel Vadot	ams,tuning-capacitor-pf = <80>;
33*c66ec88fSEmmanuel Vadot	ams,nflwdth = <0x44>;
34*c66ec88fSEmmanuel Vadot};
35