blob: 6b690fdce8fd986a129c97b5ffa3dfef9914d7a8 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Patrick Bruennba81b042016-11-04 11:57:02 +01002
3/*
4 * Copyright (C) 2016 Peng Fan <van.freenix@gmail.com>
Patrick Bruennba81b042016-11-04 11:57:02 +01005 */
6
Simon Glass11c89f32017-05-17 17:18:03 -06007#include <dm.h>
Patrick Bruennba81b042016-11-04 11:57:02 +01008#include <dm/pinctrl.h>
9
10#include "pinctrl-imx.h"
11
Marek BehĂșn4bebdd32021-05-20 13:23:52 +020012static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __section(".data");
Patrick Bruennba81b042016-11-04 11:57:02 +010013
14static int imx5_pinctrl_probe(struct udevice *dev)
15{
16 struct imx_pinctrl_soc_info *info =
17 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
18
19 return imx_pinctrl_probe(dev, info);
20}
21
22static const struct udevice_id imx5_pinctrl_match[] = {
23 {
24 .compatible = "fsl,imx53-iomuxc",
25 .data = (ulong)&imx5_pinctrl_soc_info
26 },
27 {
28 .compatible = "fsl,imx53-iomuxc-gpr",
29 .data = (ulong)&imx5_pinctrl_soc_info
30 },
31 { /* sentinel */ }
32};
33
34U_BOOT_DRIVER(imx5_pinctrl) = {
35 .name = "imx5-pinctrl",
36 .id = UCLASS_PINCTRL,
37 .of_match = of_match_ptr(imx5_pinctrl_match),
38 .probe = imx5_pinctrl_probe,
39 .remove = imx_pinctrl_remove,
Simon Glass8a2b47f2020-12-03 16:55:17 -070040 .priv_auto = sizeof(struct imx_pinctrl_priv),
Patrick Bruennba81b042016-11-04 11:57:02 +010041 .ops = &imx_pinctrl_ops,
42 .flags = DM_FLAG_PRE_RELOC,
Patrick Bruennba81b042016-11-04 11:57:02 +010043};