Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Patrick Bruenn | ba81b04 | 2016-11-04 11:57:02 +0100 | [diff] [blame] | 2 | |
| 3 | /* |
| 4 | * Copyright (C) 2016 Peng Fan <van.freenix@gmail.com> |
Patrick Bruenn | ba81b04 | 2016-11-04 11:57:02 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
Simon Glass | 11c89f3 | 2017-05-17 17:18:03 -0600 | [diff] [blame] | 7 | #include <dm.h> |
Patrick Bruenn | ba81b04 | 2016-11-04 11:57:02 +0100 | [diff] [blame] | 8 | #include <dm/pinctrl.h> |
| 9 | |
| 10 | #include "pinctrl-imx.h" |
| 11 | |
Marek BehĂșn | 4bebdd3 | 2021-05-20 13:23:52 +0200 | [diff] [blame] | 12 | static struct imx_pinctrl_soc_info imx5_pinctrl_soc_info __section(".data"); |
Patrick Bruenn | ba81b04 | 2016-11-04 11:57:02 +0100 | [diff] [blame] | 13 | |
| 14 | static 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 | |
| 22 | static 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 | |
| 34 | U_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 Glass | 8a2b47f | 2020-12-03 16:55:17 -0700 | [diff] [blame] | 40 | .priv_auto = sizeof(struct imx_pinctrl_priv), |
Patrick Bruenn | ba81b04 | 2016-11-04 11:57:02 +0100 | [diff] [blame] | 41 | .ops = &imx_pinctrl_ops, |
| 42 | .flags = DM_FLAG_PRE_RELOC, |
Patrick Bruenn | ba81b04 | 2016-11-04 11:57:02 +0100 | [diff] [blame] | 43 | }; |