Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1845357pxb; Sat, 2 Apr 2022 05:48:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmAtH5L1FWOQGmWLtRvsLsnAYtqt/J/tpJi2N3e6VvqZ13KLdMJoihvMGfElAoAC0P7mGB X-Received: by 2002:a17:90a:7d10:b0:1c9:7939:c70 with SMTP id g16-20020a17090a7d1000b001c979390c70mr16751142pjl.203.1648903700819; Sat, 02 Apr 2022 05:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648903700; cv=none; d=google.com; s=arc-20160816; b=HLaddXY2OC6lwfCTX58d2F4kVKouSQI8UQPCUZldUMwkN2A373dtDdM99odSA43Ng2 6fBd0r4mn3SbFx2OcAtf758OUnM51B9kE/JIKCttqwSMUSNHzdEbMdV9vCUbeCGz15sh 7yy5fjUn3/akQESjsMGPhwF2rhbX1WUZsSHSu3b9zpR/oicsflrQt8IkLRmf0RT15FV6 mvJt1LZapXDFl+lg+FYXYs+afOCvXuId9da8IsfeNSLtHl6RSLxAKjPCe/XnBliQ9c0g KXzG6lyZ8K5h1hkJszwXNOjcZpvidkJLqEmKnS6tESDnqIjcehMCntnCj2EKhrHDezGL Tjpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=W/JwoXAcjqpUeNN5rrXlo11fHlP+fYByEFJ34EyPDQ4=; b=XYPKvrGUULm8aOR0Fb/ck+W/86HeFvupuWkCyS34xtd94JhpCXSmyeNOzOv/+bxenO SsMZ0Am/PvjMFs2bkxoYcgwy1AKjzP8oxR9JfueREaqzSv+O0YtG4DP+7USOGT2botFW Gf27dAfJ0PaCU1XShSKDC4uOhxarWG6s7jrNjM7ONrxw0ZtY1yCrlC6UPwGsonZJBpsF I5f4ThsA6NuVpOzRgDBMFh5LZOjjqU7iO73iEu3yTdh7kThafT1H+UdWDWiG8Ope02wI K3mbzrDnh5GnlfSL57NPTarmQ6Mu6BCVReYxAtoIOEcIlJB2d6aU7aqtWw2dOPR5Lpee kpLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z4d9SYyB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k17-20020aa788d1000000b004fb2ca5f6fcsi5080512pff.26.2022.04.02.05.48.08; Sat, 02 Apr 2022 05:48:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z4d9SYyB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352506AbiDAU3d (ORCPT + 99 others); Fri, 1 Apr 2022 16:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352905AbiDAU25 (ORCPT ); Fri, 1 Apr 2022 16:28:57 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE2B98FE4D for ; Fri, 1 Apr 2022 13:27:05 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id a17so4256631edm.9 for ; Fri, 01 Apr 2022 13:27:05 -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:mime-version :content-transfer-encoding; bh=W/JwoXAcjqpUeNN5rrXlo11fHlP+fYByEFJ34EyPDQ4=; b=z4d9SYyBZioII/u1DVvwwX/yVHWqJ2PqRyvTNe9OXAF2qqCQ4HNspqkY1qfLlXZkzo QvE3agotx83Ip2w4aR0v8q1GU42qBmma10TUNG1rW9e/0wZejTSuXuj6NeAuzD2W1VDb LGAeg0NguiK1kOapyXFvQNiO2xVw4so17vgrV7s9asQc/aZdZHvOsfOxvCn5dqfxBFbE AZfXu/oOBPXM9myX/vlMZanmY500YaU+9IMzt5E7b95g9G/wLG5E45D6/kkt14UEGRvJ KRI7OXcSImCnqqL++zh7JBOS09oeYcGe0NHAkv7fY5v9NJaP7M909M1MkLB6xFN02tc3 LVPw== 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:mime-version :content-transfer-encoding; bh=W/JwoXAcjqpUeNN5rrXlo11fHlP+fYByEFJ34EyPDQ4=; b=z3UYKVCiKyySpPa8z4RuSlM13nsZNwfgh7og83PUWrtze7W3/9OaYRNHo3R/8/52Ul +dgqKgE9SopvEZHLA6mSSTzkkXBIKinLlFUVDbCPGeW1GM5nmZluZv54O4DAjgRVlrGU i3G9XzK4Y5xP1VtFKHkcQ3guKU9beIL97sVQRR3QiH6D/hcSb0MKqx6x6ENEiMkWn2MA 2oNljTCDdfbs/C0046Lc+G4uclVLcc1xfbr+wJsG4lZP5eezwfCduoBb5g9cgQdKKdPD OTIcdeg/RHVlvKEScOmPGLnK158BMjvfB8R4lKK+W5rJZU5qP3m+6FIh7VRssORwk7uO WDsA== X-Gm-Message-State: AOAM531nQGCrgvweLF5dVcblnYXJ2c0QrzsSZdBTEV2aiU+HE+gWpqSh dQWz2ioZDUMKTELE3O9lqzVCHA== X-Received: by 2002:aa7:c30f:0:b0:419:2af:4845 with SMTP id l15-20020aa7c30f000000b0041902af4845mr22948828edq.296.1648844824221; Fri, 01 Apr 2022 13:27:04 -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 k14-20020a50e18e000000b0041b6f23f7f6sm1619346edl.22.2022.04.01.13.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 13:27:03 -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 0/6] power: supply: introduce the Qualcomm smb2 Date: Fri, 1 Apr 2022 21:26:37 +0100 Message-Id: <20220401202643.877609-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a driver for the Qualcomm PMI8998/SDM660 Switch-Mode Battery Charger "2". This replaces the previous SMBB hardware found in older PMICs. This driver provides basic support for initialising the hardware, configuring the USB input current limit and reporting information about the state of the charger. Features like type-c dual role support and OTG switching will be added in future patches. This patch series depends on my previous series adding support for the Round Robin ADC which is used for reading the USB voltage and current, it can be found here: https://lore.kernel.org/linux-arm-msm/20220323162820.110806-1-caleb@connolly.tech/ --- Caleb Connolly (6): power: supply: add Qualcomm SMB2 driver arm64: dts: qcom: pmi8998: add smb2 node arm64: dts: sdm845-oneplus: enable smb2 arm64: dts: qcom: sdm845-db845c: enable smb2 arm64: dts: qcom: sdm845-xiaomi-beryllium enable smb2 dt-bindings: power: supply: qcom,smb2: add bindings for smb2 driver .../bindings/power/supply/qcom,smb2.yaml | 68 ++ arch/arm64/boot/dts/qcom/pmi8998.dtsi | 15 + arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 18 + .../boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 + .../dts/qcom/sdm845-oneplus-enchilada.dts | 4 + .../boot/dts/qcom/sdm845-oneplus-fajita.dts | 4 + .../boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 14 + drivers/power/supply/Kconfig | 9 + drivers/power/supply/Makefile | 1 + drivers/power/supply/qcom_smb2.c | 930 ++++++++++++++++++ 10 files changed, 1067 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/qcom,smb2.yaml create mode 100644 drivers/power/supply/qcom_smb2.c -- 2.35.1