Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2238306rdb; Mon, 20 Nov 2023 06:05:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEula1KoXfPza13N+f6XQQkh9kVwMVOuZvGMdBALhrXtF3H+InhSba6Sre2QMi6/saSHFi/ X-Received: by 2002:a05:6808:1301:b0:3af:9838:8494 with SMTP id y1-20020a056808130100b003af98388494mr11328249oiv.20.1700489120512; Mon, 20 Nov 2023 06:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700489120; cv=none; d=google.com; s=arc-20160816; b=XOiszDHlk6ynvqMowp456YXDIffFCkCfvAJC0wg2iXSOoPhX9hZcsBda3zCrivRY3d nvrQ9srhL+6XLFws7uq9dFeZ3A3WbYvFLZrEYsrAYCM1yvrSpTqtshvW9wxMYRuwYhQT L1ZwDN+DpwbAQgrfcFRL4eiG3vbilZ6BildWzGTmgkjppd4saSEuy2QEMKq0Jl4XNand NukbvxS3jI1EqUeTs8k0ltweNMEuMUQuZH3Euef7nN/JPi9un9TGqdHPthLN3IeSwmPs k2UqVgwqucbk8X1bzQjZjIwty4FE85w+VNe7eRwuLZ9kLQeJmwfNhtYYvAwicjmwkgNm 6Rrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=gKU2Hb5Ts8ACz6pXE/qz00/JtwGg1ALMTvmhW/lX6v4=; fh=U5mxiWMUuvTRq6alBZlLGQb1SMJA9nVYKnFjYXdNN2o=; b=t999sW4cDVjoPoIKEZ+dCbd6pK9z+eRdvGJHvk0hyKJQPS2r4WRXCHkmaMn+RA/7eh lUbq/jCzQ7Odl+QP4MuS84iBv6Xa/QurIqu/X5DSH0ZbhXnor4E/d2sUkIa3Fq8i9UM/ pKPVv4+5ac+/2xMi/xz5Y4EzpzXrxpfaewo5zawh6DnPq1Mic3myHAy9SY7GrctJI+/c BwbIITG8ku/JHiqMc7Yg/JINNivoK78ZgMNxH1HskD7BRbtQAhsmKLh2Wo1aQwuBWHAZ TluBEyeUAUt98va+I5Kia2p7BguUK04SrkDFp/qpHvqRMYgXtm0iU9EFuYbcL4g4ETrk +mug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=NetaeWoS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id r24-20020a0568080ab800b003ae5cc01b8bsi2831110oij.78.2023.11.20.06.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:05:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=NetaeWoS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A283E80A3666; Mon, 20 Nov 2023 06:05:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233744AbjKTOEk (ORCPT + 99 others); Mon, 20 Nov 2023 09:04:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233626AbjKTOEV (ORCPT ); Mon, 20 Nov 2023 09:04:21 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6FFA10EF; Mon, 20 Nov 2023 06:03:46 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id CE14641C8C; Mon, 20 Nov 2023 19:03:40 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1700489021; bh=cGxQVt+NVbaQIsSjfqmJUKIMf/PR6FSgo/FLAfIdsik=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=NetaeWoSzy6hx0ThcsqTyd88xLdda1hsW7QjBpdxRda1PiaGgxi41LfXu6DEJ7cio 2eoiOAJFn89bUyp/ryBAEq0pBhpkY7juzPRV9302C/pqG/el1jw/B0wmIDJs96bxls rZdVZp/Ku7geSgkr0Q1C0TEurdqhmkw91nmVJYdtrGYdsunMieRuaS2d8Y7tPP9KDP pY5VDKn3/uLSA7ThX5xoAMedNdzEZdjLcG3dK4bJSFKUz1jYEiHs8e39NQuNfj5xsB RlevYlZGDKOk2ivUbg2m53TE22ysCC6779U4V4kZM3VRVz5yr/qDoWmk/kwNhpL7Og OKzbeTpSrFiHA== From: Nikita Travkin Date: Mon, 20 Nov 2023 19:03:04 +0500 Subject: [PATCH v4 2/3] arm64: dts: qcom: pm8916: Add BMS and charger MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231120-pm8916-dtsi-bms-lbc-v4-2-4f91056c8252@trvn.ru> References: <20231120-pm8916-dtsi-bms-lbc-v4-0-4f91056c8252@trvn.ru> In-Reply-To: <20231120-pm8916-dtsi-bms-lbc-v4-0-4f91056c8252@trvn.ru> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Stephen Boyd Cc: ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nikita Travkin X-Developer-Signature: v=1; a=openpgp-sha256; l=2360; i=nikita@trvn.ru; h=from:subject:message-id; bh=cGxQVt+NVbaQIsSjfqmJUKIMf/PR6FSgo/FLAfIdsik=; b=owEBbQKS/ZANAwAIAUMc7O4oGb91AcsmYgBlW2c6wY2c6XqAiTk2FnLRWhwUtpSFzC7/q00Nq OUIcnOCodOJAjMEAAEIAB0WIQTAhK9UUj+qg34uxUdDHOzuKBm/dQUCZVtnOgAKCRBDHOzuKBm/ dafFD/9F1dMePHKR/saUSqP6doyBMFABCcvg46qy03xY3VWDQF/6/hefPTC7sINYtptOf0YXuzN 5Ez25j+mAz+H2Qpt086020crP5NrNAJBxOeWlVLakJKK/L2+b9SKkrfQ6bQZ8Q7kYXtTw62sc3/ Q0aEHN/DTvpsJ6mZCP94HPzfKdkUWs1Eo3RrRzkvptPmXeDtSTzHbM1P/2XWYrejzCbyuTCqL9i mnnlVIamdAM+wYkVO3Fi/uOyfPIIDELvaNdkIf2GPHqxxTx1yusTskYtGPOptKaL5xiOsM2vd5D S750NWieowEX+xds7B2Er4f1kjgz1mD3bBQTq4oHZ2bB1zTd/FWZSKE/OcGWYWdmKchwQrkqwTQ PY3cvyWnoUVrbuM0LtU0dEZ6/EU7FKd7ITTbx4L/FlDmdb8miW3iuYb/mzjrrTYteDt/MKJWNa9 /HcwCd4TkmIqjWh7EpK9spCUG56e8G8H/Ld4+xyPxU1vzIhHu8nQ3VEnAjKn24LC0b8GeAZ+bE+ TX703tEQJNxIhZQb8cttY4mYVRvZ4T5YOvYaeEjwzYac89Yd9w/MLHe+4DxE+tnEXmimW6MTERz hpH3AzVEyo+10AvBXcP4s6lpobMFHiOGTw/UrrIAIPnpbbIUSQaXu6fCJaqjL/yCiE0LhNYv6lc cs+Cz3/xXZzEsCA== X-Developer-Key: i=nikita@trvn.ru; a=openpgp; fpr=C084AF54523FAA837E2EC547431CECEE2819BF75 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 06:05:04 -0800 (PST) pm8916 contains some hardware blocks for battery powered devices: - VM-BMS: Battery voltage monitoring block. - LBC: Linear battery charger. Add them to the pmic dtsi so the devices that make use of those blocks can enable them. Signed-off-by: Nikita Travkin --- arch/arm64/boot/dts/qcom/pm8916.dtsi | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi index f4de86787743..4b2e8fb47d2d 100644 --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi @@ -41,6 +41,35 @@ watchdog { }; }; + pm8916_charger: charger@1000 { + compatible = "qcom,pm8916-lbc"; + reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>; + reg-names = "chgr", "bat_if", "usb", "misc"; + + interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "vbat_det", + "fast_chg", + "chg_fail", + "chg_done", + "bat_pres", + "temp_ok", + "coarse_det", + "usb_vbus", + "chg_gone", + "overtemp"; + + status = "disabled"; + }; + pm8916_usbin: usb-detect@1300 { compatible = "qcom,pm8941-misc"; reg = <0x1300>; @@ -91,6 +120,25 @@ channel@f { }; }; + pm8916_bms: battery@4000 { + compatible = "qcom,pm8916-bms-vm"; + reg = <0x4000>; + interrupts = <0x0 0x40 0 IRQ_TYPE_EDGE_RISING>, + <0x0 0x40 1 IRQ_TYPE_EDGE_RISING>, + <0x0 0x40 2 IRQ_TYPE_EDGE_RISING>, + <0x0 0x40 3 IRQ_TYPE_EDGE_RISING>, + <0x0 0x40 4 IRQ_TYPE_EDGE_RISING>, + <0x0 0x40 5 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "cv_leave", + "cv_enter", + "ocv_good", + "ocv_thr", + "fifo", + "state_chg"; + + status = "disabled"; + }; + rtc@6000 { compatible = "qcom,pm8941-rtc"; reg = <0x6000>, <0x6100>; -- 2.41.0