[PATCH 2/4] clk: stm32mp13: add a STM32MP13 RCC clock driver

Patrick Delaunay patrick.delaunay at foss.st.com
Tue May 10 09:51:11 CEST 2022


Introduce a minimal STM32MP13 RCC driver only to allow bind of RCC MISC
driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
---

 drivers/clk/stm32/Kconfig         |  8 ++++++++
 drivers/clk/stm32/Makefile        |  1 +
 drivers/clk/stm32/clk-stm32mp13.c | 21 +++++++++++++++++++++
 3 files changed, 30 insertions(+)
 create mode 100644 drivers/clk/stm32/clk-stm32mp13.c

diff --git a/drivers/clk/stm32/Kconfig b/drivers/clk/stm32/Kconfig
index eac3fc1e9d..7444164b81 100644
--- a/drivers/clk/stm32/Kconfig
+++ b/drivers/clk/stm32/Kconfig
@@ -21,3 +21,11 @@ config CLK_STM32MP1
 	help
 	  Enable the STM32 clock (RCC) driver. Enable support for
 	  manipulating STM32MP15's on-SoC clocks.
+
+config CLK_STM32MP13
+	bool "Enable RCC clock driver for STM32MP13"
+	depends on ARCH_STM32MP && CLK
+	default y if STM32MP13x
+	help
+	  Enable the STM32 clock (RCC) driver. Enable support for
+	  manipulating STM32MP13's on-SoC clocks.
diff --git a/drivers/clk/stm32/Makefile b/drivers/clk/stm32/Makefile
index b420eeaa4e..feeb796f76 100644
--- a/drivers/clk/stm32/Makefile
+++ b/drivers/clk/stm32/Makefile
@@ -5,3 +5,4 @@
 obj-$(CONFIG_CLK_STM32F) += clk_stm32f.o
 obj-$(CONFIG_CLK_STM32H7) += clk_stm32h7.o
 obj-$(CONFIG_CLK_STM32MP1) += clk_stm32mp1.o
+obj-$(CONFIG_CLK_STM32MP13) += clk-stm32mp13.o
\ No newline at end of file
diff --git a/drivers/clk/stm32/clk-stm32mp13.c b/drivers/clk/stm32/clk-stm32mp13.c
new file mode 100644
index 0000000000..afd116361b
--- /dev/null
+++ b/drivers/clk/stm32/clk-stm32mp13.c
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
+/*
+ * Copyright (C) 2022, STMicroelectronics - All Rights Reserved
+ * Author: Gabriel Fernandez <gabriel.fernandez at st.com> for STMicroelectronics.
+ */
+
+#define LOG_CATEGORY UCLASS_CLK
+
+#include <common.h>
+#include <dm.h>
+
+static int stm32mp1_clk_probe(struct udevice *dev)
+{
+	return -EINVAL;
+}
+
+U_BOOT_DRIVER(stm32mp1_clock) = {
+	.name = "stm32mp13_clk",
+	.id = UCLASS_CLK,
+	.probe = stm32mp1_clk_probe,
+};
-- 
2.25.1



More information about the U-Boot mailing list