blob: 1f81a66df45f081d50f1c18e559bcd8dc64e60d9 [file] [log] [blame]
Peng Fan4aa9d4d02017-02-22 16:21:49 +08001/*
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
Simon Glass9d922452017-05-17 17:18:03 -06009#include <dm.h>
Peng Fan4aa9d4d02017-02-22 16:21:49 +080010#include <dm/pinctrl.h>
11
12#include "pinctrl-imx.h"
13
14static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info = {
15 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CONFIG_IBE_OBE,
16};
17
18static int imx7ulp_pinctrl_probe(struct udevice *dev)
19{
20 struct imx_pinctrl_soc_info *info =
21 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
22
23 return imx_pinctrl_probe(dev, info);
24}
25
26static const struct udevice_id imx7ulp_pinctrl_match[] = {
27 { .compatible = "fsl,imx7ulp-iomuxc-0", .data = (ulong)&imx7ulp_pinctrl_soc_info },
28 { .compatible = "fsl,imx7ulp-iomuxc-1", .data = (ulong)&imx7ulp_pinctrl_soc_info },
29 { /* sentinel */ }
30};
31
32U_BOOT_DRIVER(imx7ulp_pinctrl) = {
33 .name = "imx7ulp-pinctrl",
34 .id = UCLASS_PINCTRL,
35 .of_match = of_match_ptr(imx7ulp_pinctrl_match),
36 .probe = imx7ulp_pinctrl_probe,
37 .remove = imx_pinctrl_remove,
38 .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv),
39 .ops = &imx_pinctrl_ops,
40 .flags = DM_FLAG_PRE_RELOC,
41};