mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
soc: st: Add STM32MP2 SYSCFG driver
Add trivial SYSCFG driver for ST STM32MP25xx, which binds drivers to its subnodes. This is currently used to bind USB PHY drivers to subnodes described in the SYSCFG DT node. Signed-off-by: Marek Vasut <marex@nabladev.com> Tested-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Acked-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/20260902124018.606544-2-marex@nabladev.com Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
This commit is contained in:
parent
3cead63752
commit
f831584128
|
|
@ -24,6 +24,7 @@ source "drivers/soc/renesas/Kconfig"
|
|||
source "drivers/soc/rockchip/Kconfig"
|
||||
source "drivers/soc/samsung/Kconfig"
|
||||
source "drivers/soc/sophgo/Kconfig"
|
||||
source "drivers/soc/st/Kconfig"
|
||||
source "drivers/soc/sunxi/Kconfig"
|
||||
source "drivers/soc/tegra/Kconfig"
|
||||
source "drivers/soc/ti/Kconfig"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ obj-y += renesas/
|
|||
obj-y += rockchip/
|
||||
obj-$(CONFIG_SOC_SAMSUNG) += samsung/
|
||||
obj-y += sophgo/
|
||||
obj-y += st/
|
||||
obj-y += sunxi/
|
||||
obj-$(CONFIG_ARCH_TEGRA) += tegra/
|
||||
obj-y += ti/
|
||||
|
|
|
|||
12
drivers/soc/st/Kconfig
Normal file
12
drivers/soc/st/Kconfig
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
menu "ST SoC drivers"
|
||||
|
||||
config SOC_STM32MP2
|
||||
tristate "STM32MP2 SoC family support"
|
||||
depends on ARCH_STM32 || COMPILE_TEST
|
||||
default ARCH_STM32 && ARM64
|
||||
select SOC_BUS
|
||||
help
|
||||
If you say yes here, you get support for the ST STM32MP2 family
|
||||
|
||||
endmenu
|
||||
1
drivers/soc/st/Makefile
Normal file
1
drivers/soc/st/Makefile
Normal file
|
|
@ -0,0 +1 @@
|
|||
obj-$(CONFIG_SOC_STM32MP2) += stm32mp2-syscfg.o
|
||||
33
drivers/soc/st/stm32mp2-syscfg.c
Normal file
33
drivers/soc/st/stm32mp2-syscfg.c
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright 2026 Marek Vasut
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
static int stm32mp2_syscfg_probe(struct platform_device *pdev)
|
||||
{
|
||||
return devm_of_platform_populate(&pdev->dev);
|
||||
}
|
||||
|
||||
static const struct of_device_id stm32mp2_syscfg_ids[] = {
|
||||
{ .compatible = "st,stm32mp23-syscfg" },
|
||||
{ .compatible = "st,stm32mp25-syscfg" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, stm32mp2_syscfg_ids);
|
||||
|
||||
static struct platform_driver stm32mp2_syscfg_driver = {
|
||||
.driver = {
|
||||
.name = "stm32mp2_syscfg",
|
||||
.of_match_table = stm32mp2_syscfg_ids,
|
||||
},
|
||||
.probe = stm32mp2_syscfg_probe,
|
||||
};
|
||||
module_platform_driver(stm32mp2_syscfg_driver);
|
||||
|
||||
MODULE_AUTHOR("Marek Vasut <marex@nabladev.com>");
|
||||
MODULE_DESCRIPTION("ST STM32MP2 SYSCFG driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
Loading…
Reference in New Issue
Block a user