devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	David Heidelberg <david@ixit.cz>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	"Bruce E . Robertson" <bruce.e.robertson@intel.com>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Jonghwa Lee <jonghwa3.lee@samsung.com>,
	John Stultz <john.stultz@linaro.org>,
	Vinay Simha BN <simhavcs@gmail.com>,
	linux-tegra@vger.kernel.org
Subject: [PATCH v3 10/10] ARM: tegra: nexus7: Add SMB347 battery charger
Date: Fri, 14 Aug 2020 00:34:09 +0300	[thread overview]
Message-ID: <20200813213409.24222-11-digetx@gmail.com> (raw)
In-Reply-To: <20200813213409.24222-1-digetx@gmail.com>

From: David Heidelberg <david@ixit.cz>

SMB347 is a battery charger controller which is found on the Nexus 7
device.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 .../tegra30-asus-nexus7-grouper-common.dtsi   | 24 ++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi b/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi
index e2d5fbacf9b4..903457292c04 100644
--- a/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi
+++ b/arch/arm/boot/dts/tegra30-asus-nexus7-grouper-common.dtsi
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/input/gpio-keys.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/power/summit,smb347-charger.h>
 #include <dt-bindings/thermal/thermal.h>
 
 #include "tegra30.dtsi"
@@ -919,9 +920,24 @@ nct72: temperature-sensor@4c {
 			#thermal-sensor-cells = <1>;
 		};
 
-		battery@55 {
+		fuel-gauge@55 {
 			compatible = "ti,bq27541";
 			reg = <0x55>;
+			power-supplies = <&power_supply>;
+			monitored-battery = <&battery_cell>;
+		};
+
+		power_supply: charger@6a {
+			compatible = "summit,smb347";
+			reg = <0x6a>;
+
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(V, 1) IRQ_TYPE_EDGE_BOTH>;
+
+			summit,enable-charge-control = <SMB3XX_CHG_ENABLE_PIN_ACTIVE_LOW>;
+			summit,enable-usb-charging;
+
+			monitored-battery = <&battery_cell>;
 		};
 	};
 
@@ -1011,6 +1027,12 @@ backlight: backlight {
 		default-brightness-level = <15>;
 	};
 
+	battery_cell: battery-cell {
+		compatible = "simple-battery";
+		constant-charge-current-max-microamp = <1800000>;
+		operating-range-celsius = <0 45>;
+	};
+
 	/* PMIC has a built-in 32KHz oscillator which is used by PMC */
 	clk32k_in: clock@0 {
 		compatible = "fixed-clock";
-- 
2.27.0


  parent reply	other threads:[~2020-08-13 21:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13 21:33 [PATCH v3 00/10] Summit SMB3xx driver & device-tree Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 01/10] dt-bindings: battery: Add temperature properties Dmitry Osipenko
2020-08-25  2:05   ` Rob Herring
2020-08-13 21:34 ` [PATCH v3 02/10] dt-bindings: power: supply: Add device-tree binding for Summit SMB3xx Dmitry Osipenko
2020-08-25  2:08   ` Rob Herring
2020-08-13 21:34 ` [PATCH v3 03/10] power: supply: Support battery temperature device-tree properties Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 04/10] power: supply: smb347-charger: Use resource-managed API Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 05/10] power: supply: smb347-charger: Implement device-tree support Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 06/10] power: supply: smb347-charger: Support SMB345 and SMB358 Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 07/10] power: supply: smb347-charger: Remove virtual smb347-battery Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 08/10] power: supply: smb347-charger: Replace mutex with IRQ disable/enable Dmitry Osipenko
2020-08-13 21:34 ` [PATCH v3 09/10] ARM: dts: qcom: apq8064-nexus7: Add SMB345 battery charger Dmitry Osipenko
2020-08-13 21:34 ` Dmitry Osipenko [this message]
2020-09-17 10:24   ` [PATCH v3 10/10] ARM: tegra: nexus7: Add SMB347 " Thierry Reding
2020-08-26 14:40 ` [PATCH v3 00/10] Summit SMB3xx driver & device-tree Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200813213409.24222-11-digetx@gmail.com \
    --to=digetx@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=bruce.e.robertson@intel.com \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=john.stultz@linaro.org \
    --cc=jonathanh@nvidia.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=simhavcs@gmail.com \
    --cc=sre@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).