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 1A92CC636CD for ; Wed, 1 Feb 2023 14:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbjBAOng (ORCPT ); Wed, 1 Feb 2023 09:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232536AbjBAOnM (ORCPT ); Wed, 1 Feb 2023 09:43:12 -0500 Received: from mail.fris.de (mail.fris.de [IPv6:2a01:4f8:c2c:390b::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D6052E82E; Wed, 1 Feb 2023 06:43:03 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 75799BFC6C; Wed, 1 Feb 2023 15:34:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262091; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=jpzkr24nHKJp5IYEK48VP/WYJnaAAqAY3mtPMKQ4JTk=; b=EyhNDpImLtYrLnSp9RszhmfZjgngLI5STcz8zOdrh17GinHCp5YJE3zgtszbPSiQnpAnae xNdr4zrlZ0mKxAUaBUSqQJuGlTP2/pCqfbrB5/hovHvR+PojO5PttjnGFIcnjJ31qp23nr KdZlZTyJbhqvHE24LaQGzhdy4qYwLM4nxNYHAe/PUIY61wf7idcvDamcz4jI6virl51pHY jpdHe8kKUEDGJjPiRr0KhLIL4GZhloH23lwsCEaQ1ykSVM7YcpFDTIMNYXmkKDs1IVwsqR A9x7BKDpE/1rj0AeNSB3yW+hOWuKYYiBQdV0CGzRcpIomE9IBP6lCZc8K2iNeA== From: Frieder Schrempf To: Alexandre Belloni , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Frieder Schrempf , Alessandro Zummo , Krzysztof Kozlowski , Rob Herring , Sascha Hauer , Shawn Guo Subject: [PATCH 0/7] Enable backup switch mode on RTCs via devicetree Date: Wed, 1 Feb 2023 15:34:22 +0100 Message-Id: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frieder Schrempf Some RTC devices like the RV3028 have BSM disabled as factory default. This makes the RTC quite useless if it is expected to preserve the time on hardware that has a battery-buffered supply for the RTC. Let boards that have a buffered supply for the RTC force the BSM to the desired value via devicetree by setting the 'backup-switch-mode' property. That way the RTC on the boards work as one would expect them to do without any per-board intervention through userspace tools to enable BSM. Frieder Schrempf (7): dt-bindings: rtc: Move RV3028 to separate binding file dt-bindings: rtc: Add backup-switch-mode property dt-bindings: rtc: microcrystal,rv3032: Add backup-switch-mode property rtc: Move BSM defines to separate header for DT usage rtc: class: Support setting backup switch mode from devicetree arm64: dts: imx8mm-kontron: Remove useless trickle-diode-disable from RTC node arm64: dts: imx8mm-kontron: Enable backup switch mode for RTC on OSM-S module .../bindings/rtc/microcrystal,rv3028.yaml | 60 +++++++++++++++++++ .../devicetree/bindings/rtc/rtc.yaml | 7 +++ .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 - .../dts/freescale/imx8mm-kontron-osm-s.dtsi | 3 +- drivers/rtc/class.c | 14 +++++ include/dt-bindings/rtc/rtc.h | 11 ++++ include/uapi/linux/rtc.h | 6 +- 7 files changed, 95 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml create mode 100644 include/dt-bindings/rtc/rtc.h -- 2.39.1 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C03EAC05027 for ; Wed, 1 Feb 2023 14:45:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=s+89sFLiDE4L6o8kQMW+y8BVKJ9ZxpQ7m4YfUIcPchE=; b=aPCqmhyBzOqOM0 SEQdVvhsyFeF7uSncceKQ3TWRDrORYdG5PoyZc69Rj8+3+PHgvTnkZc/E3L0WJyNBORoTCMSN1ol5 WIFjGwPxXaKeUAY9VyRf0SH4Jq9n6mx5Lfx4PHa3/FxB/IN7no4UIHVDWAwqvj9vk4+5U3d2HGueB WmhIyJ3hO07qYOUYCiFJcXplA/xAv9Ol7RYbcnkWd8zR3sb/PlJ/7c2BUTksUvoI7ImVvHIZLB6yy BQdkFSj12VBFApmcRDqVthz8p4tV1tuk5m9cWs/fURBh2yEfK9wXEHeLmvZBqXXScqeavLm3z9lfL eD8X+0B9m4lpVPImgt+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNELj-00CT5w-SY; Wed, 01 Feb 2023 14:44:36 +0000 Received: from mail.fris.de ([2a01:4f8:c2c:390b::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNECT-00COl1-JS for linux-arm-kernel@lists.infradead.org; Wed, 01 Feb 2023 14:35:05 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 75799BFC6C; Wed, 1 Feb 2023 15:34:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262091; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=jpzkr24nHKJp5IYEK48VP/WYJnaAAqAY3mtPMKQ4JTk=; b=EyhNDpImLtYrLnSp9RszhmfZjgngLI5STcz8zOdrh17GinHCp5YJE3zgtszbPSiQnpAnae xNdr4zrlZ0mKxAUaBUSqQJuGlTP2/pCqfbrB5/hovHvR+PojO5PttjnGFIcnjJ31qp23nr KdZlZTyJbhqvHE24LaQGzhdy4qYwLM4nxNYHAe/PUIY61wf7idcvDamcz4jI6virl51pHY jpdHe8kKUEDGJjPiRr0KhLIL4GZhloH23lwsCEaQ1ykSVM7YcpFDTIMNYXmkKDs1IVwsqR A9x7BKDpE/1rj0AeNSB3yW+hOWuKYYiBQdV0CGzRcpIomE9IBP6lCZc8K2iNeA== From: Frieder Schrempf To: Alexandre Belloni , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Frieder Schrempf , Alessandro Zummo , Krzysztof Kozlowski , Rob Herring , Sascha Hauer , Shawn Guo Subject: [PATCH 0/7] Enable backup switch mode on RTCs via devicetree Date: Wed, 1 Feb 2023 15:34:22 +0100 Message-Id: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230201_063502_574693_A60EB548 X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Frieder Schrempf Some RTC devices like the RV3028 have BSM disabled as factory default. This makes the RTC quite useless if it is expected to preserve the time on hardware that has a battery-buffered supply for the RTC. Let boards that have a buffered supply for the RTC force the BSM to the desired value via devicetree by setting the 'backup-switch-mode' property. That way the RTC on the boards work as one would expect them to do without any per-board intervention through userspace tools to enable BSM. Frieder Schrempf (7): dt-bindings: rtc: Move RV3028 to separate binding file dt-bindings: rtc: Add backup-switch-mode property dt-bindings: rtc: microcrystal,rv3032: Add backup-switch-mode property rtc: Move BSM defines to separate header for DT usage rtc: class: Support setting backup switch mode from devicetree arm64: dts: imx8mm-kontron: Remove useless trickle-diode-disable from RTC node arm64: dts: imx8mm-kontron: Enable backup switch mode for RTC on OSM-S module .../bindings/rtc/microcrystal,rv3028.yaml | 60 +++++++++++++++++++ .../devicetree/bindings/rtc/rtc.yaml | 7 +++ .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 - .../dts/freescale/imx8mm-kontron-osm-s.dtsi | 3 +- drivers/rtc/class.c | 14 +++++ include/dt-bindings/rtc/rtc.h | 11 ++++ include/uapi/linux/rtc.h | 6 +- 7 files changed, 95 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml create mode 100644 include/dt-bindings/rtc/rtc.h -- 2.39.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel