From mboxrd@z Thu Jan 1 00:00:00 1970 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 D8E9AC7EE23 for ; Fri, 26 May 2023 21:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230326AbjEZVjw (ORCPT ); Fri, 26 May 2023 17:39:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242775AbjEZVjr (ORCPT ); Fri, 26 May 2023 17:39:47 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8AF8DF for ; Fri, 26 May 2023 14:39:45 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f6094cb2ebso8561885e9.3 for ; Fri, 26 May 2023 14:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685137184; x=1687729184; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Fr38gHrovEqvIDVjmJUcVz1yHKs2a68amocFg0XW5+I=; b=mz6LhGw+L2b0oy3zfwNffZyMgRGm9NTPoy9n3vmtvsi6I6X2OPbTFsn16Buj+rejy/ Cl7n2yFtUdwBry6q/owM30XjthCsMRRiSQzo1b5UY67Uh1drhST2zZN+8mcOOa3OCMaY nHlLgHqYIafBxn6n/RAmvfOgoIu9B1QzXshPZA1Y1F4ag79LNriTaS8uspFNLio43U0b e0yuR1W123rZQ8hFiHdfMJuU2TbSSkr7nMAiC4NaDlYjmdhCxfU5yWMPJQ6RKOXGp8ue OddpvLlaCzmVC8dgFq3UPcFOG7fwZ5aNskTrsMrdyFJQ04f25Crstlgh+m3lZe3FNDhc laBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685137184; x=1687729184; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fr38gHrovEqvIDVjmJUcVz1yHKs2a68amocFg0XW5+I=; b=JEgLoIYKsXbTjUupDPH5ETkkYXR9JudDE3WMaNNU3bjC94u13PcEMD82LLh6gYXt8m xybRXCyGADIm/S0qZZ0CW0o2pUDRQLmq4QeFTOovhpmgKBH9DKhMgmQD6A2bri2U/OhW EM4O0KuvxxP9dRZ/YdpQvJIHe1E1JWIZlHDqvPxpgi+Q/kmT36+jTq7zEB3u2UzQWoAJ 9NAYDSUvfXGuFCNyaNWNqTjI59gJ3PEV28wRyS0j5j9pq3Zq2Q+GKCGpc+UwMayiPPjX g1LkmzUqXaMvziuuICp2zZ0VrL2MbJ6Oj9wQpgUmzl4v2Fqfg27y2KyEVuvNFPnuns9x MUQw== X-Gm-Message-State: AC+VfDwXlG6MmwKxmwD7JfTqZloyLNnUF4j+N8gpUYx3EH4Io2bBut+i ThYGmF+z17vGAuiEo8OYLmmntg== X-Google-Smtp-Source: ACHHUZ6sb0RcvontvHGTFeeFVWpYWfP6XcpLXn2gIyOgReaEDFza2qOvrIhPKacGPWqidQpHseAAUg== X-Received: by 2002:a7b:c4d9:0:b0:3f6:244:55e3 with SMTP id g25-20020a7bc4d9000000b003f6024455e3mr2177603wmk.35.1685137184171; Fri, 26 May 2023 14:39:44 -0700 (PDT) Received: from [192.168.0.79] (cpc76484-cwma10-2-0-cust274.7-3.cable.virginm.net. [82.31.201.19]) by smtp.gmail.com with ESMTPSA id n26-20020a7bcbda000000b003f60482024fsm6346053wmi.30.2023.05.26.14.39.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 May 2023 14:39:43 -0700 (PDT) Message-ID: <869ed07a-1f9c-75dc-8250-e9533f3d5b88@linaro.org> Date: Fri, 26 May 2023 22:39:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 3/6] arm64: dts: qcom: pmi8998: add charger node To: Konrad Dybcio , Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org References: <20230524-pmi8998-charger-dts-v1-0-f9334afc4505@linaro.org> <20230524-pmi8998-charger-dts-v1-3-f9334afc4505@linaro.org> Content-Language: en-US From: Caleb Connolly In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 26/05/2023 20:46, Konrad Dybcio wrote: > > > On 24.05.2023 19:38, Caleb Connolly wrote: >> Add a node for the smb2 charger hardware found on the pmi8998 pmic >> following the DT bindings. >> >> Signed-off-by: Caleb Connolly >> --- >> arch/arm64/boot/dts/qcom/pmi8998.dtsi | 20 ++++++++++++++++++++ >> 1 file changed, 20 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi >> index be6f60bfc26c..73f51451d21d 100644 >> --- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi >> +++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi >> @@ -9,6 +9,26 @@ pmi8998_lsid0: pmic@2 { >> #address-cells = <1>; >> #size-cells = <0>; >> >> + pmi8998_charger: charger@1000 { >> + compatible = "qcom,pmi8998-charger"; >> + reg = <0x1000>; >> + >> + interrupts = <0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>, >> + <0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>, >> + <0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>, >> + <0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>; >> + interrupt-names = "usb-plugin", >> + "bat-ov", >> + "wdog-bark", >> + "usbin-icl-change"; >> + >> + io-channels = <&pmi8998_rradc 3>, >> + <&pmi8998_rradc 4>; >> + io-channel-names = "usbin_i", "usbin_v"; > Are these hard-wired internally? Yes, features like AICL (automatic input current limiting - where the device pulls more and more current until the input voltage drops) are run autonomously and dont rely on the driver to tell the charger block what the readings are. This is only used to expose the voltage/current values to userspace via the standard psy interface. > > Konrad >> + >> + status = "disabled"; >> + }; >> + >> pmi8998_gpios: gpio@c000 { >> compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; >> reg = <0xc000>; >> -- // Caleb (they/them)