blob: 6942f39670c40657abc1323c5708218c8aaa00eb [file] [log] [blame]
Patrick Bruenn98d62e62016-11-04 11:57:02 +01001
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 imx5_pinctrl_soc_info;
14
15static int imx5_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 imx5_pinctrl_match[] = {
24 {
25 .compatible = "fsl,imx53-iomuxc",
26 .data = (ulong)&imx5_pinctrl_soc_info
27 },
28 {
29 .compatible = "fsl,imx53-iomuxc-gpr",
30 .data = (ulong)&imx5_pinctrl_soc_info
31 },
32 { /* sentinel */ }
33};
34
35U_BOOT_DRIVER(imx5_pinctrl) = {
36 .name = "imx5-pinctrl",
37 .id = UCLASS_PINCTRL,
38 .of_match = of_match_ptr(imx5_pinctrl_match),
39 .probe = imx5_pinctrl_probe,
40 .remove = imx_pinctrl_remove,
41 .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv),
42 .ops = &imx_pinctrl_ops,
43 .flags = DM_FLAG_PRE_RELOC,
44};