mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
i.MX drivers changes for 6.17:
- A couple of MAINTAINERS updates - A new bus driver for i.MX AIPSTZ bridge and a follow-up fix from Laurentiu Mihalcea -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmhzO50ACgkQUFdYWoew fM4kRwf/dvp+FsIahhfr1tACaoGvpLsLQwQ/l6ufjAJJk+vyVfFNh1/ttxInQqdL OHot1qbdf8Zo8wfoYNTpSWqo50TfK4wQfvr6JBvUsfdpkkLWeyQOtu/0vKVvve8o 8AQhJc3tS73iLFScp+moUD4fyXiL9GnyRSmHyXxP4DdfM3wQRfZc9pNmXXAX00LV R8xkAv+CeshVqgEPLliSB9269Yq9vCCBcapuVtW5ewW0anSb8ifzuiKNbOo6rY9j LGxXCxx2OUiaxNiP0xa6RxITyPvAExl4+M5/up4+wjyIK5n9QHZNPjlI+etongAy bbrgLKVSZYM1B4k9ANORElxxa+cdYA== =6puG -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmh/+G0ACgkQmmx57+YA GNn+yg//TZpDqdLvMdT7NsYa6z0qHgm9LiiAR57cSXZGwi0YlCc3prEQNfKclwfN zjmPv6OR5wlNfiD9zUVlu39deWvpGraYfgcX/P8j4w4J7msMRnr0AxZbWPGaIiJT 3SNXOfeVe8267g/nC30QYDQYEKUkY5c0nvIesiojnF4mMTsuIromioECLJkpED4M ISFCbK6zHkvjzOKpLJpdmo+XwaIZaLeO5PMKcTrGNw/dHYfNNakpfKh0BwQKqoKL ux2r4XZL0WrqmUAMRTuEWYo1tPQrBT9A2C6cy8ZVn/8fc2JJkxy3UYC1i2bIqft+ cAC2/EczqwAwXHcMD0lBnhG/pg3nrd9/2OPqnMTBBdeUqHiz4dNiIJwVrvUVNW75 ZFuUEdwGNASRur+nf5t/YxTQcWHx+fXY+G5PW89TSCE5O+MdoKhRjQHO6leUJhLh pUZWqA8881IeCYYBLWi4J3wMXqCeHp2f7rGUFTNPTuI+N0/sp1S73hPqJ47rK5VM NU2viC3L/1gHXcaQzIepIPdlHf1b+Etbff0b5N1LKRsV6+JKHlGes2tSreBDQb0V pdG18TYGLz0VPYObJJQryPJHRvMX8oX46bR032nfBXUzUrROktkrD0PP/4rxVMJ+ f1p8FUd50rYCJPNYM8KB0tpvYwYRnC3tsmgF3kiiC/zwisjCyxk= =/Bru -----END PGP SIGNATURE----- Merge tag 'imx-drivers-6.17' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers changes for 6.17: - A couple of MAINTAINERS updates - A new bus driver for i.MX AIPSTZ bridge and a follow-up fix from Laurentiu Mihalcea * tag 'imx-drivers-6.17' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: bus: imx-aipstz: allow creating pdevs for child buses MAINTAINERS: Update i.MX entry bus: add driver for IMX AIPSTZ bridge MAINTAINERS: add NXP S32G RTC driver Link: https://lore.kernel.org/r/20250713055441.221235-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
1c37b63aab
|
|
@ -2585,6 +2585,8 @@ L: imx@lists.linux.dev
|
|||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
|
||||
F: Documentation/devicetree/bindings/firmware/fsl*
|
||||
F: Documentation/devicetree/bindings/firmware/nxp*
|
||||
F: arch/arm/boot/dts/nxp/imx/
|
||||
F: arch/arm/boot/dts/nxp/mxs/
|
||||
F: arch/arm64/boot/dts/freescale/
|
||||
|
|
@ -3000,8 +3002,10 @@ R: Ghennadi Procopciuc <ghennadi.procopciuc@oss.nxp.com>
|
|||
R: NXP S32 Linux Team <s32@nxp.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/rtc/nxp,s32g-rtc.yaml
|
||||
F: arch/arm64/boot/dts/freescale/s32g*.dts*
|
||||
F: drivers/pinctrl/nxp/
|
||||
F: drivers/rtc/rtc-s32g.c
|
||||
|
||||
ARM/NXP S32G/S32R DWMAC ETHERNET DRIVER
|
||||
M: Jan Petrous <jan.petrous@oss.nxp.com>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,12 @@ config HISILICON_LPC
|
|||
Driver to enable I/O access to devices attached to the Low Pin
|
||||
Count bus on the HiSilicon Hip06/7 SoC.
|
||||
|
||||
config IMX_AIPSTZ
|
||||
tristate "Support for IMX Secure AHB to IP Slave bus (AIPSTZ) bridge"
|
||||
depends on ARCH_MXC
|
||||
help
|
||||
Enable support for IMX AIPSTZ bridge.
|
||||
|
||||
config IMX_WEIM
|
||||
bool "Freescale EIM DRIVER"
|
||||
depends on ARCH_MXC || COMPILE_TEST
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ obj-$(CONFIG_FSL_MC_BUS) += fsl-mc/
|
|||
|
||||
obj-$(CONFIG_BT1_APB) += bt1-apb.o
|
||||
obj-$(CONFIG_BT1_AXI) += bt1-axi.o
|
||||
obj-$(CONFIG_IMX_AIPSTZ) += imx-aipstz.o
|
||||
obj-$(CONFIG_IMX_WEIM) += imx-weim.o
|
||||
obj-$(CONFIG_INTEL_IXP4XX_EB) += intel-ixp4xx-eb.o
|
||||
obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o
|
||||
|
|
|
|||
108
drivers/bus/imx-aipstz.c
Normal file
108
drivers/bus/imx-aipstz.c
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright 2025 NXP
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#define IMX_AIPSTZ_MPR0 0x0
|
||||
|
||||
struct imx_aipstz_config {
|
||||
u32 mpr0;
|
||||
};
|
||||
|
||||
struct imx_aipstz_data {
|
||||
void __iomem *base;
|
||||
const struct imx_aipstz_config *default_cfg;
|
||||
};
|
||||
|
||||
static void imx_aipstz_apply_default(struct imx_aipstz_data *data)
|
||||
{
|
||||
writel(data->default_cfg->mpr0, data->base + IMX_AIPSTZ_MPR0);
|
||||
}
|
||||
|
||||
static const struct of_device_id imx_aipstz_match_table[] = {
|
||||
{ .compatible = "simple-bus", },
|
||||
{ }
|
||||
};
|
||||
|
||||
static int imx_aipstz_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct imx_aipstz_data *data;
|
||||
|
||||
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
||||
if (!data)
|
||||
return dev_err_probe(&pdev->dev, -ENOMEM,
|
||||
"failed to allocate data memory\n");
|
||||
|
||||
data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
|
||||
if (IS_ERR(data->base))
|
||||
return dev_err_probe(&pdev->dev, -ENOMEM,
|
||||
"failed to get/ioremap AC memory\n");
|
||||
|
||||
data->default_cfg = of_device_get_match_data(&pdev->dev);
|
||||
|
||||
imx_aipstz_apply_default(data);
|
||||
|
||||
dev_set_drvdata(&pdev->dev, data);
|
||||
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
devm_pm_runtime_enable(&pdev->dev);
|
||||
|
||||
return of_platform_populate(pdev->dev.of_node, imx_aipstz_match_table,
|
||||
NULL, &pdev->dev);
|
||||
}
|
||||
|
||||
static void imx_aipstz_remove(struct platform_device *pdev)
|
||||
{
|
||||
of_platform_depopulate(&pdev->dev);
|
||||
}
|
||||
|
||||
static int imx_aipstz_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct imx_aipstz_data *data = dev_get_drvdata(dev);
|
||||
|
||||
/* restore potentially lost configuration during domain power-off */
|
||||
imx_aipstz_apply_default(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops imx_aipstz_pm_ops = {
|
||||
RUNTIME_PM_OPS(NULL, imx_aipstz_runtime_resume, NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
/*
|
||||
* following configuration is equivalent to:
|
||||
* masters 0-7 => trusted for R/W + use AHB's HPROT[1] to det. privilege
|
||||
*/
|
||||
static const struct imx_aipstz_config imx8mp_aipstz_default_cfg = {
|
||||
.mpr0 = 0x77777777,
|
||||
};
|
||||
|
||||
static const struct of_device_id imx_aipstz_of_ids[] = {
|
||||
{ .compatible = "fsl,imx8mp-aipstz", .data = &imx8mp_aipstz_default_cfg },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, imx_aipstz_of_ids);
|
||||
|
||||
static struct platform_driver imx_aipstz_of_driver = {
|
||||
.probe = imx_aipstz_probe,
|
||||
.remove = imx_aipstz_remove,
|
||||
.driver = {
|
||||
.name = "imx-aipstz",
|
||||
.of_match_table = imx_aipstz_of_ids,
|
||||
.pm = pm_ptr(&imx_aipstz_pm_ops),
|
||||
},
|
||||
};
|
||||
module_platform_driver(imx_aipstz_of_driver);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("IMX secure AHB to IP Slave bus (AIPSTZ) bridge driver");
|
||||
MODULE_AUTHOR("Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>");
|
||||
Loading…
Reference in New Issue
Block a user