1 /*
2  * Copyright (C) 2016 Freescale Semiconductor, Inc.
3  *
4  * Peng Fan <peng.fan@nxp.com>
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #include <common.h>
10 #include <dm.h>
11 #include <dm/pinctrl.h>
12 
13 #include "pinctrl-imx.h"
14 
15 static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info = {
16 	.flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CONFIG_IBE_OBE,
17 };
18 
19 static int imx7ulp_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 imx7ulp_pinctrl_match[] = {
28 	{ .compatible = "fsl,imx7ulp-iomuxc-0", .data = (ulong)&imx7ulp_pinctrl_soc_info },
29 	{ .compatible = "fsl,imx7ulp-iomuxc-1", .data = (ulong)&imx7ulp_pinctrl_soc_info },
30 	{ /* sentinel */ }
31 };
32 
33 U_BOOT_DRIVER(imx7ulp_pinctrl) = {
34 	.name = "imx7ulp-pinctrl",
35 	.id = UCLASS_PINCTRL,
36 	.of_match = of_match_ptr(imx7ulp_pinctrl_match),
37 	.probe = imx7ulp_pinctrl_probe,
38 	.remove = imx_pinctrl_remove,
39 	.priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv),
40 	.ops = &imx_pinctrl_ops,
41 	.flags = DM_FLAG_PRE_RELOC,
42 };
43