Giulio Benetti | 6fd36dd | 2020-01-10 15:47:02 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2019 |
| 4 | * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com> |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <dm.h> |
| 9 | #include <dm/pinctrl.h> |
| 10 | |
| 11 | #include "pinctrl-imx.h" |
| 12 | |
| 13 | static struct imx_pinctrl_soc_info imxrt_pinctrl_soc_info = { |
| 14 | .flags = ZERO_OFFSET_VALID, |
| 15 | }; |
| 16 | |
| 17 | static int imxrt_pinctrl_probe(struct udevice *dev) |
| 18 | { |
| 19 | struct imx_pinctrl_soc_info *info = |
| 20 | (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev); |
| 21 | |
| 22 | return imx_pinctrl_probe(dev, info); |
| 23 | } |
| 24 | |
| 25 | static const struct udevice_id imxrt_pinctrl_match[] = { |
| 26 | { .compatible = "fsl,imxrt-iomuxc", |
| 27 | .data = (ulong)&imxrt_pinctrl_soc_info }, |
| 28 | { /* sentinel */ } |
| 29 | }; |
| 30 | |
| 31 | U_BOOT_DRIVER(imxrt_pinctrl) = { |
| 32 | .name = "imxrt-pinctrl", |
| 33 | .id = UCLASS_PINCTRL, |
| 34 | .of_match = of_match_ptr(imxrt_pinctrl_match), |
| 35 | .probe = imxrt_pinctrl_probe, |
| 36 | .remove = imx_pinctrl_remove, |
Simon Glass | 8a2b47f | 2020-12-03 16:55:17 -0700 | [diff] [blame] | 37 | .priv_auto = sizeof(struct imx_pinctrl_priv), |
Giulio Benetti | 6fd36dd | 2020-01-10 15:47:02 +0100 | [diff] [blame] | 38 | .ops = &imx_pinctrl_ops, |
| 39 | .flags = DM_FLAG_PRE_RELOC, |
| 40 | }; |