summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/nxp/pinctrl-imx.h
AgeCommit message (Collapse)Author
2025-01-25pinctrl: imx: Fold imx_pinctrl_set_state_scu() from pinctrl-imx8.cMarek Vasut
The only user of the SCU pinctrl code is pinctrl-imx8.c , fold the entire pinctrl-scu.c code into pinctrl-imx8.c and remove the matching Kconfig symbols and Makefile entries. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25pinctrl: imx: Split imx_pinctrl_set_state_scu() from ↵Marek Vasut
imx_pinctrl_set_state_mmio() Call imx_pinctrl_set_state_common() from imx_pinctrl_scu_conf_pins(), rename imx_pinctrl_scu_conf_pins() to imx_pinctrl_set_state_scu(). Get rid of the unnecessary ifdeffery in pinctrl-imx.h in the process. Remove all SCU support from pinctrl-imx.c imx_pinctrl_set_state_mmio() which makes that function a pure MMIO pinctrl configuration accessor. Update pinctrl-imx8.c to call imx_pinctrl_set_state_scu directly. No functional change. This patch is best viewed with git show -w due to indent change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25pinctrl: imx: Split imx_pinctrl_set_state() into common and mmio partsMarek Vasut
Split imx_pinctrl_set_state() into imx_pinctrl_set_state_common() and imx_pinctrl_set_state_mmio(). The former does the common configuration parsing, the later does call imx_pinctrl_set_state_common() and then does pin configuration using either SCU or MMIO accesses. The SCU part is going to be moved out in follow up patches. This is a preparatory patch for follow up pinctrl drivers which do not use the MMIO accessors, but some other means, like SCU or otherwise. Those will call the common imx_pinctrl_set_state_common() function wrapped into some other imx_pinctrl_set_state_*() function, in a way similar to imx_pinctrl_set_state_mmio() does so for MMIO accesses. Update all imx_pinctrl_set_state_mmio() call sites to call imx_pinctrl_set_state_mmio() instead. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25pinctrl: imx: Rename imx_pinctrl_remove() to imx_pinctrl_remove_mmio()Marek Vasut
The current implementation of imx_pinctrl_remove() is specific to the MMIO accessor implementation, rename the function to imx_pinctrl_remove_mmio() to make this obvious. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25pinctrl: imx: Split imx_pinctrl_probe() into common and mmio partsMarek Vasut
Split imx_pinctrl_probe() into imx_pinctrl_probe_common() and imx_pinctrl_probe_mmio(). The former does the common setup, the later does the common setup and MMIO access configuration. The common setup can be used as-is for SCU based systems, update the pinctrl-imx8 to call only the common setup, update all the other pinctrl drivers to call imx_pinctrl_probe_mmio(). No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25pinctrl: imx: Inline struct imx_pinctrl_soc_info access into probeMarek Vasut
The probe function is identical across all the pinctrl drivers. Inline the imx_pinctrl_soc_info access into imx_pinctrl_probe() and drop all the duplicate probe functions. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-25pinctrl: imx: Push imx_pinctrl_ops into drivers and staticizeMarek Vasut
Move imx_pinctrl_ops into drivers and staticize. This is preparatory patch for follow up pinctrl drivers which will not use this variant of imx_pinctrl_ops content. This should not change size, as most of the deployments compiled in one pinctrl driver anyway. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-10-22pinctrl: Add pinctrl driver for i.MX8Peng Fan
Add pinctrl driver for i.MX8. The pads configuration is controlled by SCU, so need to ask SCU to configure pads through scfw API. Add pinctrl-scu to invoke sc_pad_set to configure pads. Add a new flag IMX8_USE_SCU to differentiate i.MX8 from other platforms which could directly configure pads from Acore side. Add CONFIG_PINCTRL_IMX8 as the built gate. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-17pinctrl: Add i.MX7ULP pinctrl driverPeng Fan
Add i.MX7ULP pinctrl driver. Select CONFIG_PINCTRL_IMX7ULP to use this driver. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by : Stefano Babic <sbabic@denx.de>
2016-02-21pinctrl: imx: Introduce pinctrl driver for i.MX6Peng Fan
Introduce pinctrl for i.MX6 1. pinctrl-imx.c is for common usage. It's used by i.MX6/7. 2. Add PINCTRL_IMX PINCTRL_IMX6 Kconfig entry. 3. To the pinctrl_ops implementation, only set_state is implemented. To i.MX6/7, the pinctrl dts entry is as following: &iomuxc { pinctrl-names = "default"; pinctrl_csi1: csi1grp { fsl,pins = < MX6UL_PAD_CSI_MCLK__CSI_MCLK 0x1b088 MX6UL_PAD_CSI_PIXCLK__CSI_PIXCLK 0x1b088 MX6UL_PAD_CSI_VSYNC__CSI_VSYNC 0x1b088 >; }; [.....] }; there is no property named function or groups. So pinctrl_generic_set_state can not be used here. 5. This driver is a simple implementation for i.mx iomux controller, only parse the fsl,pins property and write value to registers. 6. With DEBUG enabled, we can see log when "i2c bus 0": " set_state_simple op missing imx_pinctrl_set_state: i2c1grp mux_reg 0x14c, conf_reg 0x3bc, input_reg 0x5d8, mux_mode 0x0, input_val 0x1, config_val 0x4000007f write mux: offset 0x14c val 0x10 select_input: offset 0x5d8 val 0x1 write config: offset 0x3bc val 0x7f mux_reg 0x148, conf_reg 0x3b8, input_reg 0x5d4, mux_mode 0x0, input_val 0x1, config_val 0x4000007f write mux: offset 0x148 val 0x10 select_input: offset 0x5d4 val 0x1 write config: offset 0x3b8 val 0x7f " this means imx6 pinctrl driver works as expected. Signed-off-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>