18c2ecf20Sopenharmony_ciAustrian Microsystems AS3935 Franklin lightning sensor device driver 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciRequired properties: 48c2ecf20Sopenharmony_ci - compatible: must be "ams,as3935" 58c2ecf20Sopenharmony_ci - reg: SPI chip select number for the device 68c2ecf20Sopenharmony_ci - spi-max-frequency: specifies maximum SPI clock frequency 78c2ecf20Sopenharmony_ci - spi-cpha: SPI Mode 1. Refer to spi/spi-bus.txt for generic SPI 88c2ecf20Sopenharmony_ci slave node bindings. 98c2ecf20Sopenharmony_ci - interrupts : the sole interrupt generated by the device 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci Refer to interrupt-controller/interrupts.txt for generic 128c2ecf20Sopenharmony_ci interrupt client node bindings. 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciOptional properties: 158c2ecf20Sopenharmony_ci - ams,tuning-capacitor-pf: Calibration tuning capacitor stepping 168c2ecf20Sopenharmony_ci value 0 - 120pF. This will require using the calibration data from 178c2ecf20Sopenharmony_ci the manufacturer. 188c2ecf20Sopenharmony_ci - ams,nflwdth: Set the noise and watchdog threshold register on 198c2ecf20Sopenharmony_ci startup. This will need to set according to the noise from the 208c2ecf20Sopenharmony_ci MCU board, and possibly the local environment. Refer to the 218c2ecf20Sopenharmony_ci datasheet for the threshold settings. 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciExample: 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cias3935@0 { 268c2ecf20Sopenharmony_ci compatible = "ams,as3935"; 278c2ecf20Sopenharmony_ci reg = <0>; 288c2ecf20Sopenharmony_ci spi-max-frequency = <400000>; 298c2ecf20Sopenharmony_ci spi-cpha; 308c2ecf20Sopenharmony_ci interrupt-parent = <&gpio1>; 318c2ecf20Sopenharmony_ci interrupts = <16 1>; 328c2ecf20Sopenharmony_ci ams,tuning-capacitor-pf = <80>; 338c2ecf20Sopenharmony_ci ams,nflwdth = <0x44>; 348c2ecf20Sopenharmony_ci}; 35