Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp499016pxk; Wed, 23 Sep 2020 08:27:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy17fvis1ITkqGm+C28mIHfa+9OabwjWiUrPDX5B8dmD8ed7XXec+1Al50Q80SUB1+MDWDC X-Received: by 2002:a05:6402:3c8:: with SMTP id t8mr10062859edw.266.1600874870013; Wed, 23 Sep 2020 08:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600874870; cv=none; d=google.com; s=arc-20160816; b=DLX38pWLxISLuWbvPxEUhK2zn21lXz7Zc2QDs3QDxbEFHmimVbXAP3wYZKDGkW7Cgc iCXjlULPUnGmscKPNzJei8S7iRZmIYSelyHNpl1wcrBly6qMb8A6t5sAb+iivmiV9Y+i Prg1ezeOCcU4VxftExCMoCZDP+AakUHCPWZ0Sj48gUCcfeEa8E9nEOwPTbFGdNJ6sKim O5fGB+L4GmrjVeB/AW35ncwUxmUAdZG89E3tz+qLCQM1FBoAO2EuFCkV9B5JrLeq3Jcx VeFn9ned6svdeVwweMQi9vaSJ5DSFomwfBHTxzd2Zc0ev4hJR1a5SwK8mgTDWSZEQDON cfKA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XG7Whd3Om2bowv6dtVLcdP2kjKd0zNjYwmu0Q6trzE4=; b=V2rPiTpj56Ay4By58qCZcUrr6rvCrLnfwXF1LH1+TgItnzQhLRGVi0r0Ttl2PxYQVU tcT0yl9CTIHbYS0D1wBdtVKQZ8SVSRkUX1f+Uugw/x/dozDrKSHrSGolRcyCOdo5fWt6 Ucu5KySIHMvB2kbh/4AV+An/ImomOdI1maOf4Rj+VaUb687mVpuTP2Rz5k3CfTUuipsr i9RZcj7pemRBwddLQZC/WQn5q9hexsfe251T3vBo2VGhxLAHlV2sdC6M8U4UV5ribprN oOcCB4FvD2nJscUxWdV4tOTWiQudQcvFM7OSKdKN1uJonG5fgDOJ/BYwfZyBxRZPjzy2 tOZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZRRWb3Ps; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si35491edj.574.2020.09.23.08.27.23; Wed, 23 Sep 2020 08:27:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZRRWb3Ps; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726785AbgIWPYY (ORCPT + 99 others); Wed, 23 Sep 2020 11:24:24 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:33134 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726638AbgIWPYY (ORCPT ); Wed, 23 Sep 2020 11:24:24 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08NFOMee022569; Wed, 23 Sep 2020 10:24:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1600874662; bh=XG7Whd3Om2bowv6dtVLcdP2kjKd0zNjYwmu0Q6trzE4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZRRWb3PsCewnvjibfnHw25ezNbsKro8T3RMUGgguAec+972+hKRphNgbOEKdUH/n9 TLMb/Xy0OKzQ1JiF+RwJcBmJF79WISOt+L1wbSZQzcmK6secoEpbGkmLMSuWnGlBJg hug2YzWlUDXYtlTf84K4/m8uNCgkig1bzEqy5fZw= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08NFOMIL105524; Wed, 23 Sep 2020 10:24:22 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 23 Sep 2020 10:24:21 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 23 Sep 2020 10:24:21 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08NFOLur101795; Wed, 23 Sep 2020 10:24:21 -0500 From: Ricardo Rivera-Matos To: , , , , CC: , Ricardo Rivera-Matos Subject: [PATCH v4 1/2] dt-bindings: power: Add the bq256xx dt bindings Date: Wed, 23 Sep 2020 10:24:15 -0500 Message-ID: <20200923152416.24822-2-r-rivera-matos@ti.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200923152416.24822-1-r-rivera-matos@ti.com> References: <20200923152416.24822-1-r-rivera-matos@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the bindings for the bq256xx series of battery charging ICs. Datasheets: - https://www.ti.com/lit/ds/symlink/bq25600.pdf - https://www.ti.com/lit/ds/symlink/bq25601.pdf - https://www.ti.com/lit/ds/symlink/bq25600d.pdf - https://www.ti.com/lit/ds/symlink/bq25601d.pdf - https://www.ti.com/lit/ds/symlink/bq25611d.pdf - https://www.ti.com/lit/ds/symlink/bq25618.pdf - https://www.ti.com/lit/ds/symlink/bq25619.pdf Signed-off-by: Ricardo Rivera-Matos --- v4 - documents monitored-battery and interrupts, fixes example for ti,watchdog-timeout-ms .../bindings/power/supply/bq256xx.yaml | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/bq256xx.yaml diff --git a/Documentation/devicetree/bindings/power/supply/bq256xx.yaml b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml new file mode 100644 index 000000000000..18b54783e11a --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/bq256xx.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) +# Copyright (C) 2020 Texas Instruments Incorporated +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/bq256xx.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: TI bq256xx Switch Mode Buck Charger + +maintainers: + - Ricardo Rivera-Matos + +description: | + The bq256xx devices are a family of highly-integrated battery charge + management and system power management ICs for single cell Li-ion and Li- + polymer batteries. + + Datasheets: + - https://www.ti.com/lit/ds/symlink/bq25600.pdf + - https://www.ti.com/lit/ds/symlink/bq25601.pdf + - https://www.ti.com/lit/ds/symlink/bq25600d.pdf + - https://www.ti.com/lit/ds/symlink/bq25601d.pdf + - https://www.ti.com/lit/ds/symlink/bq25611d.pdf + - https://www.ti.com/lit/ds/symlink/bq25618.pdf + - https://www.ti.com/lit/ds/symlink/bq25619.pdf + +properties: + compatible: + enum: + - ti,bq25600 + - ti,bq25601 + - ti,bq25600d + - ti,bq25601d + - ti,bq25611d + - ti,bq25618 + - ti,bq25619 + + reg: + maxItems: 1 + + ti,watchdog-timeout-ms: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + description: | + Watchdog timer in ms. 0 (default) disables the watchdog + minimum: 0 + maximum: 160000 + enum: [ 0, 40000, 80000, 160000] + + input-voltage-limit-microvolt: + description: | + Minimum input voltage limit in µV with a 100000 µV step + minimum: 3900000 + maximum: 5400000 + + input-current-limit-microamp: + description: | + Maximum input current limit in µA with a 100000 µA step + minimum: 100000 + maximum: 3200000 + + monitored-battery: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the battery node being monitored + + interrupts: + maxItems: 1 + description: | + Interrupt sends an active low, 256 μs pulse to host to report the charger + device status and faults. + +required: + - compatible + - reg + - monitored-battery + +additionalProperties: false + +examples: + - | + bat: battery { + compatible = "simple-battery"; + constant-charge-current-max-microamp = <2040000>; + constant-charge-voltage-max-microvolt = <4352000>; + precharge-current-microamp = <180000>; + charge-term-current-microamp = <180000>; + }; + #include + #include + i2c { + + clock-frequency = <400000>; + + #address-cells = <1>; + #size-cells = <0>; + + charger@6b { + compatible = "ti,bq25601"; + reg = <0x6b>; + monitored-battery = <&bat>; + + interrupt-parent = <&gpio1>; + interrupts = <16 IRQ_TYPE_EDGE_FALLING>; + ti,watchdog-timeout-ms = <40000>; + + input-voltage-limit-microvolt = <4500000>; + input-current-limit-microamp = <2400000>; + }; + }; +... -- 2.28.0