stk-stk3x1x.txt 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Sensortek stk301x, stk321x and stk331x ambient light/proximity 3-in-1 sensor
  2. Required properties:
  3. - compatible : Should be "stk,stk3x1x".
  4. - reg : i2c slave address of the device.
  5. - interrupt-parent : Parent of interrupt.
  6. - interrupts : Sensor will issue interrupt when preset condition is met,
  7. typically when proximity sensor detect a change on near/far state.
  8. - vdd-supply : Main power supply to power sensor.
  9. - vio-supply : Power supply required to pullup I2C bus.
  10. - stk,irq-gpio : irq gpio which is to provide interrupts to host, same as
  11. "interrupts" node.
  12. - stk,transmittance : Transmittance rate of glass above the ambient light
  13. detection window. The value may not be equal to real transmittance
  14. but just a relative value.
  15. - stk,state-reg : The default setting of state register.
  16. - stk,psctrl-reg : The default setting for proximity sensor.
  17. - stk,alsctrl-reg : The default setting for ambient light sensor.
  18. - stk,ledctrl-reg : The default setting for IR LED.
  19. - stk,wait-reg : The default setting for wait time.
  20. - stk,ps-thdh : High threshold for proximity sensor, sensor will report
  21. "near" if the proximity sensor reading is larger or equal to this
  22. value.
  23. - stk,ps-thdl : Low threshold for proximity sensor, sensor will report
  24. "far" if the proximity sensor reading is larger than this value.
  25. Optional properties:
  26. - stk,use-fir : Boolean to enable light data jitter suppressing FIR filter.
  27. Example:
  28. i2c@f9925000 {
  29. stk@48 {
  30. compatible = "stk,stk3x1x";
  31. reg = <0x48>;
  32. interrupt-parent = <&msmgpio>;
  33. interrupts = <80 0x2>;
  34. vdd-supply = <&pm8110_l19>;
  35. vio-supply = <&pm8110_l14>;
  36. stk,irq-gpio = <&msmgpio 80 0x02>;
  37. stk,transmittance = <500>;
  38. stk,state-reg = <0x00>;
  39. stk,psctrl-reg = <0x71>;
  40. stk,alsctrl-reg = <0x38>;
  41. stk,ledctrl-reg = <0xFF>;
  42. stk,wait-reg = <0x07>;
  43. stk,ps-thdh = <1700>;
  44. stk,ps-thdl = <1500>;
  45. stk,use-fir;
  46. };