Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1669445ybh; Mon, 20 Jul 2020 04:25:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyRXDJQxiQgCaAcd860o1aQ355YywM9HzyDnEov65xU7SimaABxvL9EvXh5hleHGb0fi5O X-Received: by 2002:aa7:c2d7:: with SMTP id m23mr21166019edp.216.1595244319848; Mon, 20 Jul 2020 04:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595244319; cv=none; d=google.com; s=arc-20160816; b=WMaRbYLchqdnHPcVSjByyUMHlOQj7LFW69K2LBZ6xs/1GZZI0dxUwIynE8jzGFqrDu Ba5Hf6RJXJ9GoZcz62deO+FV/RrcdHjoBxa+gKj7NOWaXvm3zFcmqY5jM0dd9+l0YYCu qQeImLbA3XMGRgCxUDRn4CQsUl7HKnUu5SK0xqnyfFsnkbWkbuOxGs4WXq9mWGfGZREb NaNljMaFaWi2PKL9VotgAcqKcJ0KZCz4vwjJb09mBcl94lctzzNQcbsaeuZe3t1h8lgk sXr7T+rQ1bb04aWsXzWZz2ACpfVcOzJwa4LcDOiGB2vmPv+kT/2deMcrverWwTTJkbLu cdFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EqLyPhmrOwod1tcRJ7mEQ+gXPXSq7Nk5K0GWxKk/b8A=; b=sn5H5Yg1eiJQf+t7B+0KeXjYvVXK2koNOVqY1IQJ+ORmGzd5lBF0g1vGCIM5V+EldR 4ErDxkz/v1+F2Vsu8Vlng7eNESlT96meHvloGn/zj2XPpKfCrFnb/rFrXxaTYO6G8qhV SiyxKK1F8VUyKUf+ZxUR9rZf0z7vZMgvJmXl2LyMafUW8pAwTjSI0R4MzlUTNKl8UxsF XG2yneSd8VcUiNW0mzT0yNVMP4IVXpQxthMTgYaNW7yDMe3+bIUMLJ3nUtmwarbNL1jO MKK5BWnulo8Ok3yh6lZ9yS2GZlpC0EE7h+cGzZfNH2MMKbWbKOj/7x1DFkZCROou9M4B balQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uoxcNeLN; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si10214121eji.354.2020.07.20.04.24.56; Mon, 20 Jul 2020 04:25:19 -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=@gmail.com header.s=20161025 header.b=uoxcNeLN; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728589AbgGTLYn (ORCPT + 99 others); Mon, 20 Jul 2020 07:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728587AbgGTLYl (ORCPT ); Mon, 20 Jul 2020 07:24:41 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99C64C061794; Mon, 20 Jul 2020 04:24:41 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id f2so17427559wrp.7; Mon, 20 Jul 2020 04:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EqLyPhmrOwod1tcRJ7mEQ+gXPXSq7Nk5K0GWxKk/b8A=; b=uoxcNeLNN++s3CWu6vvva5p4VzC/EcNdioQeI0zDkgICA/xJUyqa1RglF40tuPFMud 7UkpBFggaOkg6bJCuJEmGPECUHcrGFjkH+7lAqn+NV+SonmNIQu9tcMg5lR0KQdiv+cF z0KkTb/1ZJfSuXdCh9PxvPAUV1Jau/PAbT1vTq/891AYUJvtbDrmTT3CXeZlo4E5G5KD SjtWuxanIhkd3htWcV1qZiLqLQ2v3ZfeieFuNMfEHc5OgulagVInEvola8/pQLMlIb9Z ZqV66wYqHsmjWmmXJFMj+9YVSyk5Nfcx4xUN5N0ea3+1WQs5nIuRCyR3ScNnuq9Pkppe oQUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EqLyPhmrOwod1tcRJ7mEQ+gXPXSq7Nk5K0GWxKk/b8A=; b=prFREc1VF6LFcasRyPutOirNnP/5hdZyVsWrLGQYR2p/X4V5rM90uhLdXHLmLR6qLB y+odysTDT3/QUAiIbf2b1a8dDhcuVDtFgvR0puwD0Cdzfo5YZxIqGi0u2gbbiSRpaKqY rBR/hlM54/UfP65I3JEwDb6M0frgVeGv74brnT0WTPbOhgzzLIW1dIReL0Gf5IIqA90z EH4cnFcB5zS7w1c9ExAoluGN/NzH97KjeKs4tITVCoC66NEn2qHhrFbljTBgQzhpkrCT bydJAmnAIs8k7J9Y9eCz+VrF/BmC3/lkzlKkilFXW0cT3g9nhwcbUyQgjIqSCfIEoqDn Nf5w== X-Gm-Message-State: AOAM531Nv7fuXoz1fM1I1GDYsdGzr/NLsBWzF+ldg7kn3h740qvjp+JR 1mY6QqCmXh7MYWrSfTRfc3w= X-Received: by 2002:adf:edc6:: with SMTP id v6mr21929317wro.413.1595244280304; Mon, 20 Jul 2020 04:24:40 -0700 (PDT) Received: from localhost.localdomain ([148.63.172.143]) by smtp.gmail.com with ESMTPSA id t4sm33452942wmf.4.2020.07.20.04.24.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jul 2020 04:24:39 -0700 (PDT) From: miguelborgesdefreitas@gmail.com To: a.zummo@towertech.it Cc: baruch@tkos.co.il, linux@armlinux.org.uk, alexandre.belloni@bootlin.com, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, miguelborgesdefreitas@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] dt-bindings: rtc: pcf8523: add DSM pm option for battery switch-over Date: Mon, 20 Jul 2020 12:23:59 +0100 Message-Id: <20200720112401.4620-2-miguelborgesdefreitas@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200720112401.4620-1-miguelborgesdefreitas@gmail.com> References: <20200719145028.3370-3-miguelborgesdefreitas@gmail.com> <20200720112401.4620-1-miguelborgesdefreitas@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miguel Borges de Freitas This adds direct-switching mode as a configurable DT flag for RTC modules supporting it (e.g. nxp pcf8523). DSM switches the power source to the battery supply whenever the VDD drops below VBAT. The option is recommended for hw designs where VDD is always expected to be higher than VBAT. Signed-off-by: Miguel Borges de Freitas --- Changes in v2: - Added extended commit message for git history - Separate dt bindings documentation into a single patch Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt | 7 ++++++- Documentation/devicetree/bindings/rtc/rtc.yaml | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt b/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt index 0b1080c..f715a8f 100644 --- a/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf8523.txt @@ -4,10 +4,14 @@ Required properties: - compatible: Should contain "nxp,pcf8523". - reg: I2C address for chip. -Optional property: +Optional properties: - quartz-load-femtofarads: The capacitive load of the quartz(x-tal), expressed in femto Farad (fF). Valid values are 7000 and 12500. Default value (if no value is specified) is 12500fF. +- pm-enable-dsm: battery switch-over function is enabled in direct + switching mode. The power failure condition happens when VDD < VBAT, + without requiring VDD to drop below Vth(sw)bat. + Default value (if not provided) is the standard mode. Example: @@ -15,4 +19,5 @@ pcf8523: rtc@68 { compatible = "nxp,pcf8523"; reg = <0x68>; quartz-load-femtofarads = <7000>; + pm-enable-dsm; }; diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml index ee237b2..a0048f4 100644 --- a/Documentation/devicetree/bindings/rtc/rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/rtc.yaml @@ -47,4 +47,11 @@ properties: description: Enables wake up of host system on alarm. + pm-enable-dsm: + $ref: /schemas/types.yaml#/definitions/flag + description: + Enables the battery switch-over function in direct switching + mode. Should be set in systems where VDD is higher than VBAT + at all times. + ... -- 1.8.3.1