Message ID | 20230615105826.411953-4-linux@rasmusvillemoes.dk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp556220vqr; Thu, 15 Jun 2023 04:21:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4td3cnRiZA+gyEQ6sSsLnQUYY+3mABxQf0cbLYzFZjy+8dTDM8V5WPO2buYvOzPkBaRDdE X-Received: by 2002:a05:6402:51cb:b0:514:b3b5:59b2 with SMTP id r11-20020a05640251cb00b00514b3b559b2mr4751657edd.20.1686828085578; Thu, 15 Jun 2023 04:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686828085; cv=none; d=google.com; s=arc-20160816; b=n0VdcSfQeQlq5qlfV3VsL572q+Q7cX6gQ7FW+O9aqqVPj1msf4pwlSP77ddK9p5Lxj KUpWYDKUji1nlRMEVo7F8dDeSH6rf8DUIwTNjosjXR6HrU4MK0xVuAP3G9rj+fSOCYbC XrLROEF3GVmtv/6djRu8K9C9xpG6GFd9qrV2pBrdygxBaUi7y2faqrBry1m+l8qFa0w5 pTZCKS8HL0CfCWNTLpfyYirO+DVRS0ssG3sWn1Ziwqauh/iV4ezoT80DILrBBnmlBVWC vpxUWDLD0cJfbMvn/L0Gvr1hw/m5pbFFN2ANBFPE6U9i3/Z6a2WzM9cygJ+jr6bD9sLn oetg== 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=cfopBjHrRqDySJuSAMCUvhXmj8ZxffTN4Fp5DsieY7A=; b=PYpOp33yXh6KEv4M5w3hqptfq3VVbOKagIrgd3jwKzQfT9BkXZ7zKcKYC3Ix32VV76 l0YUWeo+MqooFTj8tZVuxEiI2XudvPO0zqdWp42Y+QSglsCfRYlEbdVd9SHxVoZcEKDx 7/wdpIx1q2cGHZwx1RZmiBQGCBROGEpcCaP4xGGcpfg7x8pJtTvR8XB9MQmbWiUDu803 bEWH7iI0IwK2QuiDU+YFUc42AneWI8Aw4nqOqYxMk0EEMQKV3yoshVgpFOceoUQlAVo4 3WvFIhy64ecVkABtSyexg5lxI7Ocmwsxd4+x652Rs36u7I7jRr8tPg2B29YytD2fsGVF uVLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Lz6b6vSF; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020aa7c585000000b005164ef74becsi9528558edq.106.2023.06.15.04.21.00; Thu, 15 Jun 2023 04:21:25 -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=@rasmusvillemoes.dk header.s=google header.b=Lz6b6vSF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343772AbjFOK6y (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Thu, 15 Jun 2023 06:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343729AbjFOK6l (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 15 Jun 2023 06:58:41 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2C24E57 for <linux-kernel@vger.kernel.org>; Thu, 15 Jun 2023 03:58:38 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f762b3227dso825704e87.1 for <linux-kernel@vger.kernel.org>; Thu, 15 Jun 2023 03:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; t=1686826717; x=1689418717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cfopBjHrRqDySJuSAMCUvhXmj8ZxffTN4Fp5DsieY7A=; b=Lz6b6vSFV436npcr01hqfn/fSPQ3iCiWMoVTbEZAZeaDjmqE5NJUwJofa1Mqm0ORzg IyzgJkRfQEkALXUjUiCeKMY3E/6lAZqVq0T+ta77WY2h/GVPUdggQ6vemrz3VanJr10E dAfiyEgfami0fJahzDv9md1i7sRI5xr3dysBQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686826717; x=1689418717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cfopBjHrRqDySJuSAMCUvhXmj8ZxffTN4Fp5DsieY7A=; b=G2wAuGHtO3063B7KPW1NS8WFbU/fLhN45sgsxDM64q3SyhIyUYDvDrb70w6kDmdF5Q EdjSFlzRukB4Gyieyz2QyVxXuDukBx5nI5hnLOrd8f9sD3g9HjKmqd1pFvC3f/Rk6AqN eSGEajeFY+gbiEp31dj18cVlYHMhXpWHURwdR9VQOT9BaIhFisJhBUHgAmDcgtcFSrxy /hV6Tecq9fcp5ripl3Cz6xFNeUvIl60q34NwRw3MaByqEjovkLArFthP0CpHRveZ4t+1 Cm1of7bwRPYBgV/q992pmR3txuQhRJbmoN1LbfFE8RZPK1dbrmmXnJui9lLYKOjOw2vk jaZw== X-Gm-Message-State: AC+VfDwiHGcuK/mQX3yT04ZkYxywZ0XUDXLoAP3Xpez1eYWJV01/Z3qk E9dkLB8Mw2/kJxIZKveJWULH7Q== X-Received: by 2002:a05:6512:46d:b0:4f1:2ebf:536f with SMTP id x13-20020a056512046d00b004f12ebf536fmr1457824lfd.16.1686826717359; Thu, 15 Jun 2023 03:58:37 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id h7-20020ac25967000000b004f13f4ec267sm165364lfp.186.2023.06.15.03.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 03:58:37 -0700 (PDT) From: Rasmus Villemoes <linux@rasmusvillemoes.dk> To: Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, linux-rtc@vger.kernel.org, Rasmus Villemoes <linux@rasmusvillemoes.dk>, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/8] dt-bindings: rtc: isl12022: add bindings for battery alarm trip levels Date: Thu, 15 Jun 2023 12:58:21 +0200 Message-Id: <20230615105826.411953-4-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230615105826.411953-1-linux@rasmusvillemoes.dk> References: <20230612113059.247275-1-linux@rasmusvillemoes.dk> <20230615105826.411953-1-linux@rasmusvillemoes.dk> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768496921965277583?= X-GMAIL-MSGID: =?utf-8?q?1768767446525774137?= |
Series |
rtc: isl12022: battery backup voltage and clock support
|
|
Commit Message
Rasmus Villemoes
June 15, 2023, 10:58 a.m. UTC
The isl12022 has a built-in support for monitoring the voltage of the
backup battery, and setting bits in the status register when that
voltage drops below two predetermined levels (usually 85% and 75% of
the nominal voltage). However, since it can operate at wide range of
battery voltages (2.5V - 5.5V), one must configure those trip levels
according to which battery is used on a given board.
Add bindings for defining these two trip levels. While the register
and bit names suggest that they should correspond to 85% and 75% of
the nominal battery voltage, the data sheet also says
There are total of 7 levels that could be selected for the first
alarm. Any of the of levels could be selected as the first alarm
with no reference as to nominal Battery voltage level.
Hence this provides the hardware designer the ability to choose values
based on the discharge characteristics of the battery chosen for the
given product, rather than just having one battery-microvolt property
and having the driver choose levels close to 0.85/0.75 times that.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
.../devicetree/bindings/rtc/intersil,isl12022.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
Comments
On 15/06/2023 12:58, Rasmus Villemoes wrote: > The isl12022 has a built-in support for monitoring the voltage of the > backup battery, and setting bits in the status register when that > voltage drops below two predetermined levels (usually 85% and 75% of > the nominal voltage). However, since it can operate at wide range of > battery voltages (2.5V - 5.5V), one must configure those trip levels > according to which battery is used on a given board. > > Add bindings for defining these two trip levels. While the register > and bit names suggest that they should correspond to 85% and 75% of > the nominal battery voltage, the data sheet also says Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml b/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml index 054d3fc649ba..3c6c07aaa78f 100644 --- a/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml +++ b/Documentation/devicetree/bindings/rtc/intersil,isl12022.yaml @@ -19,6 +19,14 @@ properties: interrupts: maxItems: 1 + isil,battery-trip-levels-microvolt: + description: + The battery voltages at which the first alarm and second alarm + should trigger (normally ~85% and ~75% of nominal V_BAT). + items: + - enum: [2125000, 2295000, 2550000, 2805000, 3060000, 4250000, 4675000] + - enum: [1875000, 2025000, 2250000, 2475000, 2700000, 3750000, 4125000] + required: - compatible - reg @@ -39,6 +47,7 @@ examples: compatible = "isil,isl12022"; reg = <0x6f>; interrupts-extended = <&gpio1 5 IRQ_TYPE_LEVEL_LOW>; + isil,battery-trip-levels-microvolt = <2550000>, <2250000>; }; };