summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/nxp/pinctrl-imx.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-02-21 07:56:16 -0500
committerTom Rini <trini@konsulko.com>2016-02-21 07:56:16 -0500
commit595af9db2422fa5ae734cfe615415b17a5098f34 (patch)
tree21a9287dd2998798c2dbb1613eefc7d5f5a58159 /drivers/pinctrl/nxp/pinctrl-imx.h
parent03bfc78359a2d749252b7dfdbff33898f6da0385 (diff)
parent35c4ce5e20d3d10d1089ba336a248896faed284c (diff)
downloadtalos-obmc-uboot-595af9db2422fa5ae734cfe615415b17a5098f34.tar.gz
talos-obmc-uboot-595af9db2422fa5ae734cfe615415b17a5098f34.zip
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'drivers/pinctrl/nxp/pinctrl-imx.h')
-rw-r--r--drivers/pinctrl/nxp/pinctrl-imx.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.h b/drivers/pinctrl/nxp/pinctrl-imx.h
new file mode 100644
index 0000000000..037c491580
--- /dev/null
+++ b/drivers/pinctrl/nxp/pinctrl-imx.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 Peng Fan <van.freenix@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __DRIVERS_PINCTRL_IMX_H
+#define __DRIVERS_PINCTRL_IMX_H
+
+/**
+ * @base: the address to the controller in virtual memory
+ * @input_sel_base: the address of the select input in virtual memory.
+ * @flags: flags specific for each soc
+ */
+struct imx_pinctrl_soc_info {
+ void __iomem *base;
+ void __iomem *input_sel_base;
+ unsigned int flags;
+};
+
+/**
+ * @dev: a pointer back to containing device
+ * @info: the soc info
+ */
+struct imx_pinctrl_priv {
+ struct udevice *dev;
+ struct imx_pinctrl_soc_info *info;
+};
+
+extern const struct pinctrl_ops imx_pinctrl_ops;
+
+#define IMX_NO_PAD_CTL 0x80000000 /* no pin config need */
+#define IMX_PAD_SION 0x40000000 /* set SION */
+
+/*
+ * Each pin represented in fsl,pins consists of 5 u32 PIN_FUNC_ID and
+ * 1 u32 CONFIG, so 24 types in total for each pin.
+ */
+#define FSL_PIN_SIZE 24
+#define SHARE_FSL_PIN_SIZE 20
+
+#define SHARE_MUX_CONF_REG 0x1
+#define ZERO_OFFSET_VALID 0x2
+
+#define IOMUXC_CONFIG_SION (0x1 << 4)
+
+int imx_pinctrl_probe(struct udevice *dev, struct imx_pinctrl_soc_info *info);
+
+int imx_pinctrl_remove(struct udevice *dev);
+#endif /* __DRIVERS_PINCTRL_IMX_H */
OpenPOWER on IntegriCloud