From patchwork Thu Jul 11 14:08:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Caron X-Patchwork-Id: 13730762 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 395F8C3DA41 for ; Thu, 11 Jul 2024 14:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=810oLGHtnWvk0qunlO6ujwf2zHVTB1qeFo9iOn5quoI=; b=PgsP8mTVLS2hVSm1wTRkUmD6Ey Uqh7B+M1FoNX3bksiAehQ29avj1A+YnpK2sMYldwxmoOBJGwoGFDU63gUCY9ici4EPMbvy/Mozvxv AcCa4ELL8dwN68B0zi8rWYJYKgQJeOdkOFr/Im2QERQ2xb04f8zCmBG6+E8zbJF2nVqP5AHsJgsF5 2/3jtJu3z5odmXliG2SqrY+wfDj2rzBU1Qqq4J670NPLFu14cdR+SlQWY8PBaHIj/jNxglBQYBnyy aoPewMrnAUC5UOA+JAyUklkA9k5b22d5eyZE5soPblsuikw9VAJrIUaZlhTzB2He8cN9xt4FVHTa5 yQNONeng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRuV0-0000000EHq2-2gBM; Thu, 11 Jul 2024 14:10:18 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRuUh-0000000EHlc-2tx6 for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2024 14:10:02 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46BAhAq7001787; Thu, 11 Jul 2024 16:09:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=selector1; bh=810oLGHtnWvk0qunlO6ujw f2zHVTB1qeFo9iOn5quoI=; b=OiEOt13mEH9VqWkPNwsAmV1GAAe7f0idnPMNB+ o5nL7P7GYrgWDAtfrr1GyxNAGYjLLVoqBjIBfVW7IrHrohG5sIyBDOn7Wj9RQuLv BiKbmxDRSBGnwb/pjS58cSBkWDTzG3aca37pVpCWC6HLf0CHLSNgwc1yP5x242m9 gVGvHKnBh0an5mMnqKRxmeyjpW+vacxcnusualFiLkTz+zGYXBo8HbNWXtuMotB8 0Qy6WZKkf2w/AQKd5JH5goTjHBEfEpda5gOiw3hUoyXVwARb3EJ0UateJ2bugesY xjfDRR1XRpUs/H6V6wv3UvfP/iaCeJLwd52lNTWOmc11CjGA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 406wj36cvg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jul 2024 16:09:41 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 970C94002D; Thu, 11 Jul 2024 16:09:36 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id F40A223D407; Thu, 11 Jul 2024 16:08:57 +0200 (CEST) Received: from localhost (10.48.86.111) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 11 Jul 2024 16:08:57 +0200 From: Valentin Caron To: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue CC: , , , , , Amelie Delaunay , Valentin Caron Subject: [PATCH 0/4] rtc: stm32: add pinctrl interface to handle RTC outs Date: Thu, 11 Jul 2024 16:08:39 +0200 Message-ID: <20240711140843.3201530-1-valentin.caron@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.48.86.111] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-11_10,2024-07-11_01,2024-05-17_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240711_071000_297723_91F7BC2D X-CRM114-Status: GOOD ( 10.37 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds a pinctrl/pinmux interface to control STM32 RTC outputs. Theses two signals output are possible: - LSCO (Low Speed Clock Output) that allow to output LSE clock on a pin. On STM32MPU Discovery boards, this feature is used to generate a clock to Wifi/Bluetooth module. - Alarm out that allow to send a pulse on a pin when alarm A of the RTC expires. First attempt [1] was based on 'st,' vendor properties, this one is based on pinctrl and pinmux framework. As device-trees will be upstreamed separately, here is an example: stm32-pinctrl { rtc_rsvd_pins_a: rtc-rsvd-0 { pins { pinmux = , /* OUT2 */ ; /* OUT2_RMP */ }; }; }; stm32-rtc { pinctrl-0 = <&rtc_rsvd_pins_a &rtc_alarma_pins_a>; /* Enable by foo-device */ rtc_lsco_pins_a: rtc-lsco-0 { pins = "out2_rmp"; function = "lsco"; }; /* Enable by stm32-rtc hog */ rtc_alarma_pins_a: rtc-alarma-0 { pins = "out2"; function = "alarm-a"; }; }; foo-device { pinctrl-0 = <&rtc_lsco_pins_a>; }; [1] https://lore.kernel.org/linux-arm-kernel/20220504130617.331290-5-valentin.caron@foss.st.com/t/#m37935e92315e22bbe085775096175afc05b7ff09 Valentin Caron (4): dt-bindings: rtc: stm32: describe pinmux nodes rtc: stm32: add pinctrl and pinmux interfaces rtc: stm32: add Low Speed Clock Output (LSCO) support rtc: stm32: add alarm A out feature .../devicetree/bindings/rtc/st,stm32-rtc.yaml | 28 ++ drivers/rtc/Kconfig | 1 + drivers/rtc/rtc-stm32.c | 281 ++++++++++++++++++ 3 files changed, 310 insertions(+)