summaryrefslogtreecommitdiff
path: root/drivers/reset/stm32/stm32-reset-core.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-06-11 09:47:10 -0600
committerTom Rini <trini@konsulko.com>2025-06-11 12:00:36 -0600
commit4b5cb576116663813768ddeb46523d1aa717133e (patch)
tree7df3998044bae529e9812b8f1861a650d2d6359e /drivers/reset/stm32/stm32-reset-core.h
parent9e50cf80d0ec5d6856a5efa5b42b8b70ed1d17ed (diff)
parent7ab0ee3a59c01ca164a5b71e0c4c90555da5e806 (diff)
Merge tag 'u-boot-stm32-20250611' of https://source.denx.de/u-boot/custodians/u-boot-stm into next
CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/26607 - Add clock and reset drivers support for STM32MP25 - Add STM32H747-Discovery board support - Add tamp_nvram driver - Add SPL support and clock tree init to STM32MP13 RCC driver - Add STM32MP13xx ram support - Add support for STM32 Image V2.0 for STM32MP13xx - Fix SYSRAM size on STM32MP13xx - Fix DBGMCU macro on STM32MP13xx - Auto-detect ROM API table on STM32MP15xx
Diffstat (limited to 'drivers/reset/stm32/stm32-reset-core.h')
-rw-r--r--drivers/reset/stm32/stm32-reset-core.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/reset/stm32/stm32-reset-core.h b/drivers/reset/stm32/stm32-reset-core.h
new file mode 100644
index 00000000000..25a1aa152cb
--- /dev/null
+++ b/drivers/reset/stm32/stm32-reset-core.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */
+/*
+ * Copyright (C) 2025, STMicroelectronics - All Rights Reserved
+ * Author(s): Gabriel Fernandez, <gabriel.fernandez@foss.st.com> for STMicroelectronics.
+ */
+
+#include <reset-uclass.h>
+
+struct stm32_reset_cfg {
+ u16 offset;
+ u8 bit_idx;
+ bool set_clr;
+ bool inverted;
+};
+
+struct stm32_reset_data {
+ const struct stm32_reset_cfg * (*get_reset_line)(struct reset_ctl *reset_ctl);
+ u32 clear_offset;
+ u32 reset_us;
+};
+
+struct stm32_reset_priv {
+ fdt_addr_t base;
+ struct stm32_reset_cfg reset_line;
+ const struct stm32_reset_data *data;
+};
+
+extern const struct reset_ops stm32_reset_ops;
+
+int stm32_reset_core_probe(struct udevice *dev,
+ const struct stm32_reset_data *data);