Peng Fan | 3e0c1b9 | 2019-01-28 09:43:42 +0000 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright 2019 NXP |
| 4 | */ |
| 5 | |
| 6 | #include <dm/device.h> |
| 7 | #include <dm/pinctrl.h> |
| 8 | |
| 9 | #include "pinctrl-imx.h" |
| 10 | |
Peng Fan | ba491a5 | 2020-05-30 16:39:14 +0800 | [diff] [blame] | 11 | static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info __attribute__((section(".data"))); |
Peng Fan | 3e0c1b9 | 2019-01-28 09:43:42 +0000 | [diff] [blame] | 12 | |
| 13 | static int imx8mq_pinctrl_probe(struct udevice *dev) |
| 14 | { |
| 15 | struct imx_pinctrl_soc_info *info = |
| 16 | (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev); |
| 17 | |
| 18 | return imx_pinctrl_probe(dev, info); |
| 19 | } |
| 20 | |
| 21 | static const struct udevice_id imx8m_pinctrl_match[] = { |
| 22 | { .compatible = "fsl,imx8mq-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info }, |
| 23 | { .compatible = "fsl,imx8mm-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info }, |
Peng Fan | 2f70152 | 2019-09-16 03:09:42 +0000 | [diff] [blame] | 24 | { .compatible = "fsl,imx8mn-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info }, |
Peng Fan | ed2af07 | 2019-12-30 09:52:15 +0800 | [diff] [blame] | 25 | { .compatible = "fsl,imx8mp-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info }, |
Peng Fan | 3e0c1b9 | 2019-01-28 09:43:42 +0000 | [diff] [blame] | 26 | { /* sentinel */ } |
| 27 | }; |
| 28 | |
| 29 | U_BOOT_DRIVER(imx8mq_pinctrl) = { |
| 30 | .name = "imx8mq-pinctrl", |
| 31 | .id = UCLASS_PINCTRL, |
| 32 | .of_match = of_match_ptr(imx8m_pinctrl_match), |
| 33 | .probe = imx8mq_pinctrl_probe, |
| 34 | .remove = imx_pinctrl_remove, |
Simon Glass | 8a2b47f | 2020-12-03 16:55:17 -0700 | [diff] [blame] | 35 | .priv_auto = sizeof(struct imx_pinctrl_priv), |
Peng Fan | 3e0c1b9 | 2019-01-28 09:43:42 +0000 | [diff] [blame] | 36 | .ops = &imx_pinctrl_ops, |
| 37 | .flags = DM_FLAG_PRE_RELOC, |
| 38 | }; |