1 
2 /*
3  * Copyright (C) 2016 Peng Fan <van.freenix@gmail.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #include <common.h>
9 #include <dm.h>
10 #include <dm/pinctrl.h>
11 
12 #include "pinctrl-imx.h"
13 
14 static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info;
15 
16 static int imx5_pinctrl_probe(struct udevice *dev)
17 {
18 	struct imx_pinctrl_soc_info *info =
19 		(struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
20 
21 	return imx_pinctrl_probe(dev, info);
22 }
23 
24 static const struct udevice_id imx5_pinctrl_match[] = {
25 	{
26 		.compatible = "fsl,imx53-iomuxc",
27 		.data = (ulong)&imx5_pinctrl_soc_info
28 	},
29 	{
30 		.compatible = "fsl,imx53-iomuxc-gpr",
31 		.data = (ulong)&imx5_pinctrl_soc_info
32 	},
33 	{ /* sentinel */ }
34 };
35 
36 U_BOOT_DRIVER(imx5_pinctrl) = {
37 	.name = "imx5-pinctrl",
38 	.id = UCLASS_PINCTRL,
39 	.of_match = of_match_ptr(imx5_pinctrl_match),
40 	.probe = imx5_pinctrl_probe,
41 	.remove = imx_pinctrl_remove,
42 	.priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv),
43 	.ops = &imx_pinctrl_ops,
44 	.flags = DM_FLAG_PRE_RELOC,
45 };
46