]>
Commit | Line | Data |
---|---|---|
38b6686f PF |
1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | /* | |
3 | * Copyright 2018 NXP | |
4 | */ | |
5 | ||
d678a59d | 6 | #include <common.h> |
401d1c4f | 7 | #include <asm/global_data.h> |
38b6686f PF |
8 | #include <dm/device.h> |
9 | #include <dm/pinctrl.h> | |
10 | ||
11 | #include "pinctrl-imx.h" | |
12 | ||
13 | DECLARE_GLOBAL_DATA_PTR; | |
14 | ||
15 | static struct imx_pinctrl_soc_info imx8_pinctrl_soc_info = { | |
16 | .flags = IMX8_USE_SCU, | |
17 | }; | |
18 | ||
19 | static int imx8_pinctrl_probe(struct udevice *dev) | |
20 | { | |
21 | struct imx_pinctrl_soc_info *info = | |
22 | (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev); | |
23 | ||
24 | return imx_pinctrl_probe(dev, info); | |
25 | } | |
26 | ||
27 | static const struct udevice_id imx8_pinctrl_match[] = { | |
28 | { .compatible = "fsl,imx8qxp-iomuxc", .data = (ulong)&imx8_pinctrl_soc_info }, | |
a413c17e | 29 | { .compatible = "fsl,imx8qm-iomuxc", .data = (ulong)&imx8_pinctrl_soc_info }, |
38b6686f PF |
30 | { /* sentinel */ } |
31 | }; | |
32 | ||
33 | U_BOOT_DRIVER(imx8_pinctrl) = { | |
34 | .name = "imx8_pinctrl", | |
35 | .id = UCLASS_PINCTRL, | |
36 | .of_match = of_match_ptr(imx8_pinctrl_match), | |
37 | .probe = imx8_pinctrl_probe, | |
38 | .remove = imx_pinctrl_remove, | |
41575d8e | 39 | .priv_auto = sizeof(struct imx_pinctrl_priv), |
38b6686f PF |
40 | .ops = &imx_pinctrl_ops, |
41 | .flags = DM_FLAG_PRE_RELOC, | |
42 | }; |