devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND v4 0/3] Add Richtek RT9759 smart cap divider charger support
@ 2023-07-03  8:00 cy_huang
  2023-07-03  8:00 ` [PATCH RESEND v4 1/3] dt-bindings: power: supply: Add Richtek RT9759 smart cap divider charger cy_huang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: cy_huang @ 2023-07-03  8:00 UTC (permalink / raw)
  To: Sebastian Reichel, Krzysztof Kozlowski, Conor Dooley
  Cc: Rob Herring, ChiYuan Huang, Allen Chiang,
	open list:POWER SUPPLY CLASS/SUBSYSTEM and DRIVERS, open list,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

From: ChiYuan Huang <cy_huang@richtek.com>

This patch set is to add Richtek RT9759 smart cap divider charger.

The RT9759 is a high efficiency and high charge current charger.
The efficiency is up to 97.8% when VBAT=4.2V, IBAT=2.5A, and the maximum
charge current is up to 8A. The device integrates smart cap divider topology
with a dual-phase charge pump core and 9 channel high speed ADCs to monitor
the charging process.

Since v4:
- Since it's 2023 now, change date from 2022 to 2023 for source code and ABI.

Since v3:
- Fix 0002 patch title typo (from 'rt9471' to 'rt9759')
- Remove unused R_VAC_OVP range.
- Refer to ABI document, use 'status' to control battery charging, not 'online'
- Refer to ABI document, use 'online' to indicate bus state

Since v2:
- Add Reviewed-by tag for dt-binding patch
- Change ABI document date from Oct 2022 to Nov 2022 and KernelVersion
  from 6.1 to 6.2

ChiYuan Huang (3):
  dt-bindings: power: supply: Add Richtek RT9759 smart cap divider
    charger
  power: supply: Add Richtek RT9759 smart cap divider charger
  Documentation: power: rt9759: Document exported sysfs entries

 .../ABI/testing/sysfs-class-power-rt9759      |  37 ++
 .../bindings/power/supply/richtek,rt9759.yaml |  61 ++
 drivers/power/supply/Kconfig                  |  15 +
 drivers/power/supply/Makefile                 |   1 +
 drivers/power/supply/rt9759.c                 | 613 ++++++++++++++++++
 5 files changed, 727 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-power-rt9759
 create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt9759.yaml
 create mode 100644 drivers/power/supply/rt9759.c


base-commit: a901a3568fd26ca9c4a82d8bc5ed5b3ed844d451
-- 
2.40.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH RESEND v4 1/3] dt-bindings: power: supply: Add Richtek RT9759 smart cap divider charger
@ 2023-03-06  1:12 cy_huang
  0 siblings, 0 replies; 6+ messages in thread
From: cy_huang @ 2023-03-06  1:12 UTC (permalink / raw)
  To: sre, robh+dt, krzysztof.kozlowski+dt
  Cc: cy_huang, allen_chiang, u0084500, linux-pm, linux-kernel,
	devicetree

From: ChiYuan Huang <cy_huang@richtek.com>

Add bindings for the Richtek RT9759 smart cap divider charger.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Since v2
- Add Reviewed-by tag for dt-binding patch
---
 .../bindings/power/supply/richtek,rt9759.yaml      | 61 ++++++++++++++++++++++
 1 file changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/richtek,rt9759.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/richtek,rt9759.yaml b/Documentation/devicetree/bindings/power/supply/richtek,rt9759.yaml
new file mode 100644
index 00000000..04fc6b0
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/richtek,rt9759.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/richtek,rt9759.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Richtek RT9759 Smart Cap Divider Charger
+
+maintainers:
+  - ChiYuan Huang <cy_huang@richtek.com>
+
+description: |
+  The RT9759 is a high efficiency and high charge current charger.
+  The efficiency is up to 97.8% when VBAT = 4.2V, IBAT = 2.5A and the maximum
+  charge current is up to 8A. The device integrates smart cap divider topology
+  with dual phase charge pump core. The ADCs provide input and output voltage,
+  current and temperature information to monitor the whole charging process.
+
+  Datasheet is available at
+  https://www.richtek.com/assets/product_file/RT9759/DS9759-02.pdf
+
+properties:
+  compatible:
+    enum:
+      - richtek,rt9759
+
+  reg:
+    maxItems: 1
+
+  wakeup-source: true
+
+  interrupts:
+    maxItems: 1
+
+  shunt-resistor-micro-ohms:
+    description: Battery current sense resistor mounted.
+    default: 2000
+
+required:
+  - compatible
+  - reg
+  - wakeup-source
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      charger@66 {
+        compatible = "richtek,rt9759";
+        reg = <0x66>;
+        wakeup-source;
+        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_EDGE_FALLING>;
+        shunt-resistor-micro-ohms = <5000>;
+      };
+    };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-13  1:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03  8:00 [PATCH RESEND v4 0/3] Add Richtek RT9759 smart cap divider charger support cy_huang
2023-07-03  8:00 ` [PATCH RESEND v4 1/3] dt-bindings: power: supply: Add Richtek RT9759 smart cap divider charger cy_huang
2023-07-03  8:00 ` [PATCH RESEND v4 2/3] " cy_huang
2023-07-03  8:00 ` [PATCH RESEND v4 3/3] Documentation: power: rt9759: Document exported sysfs entries cy_huang
2023-07-13  1:26 ` [PATCH RESEND v4 0/3] Add Richtek RT9759 smart cap divider charger support ChiYuan Huang
  -- strict thread matches above, loose matches on Subject: below --
2023-03-06  1:12 [PATCH RESEND v4 1/3] dt-bindings: power: supply: Add Richtek RT9759 smart cap divider charger cy_huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).