blob: 23f07f8d1e0535f636cac170f74e4379748b2913 [file] [log] [blame]
Giulio Benetti6fd36dd2020-01-10 15:47:02 +01001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2019
4 * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
5 */
6
Giulio Benetti6fd36dd2020-01-10 15:47:02 +01007#include <dm.h>
8#include <dm/pinctrl.h>
9
10#include "pinctrl-imx.h"
11
12static struct imx_pinctrl_soc_info imxrt_pinctrl_soc_info = {
13 .flags = ZERO_OFFSET_VALID,
14};
15
16static int imxrt_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 imxrt_pinctrl_match[] = {
25 { .compatible = "fsl,imxrt-iomuxc",
26 .data = (ulong)&imxrt_pinctrl_soc_info },
27 { /* sentinel */ }
28};
29
30U_BOOT_DRIVER(imxrt_pinctrl) = {
31 .name = "imxrt-pinctrl",
32 .id = UCLASS_PINCTRL,
33 .of_match = of_match_ptr(imxrt_pinctrl_match),
34 .probe = imxrt_pinctrl_probe,
35 .remove = imx_pinctrl_remove,
Simon Glass8a2b47f2020-12-03 16:55:17 -070036 .priv_auto = sizeof(struct imx_pinctrl_priv),
Giulio Benetti6fd36dd2020-01-10 15:47:02 +010037 .ops = &imx_pinctrl_ops,
38 .flags = DM_FLAG_PRE_RELOC,
39};