From patchwork Thu Apr 28 10:42:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 567410 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB054C4167B for ; Thu, 28 Apr 2022 10:43:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343899AbiD1KqO (ORCPT ); Thu, 28 Apr 2022 06:46:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245401AbiD1KqL (ORCPT ); Thu, 28 Apr 2022 06:46:11 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 987EC8594D for ; Thu, 28 Apr 2022 03:42:54 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id gh6so8796013ejb.0 for ; Thu, 28 Apr 2022 03:42:54 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=eVrG7ytRhvfMLwg4sL6jbIdDhYj5gKeUGxhEwn4Bejk=; b=BJXlGK81Gi71Z8HxoEnY11K+gDOzQVNHqhtuUdEI8MGf68sHJf+x768slqQyn/S9+k iy1lDOkc1p3T4q9qa9V9Q10QQ5LBa9xudCJaVZBztiEy26LfiyjDRCO1rdrQTLzYmm2s mk3ffQ8YvBTwSzeP1rSXOljFCx0xNzu0/t1NQcz+Yt5FC4zWLRTgv9fHaOhJZScXwNoQ nUkkYbRoAzQbgodD7ONX4+jOvJtB2wQZeapWoFs+AhVRoaVhvpf5GZv/Eg3AebW8z7me f/dQHPs+Jx6tMj9vDgFTEhAcscAn2vDRMKSsKKY+kQBsrZjxExyBT8GoMhoEJW9dpjf4 eovQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eVrG7ytRhvfMLwg4sL6jbIdDhYj5gKeUGxhEwn4Bejk=; b=uZxz+qpdea2DUNAZHd+wt+cinlLqYi8PhTJa/ZTD4xTVd5X7yLfmAu7FG66+bgGbgb zvvq6SdVZKW7SSR1ZX3DjShH28+pKGZbnSkM9q5f+cWUz8+4VpjefyPaIzCoQi61RBs9 RqA8dlga0+TsNQpiP5vT1Sfecid1daDfwN51JI8mit+pzljnf/0uxtEFlKqAo8gmzHfl Im25mPLPsImv+mt2SyiMNaZMbiBycirpM0xr+zpE3kY9WEwS+29xlGBSxFmsC4679Z04 0huAES+gB+4w5WilLuLnXz3V2C7yMChrX48IBb/YeNjei/RhYE0KbiQQsdkLHNpPdwfE G5EA== X-Gm-Message-State: AOAM531xgifFeYdafp0Yqa1S3l9e8+Sd+DvrSnYH2Sur6fDlkriTlQyq OwJOCL8eXDFBUAjGun9D1R8SsQ== X-Google-Smtp-Source: ABdhPJzqQ4xoq3ewwa2SFLN6+Qifk+2YjdCez3ZVLT7Mv4oKmLqYRUYKBKSzP6eNxb+f5xRpRHg7wg== X-Received: by 2002:a17:906:804b:b0:6f3:8d78:ffa8 with SMTP id x11-20020a170906804b00b006f38d78ffa8mr20612885ejw.588.1651142573217; Thu, 28 Apr 2022 03:42:53 -0700 (PDT) Received: from localhost.localdomain (cpc78119-cwma10-2-0-cust590.7-3.cable.virginm.net. [81.96.50.79]) by smtp.gmail.com with ESMTPSA id mf1-20020a1709071a4100b006f39f556011sm4982583ejc.125.2022.04.28.03.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 03:42:52 -0700 (PDT) From: Caleb Connolly To: caleb.connolly@linaro.org, Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: Amit Pundir , Sumit Semwal Subject: [PATCH v2 5/6] arm64: dts: qcom: sdm845-xiaomi-beryllium enable pmi8998 charger Date: Thu, 28 Apr 2022 11:42:32 +0100 Message-Id: <20220428104233.2980806-6-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220428104233.2980806-1-caleb.connolly@linaro.org> References: <20220428104233.2980806-1-caleb.connolly@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Enable the smb2 charger driver and add a battery node to report the battery stats correctly. Signed-off-by: Caleb Connolly --- .../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts index b3b6aa4e0fa3..1a5e127d7a43 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts @@ -109,6 +109,14 @@ rmtfs_mem: memory@f6301000 { }; }; + battery: battery { + compatible = "simple-battery"; + + charge-full-design-microamp-hours = <4000000>; + voltage-min-design-microvolt = <3400000>; + voltage-max-design-microvolt = <4400000>; + }; + vreg_s4a_1p8: vreg-s4a-1p8 { compatible = "regulator-fixed"; regulator-name = "vreg_s4a_1p8"; @@ -302,6 +310,11 @@ vol_up_pin_a: vol-up-active { }; }; +&pmi8998_charger { + status = "okay"; + monitored-battery = <&battery>; +}; + &pm8998_pon { resin { compatible = "qcom,pm8941-resin";