1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2016 Freescale Semiconductor, Inc.
4  *
5  * Peng Fan <peng.fan@nxp.com>
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 imx7ulp_pinctrl_soc_info0 = {
15 	.flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CONFIG_IBE_OBE,
16 };
17 
18 static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info1 = {
19 	.flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CONFIG_IBE_OBE,
20 };
21 
22 static int imx7ulp_pinctrl_probe(struct udevice *dev)
23 {
24 	struct imx_pinctrl_soc_info *info =
25 		(struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
26 
27 	return imx_pinctrl_probe(dev, info);
28 }
29 
30 static const struct udevice_id imx7ulp_pinctrl_match[] = {
31 	{ .compatible = "fsl,imx7ulp-iomuxc-0", .data = (ulong)&imx7ulp_pinctrl_soc_info0 },
32 	{ .compatible = "fsl,imx7ulp-iomuxc-1", .data = (ulong)&imx7ulp_pinctrl_soc_info1 },
33 	{ /* sentinel */ }
34 };
35 
36 U_BOOT_DRIVER(imx7ulp_pinctrl) = {
37 	.name = "imx7ulp-pinctrl",
38 	.id = UCLASS_PINCTRL,
39 	.of_match = of_match_ptr(imx7ulp_pinctrl_match),
40 	.probe = imx7ulp_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