blob: 3f15f1dd450262cb22ebd1650ae408ec3dd4f335 [file] [log] [blame]
Ye Li271b8a72021-08-07 16:00:43 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright 2020 NXP
4 *
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 imx8ulp_pinctrl_soc_info0 = {
14 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CONFIG_IBE_OBE,
15};
16
17static struct imx_pinctrl_soc_info imx8ulp_pinctrl_soc_info1 = {
18 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CONFIG_IBE_OBE,
19};
20
21static int imx8ulp_pinctrl_probe(struct udevice *dev)
22{
23 struct imx_pinctrl_soc_info *info =
24 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
25
26 return imx_pinctrl_probe(dev, info);
27}
28
29static const struct udevice_id imx8ulp_pinctrl_match[] = {
30 { .compatible = "fsl,imx8ulp-iomuxc0", .data = (ulong)&imx8ulp_pinctrl_soc_info0 },
31 { .compatible = "fsl,imx8ulp-iomuxc1", .data = (ulong)&imx8ulp_pinctrl_soc_info1 },
32 { /* sentinel */ }
33};
34
35U_BOOT_DRIVER(imx8ulp_pinctrl) = {
36 .name = "imx8ulp-pinctrl",
37 .id = UCLASS_PINCTRL,
38 .of_match = of_match_ptr(imx8ulp_pinctrl_match),
39 .probe = imx8ulp_pinctrl_probe,
40 .remove = imx_pinctrl_remove,
41 .priv_auto = sizeof(struct imx_pinctrl_priv),
42 .ops = &imx_pinctrl_ops,
43 .flags = DM_FLAG_PRE_RELOC,
44};