[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250523-b4-gs101_max77759_fg-v4-3-b49904e35a34@uclouvain.be>
Date: Fri, 23 May 2025 14:51:46 +0200
From: Thomas Antoine via B4 Relay <devnull+t.antoine.uclouvain.be@...nel.org>
To: Sebastian Reichel <sre@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Dimitri Fedrau <dima.fedrau@...il.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Peter Griffin <peter.griffin@...aro.org>,
André Draszik <andre.draszik@...aro.org>,
Tudor Ambarus <tudor.ambarus@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, Thomas Antoine <t.antoine@...ouvain.be>
Subject: [PATCH v4 3/5] dt-bindings: power: supply: add max77759-fg flavor
From: Thomas Antoine <t.antoine@...ouvain.be>
The Maxim MAX77759 is an IC used to manage the power supply of the battery
and the USB-C. Based on drivers from google, it contains at least a PMIC,
a fuel gauge, a TCPCI and a charger.
Use max77759-fg compatible to avoid conflict with drivers for other
functions.
The Maxim MAX77759 has no non-volatile memory so it doesn't require an
address and instead requires a value for the current sensing resistor.
Keep shunt-resistor-micro-ohms optional for the MAX17201/MAX17205 as it is
not be used at the moment but could be in the future. (e.g. as a default
value to be used in case of nvmem failure)
Signed-off-by: Thomas Antoine <t.antoine@...ouvain.be>
---
.../bindings/power/supply/maxim,max17201.yaml | 42 ++++++++++++++++++++--
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml
index fe3dd9bd5585618e45220c51023391a5b21acfd2..2fb826b4b160eb9abe6604185ac2192447d90b8c 100644
--- a/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml
+++ b/Documentation/devicetree/bindings/power/supply/maxim,max17201.yaml
@@ -9,13 +9,11 @@ title: Maxim MAX17201 fuel gauge
maintainers:
- Dimitri Fedrau <dima.fedrau@...il.com>
-allOf:
- - $ref: power-supply.yaml#
-
properties:
compatible:
oneOf:
- const: maxim,max17201
+ - const: maxim,max77759-fg
- items:
- enum:
- maxim,max17205
@@ -25,11 +23,18 @@ properties:
items:
- description: ModelGauge m5 registers
- description: Nonvolatile registers
+ minItems: 1
+ maxItems: 2
reg-names:
items:
- const: m5
- const: nvmem
+ minItems: 1
+ maxItems: 2
+
+ shunt-resistor-micro-ohms:
+ description: The value of current sense resistor in microohms.
interrupts:
maxItems: 1
@@ -39,6 +44,37 @@ required:
- reg
- reg-names
+allOf:
+ - $ref: power-supply.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - maxim,max17201
+ then:
+ properties:
+ reg:
+ minItems: 2
+ reg-names:
+ minItems: 2
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - maxim,max77759-fg
+ then:
+ properties:
+ reg:
+ maxItems: 1
+ reg-names:
+ maxItems: 1
+ required:
+ - shunt-resistor-micro-ohms
+
unevaluatedProperties: false
examples:
--
2.49.0
Powered by blists - more mailing lists