blob: f1c655f4cb57a28b572f87106617eb729ad16ec1 [file] [log] [blame]
Patrick Bruennba81b042016-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
Simon Glass51a3ec32017-05-17 17:18:07 -06008#include <common.h>
Simon Glass11c89f32017-05-17 17:18:03 -06009#include <dm.h>
Patrick Bruennba81b042016-11-04 11:57:02 +010010#include <dm/pinctrl.h>
11
12#include "pinctrl-imx.h"
13
14static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info;
15
16static int imx5_pinctrl_probe(struct udevice *dev)
17{
18 struct imx_pinctrl_soc_info *info =
19 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
20
21 return imx_pinctrl_probe(dev, info);
22}
23
24static const struct udevice_id imx5_pinctrl_match[] = {
25 {
26 .compatible = "fsl,imx53-iomuxc",
27 .data = (ulong)&imx5_pinctrl_soc_info
28 },
29 {
30 .compatible = "fsl,imx53-iomuxc-gpr",
31 .data = (ulong)&imx5_pinctrl_soc_info
32 },
33 { /* sentinel */ }
34};
35
36U_BOOT_DRIVER(imx5_pinctrl) = {
37 .name = "imx5-pinctrl",
38 .id = UCLASS_PINCTRL,
39 .of_match = of_match_ptr(imx5_pinctrl_match),
40 .probe = imx5_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};