blob: 73d3c009d5b6afce5760a4bb72de568c2de98864 [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
Ye Li271b8a72021-08-07 16:00:43 +08007#include <dm.h>
8#include <dm/pinctrl.h>
9
10#include "pinctrl-imx.h"
11
12static struct imx_pinctrl_soc_info imx8ulp_pinctrl_soc_info0 = {
Tom Rini364d0022023-01-10 11:19:45 -050013 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CFG_IBE_OBE,
Ye Li271b8a72021-08-07 16:00:43 +080014};
15
16static struct imx_pinctrl_soc_info imx8ulp_pinctrl_soc_info1 = {
Tom Rini364d0022023-01-10 11:19:45 -050017 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CFG_IBE_OBE,
Ye Li271b8a72021-08-07 16:00:43 +080018};
19
20static int imx8ulp_pinctrl_probe(struct udevice *dev)
21{
22 struct imx_pinctrl_soc_info *info =
23 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
24
25 return imx_pinctrl_probe(dev, info);
26}
27
28static const struct udevice_id imx8ulp_pinctrl_match[] = {
29 { .compatible = "fsl,imx8ulp-iomuxc0", .data = (ulong)&imx8ulp_pinctrl_soc_info0 },
30 { .compatible = "fsl,imx8ulp-iomuxc1", .data = (ulong)&imx8ulp_pinctrl_soc_info1 },
31 { /* sentinel */ }
32};
33
34U_BOOT_DRIVER(imx8ulp_pinctrl) = {
35 .name = "imx8ulp-pinctrl",
36 .id = UCLASS_PINCTRL,
37 .of_match = of_match_ptr(imx8ulp_pinctrl_match),
38 .probe = imx8ulp_pinctrl_probe,
39 .remove = imx_pinctrl_remove,
40 .priv_auto = sizeof(struct imx_pinctrl_priv),
41 .ops = &imx_pinctrl_ops,
42 .flags = DM_FLAG_PRE_RELOC,
43};