cpcap-battery.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Copyright (C) 2021 Sebastian Reichel
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/power/supply/cpcap-battery.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: Motorola CPCAP PMIC battery
  8. maintainers:
  9. - Tony Lindgren <tony@atomide.com>
  10. - Sebastian Reichel <sre@kernel.org>
  11. description: |
  12. Motorola CPCAP is a PMIC found in some mobile phones, e.g.
  13. the Droid 4. This binding describes its battery fuel gauge
  14. sub-function.
  15. allOf:
  16. - $ref: power-supply.yaml#
  17. properties:
  18. compatible:
  19. const: motorola,cpcap-battery
  20. interrupts:
  21. items:
  22. - description: eol interrupt
  23. - description: low battery percentage interrupt
  24. - description: critical battery percentage interrupt
  25. - description: charger detect interrupt
  26. - description: battery detect interrupt
  27. - description: coulomb counter calibration interrupt
  28. interrupt-names:
  29. items:
  30. - const: eol
  31. - const: lowbph
  32. - const: lowbpl
  33. - const: chrgcurr1
  34. - const: battdetb
  35. - const: cccal
  36. io-channels:
  37. items:
  38. - description: battery temperature
  39. - description: battery voltage
  40. - description: battery charge current
  41. - description: battery current
  42. io-channel-names:
  43. items:
  44. - const: battdetb
  45. - const: battp
  46. - const: chg_isense
  47. - const: batti
  48. power-supplies: true
  49. required:
  50. - compatible
  51. - interrupts
  52. - interrupt-names
  53. - io-channels
  54. - io-channel-names
  55. - power-supplies
  56. additionalProperties: false
  57. examples:
  58. - |
  59. cpcap {
  60. battery {
  61. compatible = "motorola,cpcap-battery";
  62. interrupts-extended =
  63. <&cpcap 6 0>, <&cpcap 5 0>, <&cpcap 3 0>,
  64. <&cpcap 20 0>, <&cpcap 54 0>, <&cpcap 57 0>;
  65. interrupt-names =
  66. "eol", "lowbph", "lowbpl",
  67. "chrgcurr1", "battdetb", "cccal";
  68. io-channels = <&cpcap_adc 0>, <&cpcap_adc 1>,
  69. <&cpcap_adc 5>, <&cpcap_adc 6>;
  70. io-channel-names = "battdetb", "battp",
  71. "chg_isense", "batti";
  72. power-supplies = <&cpcap_charger>;
  73. };
  74. };