From patchwork Mon Jan 21 07:38:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10772715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6065A13B4 for ; Mon, 21 Jan 2019 07:40:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FD5229CE4 for ; Mon, 21 Jan 2019 07:40:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4385729CEB; Mon, 21 Jan 2019 07:40:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D96D029CE4 for ; Mon, 21 Jan 2019 07:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tjIwAbOyjbYNJodG4u9bhW7DiK/+VEIzZTi5CC+OxWc=; b=ptV/QLsP2n3ch7HFueuTKwC4k+ 8N5U37NJupo9Jh8mNNOTHpoXk4VojUpP61byxOYyA06qNNpZCEX2v2A5NiR/ouupgqDjG/jutKYg5 Q78DJSLt9n844g3lnJEq/P7Ip5L3sKmPBROkb1sHvlA4nlpneycnwAv0Ck5N8B/90n8zqm0lKq1V5 5oH+FV3uBUy5TFnU+bUAdQysUwwOQFk3B5B+Nd9oc/eyr4aL1YIzGDF7OPBo9zqwpkbFAaK4hOw2Q 293H5QpuEfR61lToCq/AThe+T2+Ez1dQkqbCEIS6tcAR9dQAjkqXZEqbgK2EWJJBrrXoi91sSJodM 3N15t3oA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUCH-0002xP-C9; Mon, 21 Jan 2019 07:40:41 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUBL-0000vd-GH for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2019 07:39:47 +0000 Received: by mail-pl1-x643.google.com with SMTP id e11so9384875plt.11 for ; Sun, 20 Jan 2019 23:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=WBoPfqiD62qTyJHnIBLq11r66Gu0wg7pVtNBOKSgwDA=; b=Gq03+voeUhoaNn1/WdFxKHlzxB7lgh+usqPpa0k3YSSAvc268qEWfw3w701UgteYEX hw0FGqP7PBlt/PdldjvEV+eeasLrF5OnvbajQ1IKtIL6XUfQq6EVX2/WOIApBsQO723B VeDTEqdS9cPQWabO+jhVVaFliQuxwZWcCKeKY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=WBoPfqiD62qTyJHnIBLq11r66Gu0wg7pVtNBOKSgwDA=; b=dEDnmPkbe2afewYzCFTApgJt6nekZVpBFcGcJcBqUgVAd1QXVGaz1eGSxP1fJ+pfCD q5vs0clqoZlB+3HJFZXXTbYi7WlE4SJ20W2yzrnWZesvfuMAYBCIAcdFz23Wz5doTo8q 2SqY8xoYlFi/6ZJywa/RzBqKbGaIp1Vi1xwA6guyTjM1IK/zeLii/j/0hMknaf+f75X6 Hbo6LN5AdSA/GeO+ogPatzPRwsfvul+79TmwoIXFoFmHn0kZxhFan15Iu1pnEts+G7JH vuxSWbs29l2wkSWIzOjMtKw0Ue1mmusaTP1gzfWmBUvy9QIlvbfTpFnzRcgMvFf4zgxv hQhQ== X-Gm-Message-State: AJcUukcL8/op9Gd7gJ02mTyk1CP/uZL1U2dPIe8lTrnv/oaOQ4r/+Fiw HuS56J6ibUWC96yh80klmWL3OX/L5l0YKA== X-Google-Smtp-Source: ALg8bN6Nfvze4fYHv/A8yGMcDY1+zsxKPpIb1rosgM7lsw5yc9e8aGDCxHXbpFgdNRnAmdU33X95yQ== X-Received: by 2002:a17:902:7b91:: with SMTP id w17mr29154224pll.111.1548056382729; Sun, 20 Jan 2019 23:39:42 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id h19sm15583083pfn.114.2019.01.20.23.39.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Jan 2019 23:39:42 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net, orsonzhai@gmail.com, zhang.lyra@gmail.com Subject: [PATCH 4/4] arm64: dts: sprd: Add SC27XX fuel gauge device Date: Mon, 21 Jan 2019 15:38:31 +0800 Message-Id: <4f66af3b47ba241380f8092e08879aca6d7c35b3.1548052878.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190120_233943_996724_45E4F41E X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, arm@kernel.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add Spreadtrum SC27XX fuel gauge device node to calculate the battery capacity. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index b52eaf0..1110d13 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -70,6 +70,11 @@ #size-cells = <1>; hwlocks = <&hwlock 12>; + fgu_calib: calib@6 { + reg = <0x6 0x2>; + bits = <0 9>; + }; + adc_big_scale: calib@24 { reg = <0x24 0x2>; }; @@ -90,6 +95,19 @@ nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; }; + fgu@a00 { + compatible = "sprd,sc27xx-fgu", "sprd,sc2731-fgu"; + reg = <0xa00>; + bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>; + io-channels = <&pmic_adc 3>, <&pmic_adc 6>; + io-channel-names = "bat-temp", "charge-vol"; + monitored-battery = <&bat>; + nvmem-cell-names = "fgu_calib"; + nvmem-cells = <&fgu_calib>; + interrupt-parent = <&sc2731_pmic>; + interrupts = <4>; + }; + vibrator@ec8 { compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator"; reg = <0xec8>;