blob: 24f139e95c33d5144a2f857ebe04ea0760ca5c36 [file] [log] [blame]
Peng Fan745df682016-02-03 10:06:07 +08001
2/*
3 * Copyright (C) 2016 Peng Fan <van.freenix@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <dm/device.h>
9#include <dm/pinctrl.h>
10
11#include "pinctrl-imx.h"
12
13static struct imx_pinctrl_soc_info imx6_pinctrl_soc_info;
14
15static int imx6_pinctrl_probe(struct udevice *dev)
16{
17 struct imx_pinctrl_soc_info *info =
18 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
19
20 return imx_pinctrl_probe(dev, info);
21}
22
23static const struct udevice_id imx6_pinctrl_match[] = {
24 { .compatible = "fsl,imx6q-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
25 { .compatible = "fsl,imx6dl-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
26 { .compatible = "fsl,imx6sl-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
27 { .compatible = "fsl,imx6sx-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
28 { .compatible = "fsl,imx6ul-iomuxc", .data = (ulong)&imx6_pinctrl_soc_info },
29 { /* sentinel */ }
30};
31
32U_BOOT_DRIVER(imx6_pinctrl) = {
33 .name = "imx6-pinctrl",
34 .id = UCLASS_PINCTRL,
35 .of_match = of_match_ptr(imx6_pinctrl_match),
36 .probe = imx6_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};