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 11 static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info; 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 }, 24 { /* sentinel */ } 25 }; 26 27 U_BOOT_DRIVER(imx8mq_pinctrl) = { 28 .name = "imx8mq-pinctrl", 29 .id = UCLASS_PINCTRL, 30 .of_match = of_match_ptr(imx8m_pinctrl_match), 31 .probe = imx8mq_pinctrl_probe, 32 .remove = imx_pinctrl_remove, 33 .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv), 34 .ops = &imx_pinctrl_ops, 35 .flags = DM_FLAG_PRE_RELOC, 36 }; 37