diff mbox series

[v4,08/10] ARM: dts: samsung: exynos4212-tab3: Add battery node with charge current value

Message ID 20240816-max77693-charger-extcon-v4-8-050a0a9bfea0@gmail.com
State New
Headers show
Series power: supply: max77693: Toggle charging/OTG based on extcon status | expand

Commit Message

Artur Weber Aug. 16, 2024, 8:19 a.m. UTC
This value was verified by comparing register dumps of the MAX77693
charger with on mainline with a downstream kernel under Android; the
value on downstream was set to 1.8 amps when charging with a proper
charger.

Add it to a new battery node and pass it to the MAX77693 charger
so that the fast charge current setting can be used for charging.

Tested-by: Henrik Grimler <henrik@grimler.se>
Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
---
Changes in v2:
- Switched to monitored-battery
---
 arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Sebastian Reichel Aug. 27, 2024, 4:51 p.m. UTC | #1
Hi,

On Fri, Aug 16, 2024 at 12:03:32PM GMT, Krzysztof Kozlowski wrote:
> On 16/08/2024 10:19, Artur Weber wrote:
> > This value was verified by comparing register dumps of the MAX77693
> > charger with on mainline with a downstream kernel under Android; the
> > value on downstream was set to 1.8 amps when charging with a proper
> > charger.
> > 
> > Add it to a new battery node and pass it to the MAX77693 charger
> > so that the fast charge current setting can be used for charging.
> > 
> > Tested-by: Henrik Grimler <henrik@grimler.se>
> > Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> > ---
> > Changes in v2:
> > - Switched to monitored-battery
> > ---
> >  arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 6 ++++++
> >  1 file changed, 6 insertions(+)
> 
> For next version, please split DTS into separate patchset and provide in
> changelog (---) lore link to power supply patchset with bindings. It
> will be easier for Sebastian to apply entire set for psy.

I'm fine with a splitted series of course, but I am also perfectly
fine with applying partial patchsets. I know at least some SoC
maintainers like this style of a combined patch series, since they
basically get an automatic push notification that the dependencies
have been merged. It also makes testing easier of course :)

-- Sebastian
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
index 9bc05961577d..3c905bfedd96 100644
--- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
@@ -159,6 +159,7 @@  charger_reg: CHARGER {
 
 			charger {
 				compatible = "maxim,max77693-charger";
+				monitored-battery = <&battery>;
 
 				maxim,constant-microvolt = <4350000>;
 				maxim,min-system-microvolt = <3600000>;
@@ -300,6 +301,11 @@  submic_bias_reg: voltage-regulator-5 {
 		regulator-max-microvolt = <2800000>;
 	};
 
+	battery: battery {
+		compatible = "simple-battery";
+		constant-charge-current-max-microamp = <1800000>;
+	};
+
 	sound: sound {
 		compatible = "samsung,midas-audio";
 		model = "TAB3";