Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1768240rda; Tue, 24 Oct 2023 02:41:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtLK9CnOwt5Kt0isKq/BBz08nB+4DY8LdkTu4l4HbqvSKGJvhBnd/I1fgwrbGU7vcM65mL X-Received: by 2002:a17:90a:c303:b0:27c:e826:5038 with SMTP id g3-20020a17090ac30300b0027ce8265038mr8932118pjt.14.1698140475203; Tue, 24 Oct 2023 02:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698140475; cv=none; d=google.com; s=arc-20160816; b=sBnkpAmnkBIwHGJnGXJUE4jn3uGvL9CWs39DzbB3ekFiq7IA29Z5o+js7Py3MK9xHA 8vIa4J83wRAkIoX5hxmysmjFYeQd16eb0qc+3KmqmLyolQCAebh2kCxC7HHfQtdBZMg0 Bh/AhAXC1VfcrrbzFie09Ut2bDqHqVinikrD56YCyKWaVi3ug1UzlIi5IxOh53HUAkyQ i+CCi3uE3jXhqr8Ot6JDSWipvA+hF4/z89JPJkbMQk1kFlXXVmfE65WwAgtnduswxnhs kimGsL09sTSVE0B0c/f/xOcNlFRDJ/cp3XzG3KhB1eevdWhslP7ZKLEsbzTUXjz1s9be q5/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=frYit1tCX9IueSIKea43NzsgcxT/q3hMUvdyieRHGZU=; fh=/hHywkkf/VDsFUdv26PyupvsvAMFP3MiggEzKd4SsNw=; b=ej/0Vp2wJYX6zOZtn00FU6Fe9dtPv9gj50p2Hx8p9nig5eLq92bp40UjGWVx/a0RcA lqHJgegzwd7sm42l6veMroJAvkNErIbQvq9NRASu7JpIDkiS/FX/uH2X1g91Ow/x3q+l pl1OKLj4etqpwsDwS3cmFvOt8tRJJB2+4kU9EjCLjvvAyJN2o36bHOPPaq51umxMvOgl WqGGPsH5Alr4yLZxtvoN1JU7lLpCkNyfzB8ZuvWr7lDG1jMTGJUdlO2NCviKnqcqfLVU 0XFf72FbelBqTnNClODetODQNmWD0sMfYKxFaJ5bYqQ5o6nSV0W7bqHryxmey+g9OBUY otvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=DyZ5ATjG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m9-20020a633f09000000b005a073e0cca1si7846717pga.512.2023.10.24.02.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 02:41:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=DyZ5ATjG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id DA351809FEDE; Tue, 24 Oct 2023 02:41:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234294AbjJXJki (ORCPT + 99 others); Tue, 24 Oct 2023 05:40:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234387AbjJXJk3 (ORCPT ); Tue, 24 Oct 2023 05:40:29 -0400 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63E3F1BCE; Tue, 24 Oct 2023 02:30:07 -0700 (PDT) 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 71434403C2; Tue, 24 Oct 2023 14:29:48 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1698139798; bh=r9TCrD1Taj9N39LOJkMvCUyhLxDk2EU51QorwsqEIP4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DyZ5ATjGay9uJdJWM3VKywt/uGPlWIMw4zPa3vJfAHCVgNTsyXnsYxSv3HVwitcsA JKyxBMgNl7dTDO3ruIt8Bk+3JQdUtGwDcw0Ewi782Sy+kpdCh6mAJ5WZ5SJpBf/3EP rjfhkagGp6CTTAyQK0DBYZYgg4ptRUJdrTQXnrqqpHT7VjH2egs0zOWePUEhTd0lzy 8w3X3D5ft3ZJCYxjzTm+sxvBDfiidtGvl3tN30vlD3QMUVl8v7SEPSGZ94S+HNbL59 +7Ao8SoAHoVbFxGevR9HeifBvmCdVEeYN3vaqeDvu3n6bwxEO5BtGkEgncy9WRVUY5 vJY1fCrCwGTxg== MIME-Version: 1.0 Date: Tue, 24 Oct 2023 14:29:48 +0500 From: Nikita Travkin To: Konrad Dybcio Cc: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Stephen Boyd , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v2 2/3] arm64: dts: qcom: pm8916: Add BMS and charger In-Reply-To: <3dff444b-c439-4c40-9d21-1e390f449840@linaro.org> References: <20231023-pm8916-dtsi-bms-lbc-v2-0-343e3dbf423e@trvn.ru> <20231023-pm8916-dtsi-bms-lbc-v2-2-343e3dbf423e@trvn.ru> <3dff444b-c439-4c40-9d21-1e390f449840@linaro.org> Message-ID: X-Sender: nikita@trvn.ru Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 02:41:03 -0700 (PDT) Konrad Dybcio писал(а) 24.10.2023 13:34: > On 10/23/23 08:20, Nikita Travkin wrote: >> 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", > So, both the charger and the USBIN driver use the same irq? :/ > AFAIU the usbin extcon driver pretty much just tracks the state of the IRQ to report extcon. It happens to assume the same part of the pmic though, yes, which also means there will be no user that would enable both charger and vbus extcon, since charger driver provides this functionality as well. Nikita > Konrad