Message ID | 20231024-topic-pcf85363_hiz_output-v1-2-50908aff0e52@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:6b8b:b0:164:83eb:24d7 with SMTP id ta11csp2777474rwb; Wed, 25 Oct 2023 09:22:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbMRQ0AJiDEVW50p7OUvo8zODnX/tYcYf4Zh4eIBUqiLtwpYaMtX4ev3CnAiBp+eJsu0nm X-Received: by 2002:a25:238a:0:b0:da0:5f41:2e67 with SMTP id j132-20020a25238a000000b00da05f412e67mr4100003ybj.5.1698250957293; Wed, 25 Oct 2023 09:22:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698250957; cv=pass; d=google.com; s=arc-20160816; b=ZtycED3OOuRtVHHv97Ug6qQApKbRGaTh1pqbgas/CdxlaFePcmdsIyOkhQ4fwMRp8j UXOuioqOIncct37FxRoqeoTV/vObBIVgXOkuyvaTgLRFC+EHa5oG/SRImIINm2UnwXod UpGWJKAfunfhYfK8JV1NCmSArguifXyDrQP77QFm1EiL+YZKCSDpOD0v9vQfGUHza15k 3G2wxHryegCbhAcbw6+Y8XssMWEBMYmTAmsre2PzMFiWOYJ8jMX8Kh0qUu5CDgXGU/nQ 5pi9/uDWXy9uqpMV47CDqc2Ec6nBhPBOiwCyPCx2Y7asPuBrKrJtM8itNiUhI0Ldf1AO lAGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=3x2jylEEFQhqMBQxTF3MG6sZk4ZTnycZ0jC+ICuTNxA=; fh=WGYDx7G3tm+UTbKqpnFEp2KY6hmZjF4Jkz7/+/tC2Mg=; b=Krbik8fV0z6n9Ni/8oeXDWnBqDugK2Ce/5ZnIg0AjIbrQYAPY7GYW0E/FLw3PdpRcw Rj2TY0LQnDvnDumC5dFDxiAW2EfLsJijBsZDimg7jzFwS4kNoSYtLnZHN02GLwkPRJNq PdM05EDEhaXoEZ9yb31XYusIMX8p6R/Rlsad5f9cB1oyq5fmQBlMUQ3eJXVc9G1DGbQM 25lcCWVN54ePZyZ3NpDPlefA7anHBMdT1xxWtHqLfW9ndQ88M1Rh+b+Coi2xWCdzJPWM 6QAR5S1ew8glw/hRWco8bNKzfCX6NStomNAPPPQvJb7j65B6ev286vF9Cb93hfT1SiUu x38w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=foZ9tYz7; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id w202-20020a25c7d3000000b00da07dadfeaasi2021993ybe.587.2023.10.25.09.22.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 09:22:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=foZ9tYz7; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EE6AC814C68D; Wed, 25 Oct 2023 09:22:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234488AbjJYQWM (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Wed, 25 Oct 2023 12:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233317AbjJYQWG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Oct 2023 12:22:06 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2063.outbound.protection.outlook.com [40.107.21.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 981A610E; Wed, 25 Oct 2023 09:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rm+8Cm0KZxVAnZAxe5QHjuimnW91pgHhpTMqCYFrnmd68Ah5t1sd4qGogUjBzFjStDGWxycK4/x2eUbQ2KGN08l5U3RXnF2QPV2UsgptkQgMBCeYXr2QebpiebuX6PtC5IqQ1s3DipB4nthRncwzZWF6ZPmB1IoTSz2EUqA9uinLeDdrbebJrTB/FlxpVJMlFx/xN90Y/L1F/6I8l0bSAdAyvJ3dZshvg1AWMoVB8vDkb/VGcGOV3L3doAhpxmWnABC0MKDsGud1AHWegbp5zWDGgxBJ4PI8dE0ugWIjnrqsb/gq9Htytoc9fCJf9U+7PZCGar/c4lVEzq67kQxy8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3x2jylEEFQhqMBQxTF3MG6sZk4ZTnycZ0jC+ICuTNxA=; b=Pdp6gMWxQfK3p2B1z4CSWhD0HwCWEz38OkF+5Xa7QSHGFJT00YQhXyoFxZGjxIj+fBsmYdorhb4+rnzkX5KITiEfa3ec8ETp0Vzskqnl1vkL92TKa+BMSfsps3dpdytIUP5VqgwtcREjk61c+8B/oqPBU5Lv1MmHjXXB1BJK3uUPxH4q5EfXan2Yy8NgfUdLxX+QUJJXhTfzVBQiFrUSz0BJpgsUrnoZRStgA1YpuWstn5pgjEYecvo/YVGveu76EXSN4jzdGNd2HHwKQUpX1rO9Y61D1j9W+rv0vqg2+VcBJoe/xngq8h22bKxj538Kzb4uJeUmh0EWTXZtznpLMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3x2jylEEFQhqMBQxTF3MG6sZk4ZTnycZ0jC+ICuTNxA=; b=foZ9tYz7nBfrmoY1u9z/RZwUwyTciKgNBrK5ZXVHu4H/JfkSRi+j3E/yGWGitUyeoLJBJZXm6dgHQZo1R//ztnUX4KuAJwNbrRw3OpBfbnyyQBw9Y6sTNeB3OGsLW9ywYqSlWBDOX/FQXL79bzb5N04nnbCAQSwQW6r0ccByGQc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by VI1PR08MB5376.eurprd08.prod.outlook.com (2603:10a6:803:13e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Wed, 25 Oct 2023 16:21:59 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::a309:1d65:f5fb:436b]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::a309:1d65:f5fb:436b%6]) with mapi id 15.20.6933.019; Wed, 25 Oct 2023 16:21:59 +0000 From: Javier Carrasco <javier.carrasco@wolfvision.net> Date: Wed, 25 Oct 2023 18:21:55 +0200 Subject: [PATCH 2/2] dt-bindings: rtc: nxp,pcf8563: add hiz-output property Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231024-topic-pcf85363_hiz_output-v1-2-50908aff0e52@wolfvision.net> References: <20231024-topic-pcf85363_hiz_output-v1-0-50908aff0e52@wolfvision.net> In-Reply-To: <20231024-topic-pcf85363_hiz_output-v1-0-50908aff0e52@wolfvision.net> To: Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Javier Carrasco <javier.carrasco@wolfvision.net> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1698250918; l=2113; i=javier.carrasco@wolfvision.net; s=20230509; h=from:subject:message-id; bh=rqDdWYoPOl/WqKlVTb3ATpZe4jxSW4DUjdgvmC9BmGg=; b=S8MFlT+EJBnhx+hltMYRFhalHnII5UAvH7GJJKGI8jetvw3yXZ827Ae8xqMEzvzC10fJpYByw 0dMSKVyyzkAAcd2YPU4rYGn/ZM/gDu499JrYK2JmsyGgO/UJ5B0HZfk X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=tIGJV7M+tCizagNijF0eGMBGcOsPD+0cWGfKjl4h6K8= X-ClientProxiedBy: VI1PR0102CA0040.eurprd01.prod.exchangelabs.com (2603:10a6:803::17) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|VI1PR08MB5376:EE_ X-MS-Office365-Filtering-Correlation-Id: f41c3f1c-5771-467c-37f9-08dbd576838a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0BhXvqCPpFUdKfwSHTBAYxJ8t7jGRbDJ2HGGn+ANcc/NmvGzcz6zy78fJCGDfttZ3U0k9BOc4c+VkBqXxf/gdOU2s5rIMhPBCktfVgGLL+Ww6liJ04OSzaeOt+pZiPE7C1u2KbyW7Rl3AT8GTvF5TsEykp1/iHDpQvvM2P7UY8sfHny+dZenGRRLRdMOtxARsW5C0GuzsZmiQiioC1EpuIYhfunadexx0PUj0ELoydRnSXiliP768YEq0vkTWoT0S10v+dpl0bSU5ICDVTFKNAL5Ru58eo9KJVY8koS4cdEMo0esYxjOzes/sWaehs3MBzE4BnS9Ml+9TaEJEe0DCIOd8QuxSIHx5EPUyX8K4mtfVKHwDsP84z64Ssjl9/9sUDsH8yTRPWwdrHkWpX5Bw0pbTkeDfGCi1t7R88B7qSvkAs7pzWcuv2mPLQ9zZJLoPkwaNL0AKytsFuvkqr4F3tIk5PaAhUD3W8DRyuDDNuw3HyOXCi4Il+9R7hgQSIMj4W4ybnOUsKYC+JhNpwgCvYF4AqkU3bdVJ12wzSoMT0Pq+i7jaAW2TFsHFuHaJBWvfvFWhpi9g+4b6Y0nUN9Co11RKFgkmYHuWcrVAWhYiLQQK7QHSvv12CRzCdCCSIVR X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39840400004)(396003)(376002)(136003)(366004)(230922051799003)(64100799003)(186009)(1800799009)(451199024)(4326008)(2906002)(8676002)(8936002)(44832011)(83380400001)(6486002)(107886003)(52116002)(5660300002)(41300700001)(6512007)(6506007)(86362001)(316002)(110136005)(26005)(478600001)(6666004)(2616005)(36756003)(38100700002)(66946007)(66556008)(66476007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?M1L0ovYcB1AB+d7qAGBfwnXB/iwz?= =?utf-8?q?AsWlxKx8QsprYBekyiuuaGIgR0AQIQ8wKfoPhU/XcTDiVr14KW/nVStw07knsndBv?= =?utf-8?q?GfftZ0tlu38I+msZHy/q8fJk7rAgBfFx450dwotbB6ea9MCl/UAA2rJzzy+XWQvv6?= =?utf-8?q?nP8dRTzzPgh89x7XK3xEHpPDxRcHQuRYQ5a2Q0gSlm3SpJ6OyReDdnLKaQqcVjw7C?= =?utf-8?q?s4EGkSjXZLAw6KVVBvFTjUMq5Jp7OG2taY3WCO6nQ0M23BPEcO6wb/9vxJjkJXPfC?= =?utf-8?q?SdOkvoywYnr7JF1hDmx43jTbdkXLBrYT6TNBab76wI/acnogw/keIs2POXg/cmw3c?= =?utf-8?q?b/Ts3xsV67XSO86TwaSFYD8msBD/18nyorppNUJo7fNkzGNklbVPyqJlTOzjwKTk9?= =?utf-8?q?f698948qTLVLqjyBjJke3RotNAvv8g6Y72lR//myafuSprewyFEM9F5hLXn9esDXr?= =?utf-8?q?NxJonlocdrftf7UgaeradKLjnTCWvQvSsNf91phhg78gfEh4lHwIZgLcwJtPtlklB?= =?utf-8?q?IdwNcByUaVj1IcRfTw1ZOHeIFgzm6+iDGIgDrbhlGJdK+HNyTcZor7JVMUCUDmZsu?= =?utf-8?q?4MR8P+zUYugBpaqr2GyRkhRqLLl6u6isUC5WlLzKI0h42sYWFwuJ9DULcD74KhPcN?= =?utf-8?q?l+fU5BJuSWhdJGjAxqIgTJy4A4j6pfMKCLkrhNzqWENi31ZWjgxSgWzxE+VMKqP7W?= =?utf-8?q?piqxEciwAmrVfHlTY7I2bUNVpnyUWAHqefZY3ksgwXpKyy7HHmgFw7SjRLu+EymdI?= =?utf-8?q?VvCE2c4dsXVsh8IdoCDcuxkFyqGhA3NmFRCSh85pjJkvqhot7PTl2EeXpsMMu9mfI?= =?utf-8?q?v4if7QZLgOw8xYLy/ExrPJbLoszMjMYbChcyEahlkn4Y97DisgXhRsFb3BMKU84T+?= =?utf-8?q?/zptKER82ncYRMzIRuOZY9yiaxj6gZrEEOzaJLTGDGIwkZHXG+PBOXM/P5O8swWDu?= =?utf-8?q?V15W4Otx81kKfcuw6AgvviLwLFDMp6yHwxLqYdmqAV2JukAk+1E4R8bhj904EZgyK?= =?utf-8?q?+PITx8L+OYgRztTI/KUTH2VjfV+FDxT5wRbUAJmvdHWfL8nDxv5q20dFIfKnSKtBC?= =?utf-8?q?pQtHOxgNEnBpunYglVlZ5RItOjC1PKd0ppThA2s7YU1M6G4Zq3OzwOveCUg2QqP1z?= =?utf-8?q?512TN3RtJOIDDMk6mD8/eOjmZEqqzq1fkTUDUx4An1L9O62M9IyJYBA08hqU1cMaA?= =?utf-8?q?pwBrqWL8hRwaQ3au9LxxPUQOQOeC9ilujOMBbhrtUi2DP8MgbuZtmMvvloQt5+4GU?= =?utf-8?q?Fzvlu1YX5Bpe5gz/B2ekC1IEJpCOsYq5owu/vVsT92EClJkQv5c+13VGEI7dRVMoU?= =?utf-8?q?pyxhoNL81X1Q8yHLme0DHYBz+5/ECoxlJrq+MisdACp+EjusGuUH9KiwTmJ1J1Rsq?= =?utf-8?q?A46qHWYAS2nWKru9M7GY2UNBM3UTTU4x496sYXWjwHn2gfKBsfc4Z3jQ6WRw5cTtd?= =?utf-8?q?fosm1QGv5pqtPUqqYkw1JLtS3Xd8o8KiXPM9d1QSFkcTrX+EpPsNUkl0rhYkxC0IU?= =?utf-8?q?s26TUuzuWU4Nsi5QSszmSIiDYx7/+pzoBVTtQGVr1EKWXWh5PSL6Rmc=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: f41c3f1c-5771-467c-37f9-08dbd576838a X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2023 16:21:59.4176 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lGXW0xwlcr4hqXWSZn/ltlwsaQeKidBO8R1wrQqvYGb/AeP5chhYB53OarEisTb+02AZO0Od9oz3yMZuAOmjz5WjAzC9CAQkJswSI2dVsV0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5376 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 25 Oct 2023 09:22:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780745195747290878 X-GMAIL-MSGID: 1780745195747290878 |
Series |
rtc: pcf85363: add support for high-impedance output
|
|
Commit Message
Javier Carrasco
Oct. 25, 2023, 4:21 p.m. UTC
The "hiz-output" property models the RTC output as a high-impedance
(hi-Z) output.
This property is optional and if it is not defined, the output will
either act as an output clock (default mode) or as an interrupt
depending on the configuration set by other properties.
Two modes are defined in case the high-impedance is used: "enabled" and
"sleep". The former disables the RTC output completely while the latter
keeps the RTC output disabled until the system enters in sleep mode.
This option is especially relevant if the output clock is used to feed a
PMU, a PMIC or any other device required to run when the rest of the
system is down. For the sake of completeness, a "disabled" mode has been
added, which acts as if the property was not defined.
Document "hiz-output" as a non-required property.
Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Comments
Hello, I'm sorry I never replied to your previous thread... On 25/10/2023 18:21:55+0200, Javier Carrasco wrote: > The "hiz-output" property models the RTC output as a high-impedance > (hi-Z) output. > > This property is optional and if it is not defined, the output will > either act as an output clock (default mode) or as an interrupt > depending on the configuration set by other properties. > > Two modes are defined in case the high-impedance is used: "enabled" and > "sleep". The former disables the RTC output completely while the latter > keeps the RTC output disabled until the system enters in sleep mode. > This option is especially relevant if the output clock is used to feed a > PMU, a PMIC or any other device required to run when the rest of the > system is down. For the sake of completeness, a "disabled" mode has been > added, which acts as if the property was not defined. > > Document "hiz-output" as a non-required property. > > Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> > --- > Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml > index 52aa3e2091e9..4b27a9154191 100644 > --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml > +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml > @@ -36,6 +36,19 @@ properties: > enum: [6000, 7000, 12500] > default: 7000 > > + hiz-output: > + description: > + Use enabled if the output should stay in high-impedance. This > + mode will mask the output as an interrupt source. > + Use sleep if the otuput should be only active in sleep mode. > + This mode is compatible with any other output configuration. > + The disabled value acts as if the property was not defined. > + enum: > + - enabled > + - sleep > + - disabled > + default: disabled > + If instead of using a custom property, you consider this as what it actually is: pinmuxing, then everything else comes for free. With pinctrl, you can define different states for runtime and sleep and they will get applied automatically instead of open coding in the driver. Also, how you define this property means that everyone currently using this RTC is going to have a new warning that they should just ignore.
Hi Alexandre, On 26.10.23 00:23, Alexandre Belloni wrote: > Hello, > > I'm sorry I never replied to your previous thread... > > On 25/10/2023 18:21:55+0200, Javier Carrasco wrote: >> The "hiz-output" property models the RTC output as a high-impedance >> (hi-Z) output. >> >> This property is optional and if it is not defined, the output will >> either act as an output clock (default mode) or as an interrupt >> depending on the configuration set by other properties. >> >> Two modes are defined in case the high-impedance is used: "enabled" and >> "sleep". The former disables the RTC output completely while the latter >> keeps the RTC output disabled until the system enters in sleep mode. >> This option is especially relevant if the output clock is used to feed a >> PMU, a PMIC or any other device required to run when the rest of the >> system is down. For the sake of completeness, a "disabled" mode has been >> added, which acts as if the property was not defined. >> >> Document "hiz-output" as a non-required property. >> >> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> >> --- >> Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml >> index 52aa3e2091e9..4b27a9154191 100644 >> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml >> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml >> @@ -36,6 +36,19 @@ properties: >> enum: [6000, 7000, 12500] >> default: 7000 >> >> + hiz-output: >> + description: >> + Use enabled if the output should stay in high-impedance. This >> + mode will mask the output as an interrupt source. >> + Use sleep if the otuput should be only active in sleep mode. >> + This mode is compatible with any other output configuration. >> + The disabled value acts as if the property was not defined. >> + enum: >> + - enabled >> + - sleep >> + - disabled >> + default: disabled >> + > > If instead of using a custom property, you consider this as what it > actually is: pinmuxing, then everything else comes for free. With > pinctrl, you can define different states for runtime and sleep and they > will get applied automatically instead of open coding in the driver. > > Also, how you define this property means that everyone currently using > this RTC is going to have a new warning that they should just ignore. > > Thanks for your reply. The warning can only be triggered if the property is defined, so in principle no one could have that warning yet. Only the ones who actually define it and use an invalid value would get the warning. On the other hand I did not consider your approach, which might make this patch irrelevant. So I will have a look at it to make sure that it achieves the same results. Thanks again and best regards, Javier Carrasco
Hi, On 26.10.23 00:30, Javier Carrasco wrote: > Hi Alexandre, > > On 26.10.23 00:23, Alexandre Belloni wrote: >> Hello, >> >> I'm sorry I never replied to your previous thread... >> >> On 25/10/2023 18:21:55+0200, Javier Carrasco wrote: >>> The "hiz-output" property models the RTC output as a high-impedance >>> (hi-Z) output. >>> >>> This property is optional and if it is not defined, the output will >>> either act as an output clock (default mode) or as an interrupt >>> depending on the configuration set by other properties. >>> >>> Two modes are defined in case the high-impedance is used: "enabled" and >>> "sleep". The former disables the RTC output completely while the latter >>> keeps the RTC output disabled until the system enters in sleep mode. >>> This option is especially relevant if the output clock is used to feed a >>> PMU, a PMIC or any other device required to run when the rest of the >>> system is down. For the sake of completeness, a "disabled" mode has been >>> added, which acts as if the property was not defined. >>> >>> Document "hiz-output" as a non-required property. >>> >>> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net> >>> --- >>> Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml | 14 ++++++++++++++ >>> 1 file changed, 14 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml >>> index 52aa3e2091e9..4b27a9154191 100644 >>> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml >>> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml >>> @@ -36,6 +36,19 @@ properties: >>> enum: [6000, 7000, 12500] >>> default: 7000 >>> >>> + hiz-output: >>> + description: >>> + Use enabled if the output should stay in high-impedance. This >>> + mode will mask the output as an interrupt source. >>> + Use sleep if the otuput should be only active in sleep mode. >>> + This mode is compatible with any other output configuration. >>> + The disabled value acts as if the property was not defined. >>> + enum: >>> + - enabled >>> + - sleep >>> + - disabled >>> + default: disabled >>> + >> >> If instead of using a custom property, you consider this as what it >> actually is: pinmuxing, then everything else comes for free. With >> pinctrl, you can define different states for runtime and sleep and they >> will get applied automatically instead of open coding in the driver. I am not sure if your solution would cover all my needs: 1.- With pinctrl I can model the SoC pins, right? That would not stop the RTC output though, so the 32 kHz signal would be generated anyways even though the SoC would ignore it. That is one of the things I want to avoid. 2.- What happens if the RTC output is a clock for an external device that is only required when the SoC is in sleep mode? In that case I would like the RTC driver to control the output with the modes it provides. >> >> Also, how you define this property means that everyone currently using >> this RTC is going to have a new warning that they should just ignore. >> >> > Thanks for your reply. The warning can only be triggered if the property > is defined, so in principle no one could have that warning yet. Only the > ones who actually define it and use an invalid value would get the warning. > > On the other hand I did not consider your approach, which might make > this patch irrelevant. So I will have a look at it to make sure that it > achieves the same results. > > Thanks again and best regards, > Javier Carrasco >
On 26/10/2023 01:23:21+0200, Javier Carrasco wrote: > >>> + hiz-output: > >>> + description: > >>> + Use enabled if the output should stay in high-impedance. This > >>> + mode will mask the output as an interrupt source. > >>> + Use sleep if the otuput should be only active in sleep mode. > >>> + This mode is compatible with any other output configuration. > >>> + The disabled value acts as if the property was not defined. > >>> + enum: > >>> + - enabled > >>> + - sleep > >>> + - disabled > >>> + default: disabled > >>> + > >> > >> If instead of using a custom property, you consider this as what it > >> actually is: pinmuxing, then everything else comes for free. With > >> pinctrl, you can define different states for runtime and sleep and they > >> will get applied automatically instead of open coding in the driver. > > I am not sure if your solution would cover all my needs: > > 1.- With pinctrl I can model the SoC pins, right? That would not stop > the RTC output though, so the 32 kHz signal would be generated anyways > even though the SoC would ignore it. That is one of the things I want to > avoid. > No, you would model the INTA pin. > 2.- What happens if the RTC output is a clock for an external device > that is only required when the SoC is in sleep mode? In that case I > would like the RTC driver to control the output with the modes it provides. Even if I doubt this is a valid use case, this would be possible as long as the external device node has the correct pinctrl-* properties. > >> > >> Also, how you define this property means that everyone currently using > >> this RTC is going to have a new warning that they should just ignore. > >> > >> > > Thanks for your reply. The warning can only be triggered if the property > > is defined, so in principle no one could have that warning yet. Only the > > ones who actually define it and use an invalid value would get the warning. > > > > On the other hand I did not consider your approach, which might make > > this patch irrelevant. So I will have a look at it to make sure that it > > achieves the same results. > > > > Thanks again and best regards, > > Javier Carrasco > >
On 26.10.23 02:50, Alexandre Belloni wrote: > On 26/10/2023 01:23:21+0200, Javier Carrasco wrote: >>>>> + hiz-output: >>>>> + description: >>>>> + Use enabled if the output should stay in high-impedance. This >>>>> + mode will mask the output as an interrupt source. >>>>> + Use sleep if the otuput should be only active in sleep mode. >>>>> + This mode is compatible with any other output configuration. >>>>> + The disabled value acts as if the property was not defined. >>>>> + enum: >>>>> + - enabled >>>>> + - sleep >>>>> + - disabled >>>>> + default: disabled >>>>> + >>>> >>>> If instead of using a custom property, you consider this as what it >>>> actually is: pinmuxing, then everything else comes for free. With >>>> pinctrl, you can define different states for runtime and sleep and they >>>> will get applied automatically instead of open coding in the driver. >> >> I am not sure if your solution would cover all my needs: >> >> 1.- With pinctrl I can model the SoC pins, right? That would not stop >> the RTC output though, so the 32 kHz signal would be generated anyways >> even though the SoC would ignore it. That is one of the things I want to >> avoid. >> > > No, you would model the INTA pin. I am sorry for insisting on this topic, but if I get you right, I would be modeling an interrupt pin (INTA) to keep it from generating a clock signal when the RTC itself offers a high-impedance mode i.e. avoiding to use the RTC feature. Is that not a misuse of the INTA pin in the first place? If there was no other option, that would be an easy fix, but why would we not implement the hi-Z mode when it is available? If I see a pinctrl-* modeling an interrupt pin, it is not obvious that I am doing that to stop the clock signal and I would have to clarify it explicitly, especially if I am not interested in the interrupt. I would rather implement and document the hi-Z mode the RTC offers instead of using another mode like INTA which actually can trigger interrupts. If the implementation must be different is of course another topic. > >> 2.- What happens if the RTC output is a clock for an external device >> that is only required when the SoC is in sleep mode? In that case I >> would like the RTC driver to control the output with the modes it provides. > > Even if I doubt this is a valid use case, this would be possible as long > as the external device node has the correct pinctrl-* properties. > > >>>> >>>> Also, how you define this property means that everyone currently using >>>> this RTC is going to have a new warning that they should just ignore. >>>> >>>> >>> Thanks for your reply. The warning can only be triggered if the property >>> is defined, so in principle no one could have that warning yet. Only the >>> ones who actually define it and use an invalid value would get the warning. >>> >>> On the other hand I did not consider your approach, which might make >>> this patch irrelevant. So I will have a look at it to make sure that it >>> achieves the same results. >>> >>> Thanks again and best regards, >>> Javier Carrasco >>> >
On 26/10/2023 11:41:47+0200, Javier Carrasco wrote: > > On 26.10.23 02:50, Alexandre Belloni wrote: > > On 26/10/2023 01:23:21+0200, Javier Carrasco wrote: > >>>>> + hiz-output: > >>>>> + description: > >>>>> + Use enabled if the output should stay in high-impedance. This > >>>>> + mode will mask the output as an interrupt source. > >>>>> + Use sleep if the otuput should be only active in sleep mode. > >>>>> + This mode is compatible with any other output configuration. > >>>>> + The disabled value acts as if the property was not defined. > >>>>> + enum: > >>>>> + - enabled > >>>>> + - sleep > >>>>> + - disabled > >>>>> + default: disabled > >>>>> + > >>>> > >>>> If instead of using a custom property, you consider this as what it > >>>> actually is: pinmuxing, then everything else comes for free. With > >>>> pinctrl, you can define different states for runtime and sleep and they > >>>> will get applied automatically instead of open coding in the driver. > >> > >> I am not sure if your solution would cover all my needs: > >> > >> 1.- With pinctrl I can model the SoC pins, right? That would not stop > >> the RTC output though, so the 32 kHz signal would be generated anyways > >> even though the SoC would ignore it. That is one of the things I want to > >> avoid. > >> > > > > No, you would model the INTA pin. > I am sorry for insisting on this topic, but if I get you right, I would > be modeling an interrupt pin (INTA) to keep it from generating a clock > signal when the RTC itself offers a high-impedance mode i.e. avoiding to > use the RTC feature. > > Is that not a misuse of the INTA pin in the first place? If there was no > other option, that would be an easy fix, but why would we not implement > the hi-Z mode when it is available? If I see a pinctrl-* modeling an > interrupt pin, it is not obvious that I am doing that to stop the clock > signal and I would have to clarify it explicitly, especially if I am not > interested in the interrupt. > > I would rather implement and document the hi-Z mode the RTC offers > instead of using another mode like INTA which actually can trigger > interrupts. If the implementation must be different is of course another > topic. There is a pin named INTA, it can mux 4 different functions: - clock output - battery mode indication - interrupt - HiZ with pinmuxing, you can select which function you want for the pin. I'm not sure what is misused there. Can you explain what is your actual use case? I'm starting to understand that what you want is simply disable clock out because you are not using the interrupt. If we assume we are never going to use battery mode, then we could simply used the CCF for this like the other RTC drivers.
On 26.10.23 11:56, Alexandre Belloni wrote: > On 26/10/2023 11:41:47+0200, Javier Carrasco wrote: >> >> On 26.10.23 02:50, Alexandre Belloni wrote: >>> On 26/10/2023 01:23:21+0200, Javier Carrasco wrote: >>>>>>> + hiz-output: >>>>>>> + description: >>>>>>> + Use enabled if the output should stay in high-impedance. This >>>>>>> + mode will mask the output as an interrupt source. >>>>>>> + Use sleep if the otuput should be only active in sleep mode. >>>>>>> + This mode is compatible with any other output configuration. >>>>>>> + The disabled value acts as if the property was not defined. >>>>>>> + enum: >>>>>>> + - enabled >>>>>>> + - sleep >>>>>>> + - disabled >>>>>>> + default: disabled >>>>>>> + >>>>>> >>>>>> If instead of using a custom property, you consider this as what it >>>>>> actually is: pinmuxing, then everything else comes for free. With >>>>>> pinctrl, you can define different states for runtime and sleep and they >>>>>> will get applied automatically instead of open coding in the driver. >>>> >>>> I am not sure if your solution would cover all my needs: >>>> >>>> 1.- With pinctrl I can model the SoC pins, right? That would not stop >>>> the RTC output though, so the 32 kHz signal would be generated anyways >>>> even though the SoC would ignore it. That is one of the things I want to >>>> avoid. >>>> >>> >>> No, you would model the INTA pin. >> I am sorry for insisting on this topic, but if I get you right, I would >> be modeling an interrupt pin (INTA) to keep it from generating a clock >> signal when the RTC itself offers a high-impedance mode i.e. avoiding to >> use the RTC feature. >> >> Is that not a misuse of the INTA pin in the first place? If there was no >> other option, that would be an easy fix, but why would we not implement >> the hi-Z mode when it is available? If I see a pinctrl-* modeling an >> interrupt pin, it is not obvious that I am doing that to stop the clock >> signal and I would have to clarify it explicitly, especially if I am not >> interested in the interrupt. >> >> I would rather implement and document the hi-Z mode the RTC offers >> instead of using another mode like INTA which actually can trigger >> interrupts. If the implementation must be different is of course another >> topic. > > There is a pin named INTA, it can mux 4 different functions: > > - clock output > - battery mode indication > - interrupt > - HiZ > > with pinmuxing, you can select which function you want for the pin. I'm > not sure what is misused there. > > Can you explain what is your actual use case? I'm starting to understand > that what you want is simply disable clock out because you are not using > the interrupt. > > If we assume we are never going to use battery mode, then we could > simply used the CCF for this like the other RTC drivers. > I want to model the INTA pin as a clock source that only should run in sleep mode because its clock is only used in that mode. Therefore I want the pin to stay in hi-Z during normal operation. I do not want to get any interrupts from the INTA pin and the battery mode indication is not relevant for me either. I do not know the CCF mechanism in other RTCs though, but I think that the hi-Z mode accomplishes exactly what I described.The assumption about the battery mode is therefore beyond my knowledge, but my first reaction is that we already have the hi-Z for that. So in the end I just need a mechanism to configure INTA as hi-Z, which the driver still does not support. There is another application where the clock output is not required even though it is physically connected, so hi-Z is again an interesting mode and the battery mode would be available if it ever becomes relevant for anyone.
On 26/10/2023 12:13:23+0200, Javier Carrasco wrote: > I want to model the INTA pin as a clock source that only should run in > sleep mode because its clock is only used in that mode. Therefore I want > the pin to stay in hi-Z during normal operation. Can you disclose what is the user of the clock, do you have a driver for this device? > > I do not want to get any interrupts from the INTA pin and the battery > mode indication is not relevant for me either. I do not know the CCF > mechanism in other RTCs though, but I think that the hi-Z mode > accomplishes exactly what I described.The assumption about the battery > mode is therefore beyond my knowledge, but my first reaction is that we > already have the hi-Z for that. > > So in the end I just need a mechanism to configure INTA as hi-Z, which > the driver still does not support. There is another application where > the clock output is not required even though it is physically connected, > so hi-Z is again an interesting mode and the battery mode would be > available if it ever becomes relevant for anyone. >
On 26.10.23 12:21, Alexandre Belloni wrote: > On 26/10/2023 12:13:23+0200, Javier Carrasco wrote: >> I want to model the INTA pin as a clock source that only should run in >> sleep mode because its clock is only used in that mode. Therefore I want >> the pin to stay in hi-Z during normal operation. > > Can you disclose what is the user of the clock, do you have a driver for > this device? > It is a Rockchip PMU through its CLK32K_IN pin. I can't disclose the exact model (yet) though, but the use case is that the PMU can run with the RTC clock connected to that pin in low-power modes. That pin is configured in the proper mode and maybe it could be configured differently with pinctrl in "default" mode, but the RTC INTA would still output the clock, which is what I want to avoid in this particular case. I just want to stop the clock at the RTC end i.e. write PIN_IO_INTA_HIZ into the PIN_IO_INTAPM. >> >> I do not want to get any interrupts from the INTA pin and the battery >> mode indication is not relevant for me either. I do not know the CCF >> mechanism in other RTCs though, but I think that the hi-Z mode >> accomplishes exactly what I described.The assumption about the battery >> mode is therefore beyond my knowledge, but my first reaction is that we >> already have the hi-Z for that. >> >> So in the end I just need a mechanism to configure INTA as hi-Z, which >> the driver still does not support. There is another application where >> the clock output is not required even though it is physically connected, >> so hi-Z is again an interesting mode and the battery mode would be >> available if it ever becomes relevant for anyone. >> >
Hello Alexandre, On 26.10.23 11:56, Alexandre Belloni wrote: > There is a pin named INTA, it can mux 4 different functions: > > - clock output > - battery mode indication > - interrupt > - HiZ > > with pinmuxing, you can select which function you want for the pin. I'm > not sure what is misused there. > > Can you explain what is your actual use case? I'm starting to understand > that what you want is simply disable clock out because you are not using > the interrupt. > > If we assume we are never going to use battery mode, then we could > simply used the CCF for this like the other RTC drivers. > Could you please point me to an RTC driver that uses the CCF for a similar application? I am not sure what you mean with the battery mode to make use of the HiZ, and I would like to push forward with this functionality. Thank you. Best regards, Javier Carrasco
diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml index 52aa3e2091e9..4b27a9154191 100644 --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml @@ -36,6 +36,19 @@ properties: enum: [6000, 7000, 12500] default: 7000 + hiz-output: + description: + Use enabled if the output should stay in high-impedance. This + mode will mask the output as an interrupt source. + Use sleep if the otuput should be only active in sleep mode. + This mode is compatible with any other output configuration. + The disabled value acts as if the property was not defined. + enum: + - enabled + - sleep + - disabled + default: disabled + start-year: true wakeup-source: true @@ -56,5 +69,6 @@ examples: reg = <0x51>; #clock-cells = <0>; quartz-load-femtofarads = <12500>; + hiz-output = "sleep"; }; };