summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/nxp/pinctrl-imx7.c
AgeCommit message (Collapse)Author
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: Rename imx_pinctrl_ops to match driversMarek Vasut
Rename the structure instances to match driver names, so they can be easily looked up e.g. in objdump and readelf outputs. 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>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-07pinctrl: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this driver directory and when needed add missing include files directly. Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-05-24treewide: Convert macro and uses of __section(foo) to __section("foo")Marek BehĂșn
This commit does the same thing as Linux commit 33def8498fdd. Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-14pinctrl: imx7: move soc info to data sectionPeng Fan
The soc info without initialization value should be put into data section. The driver could be used before relocation, with it in BSS section could cause issue, since BSS section is not initializated and it might overwrite other areas that used by others, such as dtb. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08pinctrl: nxp: DM_FLAG_PRE_RELOC by defaultIgor Opaniuk
For NXP SoCs we have to set pinmux configuration ASAP (ideally before relocation) to get serial console working. Without this we miss almost the half of output (U-boot version, CPU defails, Reset cause, DRAM details etc.). To achieve this we need to force appropriate pinctrl drivers to get probed before relocation. Fixes: cd69e8ef9b ("colibri-imx6ull: migrate pinctrl and regulators to dtb/dm") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2018-11-14pinctrl: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng
When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
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-06-01dm: Fix up inclusion of common.hSimon Glass
It is good practice to include common.h as the first header. This ensures that required features like the DECLARE_GLOBAL_DATA_PTR macro, configuration options and common types are available. Fix up some files which currently don't do this. This is necessary because driver model will soon start using global data and configuration in the dm/read.h header file, included via dm.h. The gd->fdt_blob value will be used to access the device tree and CONFIG options will be used to determine whether to support inline functions in the header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: Use dm.h header when driver mode is usedSimon Glass
This header includes things that are needed to make driver build. Adjust existing users to include that always, even if other dm/ includes are present Signed-off-by: Simon Glass <sjg@chromium.org>
2016-02-21pinctrl: imx: Support i.MX7DPeng Fan
Introudce i.MX7 pinctrl driver support. For now only i.MX7D supported. There are two iomux controllers in i.MX7D, iomuxc and iomuxc_lpsr. To iomuxc_lpsr, ZERO_OFFSET_VALID is set, means offset of mux_reg and conf_reg can begin at 0. Signed-off-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>