blob: 6da9ff7c5bcea1a1de1da10fe3f92c527693218d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Peng Fanf70bf2b2017-02-22 16:21:49 +08002/*
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 *
5 * Peng Fan <peng.fan@nxp.com>
Peng Fanf70bf2b2017-02-22 16:21:49 +08006 */
7
Tom Riniabb9a042024-05-18 20:20:43 -06008#include <common.h>
Simon Glass11c89f32017-05-17 17:18:03 -06009#include <dm.h>
Peng Fanf70bf2b2017-02-22 16:21:49 +080010#include <dm/pinctrl.h>
11
12#include "pinctrl-imx.h"
13
Peng Fan7f0fb442017-08-14 18:09:17 +080014static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info0 = {
Tom Rini364d0022023-01-10 11:19:45 -050015 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CFG_IBE_OBE,
Peng Fanf70bf2b2017-02-22 16:21:49 +080016};
17
Peng Fan7f0fb442017-08-14 18:09:17 +080018static struct imx_pinctrl_soc_info imx7ulp_pinctrl_soc_info1 = {
Tom Rini364d0022023-01-10 11:19:45 -050019 .flags = ZERO_OFFSET_VALID | SHARE_MUX_CONF_REG | CFG_IBE_OBE,
Peng Fan7f0fb442017-08-14 18:09:17 +080020};
21
Peng Fanf70bf2b2017-02-22 16:21:49 +080022static int imx7ulp_pinctrl_probe(struct udevice *dev)
23{
24 struct imx_pinctrl_soc_info *info =
25 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
26
27 return imx_pinctrl_probe(dev, info);
28}
29
30static const struct udevice_id imx7ulp_pinctrl_match[] = {
Peng Fan7f0fb442017-08-14 18:09:17 +080031 { .compatible = "fsl,imx7ulp-iomuxc-0", .data = (ulong)&imx7ulp_pinctrl_soc_info0 },
32 { .compatible = "fsl,imx7ulp-iomuxc-1", .data = (ulong)&imx7ulp_pinctrl_soc_info1 },
Peng Fanf70bf2b2017-02-22 16:21:49 +080033 { /* sentinel */ }
34};
35
36U_BOOT_DRIVER(imx7ulp_pinctrl) = {
37 .name = "imx7ulp-pinctrl",
38 .id = UCLASS_PINCTRL,
39 .of_match = of_match_ptr(imx7ulp_pinctrl_match),
40 .probe = imx7ulp_pinctrl_probe,
41 .remove = imx_pinctrl_remove,
Simon Glass8a2b47f2020-12-03 16:55:17 -070042 .priv_auto = sizeof(struct imx_pinctrl_priv),
Peng Fanf70bf2b2017-02-22 16:21:49 +080043 .ops = &imx_pinctrl_ops,
44 .flags = DM_FLAG_PRE_RELOC,
Peng Fanf70bf2b2017-02-22 16:21:49 +080045};