bq24190.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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/bq24190.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: TI BQ2419x Li-Ion Battery Charger
  8. maintainers:
  9. - Sebastian Reichel <sre@kernel.org>
  10. allOf:
  11. - $ref: power-supply.yaml#
  12. properties:
  13. compatible:
  14. enum:
  15. - ti,bq24190
  16. - ti,bq24192
  17. - ti,bq24192i
  18. - ti,bq24193
  19. - ti,bq24196
  20. - ti,bq24296
  21. - ti,bq24297
  22. reg:
  23. maxItems: 1
  24. interrupts:
  25. maxItems: 1
  26. ce-gpios:
  27. description:
  28. Active low Charge Enable pin. Battery charging is enabled when
  29. REG01[5:4] = 01 and CE pin is Low. CE pin must be pulled high or low.
  30. maxItems: 1
  31. usb-otg-vbus:
  32. $ref: /schemas/regulator/regulator.yaml#
  33. description: |
  34. Regulator that is used to control the VBUS voltage direction for
  35. either USB host mode or for charging on the OTG port
  36. ti,system-minimum-microvolt:
  37. description: |
  38. when power is connected and the battery is below minimum system voltage,
  39. the system will be regulated above this setting.
  40. omit-battery-class:
  41. type: boolean
  42. description: |
  43. If this property is set, the operating system does not try to create a
  44. battery device.
  45. monitored-battery:
  46. description: |
  47. phandle to a "simple-battery" compatible node.
  48. This property must be a phandle to a node using the format described
  49. in battery.yaml, with the following properties being required:
  50. - precharge-current-microamp: maximum charge current during precharge phase
  51. (typically 20% of battery capacity).
  52. - charge-term-current-microamp: a charge cycle terminates when the battery voltage is
  53. above recharge threshold, and the current is below this
  54. setting (typically 10% of battery capacity).
  55. required:
  56. - compatible
  57. - reg
  58. - interrupts
  59. additionalProperties: false
  60. examples:
  61. - |
  62. #include <dt-bindings/gpio/gpio.h>
  63. #include <dt-bindings/interrupt-controller/irq.h>
  64. bat: battery {
  65. compatible = "simple-battery";
  66. precharge-current-microamp = <256000>;
  67. charge-term-current-microamp = <128000>;
  68. };
  69. i2c {
  70. #address-cells = <1>;
  71. #size-cells = <0>;
  72. charger@6a {
  73. compatible = "ti,bq24190";
  74. reg = <0x6a>;
  75. interrupt-parent = <&gpiochip>;
  76. interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
  77. monitored-battery = <&bat>;
  78. ti,system-minimum-microvolt = <3200000>;
  79. usb_otg_vbus: usb-otg-vbus { };
  80. };
  81. };