blob: 77ddb8e0b9d515ce80a19ce38d5d39509bf88113 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Peng Fanc4068df2016-02-03 10:06:08 +08002/*
3 * Copyright (C) 2016 Peng Fan <van.freenix@gmail.com>
Peng Fanc4068df2016-02-03 10:06:08 +08004 */
5
Simon Glass4af0d7e2017-05-17 17:18:07 -06006#include <common.h>
Simon Glass9d922452017-05-17 17:18:03 -06007#include <dm.h>
Peng Fanc4068df2016-02-03 10:06:08 +08008#include <dm/pinctrl.h>
9
10#include "pinctrl-imx.h"
11
Marek BehĂșn236f2ec2021-05-20 13:23:52 +020012static struct imx_pinctrl_soc_info imx7_pinctrl_soc_info __section(".data");
Peng Fanc4068df2016-02-03 10:06:08 +080013
14static struct imx_pinctrl_soc_info imx7_lpsr_pinctrl_soc_info = {
15 .flags = ZERO_OFFSET_VALID,
16};
17
18static int imx7_pinctrl_probe(struct udevice *dev)
19{
20 struct imx_pinctrl_soc_info *info =
21 (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
22
23 return imx_pinctrl_probe(dev, info);
24}
25
26static const struct udevice_id imx7_pinctrl_match[] = {
27 { .compatible = "fsl,imx7d-iomuxc", .data = (ulong)&imx7_pinctrl_soc_info },
28 { .compatible = "fsl,imx7d-iomuxc-lpsr", .data = (ulong)&imx7_lpsr_pinctrl_soc_info },
29 { /* sentinel */ }
30};
31
32U_BOOT_DRIVER(imx7_pinctrl) = {
33 .name = "imx7-pinctrl",
34 .id = UCLASS_PINCTRL,
35 .of_match = of_match_ptr(imx7_pinctrl_match),
36 .probe = imx7_pinctrl_probe,
37 .remove = imx_pinctrl_remove,
Simon Glass41575d82020-12-03 16:55:17 -070038 .priv_auto = sizeof(struct imx_pinctrl_priv),
Peng Fanc4068df2016-02-03 10:06:08 +080039 .ops = &imx_pinctrl_ops,
40 .flags = DM_FLAG_PRE_RELOC,
Peng Fanc4068df2016-02-03 10:06:08 +080041};