cm36283.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. Capella cm36283 L/P sensor
  2. Required properties:
  3. - compatible : Should be "capella,cm36283".
  4. - reg : i2c slave address of the device.
  5. - interrupt-parent : Parent of interrupt.
  6. - interrupts : L/P sample interrupt to indicate new data ready.
  7. - vdd-supply : Power supply needed to power up the device.
  8. - vio-supply : IO power supply needed for IO and I2C.
  9. - capella,interrupt-gpio : The gpio pin for the interrupt.
  10. - capella,levels : The adc value for light sensor to trigger different light level.
  11. - capella,ps_close_thd_set : The threshold adc value for proximity sensor to trigger close interrupt.
  12. - capella,ps_away_thd_set: The threshold adc value for proximity sensor to trigger away interrupt.
  13. - capella,ls_cmd : The initial value to configure cm36283 ALS_CONF register.
  14. - capella,ps_conf1_val : The initial value to configure cm36283 PS_CONF1 register.
  15. - capella,ps_conf3_val : The initial value to configure cm36283 PS_CONF3 register.
  16. Optional properties:
  17. - capella,use-polling : Property to specify if using polling instead of interrupt for adc value report.
  18. Example:
  19. capella@60 {
  20. compatible = "capella,cm36283";
  21. reg = <0x60>;
  22. interrupt-parent = <&msmgpio>;
  23. interrupts = <80 0x2>;
  24. vdd-supply = <&pm8110_l19>;
  25. vio-supply = <&pm8110_l14>;
  26. capella,use-polling;
  27. capella,interrupt-gpio = <80>;
  28. capella,levels = <0x0A 0xA0 0xE1 0x140 0x280 0x500 0xA28 0x16A8 0x1F40 0x2800>;
  29. capella,ps_close_thd_set = <0xa>;
  30. capella,ps_away_thd_set = <0x5>;
  31. capella,ls_cmd = <0x44>; /* PS_IT=160ms, INT_PERS=2*/
  32. capella,ps_conf1_val = <0x0006>; /*CM36283_PS_ITB_1_2 | CM36283_PS_DR_1_40| CM36283_PS_IT_1T | CM36283_PS_PERS_2 | CM36283_PS_RES_1*/
  33. capella,ps_conf3_val = <0x3010>; /* CM36283_PS_MS_NORMAL | CM36283_PS_PROL_255 | CM36283_PS_SMART_PERS_ENABLE, */
  34. };