2020-01-15 09:39:07 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
/*
|
|
|
|
* Copyright 2019 NXP
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/err.h>
|
|
|
|
#include <linux/init.h>
|
2020-06-24 14:24:01 +08:00
|
|
|
#include <linux/module.h>
|
2020-01-15 09:39:07 +08:00
|
|
|
#include <linux/of.h>
|
|
|
|
#include <linux/pinctrl/pinctrl.h>
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
|
|
|
|
#include "pinctrl-imx.h"
|
|
|
|
|
|
|
|
enum imx8mp_pads {
|
|
|
|
MX8MP_IOMUXC_RESERVE0 = 0,
|
|
|
|
MX8MP_IOMUXC_RESERVE1 = 1,
|
|
|
|
MX8MP_IOMUXC_RESERVE2 = 2,
|
|
|
|
MX8MP_IOMUXC_RESERVE3 = 3,
|
|
|
|
MX8MP_IOMUXC_RESERVE4 = 4,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO00 = 5,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO01 = 6,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO02 = 7,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO03 = 8,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO04 = 9,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO05 = 10,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO06 = 11,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO07 = 12,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO08 = 13,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO09 = 14,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO10 = 15,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO11 = 16,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO12 = 17,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO13 = 18,
|
|
|
|
MX8MP_IOMUXC_GPIO1_IO14 = 19,
|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XC_UART1_TXD = 137,
|
|
|
|
MX8MP_IOMUXC_UART2_RXD = 138,
|
|
|
|
MX8MP_IOMUXC_UART2_TXD = 139,
|
|
|
|
MX8MP_IOMUXC_UART3_RXD = 140,
|
|
|
|
MX8MP_IOMUXC_UART3_TXD = 141,
|
|
|
|
MX8MP_IOMUXC_UART4_RXD = 142,
|
|
|
|
MX8MP_IOMUXC_UART4_TXD = 143,
|
|
|
|
MX8MP_IOMUXC_HDMI_DDC_SCL = 144,
|
|
|
|
MX8MP_IOMUXC_HDMI_DDC_SDA = 145,
|
|
|
|
MX8MP_IOMUXC_HDMI_CEC = 146,
|
|
|
|
MX8MP_IOMUXC_HDMI_HPD = 147,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Pad names for the pinmux subsystem */
|
|
|
|
static const struct pinctrl_pin_desc imx8mp_pinctrl_pads[] = {
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE0),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE1),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE2),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE3),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE4),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO00),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO01),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO02),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO03),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO04),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO05),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO06),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOM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
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_DDC_SDA),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_CEC),
|
|
|
|
IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_HPD),
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct imx_pinctrl_soc_info imx8mp_pinctrl_info = {
|
|
|
|
.pins = imx8mp_pinctrl_pads,
|
|
|
|
.npins = ARRAY_SIZE(imx8mp_pinctrl_pads),
|
|
|
|
.gpr_compatible = "fsl,imx8mp-iomuxc-gpr",
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct of_device_id imx8mp_pinctrl_of_match[] = {
|
|
|
|
{ .compatible = "fsl,imx8mp-iomuxc", .data = &imx8mp_pinctrl_info, },
|
|
|
|
{ /* sentinel */ }
|
|
|
|
};
|
2020-06-24 14:24:01 +08:00
|
|
|
MODULE_DEVICE_TABLE(of, imx8mp_pinctrl_of_match);
|
2020-01-15 09:39:07 +08:00
|
|
|
|
|
|
|
static int imx8mp_pinctrl_probe(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
return imx_pinctrl_probe(pdev, &imx8mp_pinctrl_info);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct platform_driver imx8mp_pinctrl_driver = {
|
|
|
|
.driver = {
|
|
|
|
.name = "imx8mp-pinctrl",
|
2021-03-29 02:30:33 +08:00
|
|
|
.of_match_table = imx8mp_pinctrl_of_match,
|
2021-03-29 02:30:34 +08:00
|
|
|
.suppress_bind_attrs = true,
|
2020-01-15 09:39:07 +08:00
|
|
|
},
|
|
|
|
.probe = imx8mp_pinctrl_probe,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init imx8mp_pinctrl_init(void)
|
|
|
|
{
|
|
|
|
return platform_driver_register(&imx8mp_pinctrl_driver);
|
|
|
|
}
|
|
|
|
arch_initcall(imx8mp_pinctrl_init);
|
2020-06-24 14:24:01 +08:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>");
|
|
|
|
MODULE_DESCRIPTION("NXP i.MX8MP pinctrl driver");
|
|
|
|
MODULE_LICENSE("GPL v2");
|