blob: 53b70da869ecea1f777b60109d2418b9c63d4a1c [file] [log] [blame]
Giulio Benetti916ce982020-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
7#include <common.h>
8#include <dm.h>
9#include <dm/pinctrl.h>
10
11#include "pinctrl-imx.h"
12
13static struct imx_pinctrl_soc_info imxrt_pinctrl_soc_info = {
14 .flags = ZERO_OFFSET_VALID,
15};
16
17static int imxrt_pinctrl_probe(struct udevice *dev)
18{
19 struct imx_pinctrl_soc_info *info =
20 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
21
22 return imx_pinctrl_probe(dev, info);
23}
24
25static const struct udevice_id imxrt_pinctrl_match[] = {
26 { .compatible = "fsl,imxrt-iomuxc",
27 .data = (ulong)&imxrt_pinctrl_soc_info },
28 { /* sentinel */ }
29};
30
31U_BOOT_DRIVER(imxrt_pinctrl) = {
32 .name = "imxrt-pinctrl",
33 .id = UCLASS_PINCTRL,
34 .of_match = of_match_ptr(imxrt_pinctrl_match),
35 .probe = imxrt_pinctrl_probe,
36 .remove = imx_pinctrl_remove,
Simon Glass41575d82020-12-03 16:55:17 -070037 .priv_auto = sizeof(struct imx_pinctrl_priv),
Giulio Benetti916ce982020-01-10 15:47:02 +010038 .ops = &imx_pinctrl_ops,
39 .flags = DM_FLAG_PRE_RELOC,
40};