Commit b24a4b06cd88c944630df7efad0e30a48e99a6a7
Committed by
Ye Li
1 parent
c76cd4e58d
Exists in
smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga
and in
5 other branches
MLK-16132-2: pinctrl: add imx8m support
Add i.mx8m pinctrl driver. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 70e17c13b99ae41f416b5c72c364a0e4483188e8)
Showing 3 changed files with 52 additions and 0 deletions Side-by-side Diff
drivers/pinctrl/nxp/Kconfig
... | ... | @@ -56,4 +56,18 @@ |
56 | 56 | is different from the linux one, this is a simple implementation, |
57 | 57 | only parses the 'fsl,pins' property and configure related |
58 | 58 | registers. |
59 | + | |
60 | +config PINCTRL_IMX8M | |
61 | + bool "IMX8M pinctrl driver" | |
62 | + depends on ARCH_IMX8M && PINCTRL_FULL | |
63 | + select DEVRES | |
64 | + select PINCTRL_IMX | |
65 | + help | |
66 | + Say Y here to enable the imx8m pinctrl driver | |
67 | + | |
68 | + This provides a simple pinctrl driver for i.MX8M SoC familiy. | |
69 | + This feature depends on device tree configuration. This driver | |
70 | + is different from the linux one, this is a simple implementation, | |
71 | + only parses the 'fsl,pins' property and configure related | |
72 | + registers. |
drivers/pinctrl/nxp/Makefile
drivers/pinctrl/nxp/pinctrl-imx8m.c
1 | + | |
2 | +/* | |
3 | + * Copyright 2017 NXP | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + */ | |
7 | + | |
8 | +#include <dm/device.h> | |
9 | +#include <dm/pinctrl.h> | |
10 | + | |
11 | +#include "pinctrl-imx.h" | |
12 | + | |
13 | +static struct imx_pinctrl_soc_info imx8mq_pinctrl_soc_info; | |
14 | + | |
15 | +static int imx8mq_pinctrl_probe(struct udevice *dev) | |
16 | +{ | |
17 | + struct imx_pinctrl_soc_info *info = | |
18 | + (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev); | |
19 | + | |
20 | + return imx_pinctrl_probe(dev, info); | |
21 | +} | |
22 | + | |
23 | +static const struct udevice_id imx8m_pinctrl_match[] = { | |
24 | + { .compatible = "fsl,imx8mq-iomuxc", .data = (ulong)&imx8mq_pinctrl_soc_info }, | |
25 | + { /* sentinel */ } | |
26 | +}; | |
27 | + | |
28 | +U_BOOT_DRIVER(imx8mq_pinctrl) = { | |
29 | + .name = "imx8mq-pinctrl", | |
30 | + .id = UCLASS_PINCTRL, | |
31 | + .of_match = of_match_ptr(imx8m_pinctrl_match), | |
32 | + .probe = imx8mq_pinctrl_probe, | |
33 | + .remove = imx_pinctrl_remove, | |
34 | + .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv), | |
35 | + .ops = &imx_pinctrl_ops, | |
36 | + .flags = DM_FLAG_PRE_RELOC, | |
37 | +}; |