From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Stephen Boyd <sboyd@kernel.org>
Cc: Marek Vasut <marex@nabladev.com>,
Gabriel Fernandez <gabriel.fernandez@foss.st.com>,
michael@amarulasolutions.com, linux-amarula@amarulasolutions.com,
Yannick Fertre <yannick.fertre@foss.st.com>,
Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Fabrice Gasnier <fabrice.gasnier@foss.st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: [RFC PATCH 3/4] soc: st: stm32mp2-syscfg: register the STM32MP25 clock device
Date: Wed, 28 Oct 2026 14:59:07 +0100 [thread overview]
Message-ID: <20261028135915.2665857-4-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20261028135915.2665857-1-dario.binacchi@amarulasolutions.com>
The STM32MP25 SYSCFG provides the LTDC pixel clock mux, whose driver is
an auxiliary driver since the SYSCFG node is bound to this driver.
Create the auxiliary device for the clock driver on STM32MP25.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/soc/st/Kconfig | 1 +
drivers/soc/st/stm32mp2-syscfg.c | 28 ++++++++++++++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/st/Kconfig b/drivers/soc/st/Kconfig
index 2a9d6a77be45..62bbe8c63238 100644
--- a/drivers/soc/st/Kconfig
+++ b/drivers/soc/st/Kconfig
@@ -5,6 +5,7 @@ config SOC_STM32MP2
tristate "STM32MP2 SoC family support"
depends on ARCH_STM32 || COMPILE_TEST
default ARCH_STM32 && ARM64
+ select AUXILIARY_BUS
select SOC_BUS
help
If you say yes here, you get support for the ST STM32MP2 family
diff --git a/drivers/soc/st/stm32mp2-syscfg.c b/drivers/soc/st/stm32mp2-syscfg.c
index 770321a4a6f7..300a949744c5 100644
--- a/drivers/soc/st/stm32mp2-syscfg.c
+++ b/drivers/soc/st/stm32mp2-syscfg.c
@@ -3,18 +3,42 @@
* Copyright 2026 Marek Vasut
*/
+#include <linux/auxiliary_bus.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
+
+struct stm32mp2_syscfg_data {
+ bool has_clk;
+};
static int stm32mp2_syscfg_probe(struct platform_device *pdev)
{
- return devm_of_platform_populate(&pdev->dev);
+ const struct stm32mp2_syscfg_data *data;
+ struct device *dev = &pdev->dev;
+ int ret;
+
+ ret = devm_of_platform_populate(dev);
+ if (ret)
+ return ret;
+
+ data = device_get_match_data(dev);
+ if (data && data->has_clk &&
+ !devm_auxiliary_device_create(dev, "clk", NULL))
+ return dev_err_probe(dev, -ENODEV,
+ "failed to register the clock device\n");
+
+ return 0;
}
+static const struct stm32mp2_syscfg_data stm32mp25_syscfg_data = {
+ .has_clk = true,
+};
+
static const struct of_device_id stm32mp2_syscfg_ids[] = {
{ .compatible = "st,stm32mp23-syscfg" },
- { .compatible = "st,stm32mp25-syscfg" },
+ { .compatible = "st,stm32mp25-syscfg", .data = &stm32mp25_syscfg_data },
{ }
};
MODULE_DEVICE_TABLE(of, stm32mp2_syscfg_ids);
--
2.43.0
next prev parent reply other threads:[~2026-10-28 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 13:59 [RFC PATCH 0/4] Select the STM32MP25 LTDC pixel clock source for the RGB output Dario Binacchi
2026-10-28 13:59 ` [RFC PATCH 1/4] arm64: dts: st: fix the Engicam RMM RGB display pixel clock Dario Binacchi
2026-10-28 13:59 ` [RFC PATCH 2/4] clk: stm32: add STM32MP25 SYSCFG clock driver Dario Binacchi
2026-10-28 13:59 ` Dario Binacchi [this message]
2026-10-28 13:59 ` [RFC PATCH 4/4] arm64: dts: st: select the Engicam RMM display pixel clock source Dario Binacchi
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=20261028135915.2665857-4-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=alexandre.torgue@foss.st.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=gabriel.fernandez@foss.st.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=marex@nabladev.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=michael@amarulasolutions.com \
--cc=raphael.gallais-pou@foss.st.com \
--cc=sboyd@kernel.org \
--cc=yannick.fertre@foss.st.com \
/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
all inboxes | Powered by JetHome®