From patchwork Wed Feb 13 12:32:47 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: 10809697 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 D3FD36C2 for ; Wed, 13 Feb 2019 12:37:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDB612B3DF for ; Wed, 13 Feb 2019 12:37:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1DC12CF0D; Wed, 13 Feb 2019 12:37:15 +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 44DF22B3DF for ; Wed, 13 Feb 2019 12:37:15 +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=MC64kBcEUr385xBCR5+Mu+OStJGBob14eGQeIlXRXU0=; b=K3pG6XCPiJwlMjywStEatV2rN1 Nb/3PEZtSdTn5z1befaURoGpEYojyuCpz8Nvwf0xeBtsQJwlCWi9S35lEWkowRk65LAbOy845CYiY hwEmeFpjhJDBVDflTIKe7MD7nipGxlQf6NIAWBCJ+ywPTOwfscD9+xabiR1RTXmZL62jtM5n+K8dD VJbGDY4gnb4NYFKY/uhhKWm0FtWLEi5YNo8N830S6+2U5Ct1U06r2THml1JXrGaNYmcCFZsWttwrh QOFk/A87LgXSjCbW1jLO3iGaZALSXKxhZfpwklmx9pRgKgm1fWtYCLmj5Tht7bivo6U9XM/BA2qhF JH3iGeSg==; 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 1gttmq-0008Mz-OJ; Wed, 13 Feb 2019 12:37:12 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gttk4-000660-Ex for linux-arm-kernel@lists.infradead.org; Wed, 13 Feb 2019 12:34:22 +0000 Received: by mail-pf1-x441.google.com with SMTP id b7so1077715pfi.8 for ; Wed, 13 Feb 2019 04:34:20 -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=FGaARlyO45jSVlRCo3Ba46kwztIqiQvxEWOsLPfUyBY=; b=tmteZ4Yadx1Xj9sG8FjJzb/XQPKilq9yCsNYjoVZLRWUeNlKFBj20Hj8lf4izmYo+Y bbeGCWqccyS9rQx2mLdyJdaEyxg9LQoJHkArA1j4+WFLIBkZ/KsWvN4ODiaQxNttHHkR EwMAQ79vWNIuNG+PBfqs86YTYnu68D6h2ZruC0dK3pdyx7t9OTXKx+SzPO0DDz3kPl7X Pl9ZnKlNAzcHzZatc7X9UWT1XsN3zg5o6jD0fqONbJ4Rhm8+a5ZizaCaK1lwGBmReHOj IY4QGtiQ/igG6Lco8H4XRwozAfMo9moQS56Kiu8zFudHq+QrCqC3OnbFRLQlPQSC4Sml +nEg== 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=FGaARlyO45jSVlRCo3Ba46kwztIqiQvxEWOsLPfUyBY=; b=cg2DSI4MG11z6EZzo/7sugdkqiOGepAEBGMUA7U2Xkelmy7j/XTDaUHldGXae/ySgd eXoWZBIEud8wTpa13qlBeQpxX2/C+WQowkDfDd+OpL0JhkDoqBKYJOecjYTb/oFE1ZHg oB9dZUJnuK8Ra/gOZTrIgHtCWp3YXCFouAv/h3NjeOPPZZsLofxQBMxFwRjjTTAQNyI0 MfDLEr0XN/tchoLMJPhG6wGmiF26c0OmEUP7/+UPjnFBmHwWPpPA+b4ZPEiCzS0uLOJN mWt/8ZKa8w523rM/lySAkoDCxPXmkrdtki9y+0GrZitbVoXjBc6Ka3APk6AgihNzeqNA Z+OQ== X-Gm-Message-State: AHQUAuYxpmCUgiB2pK4l2pXZeWXClEWbZRiQB3uqY7aimf+IHr/347oY TqewXcwZTRKJ6FRKACt8dWlDGw== X-Google-Smtp-Source: AHgI3IZrWYzG9huHS10ehbGpwHIHSv79LI09Vcrf45ydQgH291PARN3sX4S/vYIcLE4vYgUdlpfxRw== X-Received: by 2002:a63:d347:: with SMTP id u7mr232319pgi.383.1550061259786; Wed, 13 Feb 2019 04:34:19 -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.15 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Feb 2019 04:34:19 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de Subject: [PATCH v2 3/5] arm64: dts: sprd: Add SC2731 charger device Date: Wed, 13 Feb 2019 20:32:47 +0800 Message-Id: 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-20190213_043420_720213_E9581AC7 X-CRM114-Status: UNSURE ( 9.23 ) 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, baolin.wang@linaro.org, zhang.lyra@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org, arm@kernel.org, olof@lixom.net, orsonzhai@gmail.com, 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 charger device node and related battery node for SC2731 PMIC. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 6 ++++++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index a2edc25..dbf6242 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -17,6 +17,12 @@ #address-cells = <1>; #size-cells = <0>; + charger@0 { + compatible = "sprd,sc2731-charger"; + reg = <0x0>; + monitored-battery = <&bat>; + }; + led-controller@200 { compatible = "sprd,sc27xx-bltc", "sprd,sc2731-bltc"; reg = <0x200>; diff --git a/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts b/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts index 3bd18e3..2a963bd 100644 --- a/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts +++ b/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts @@ -41,6 +41,22 @@ #size-cells = <2>; ranges; }; + + bat: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <1900000>; + charge-term-current-microamp = <120000>; + constant_charge_voltage_max_microvolt = <4350000>; + internal-resistance-micro-ohms = <250000>; + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, + <4022000 85>, <3983000 80>, <3949000 75>, + <3917000 70>, <3889000 65>, <3864000 60>, + <3835000 55>, <3805000 50>, <3787000 45>, + <3777000 40>, <3773000 35>, <3770000 30>, + <3765000 25>, <3752000 20>, <3724000 15>, + <3680000 10>, <3605000 5>, <3400000 0>; + }; }; &uart0 {