From patchwork Mon Oct 4 20:19:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 12534763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC516C433F5 for ; Mon, 4 Oct 2021 20:25:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA6C56140B for ; Mon, 4 Oct 2021 20:25:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AA6C56140B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZElTzdgHJIGHVDD3/oFvArfpNe9S5/bhOR70+owrOJ4=; b=Gr/qrCD2yVDLcO ppcT1NlXXJkBgsCKR661yTCi/QhS95QlQL0HL1fVrk5CG8ZwUUZGffkIJCOdhXrii97ajkHiUhKSM fdaY/taH8WnvhRHXccmVJvHJrzCnNvx7eoZB1RShfL0KomZNy7GEKzKyzM7LbardDrPqei7Ibbs4o I7tNetaZ1s6BUyyQEVg3A8JKWJsVLq6XWJQ1wV41a9Z5JsECS5jK6FrBTU1i6w7za8K+Xk9NyMX7C /IIRc6iZ0kGpD6mtomKtRnms7UKqLTUv0WfSUDXnNbEhBHkJs7Xla4y0yBurKX4uj+Kap65dQF9AL gW5fW/sLtZEdkgGhx6Mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXUU0-007xlm-52; Mon, 04 Oct 2021 20:22:44 +0000 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXUTE-007xbU-UG for linux-arm-kernel@lists.infradead.org; Mon, 04 Oct 2021 20:21:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1633378912; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=ea+Sy+mMXz74lRddtGM5fpGU44ERmjDH2rPdXRR4quU=; b=W8qn4Q0EyDg8OJa1LBVIsCFsMtKm+SPS70fiRed9tXensM0iF1gO/Jo0GzUAruEqfY xzu8GVgN37TO1IfnlJNaXfvuwPgGn1WCvjXmxvQGfhLMoM6RekEMn8AElxSxgY/6WRMM gWoot1ZRBtK0FhILSyDP9N+jGZkK4vzw+1CD6Ne+BE6knbDCjNYrTGaplrsaYh+GJhZb yUOU6LlWyIt/aLzw6fcmYfAzesQL39U7hGlh1xGNz5VVjDgmXLavyUpkVBNUc+4jxVOl Y+XkPNsUuvrVC0cGcZnj708YDdf0QY+/NfRgTbunJ2MDhiyAHwVEtHEAcxz50vFxxbHT RsLg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXTbAOHjRHIhr2eFePxBA=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.33.8 DYNA|AUTH) with ESMTPSA id 301038x94KLpKQp (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 4 Oct 2021 22:21:51 +0200 (CEST) From: Stephan Gerhold To: Bjorn Andersson Cc: Andy Gross , linux-arm-msm@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Stephan Gerhold Subject: [PATCH v2 05/15] arm64: dts: qcom: msm8916-samsung-serranove: Add rt5033 battery Date: Mon, 4 Oct 2021 22:19:11 +0200 Message-Id: <20211004201921.18526-6-stephan@gerhold.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004201921.18526-1-stephan@gerhold.net> References: <20211004201921.18526-1-stephan@gerhold.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211004_132157_150009_D462A8AA X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Like the Samsung Galaxy A3/A5, the S4 Mini VE uses a Richtek RT5033 PMIC as battery fuel gauge, charger, flash LED and for some regulators. For now, only add the fuel gauge/battery device to the device tree, so we can check the remaining battery percentage. The other RT5033 drivers need some more work first before they can be used properly. Signed-off-by: Stephan Gerhold --- Changes in v2: None. --- .../dts/qcom/msm8916-samsung-serranove.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index 2280b2e4b09f..3ef00bdc043e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -185,6 +185,21 @@ imu@6b { }; }; +&blsp_i2c4 { + status = "okay"; + + battery@35 { + compatible = "richtek,rt5033-battery"; + reg = <0x35>; + + interrupt-parent = <&msmgpio>; + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&fg_alert_default>; + }; +}; + &blsp_i2c5 { status = "okay"; @@ -371,6 +386,14 @@ l18 { }; &msmgpio { + fg_alert_default: fg-alert-default { + pins = "gpio121"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default { pins = "gpio107", "gpio109"; function = "gpio";