blob: b3844314b3dee3f1bcfda589d44265028a06fb6f [file] [log] [blame]
Peng Fan3e0c1b92019-01-28 09:43:42 +00001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright 2019 NXP
4 */
5
6#include <dm/device.h>
7#include <dm/pinctrl.h>
8
9#include "pinctrl-imx.h"
10
11static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info;
12
13static int imx8mq_pinctrl_probe(struct udevice *dev)
14{
15 struct imx_pinctrl_soc_info *info =
16 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
17
18 return imx_pinctrl_probe(dev, info);
19}
20
21static const struct udevice_id imx8m_pinctrl_match[] = {
22 { .compatible = "fsl,imx8mq-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
23 { .compatible = "fsl,imx8mm-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
Peng Fan2f701522019-09-16 03:09:42 +000024 { .compatible = "fsl,imx8mn-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info },
Peng Fan3e0c1b92019-01-28 09:43:42 +000025 { /* sentinel */ }
26};
27
28U_BOOT_DRIVER(imx8mq_pinctrl) = {
29 .name = "imx8mq-pinctrl",
30 .id = UCLASS_PINCTRL,
31 .of_match = of_match_ptr(imx8m_pinctrl_match),
32 .probe = imx8mq_pinctrl_probe,
33 .remove = imx_pinctrl_remove,
34 .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv),
35 .ops = &imx_pinctrl_ops,
36 .flags = DM_FLAG_PRE_RELOC,
37};