From patchwork Wed Feb 1 14:34:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51370 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp318474wrn; Wed, 1 Feb 2023 06:46:50 -0800 (PST) X-Google-Smtp-Source: AK7set8/r1RmBXA8RkBagnGFfuZeowfZ/LsuuXGcsET+4J2k0ZFA/JUHwPucNxoDDM95a2Ivhrrj X-Received: by 2002:a17:90b:4c91:b0:22c:1613:1656 with SMTP id my17-20020a17090b4c9100b0022c16131656mr2622224pjb.26.1675262810591; Wed, 01 Feb 2023 06:46:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262810; cv=none; d=google.com; s=arc-20160816; b=jLgsys6vEa4yWyxb6OcsdnxpPUK5721Jf6TWGwpmc9LV2E63eHyj3ST/fF5elOfj+9 aUX3nqjSupZYAFH2gy0jz1xKSWZ82zeo0hajskbgS8gRWXY9YHgdBoLKbLOAX6jUKWoD VaHaCYyf64g5xFm3rM/K26ogkB93IZFER1uL0leCaXaXyO5/92Yc0av+nJsoTLHkDm0X 3UXGG0/yDs54vPRU4iBlfhZ4lESdnZrEYn3iIPQANJsYfNZtdj8bZk2ZOWwQPdW0Li4X op+1+RsiHobIi4PyFN48faT+ivpDfYvWFhAd2PyG7BwMe5eP+fhRszHpaGZXyZIz1cBU 1I/A== 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=MjLoVQc1RTDuq1zZZzBKnhQUzoJ04kzFHyZmhNIUaWs=; b=PfAe9/c4D8ekFX0uix0gg/gl9AadMBvbGLXO68j2b8qquR5GIZbnipEBztimos2RJZ E3TtDcQq2mFJ/8ERJQDRS0WiYH57hP279W1Gy3fqSOEDCVm7LF5h+vUmlder2/o/9/As grEwR7/ZKdN0/9oowa//Eer+mTM9tT6PeeKIF/2194ikBxgX8OkXr6OuRVRjBkaSeVYv T4xeYoclwK9trNI4+PChDLjO9c5blhurM3Utnbn0+tBouOiq/sFO9EihI9F9ijfbf3Cz jtEJYz6zphndEQOp+y4/3TJJ0tpsrgUXdbDeZNkoFVIUt2JybjkaaDaj2ah9N0gz7UIm FLKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=spjaJgzm; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg1-20020a17090b1e0100b00229008bcf6bsi2197237pjb.16.2023.02.01.06.46.38; Wed, 01 Feb 2023 06:46:50 -0800 (PST) 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=@fris.de header.s=dkim header.b=spjaJgzm; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232667AbjBAOnd (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232535AbjBAOnM (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 3CF8B2E819; Wed, 1 Feb 2023 06:43:04 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id AEAB6C00E3; Wed, 1 Feb 2023 15:34:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262096; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=MjLoVQc1RTDuq1zZZzBKnhQUzoJ04kzFHyZmhNIUaWs=; b=spjaJgzmNsNJYfBkVEYRJKvJQFzMRn1FUYNuO4U2YOFo6WNhl4gFXP7VNY3+DO8DbbhKnZ pCtmGlTp1+RBxMd8C2QFwjJCRNqe7RV6VIXAIrz7KLehDVMeWGc27T8YEDnlLv3WW8J61A c28Faflv191Q3jKkv4PygmYs+VzhSOSyW7J6TIq+zIO8p8LWKP8frD/mXq3vbGzsJlA0BP UcMOhavzQb6nTErryt0UluYi6nSlj4k5ll3cXiRltnTazQTqww6CcmfaaVfu1zlzXod0fD 8UK7NrSGX7pMbTx/xSFvTGBj4TIGIsqGPAdGw3o7h3FBMsD2+lKwVmENWV3g5Q== From: Frieder Schrempf To: Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Rob Herring Cc: Frieder Schrempf , Rob Herring , Thierry Reding Subject: [PATCH 1/7] dt-bindings: rtc: Move RV3028 to separate binding file Date: Wed, 1 Feb 2023 15:34:23 +0100 Message-Id: <20230201143431.863784-2-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640376792533044?= X-GMAIL-MSGID: =?utf-8?q?1756640376792533044?= From: Frieder Schrempf The RV3028 driver uses properties that are not covered by the trivial-rtc bindings. Use custom bindings for it. Signed-off-by: Frieder Schrempf --- .../bindings/rtc/microcrystal,rv3028.yaml | 56 +++++++++++++++++++ .../devicetree/bindings/rtc/trivial-rtc.yaml | 2 - 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml diff --git a/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml b/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml new file mode 100644 index 000000000000..4667ba86fd0c --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/microcrystal,rv3028.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip RV-3028 RTC + +allOf: + - $ref: "rtc.yaml#" + +maintainers: + - Alexandre Belloni + +properties: + compatible: + const: microcrystal,rv3028 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + start-year: true + + trickle-resistor-ohms: + enum: + - 3000 + - 5000 + - 9000 + - 15000 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "microcrystal,rv3028"; + reg = <0x52>; + pinctrl-0 = <&rtc_nint_pins>; + interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>; + trickle-resistor-ohms = <3000>; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml index d9fc120c61cc..84cce1f0ca0c 100644 --- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml @@ -48,8 +48,6 @@ properties: # Intersil ISL12022 Real-time Clock - isil,isl12022 # Real Time Clock Module with I2C-Bus - - microcrystal,rv3028 - # Real Time Clock Module with I2C-Bus - microcrystal,rv3029 # Real Time Clock - microcrystal,rv8523 From patchwork Wed Feb 1 14:34:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51369 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp318086wrn; Wed, 1 Feb 2023 06:46:04 -0800 (PST) X-Google-Smtp-Source: AK7set9SqNzeILoqPRQiPgYL1SFfEtxcqTCq9Z0/tPkAFHfVE/F9IeBE062Hi/F2DUZ6KAI3obRA X-Received: by 2002:a17:902:d1d5:b0:189:c4a9:c5e8 with SMTP id g21-20020a170902d1d500b00189c4a9c5e8mr2465453plb.45.1675262764545; Wed, 01 Feb 2023 06:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262764; cv=none; d=google.com; s=arc-20160816; b=aLPcF7immz7PYFzr04Q0y3SF+quYMhJhmjghfAq56cC6gG5SBZ8cOZpDz2DmFstlGN ioqv5PcOoWu+VrXYxWiUID3CBa67cQ8ZU2BkG+0Nwqv59kb2zPM02NqYjQOmdWmYznXD OH3SraW+/1bY/zh9EZ0U8eHDPg/nqY8GYPn5unZaVc3Sd4OV6T3aKauAQOJH9CMxY9m2 FcDY6Da7PsOk0lO7WCNHBtQdRgk8p1z6WmMZjNqqNr9QSsbNSQHJL8lYm36Bq4UQ7CAW xIS4M7aKSXboV5Ux5yiJPu6Zsx1sZv7DLff8nzT/pXqkbEf/Bhmkw04Jx3qlK1/gzfqx XWng== 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=hDg1hF2NZG1k6HPgl88QV1xEXYDBSAVmSwJrGIgDnCs=; b=F73W1uXZsmFXzmzqA6B/KvKiNeKZ8PHguWLqHRGzkCx+/ShBxC+vZ87x5xVohH8YA/ uTt+aE5bhu7HSWrVvdG8HIRCASTK5+H/tEXS65YoMY0G+j724zxjzqlDzkm6/FflOOXC hSIbDIM4ATHKxm1m1mRR+BBu9Kfd70IW1wy07p/Wp+Hr2m4jsKkSuCWz97YlNZFd3gHG jDoL5XUh9Yvd//vwUeWwzXrj83hG+zTkf+6CPpBT7Vsh4N8xfy+oOOUNgJXDr8hLJRJ6 XcGSB5rpo/Iw03WafWJoVKYg5FnysxhhtgTcQHAgeiSUBS88/g90dX4Wb0CXzAPWNzzD A5DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=K8Sn9kFV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h12-20020a170902f7cc00b001978ecec8b2si7043440plw.494.2023.02.01.06.45.51; Wed, 01 Feb 2023 06:46:04 -0800 (PST) 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=@fris.de header.s=dkim header.b=K8Sn9kFV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232659AbjBAOnb (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232513AbjBAOnK (ORCPT ); Wed, 1 Feb 2023 09:43:10 -0500 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D1992E825; Wed, 1 Feb 2023 06:43:04 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id EA0A2C0330; Wed, 1 Feb 2023 15:34:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262099; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=hDg1hF2NZG1k6HPgl88QV1xEXYDBSAVmSwJrGIgDnCs=; b=K8Sn9kFVdiKRSTQdmAJ99uubjckXX0hJqe5kiWAfiFUx38C+23x7+/xd7E/s7VaL4TU3g+ 96gwIu0hLbSoIRppqatbdaf7J/iSUiZ9xBmhrcScR5VOqV01Kw3+3XcKV0rgCiubust8g8 CEwO2Xcaej3HLpsncemzwdp90EELfEWsS5gaWRxDlA5UjvaAuXZ+J/4ZugJE5Gk4so8DA/ MY8KvJNyp+KnDrJ6QUU+szz98Kfb3HVW0wAinePw08w3oi0PdEO7KaliaJNIcZxWdQNxqC tPk4us47xOjJmGX/NbARdsWxt3w/fdSvIaaXfg+KFipW0WHsXk8pyAleEvB33A== From: Frieder Schrempf To: Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Rob Herring Cc: Frieder Schrempf , Guenter Roeck , Hans Verkuil , Krzysztof Kozlowski , Sebastian Reichel , Viresh Kumar Subject: [PATCH 2/7] dt-bindings: rtc: Add backup-switch-mode property Date: Wed, 1 Feb 2023 15:34:24 +0100 Message-Id: <20230201143431.863784-3-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640328336503548?= X-GMAIL-MSGID: =?utf-8?q?1756640328336503548?= From: Frieder Schrempf Document the backups-switch-mode property that can be used to set the BSM via devicetree on devices like the RV3028. Signed-off-by: Frieder Schrempf --- Documentation/devicetree/bindings/rtc/rtc.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml index c6fff5486fe6..76b9605e755b 100644 --- a/Documentation/devicetree/bindings/rtc/rtc.yaml +++ b/Documentation/devicetree/bindings/rtc/rtc.yaml @@ -26,6 +26,13 @@ properties: 0: not chargeable 1: chargeable + backup-switch-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2, 3 ] + description: + The backup switch mode the RTC is forced into when registering + the device. See include/dt-bindings/rtc/rtc.h for a list of values. + quartz-load-femtofarads: description: The capacitive load of the quartz(x-tal), expressed in femto From patchwork Wed Feb 1 14:34:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51368 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317311wrn; Wed, 1 Feb 2023 06:44:30 -0800 (PST) X-Google-Smtp-Source: AK7set9SzHdsJiV4OKmJS0xJIrCKgNgditGm6PgM4BfhP/yi3JAk+BpgCIyyZsi2xWjwEGUhHloC X-Received: by 2002:a05:6a20:4f8a:b0:bf:1b09:5cda with SMTP id gh10-20020a056a204f8a00b000bf1b095cdamr2496534pzb.12.1675262670637; Wed, 01 Feb 2023 06:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262670; cv=none; d=google.com; s=arc-20160816; b=Ba5u++zuraaueEhtnoHg6ubtzOi2TLb2aVDujg+Euqxtt0olHe5rSoDltD4g69xkiJ SaIQPpCT3La1ixR3fUaJ2JRDa0RXWrm3hI1cmx27hTpqizU+fPdQR6ddq/zr0OEsjOQz U9kpqfyaFqwS2Ehh8hLx1VWVB5WcE7CbKF1XK5JhumiEBTpdUkpTOMgavp8o9Nv/sRwm iM9gwZOttzTVa3z1GEFHljFUuNYyWZyLlPj7GeY1g9SrR07tF3EyixRQcY8mBKUEWNH4 RspD1lldvr5c0VmjUK922mJVv/iKoXkAv7XmON1ML5yFNpYhNiZLVrfrBojYa0lnsRao DAOw== 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=tRPLVPhQGfVkVFWzPuN9DvSL3QBjCj23rMy0j/6al9U=; b=x7DrYTcrWNxtXdx35+TW2IajqVs8XrTVPh9S4ji3UKqMxuZnk1IjjKmvlwO/k3gdgN VYKaCuVEv3ozuDqKSCyHk5RqxdiS0/TKZUEuvif8p3PmhXiNsh9hWaQT59Fvv4itJBVf eea4r0Xjp6xKsePA3bAnAbWHRZnnEh7oKY7tPMuCl47uBRrnNACi26wnqFyv0gmTwGYe 1upfSlHX96RqI3X4Bjr82b9/04u9oLnYR5duxFbonEgnKg2QNqUNd1nIaNrDQif4+V2m FDKkY9/BU/2gbKKkQ4nDVMg4tDG6k5Gmu4edr7eQ+/HCvmd+vWJ0Gt9GqS5pn4/5X40Y GAWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=CwqeB4dT; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a17090ad80e00b00209a3e49f63si1863762pjv.94.2023.02.01.06.44.18; Wed, 01 Feb 2023 06:44:30 -0800 (PST) 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=@fris.de header.s=dkim header.b=CwqeB4dT; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232656AbjBAOn2 (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232460AbjBAOnK (ORCPT ); Wed, 1 Feb 2023 09:43:10 -0500 X-Greylist: delayed 489 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Feb 2023 06:43:04 PST Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78C3E206AC; 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 18DBAC0332; Wed, 1 Feb 2023 15:35:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262101; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=tRPLVPhQGfVkVFWzPuN9DvSL3QBjCj23rMy0j/6al9U=; b=CwqeB4dTR4bNwnbWH+uy8G3p5eaDqx2CL3VBGwSjEhHDwdgRV1RpUGfDxY1zycrhDuROCk /VL8MRxVzVbgNf0WUqKIDEuNKuGk9blUnlz1j+ZieGIKne3DjlrR4G71P8WZrLF1h0N+LG gPOljEtesiFpL5OnCMJ33a93OGGqmMNiN8AINW+IQ6naVFFtgmWnEfkeYD9mJiBkVXWj6G x6NqTYHYxqhpFbmfE2lG584wmUtL38K4wiNF5dETxa8DYmEvoyq8XlhxZZ72b5VufBguAK 6xhGrusdfgmCd1JiuRPHvKvct3JhNAK3KEcN7K/b6XhAm11vHVvY8f1iqCDiGg== From: Frieder Schrempf To: Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Rob Herring Cc: Frieder Schrempf Subject: [PATCH 3/7] dt-bindings: rtc: microcrystal,rv3032: Add backup-switch-mode property Date: Wed, 1 Feb 2023 15:34:25 +0100 Message-Id: <20230201143431.863784-4-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640229961406308?= X-GMAIL-MSGID: =?utf-8?q?1756640229961406308?= From: Frieder Schrempf Add the new backup-switch-mode property that allows to set the BSM via devicetree. Signed-off-by: Frieder Schrempf --- .../devicetree/bindings/rtc/microcrystal,rv3028.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml b/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml index 4667ba86fd0c..2637c4c313ac 100644 --- a/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml +++ b/Documentation/devicetree/bindings/rtc/microcrystal,rv3028.yaml @@ -22,6 +22,8 @@ properties: interrupts: maxItems: 1 + backup-switch-mode: true + start-year: true trickle-resistor-ohms: @@ -40,6 +42,7 @@ additionalProperties: false examples: - | #include + #include i2c { #address-cells = <1>; #size-cells = <0>; @@ -49,6 +52,7 @@ examples: reg = <0x52>; pinctrl-0 = <&rtc_nint_pins>; interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>; + backup-switch-mode: ; trickle-resistor-ohms = <3000>; }; }; From patchwork Wed Feb 1 14:34:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51367 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317301wrn; Wed, 1 Feb 2023 06:44:29 -0800 (PST) X-Google-Smtp-Source: AK7set98m0aUWApfYq+nr2MN4/xEDyI+ngCCH1Ny1jcjEPvyK1ccxnMdSx1P1Kz4PNfcd3I54mOJ X-Received: by 2002:a17:90b:4d08:b0:229:932:a0f3 with SMTP id mw8-20020a17090b4d0800b002290932a0f3mr2456452pjb.27.1675262669144; Wed, 01 Feb 2023 06:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262669; cv=none; d=google.com; s=arc-20160816; b=uA3VW8a4AU5Se0spzpjg2LFOTmzWEZDH/2RPBNr4mfRD5Ub2YmFng46SoBUwKgWaY4 I/HVULjJD+dhWJE3RmzsxkLMkW69bFWvElF7q6UkzGJsrcSMRYissYkG3s5fAUcb+7zC 0G5opSVoCcb7q5CjfVt43C7xLIB72Ox9J5F+sI+vPIBAEzvu/dPFPFByyPznABLmLzbk xBU0tb4pSDtSnp6IpJwsR22jLGwbArhfoXdj2F1Khl3wZQXiTfk+t6ZcJpef/aTE34Rq mwRaQFDydgiTgpnEc8cLudKgzEkBF2TGS/1MAws2oxNSfmm9QbOkRFpMXoZDe/y7JyY2 9L8w== 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=lDLZ/xjvrtcN+1CWCH6iD2koCwn6Eb1LpwYqcz6QtGM=; b=PWOVGRFGtOq7fAZaSgjv0ZwzahqtSfVtvzDOkTK3x78HhQKorGYH3MgydYI4RBWALc 7SB294CuH46Eoh/r93TY6GfhX8yPgdYJ2DGIxh9kO70+HpuSTn9hrkg6yKFif2I9jiMh X/ukOl9LZ0ifnChg23cqnjSSVpH5LCcWgskJrcVovivbqTfzfyPKd56raQhvxHmVCCDd IxWMeDq6j1OvDlU3OZ/zGdRVVFq6bMZG90A9VFDv/epaoFm937qmxYPVPQ4p+WSb+oOA xeVGYdxjy/SpyPpoilkPY3JwtM/DS/GGPRSGtf0k6KR36LSanXBUhS2D4gAk46ZKAYTH F5fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=bZ55zZJ5; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 15-20020a17090a0f8f00b0022bb873fd4bsi1949545pjz.132.2023.02.01.06.44.17; Wed, 01 Feb 2023 06:44:29 -0800 (PST) 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=@fris.de header.s=dkim header.b=bZ55zZJ5; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232625AbjBAOnX (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232449AbjBAOnK (ORCPT ); Wed, 1 Feb 2023 09:43:10 -0500 X-Greylist: delayed 488 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Feb 2023 06:43:05 PST Received: from mail.fris.de (mail.fris.de [IPv6:2a01:4f8:c2c:390b::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B6282E0D0; Wed, 1 Feb 2023 06:43:04 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 663D9C033A; Wed, 1 Feb 2023 15:35:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262104; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=lDLZ/xjvrtcN+1CWCH6iD2koCwn6Eb1LpwYqcz6QtGM=; b=bZ55zZJ5eoXQhSN7w9SMB4VCaK51BKzgXkS33yOHee5bB2bhkPDekZpgtZ93c/YxCRE4lj ucP6wYBafqEQ4SNVYXa+DD8qqy3gnRx0R01rnQWNjyWybCCtgxv9zgv4i8Tf3tBUmv3lBP pFRu7HlgOucmf3Eb+CbBzy9BJLSWfwcbCA6r60JD0KySH1eEtuheqw9A4zQijH8Vq8t7k9 nQN+AWJYpWUnuilcqLkg7GvI4deowbc2IX/ABCe8mEG/QfFOrNopolv0QVTrPFn7dSpwBg Ppc3o7UfL9AtjanRkaLAay/rCZYwQW21UmgD0hn7VmgT1YuFneII41Cba86oAw== From: Frieder Schrempf To: Alessandro Zummo , Alexandre Belloni , devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Rob Herring Cc: Frieder Schrempf Subject: [PATCH 4/7] rtc: Move BSM defines to separate header for DT usage Date: Wed, 1 Feb 2023 15:34:26 +0100 Message-Id: <20230201143431.863784-5-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640228513164454?= X-GMAIL-MSGID: =?utf-8?q?1756640228513164454?= From: Frieder Schrempf To be able to use the BSM defines in the devicetree, move the defines to a separate header within the dt-bindings directory. Signed-off-by: Frieder Schrempf --- include/dt-bindings/rtc/rtc.h | 11 +++++++++++ include/uapi/linux/rtc.h | 6 +----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 include/dt-bindings/rtc/rtc.h diff --git a/include/dt-bindings/rtc/rtc.h b/include/dt-bindings/rtc/rtc.h new file mode 100644 index 000000000000..b0cc06d368c0 --- /dev/null +++ b/include/dt-bindings/rtc/rtc.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 OR MIT */ + +#ifndef _DT_BINDINGS_RTC_H +#define _DT_BINDINGS_RTC_H + +#define RTC_BSM_DISABLED 0 +#define RTC_BSM_DIRECT 1 +#define RTC_BSM_LEVEL 2 +#define RTC_BSM_STANDBY 3 + +#endif /* _DT_BINDINGS_RTC_H */ diff --git a/include/uapi/linux/rtc.h b/include/uapi/linux/rtc.h index 97aca4503a6a..9e78c17b5733 100644 --- a/include/uapi/linux/rtc.h +++ b/include/uapi/linux/rtc.h @@ -12,6 +12,7 @@ #ifndef _UAPI_LINUX_RTC_H_ #define _UAPI_LINUX_RTC_H_ +#include #include #include #include @@ -141,11 +142,6 @@ struct rtc_param { #define RTC_PARAM_CORRECTION 1 #define RTC_PARAM_BACKUP_SWITCH_MODE 2 -#define RTC_BSM_DISABLED 0 -#define RTC_BSM_DIRECT 1 -#define RTC_BSM_LEVEL 2 -#define RTC_BSM_STANDBY 3 - #define RTC_MAX_FREQ 8192 From patchwork Wed Feb 1 14:34:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317130wrn; Wed, 1 Feb 2023 06:44:04 -0800 (PST) X-Google-Smtp-Source: AK7set8cT/2szMy5pSiaEKWD/VRh/JwxwHpU/3esyJLc8UVZOqO0xZgwR/oQkBYgOzOdcAasJNKO X-Received: by 2002:a17:902:e844:b0:196:15a6:7332 with SMTP id t4-20020a170902e84400b0019615a67332mr2713827plg.31.1675262644334; Wed, 01 Feb 2023 06:44:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262644; cv=none; d=google.com; s=arc-20160816; b=ymBIKa0Z163dq1mLCND7JWfIZnL5/2VuSuSm3qfm+iJsf0r/bboQnL12jU5r6dNIPs e70bu82dfGJh9zia43XviB77l/L44lXX7eNabbnjAZn0xLnZvtlAzcU77fcUaw7GqMFp 8w399eW5G1R+0dINZ3dNLi5bNbexo5XT4ldsWClvVT9QhyClTeH01OP6CsWXBSHgYTZ3 x5qhDcur0MgkAnBFE3E92Xhz70krzWZTEUqH7j40eXkDbaaTUiujS1oT2c6bCNvg7F4d lJOSJHEnTd9uNh9Yer7b6EQeuRDLj4GoMd748UD1erLP6K/O059N09qaJ1RiZQiBP96I bnbw== 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=wvJB0OUDEjfjJl0NbgwhqGyfXYoeQO+CyeH0uszLyk0=; b=Aof7iNTV1u4NSu+z6ZuhZa4osgZFaWFHlUaSD4saoWCJwr+jHLoPmqqKwcZzoF+2Ys n7mJPR/BQThspSAdv2Pz6qGbSFyCSoBAJPSzaPfRPwYqYuvugKwcXUw3UWYzzT9tkuFB lqyVzV45a+A3Hg0ccLXY7izAsD7TwiD4V/yvmt+JmpvllFv0YkF0rpkBJ00Ci5NHve9L qX82O8xvDd8EUR60J1babTBicanvLVTYL32gu7maJVgVztqhbLHXQhMLdlEG/kEZm9fM 3INhcE8Tsf4hzz5rYhdjb7YclpM3E9+ocMYyFYPrk3vIYq18lo/dIffoZeHF28YESBrz SOLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=silF0PZR; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170902ea0400b00189ac5a25e8si6923296plg.160.2023.02.01.06.43.52; Wed, 01 Feb 2023 06:44:04 -0800 (PST) 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=@fris.de header.s=dkim header.b=silF0PZR; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231963AbjBAOnU (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232462AbjBAOnK (ORCPT ); Wed, 1 Feb 2023 09:43:10 -0500 X-Greylist: delayed 491 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Feb 2023 06:43:05 PST Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C03D2E80B; 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 432F6C033C; Wed, 1 Feb 2023 15:35:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262109; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=wvJB0OUDEjfjJl0NbgwhqGyfXYoeQO+CyeH0uszLyk0=; b=silF0PZRDEQ+cRx3MXl+8ZK4MfXSgw/Xeu5H/4fxJDygDKC88Zw65FY6WVG3pWEQ9DEWc0 Liz7qJ8O4M71oGThvh+zL2SIYCziQcwpNs8/M2KvA0TumO6qOo0g0pGIoyNDxteHsGkHG2 JxyR7kAoeie/HU69iXi7Wvt5qD+zNPrtwdBFTN1M6Y1AAHwsVQkyJJc8WUNoyt5lGWhtI4 eH5KZfnH8tUtL7cFta9BVXp0h6vqDYuoBkzey2F4UrBFonlCOrJwfx17HVJTVX1uAhfemC zFR0NAH3zLARFWNLNg4cVG1cAPOm3hRP+kjVFxtAAYUTB3+Uw6o6xBYgg1fAgw== From: Frieder Schrempf To: Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Frieder Schrempf , keliu , Shang XiaoJing , Vincent Whitchurch , Yang Yingliang Subject: [PATCH 5/7] rtc: class: Support setting backup switch mode from devicetree Date: Wed, 1 Feb 2023 15:34:27 +0100 Message-Id: <20230201143431.863784-6-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640202873826855?= X-GMAIL-MSGID: =?utf-8?q?1756640202873826855?= 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 available force the BSM to the desired value via devicetree by setting the 'backup-switch-mode' property. Signed-off-by: Frieder Schrempf --- drivers/rtc/class.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index e5b7b48cffac..79417d1fbeee 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -391,6 +391,11 @@ int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc) struct rtc_wkalrm alrm; int err; + struct rtc_param bsm = { + .param = RTC_PARAM_BACKUP_SWITCH_MODE, + .uvalue = RTC_BSM_DISABLED, + }; + if (!rtc->ops) { dev_dbg(&rtc->dev, "no ops set\n"); return -EINVAL; @@ -402,6 +407,15 @@ int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc) if (rtc->ops->set_offset) set_bit(RTC_FEATURE_CORRECTION, rtc->features); + /* setup backup switching mode */ + if (test_bit(RTC_FEATURE_BACKUP_SWITCH_MODE, rtc->features) && + !device_property_read_u32(rtc->dev.parent, "backup-switch-mode", + (u32 *)&bsm.uvalue)) { + err = rtc->ops->param_set(rtc->dev.parent, &bsm); + if (err && err != -EINVAL) + return err; + } + rtc->owner = owner; rtc_device_get_offset(rtc); From patchwork Wed Feb 1 14:34:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51364 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317043wrn; Wed, 1 Feb 2023 06:43:51 -0800 (PST) X-Google-Smtp-Source: AK7set/4pTlg0OiKyB9RFzZPtxhtpaam1RP68xEOeUB9klj93VisiGxfij75nPu/8WUdH+Z2YVHE X-Received: by 2002:a17:90b:4b52:b0:22c:1bca:2caf with SMTP id mi18-20020a17090b4b5200b0022c1bca2cafmr2530587pjb.35.1675262631488; Wed, 01 Feb 2023 06:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262631; cv=none; d=google.com; s=arc-20160816; b=KRmGaQDMd+rMrTyZvaH7Q/gPimHqwC5exV/BJLwzGfqiXCCtqFJpuwbiJVdq2TlUN0 A7DlWYFSySSl06PWbP20EoNeqyfeKInTZBqLL214vwywnDzcQf7QHZvXN4zlaYjQqRoW Pd1jyxmbkhR9ORYNFYGL+/CaVnG5Yimj6qNSWtgUbDSBwAKltvDzsg45WDg33ErpjhLu 0z4DZPaysTspBcJT/xvJLc/Ps+9HYmmHBm5fnz4jvZBQCw7BqDZ7XxHAMW71epLonMhi bhsJouQLo70NjbM1K19NlWvuQZ/8V4oY6WkBv3WgYunGv+ol6GWRSO5BhxVYri7/A97h b48A== 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=Dw2TOe9INXR0KNdyE/2U1NR4R/t62iyFFz/D+rvH3EY=; b=YUlGQPP51CZ3SZ53DlHdBxEEysuK+5TGrgL1TVSPWQ28LvkrRvCsToZWgSXsO0gcen 2RdnAXERLHCuh6vIpz3QePvCcOud8IPzr+egwf+nCSt7NuKn95ZKjjoZAcDuEycsgstg eBT8Fnks6Ju8sdjjhLtuLRzkldFv7WYlh66hkUA531tUOykZyAwPcyzg/Xzkpp4tHgSk 3/qjOFzKfZ35fVqvov0ToSFqzCzepASweYk2SYyOAYpQddBsKzPI3YaYrWaTyuoxIo3t MT7xMlpgxyKp37/7Z1UzZ4o7RDMN1SRo0M/S/kWdi7aInR/nLST4t2rKkw9gOAwChcGn cRog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b=oM1aKKVh; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191-20020a6388c8000000b004efac8cef1bsi2814616pgd.725.2023.02.01.06.43.38; Wed, 01 Feb 2023 06:43:51 -0800 (PST) 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=@fris.de header.s=dkim header.b=oM1aKKVh; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232543AbjBAOnM (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232081AbjBAOnK (ORCPT ); Wed, 1 Feb 2023 09:43:10 -0500 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B44B2D168; 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 48769C033E; Wed, 1 Feb 2023 15:35:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262116; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=Dw2TOe9INXR0KNdyE/2U1NR4R/t62iyFFz/D+rvH3EY=; b=oM1aKKVhGo4gLscn+2UMko2PQ1YXKH6d4Muvf1d9eKLSfZgdsAAk9BL2+NWKDco6kQWUVi GNJFEXushZCzqq5/8352i/I/CdFolWd1yBQLqiG9HJA2mZop71eicMHRhyIxTJFaG9LB+F u+X0TOA/HFXP5tLR3aS816HFTiCSffRYptxaeUAjQzmoGu6yOgf4jaWIqJjNeQWjWu0YfR GGVM0e6o2PdBjx5u3Rl6R2gDeuVE8x06ZFoIlW2ZHkdaxVvpgofByShri4m7a5iyvcPaCE YLmrj9+oYMDofBrjA+fKuKnxSv3OBI/jUHcNGnG9O3G6TLDChCYGHn3xv6Qxhg== From: Frieder Schrempf To: devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Sascha Hauer , Shawn Guo Cc: Frieder Schrempf , Fabio Estevam , Heiko Thiery , Krzysztof Kozlowski , Marek Vasut , NXP Linux Team , Pengutronix Kernel Team Subject: [PATCH 6/7] arm64: dts: imx8mm-kontron: Remove useless trickle-diode-disable from RTC node Date: Wed, 1 Feb 2023 15:34:28 +0100 Message-Id: <20230201143431.863784-7-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640189094770910?= X-GMAIL-MSGID: =?utf-8?q?1756640189094770910?= From: Frieder Schrempf The RV3028 driver doesn't use this property. Remove it. Signed-off-by: Frieder Schrempf --- arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi index 5172883717d1..131f98cf5a04 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi @@ -206,7 +206,6 @@ rtc@52 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rtc>; interrupts-extended = <&gpio4 1 IRQ_TYPE_LEVEL_HIGH>; - trickle-diode-disable; }; }; From patchwork Wed Feb 1 14:34:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 51366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317175wrn; Wed, 1 Feb 2023 06:44:10 -0800 (PST) X-Google-Smtp-Source: AK7set87hlj+/ACO8GO6LMzGH7eJISi5XeWvW9Hw2fidwECWkH8YXqBZ/UNGHu0Nhc39RsycyU3n X-Received: by 2002:aa7:9911:0:b0:592:5dd5:7655 with SMTP id z17-20020aa79911000000b005925dd57655mr2186086pff.28.1675262650444; Wed, 01 Feb 2023 06:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675262650; cv=none; d=google.com; s=arc-20160816; b=uoXqpg25OqhFNBon0KFKKJXnViznyZPuEPIzh67hv3rY8ygBzEPAAGRf1VnIxH13sk i0YgWmZ4WpFlAvs8PsgFmUq4saKAYsCj32rkz1lS5fDohdCfaTUt2ksd0kUm1sjnGdEg CMb2lzzWqEQ4GhX6C4IruV1v6Pwlt7SWg7Zo2hLzwtG0jJHVxUFtwScXTJBdlQTvZnIT /QwLu/rZIMmr40Ic4AQi/bIolelDM+Frb2wvclEw3iNKI79ABbs+LojTMckwKZ7Fsx+h zRGaz8M/v/V2uNGLi0fNzV4CXXnAdn7jtYTkpDnIiBAH5VzWTFwgmGJ+0KhmO/v/JXOM sSXg== 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=s+I2FNNs+N+h3hl6gVrjPwSvZ5ntoO7yYLOlsjMKshg=; b=Xi2pnz6vQD0kQasYGLbI9go3XWwRmqjvCGqa/a4Wa0mCSOJnRId8SRhY6xSjHi7BSg eeaZocFoJkfrclQorgO3UynCGDot9vVqqUnmRc2yRJ+LiZJy73euw2FD58vNFl9ZNJRQ 60I7wkM3IiWIsvR8pZndVITRIOJEeMFAqO43lpBze2BbG6jOvw7NZ/YFaerSFSA4WzUJ d3FbNtrEXPpCXuMnhfdlxvUDWA85DdxMWl+31RgO8IByZ7I223Pi9kWEq+gnsEgh80rS FvnVTTMzFK6OUg1MTxPjI6I8/PZgZM05fMflAj8rXVdvr3kJ0fAHiDIk7XUcudF+Txts Sg5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fris.de header.s=dkim header.b="X/aZQs7Z"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 190-20020a6205c7000000b0059394f3d4a0si13821667pff.93.2023.02.01.06.43.58; Wed, 01 Feb 2023 06:44:10 -0800 (PST) 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=@fris.de header.s=dkim header.b="X/aZQs7Z"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fris.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232525AbjBAOnQ (ORCPT + 99 others); Wed, 1 Feb 2023 09:43:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232502AbjBAOnK (ORCPT ); Wed, 1 Feb 2023 09:43:10 -0500 Received: from mail.fris.de (mail.fris.de [116.203.77.234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39E1EF751; Wed, 1 Feb 2023 06:43:04 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A3F56C0340; Wed, 1 Feb 2023 15:35:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fris.de; s=dkim; t=1675262122; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=s+I2FNNs+N+h3hl6gVrjPwSvZ5ntoO7yYLOlsjMKshg=; b=X/aZQs7ZNCRFZ3MdWAMbtDzLN1eXorx7zqRcGW/qhiRxZxgRp0Kgil1B5Oes0tlJnDJbgt JTNHlMqlMF7pRitaPnLv3YBoWWkiVJLkHN5hf3r/AISUyQIpj25+oH8yRuFOL7L7H3QXk3 jU/1xffz52Ul4TR4OZZmEU42yLNjywbNT7aTYpbkbA4fRNZnbzkAqWLH3iGlUDBed6trYG +V39IaEbSi4eFiqYwghw5K5KZ/kPbh2oNf+3nATF3IWWYxfoNFNHUgh1GnC80ITObIT9PK Pn8ZZJkbMb/LgNdg981I76EOEeXzSuWDTMFI4finyA6fYyPBHv0xEO2tLx+F9Q== From: Frieder Schrempf To: devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Sascha Hauer , Shawn Guo Cc: Frieder Schrempf , Fabio Estevam , Heiko Thiery , Krzysztof Kozlowski , Marek Vasut , NXP Linux Team , Pengutronix Kernel Team Subject: [PATCH 7/7] arm64: dts: imx8mm-kontron: Enable backup switch mode for RTC on OSM-S module Date: Wed, 1 Feb 2023 15:34:29 +0100 Message-Id: <20230201143431.863784-8-frieder@fris.de> In-Reply-To: <20230201143431.863784-1-frieder@fris.de> References: <20230201143431.863784-1-frieder@fris.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756640209304156697?= X-GMAIL-MSGID: =?utf-8?q?1756640209304156697?= From: Frieder Schrempf The board has a battery backup supply for the RTC, but the factory default is to have BSM disabled. Therefore the time will not be preserved if the board is not supplied. Fix this by forcing the RTC into BSM level mode. Signed-off-by: Frieder Schrempf --- arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi index 131f98cf5a04..5188b5b718a0 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-osm-s.dtsi @@ -4,6 +4,7 @@ */ #include +#include #include "imx8mm.dtsi" / { @@ -206,6 +207,7 @@ rtc@52 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rtc>; interrupts-extended = <&gpio4 1 IRQ_TYPE_LEVEL_HIGH>; + backup-switch-mode = ; }; };