From patchwork Sun Mar 29 16:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Heidelberg X-Patchwork-Id: 202682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49CCAC43331 for ; Sun, 29 Mar 2020 16:23:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23A8620733 for ; Sun, 29 Mar 2020 16:23:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728391AbgC2QXP (ORCPT ); Sun, 29 Mar 2020 12:23:15 -0400 Received: from ip-78-45-52-129.net.upcbroadband.cz ([78.45.52.129]:52648 "EHLO ixit.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728330AbgC2QXP (ORCPT ); Sun, 29 Mar 2020 12:23:15 -0400 Received: from localhost.localdomain (227.146.230.94.awnet.cz [94.230.146.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id 8F89E249A1; Sun, 29 Mar 2020 18:23:12 +0200 (CEST) From: David Heidelberg To: Sebastian Reichel , Jonghwa Lee , Chanwoo Choi , Myungjoo Ham , Sumit Semwal , John Stultz , Vinay Simha BN , mika.westerberg@linux.intel.com, ramakrishna.pallala@intel.com, Dmitry Osipenko , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: David Heidelberg , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH 9/9] arm: dts: qcom: apq8064-nexus7: Add smb345 charger node Date: Sun, 29 Mar 2020 18:21:28 +0200 Message-Id: <20200329162128.218584-10-david@ixit.cz> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200329161552.215075-1-david@ixit.cz> References: <20200329161552.215075-1-david@ixit.cz> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add smb345 charger node to Nexus 7 2013 DTS. Proper charger initialization also prevents battery from overcharging. Original author: Vinay Simha BN Signed-off-by: David Heidelberg --- .../boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts index a701d4bac320..9f14216a22f1 100644 --- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts +++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts @@ -3,6 +3,7 @@ #include #include #include +#include / { model = "Asus Nexus7(flo)"; compatible = "asus,nexus7-flo", "qcom,apq8064"; @@ -293,11 +294,30 @@ eeprom@52 { pagesize = <32>; }; - bq27541@55 { + bat: battery@55 { compatible = "ti,bq27541"; reg = <0x55>; + power-supplies = <&power_supply>; }; + power_supply: charger@6a { + compatible = "summit,smb345"; + reg = <0x6a>; + + interrupt-parent = <&tlmm_pinmux>; + interrupts = <23 IRQ_TYPE_EDGE_BOTH>; + + summit,max-chg-curr = <1800000>; + summit,usb-curr-limit = <500000>; + + summit,chip-temp-threshold = <110>; + + summit,enable-usb-charging; + summit,enable-otg-charging; + + summit,enable-chg-ctrl = + ; + }; }; };