From: Valentin Caron <valentin.caron@foss.st.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: <linux-rtc@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
Amelie Delaunay <amelie.delaunay@foss.st.com>,
Valentin Caron <valentin.caron@foss.st.com>
Subject: [PATCH 0/4] rtc: stm32: add pinctrl interface to handle RTC outs
Date: Thu, 11 Jul 2024 16:08:39 +0200 [thread overview]
Message-ID: <20240711140843.3201530-1-valentin.caron@foss.st.com> (raw)
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 = <STM32_PINMUX('B', 2, AF1)>, /* OUT2 */
<STM32_PINMUX('I', 8, ANALOG)>; /* 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(+)
--
2.25.1
next reply other threads:[~2024-07-11 14:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 14:08 Valentin Caron [this message]
2024-07-11 14:08 ` [PATCH 1/4] dt-bindings: rtc: stm32: describe pinmux nodes Valentin Caron
2024-07-11 22:56 ` Rob Herring
2024-07-15 12:04 ` Valentin CARON
2024-07-11 14:08 ` [PATCH 2/4] rtc: stm32: add pinctrl and pinmux interfaces Valentin Caron
2024-07-12 22:44 ` kernel test robot
2024-07-13 1:38 ` kernel test robot
2024-07-11 14:08 ` [PATCH 3/4] rtc: stm32: add Low Speed Clock Output (LSCO) support Valentin Caron
2024-07-11 14:08 ` [PATCH 4/4] rtc: stm32: add alarm A out feature Valentin Caron
2024-07-15 21:12 ` [PATCH 0/4] rtc: stm32: add pinctrl interface to handle RTC outs Alexandre Belloni
2024-07-17 7:57 ` Valentin CARON
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240711140843.3201530-1-valentin.caron@foss.st.com \
--to=valentin.caron@foss.st.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).