From patchwork Wed Feb 13 12:32:48 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: 158208 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp15887jaa; Wed, 13 Feb 2019 04:34:26 -0800 (PST) X-Google-Smtp-Source: AHgI3IbCARTSHA4Oonp5QhLYDUxicN3kcLiO6N2bScVsVu/f9YzAABU/yWzr/y9wF2n1Qm8Zq66P X-Received: by 2002:a63:b105:: with SMTP id r5mr275817pgf.442.1550061266514; Wed, 13 Feb 2019 04:34:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550061266; cv=none; d=google.com; s=arc-20160816; b=B4ay5Zcm4mJN3+H5Al/hICLprbledqwmDqiE8rWCfZhzftLJOq894J7B4sLJQR0f93 +qbKklIpvlgEqrtVJ6mXHHploYXeYWzeusFAj0LDuWPBqmllwqeXp08+FWO3IDRf1dig 8qr3Z6KRki7yY3c68kC0WDNz0BA3CzrgMH96m3YNmIwjfmk3O4PVjAFn+/ygWlrMN1i9 4Gcv/+RIeaCzwWURKx93FNRZH3VkKV0UotsnK/SY562M7RsMpvhJQt2S/edbDY2QNHcF kywri18XF6bOJZCSbLhQ0NxB0Ee1KVlKc8LE6U18PA1SkTN85Wm87Hl1wqpxk3hIStyP NxcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=1Ftil2JC2XMfueJ0xbXmoE9WbLO/vJyO48RDROHSDf0=; b=H58Ozn/33f2JdLN3YyQlhga0JZrPjUj/Tw81Ow6Algwqap9DA+Siksxvj73T9p56Ro 7J4JcPboUkSz8oqiaZRpmMt6n5YrgLeYlnJNPvv9+UqSMQW4kgsBV0bivQg4hJS9T0dt FeQnvkbqwGFOaC8NWJSRckNnHuHcFQKgVCwLR5HVw+aHFA3qPTE+XZA/s0Bu495fFS+J 8TN+u/b4PLKhBK9phQp4rv0Et/1J8Jt1FiUPtsrjJRuk9epBqmknvFbGLdBWGGBZknXk ghJfqzU05ZyBpD28QQVKN0cHDM09uJnG9GrQbUyFd1D3MeJ6Hhu8+4iUha+alsx7wqIQ 0EKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OSoR2YWH; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si15815528plr.128.2019.02.13.04.34.26; Wed, 13 Feb 2019 04:34:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OSoR2YWH; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392176AbfBMMeZ (ORCPT + 7 others); Wed, 13 Feb 2019 07:34:25 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38453 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392170AbfBMMeY (ORCPT ); Wed, 13 Feb 2019 07:34:24 -0500 Received: by mail-pg1-f194.google.com with SMTP id g189so1076165pgc.5 for ; Wed, 13 Feb 2019 04:34:24 -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=1Ftil2JC2XMfueJ0xbXmoE9WbLO/vJyO48RDROHSDf0=; b=OSoR2YWHmdDR0TDR0DDK+/GdBK1YYrgUQhsHJFLsbFRkAFflM/s+JBorKv1keFVe/g G3WqTYVQfjWh428+yj8hIUKf2o3TfTSpJNrICx6PEjLtFAOzY40uXayS5vPSWgLb12zK 6x97NWMknbiZgNm8oqbwQMRaYGzrbXcNfsU+owOiAkuJaiqpkOKejjmRPS2fpaC/+p46 xGjrBfLDHT3bsvLpb28JPjDNEkm7QsmsT4fUuKpYkaOcULj6FsBH9EGukBiRmarVCvQd AoW/FRr/i4aFl0KXtniSeunNac6cBvKh3GDVOWdvFtXTjJK9dlJIKyTpXW7bzq4S9KfE vOjA== 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=1Ftil2JC2XMfueJ0xbXmoE9WbLO/vJyO48RDROHSDf0=; b=fHTWc6m+cRrsmtsmMEhAYr55jl5S5avfkrEKxbNmxs61+cuFKRUFzGiIAOyn/LFQwb kAZrgVXDpNS56CtgX9rjuRtKE0NsEk6Wg+h1Ld4da2C8Or2OY9DoK+LFmztxIURgvIWH BO6YVQFqfUwdX4ZiuqeVXngsyN2BGwIZn3VifD4pJ4veXa1RFIWc0mc+f2FuxTTtLefZ tlJ0J1mD1ftlU2b0jLXrJvXPVjPxldrhCMwSkUJD0+e/Ons0+qsw+vG6u9vg2kb0sefJ VvEnobjjXK40rhYVYsFHe8X6blubiqrcztOnnam5ffecHpjs66exmix0eWa5bNjKLAq1 lSmA== X-Gm-Message-State: AHQUAuYPLAqHJqgYqSlIjzmWNSfH3Edh3Xqk7N/7r0SECSAI1bvgPwQ1 i/cUGRyzX925aVqukUjYaFNalg== X-Received: by 2002:a65:6294:: with SMTP id f20mr293397pgv.174.1550061263973; Wed, 13 Feb 2019 04:34:23 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id l5sm21223640pgl.51.2019.02.13.04.34.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Feb 2019 04:34:23 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de Cc: olof@lixom.net, orsonzhai@gmail.com, zhang.lyra@gmail.com, devicetree@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH v2 4/5] arm64: dts: sprd: Add SC27XX fuel gauge device Date: Wed, 13 Feb 2019 20:32:48 +0800 Message-Id: <46be35679912ffa446d67bb9b81f0cee065c1ca2.1550060544.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(+) -- 1.7.9.5 diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index dbf6242..4a79ddf 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,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>;