aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl
AgeCommit message (Collapse)Author
2023-04-07pinctrl: renesas: Add R8A779F0 S4 PFC tablesLUU HOAI
Add pinctrl tables for R8A779F0 S4 SoC. Based on Linux next 20230228 PFC tables tables up to commit 058f4df42121 ("Add linux-next specific files for 20230228") Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: LUU HOAI <hoai.luu.ub@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Use RCAR_64 Kconfig, sync with Linux next 20230228]
2023-04-03pinctrl: fix pinctrl_gpio_get_pinctrl_and_offset for gpio-ranges arrayQuanyang Wang
Sometimes a multi-element array is used for "gpio-ranges" property in dts file: qe_pio_e: gpio-controller@1460 { ...... gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>; ...... }; But the function pinctrl_gpio_get_pinctrl_and_offset can't handle this case because the "index" argument passed to dev_read_phandle_with_args is fixed to be "0". Use a loop to traverse the array to fix it. Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
2023-03-10pinctrl: renesas: Drop non-existent PFC info table entriesMarek Vasut
Remove PFC info table entries which are never instantiated, since there are no drivers for those. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-01arm64: a37xx: pinctrl: probe after bindingRobert Marko
Currently, pinctrl drivers are getting probed during post-bind, however that is being reverted, and on A37XX pinctrl driver is the one that registers the GPIO driver during the probe. So, if the pinctrl driver doesn't get probed GPIO-s won't get registered and thus they cannot be used. This is a problem on the Methode eDPU as it just uses SB pins as GPIO-s and without them being registered networking won't work as it only has one SFP slot and the TX disable GPIO is on the SB controller. So, lets just add a flag only to A37XX driver to probe after binding in order for the GPIO driver to always get registered. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-02-28rockchip: rk3568: add rk3568 pinctrl driverJagan Teki
Add driver supporting pin multiplexing on rk3568 platform. Co-developed-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com> Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com> Co-developed-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Jagan Teki <jagan@edgeble.ai> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-02-10Correct SPL use of ATMEL_PIO4Simon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_ATMEL_PIO4 defined in Kconfig Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-10Correct SPL uses of OF_BOARDSimon Glass
This converts 3 usages of this option to the non-SPL form, since there is no SPL_OF_BOARD defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
2023-02-10Correct SPL use of SANDBOXSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_SANDBOX defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-02pinctrl: renesas: r8a7796: Add R8A77961 PFC supportHai Pham
R-Car M3-W+ (R8A77961) is pin compatible with R-Car M3-W (R8A77960), which allows for both SoCs to share a driver. Based on Linux commit 708c69e9eacc ("pinctrl: sh-pfc: r8a7796: Add R8A77961 PFC support") and 74ce7a8044b0 ("pinctrl: renesas: r8a7796: Optimize pinctrl image size for R8A774A1") Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2023-02-02pinctrl: renesas: Synchronize R8A779A0 V3U PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A779A0 V3U PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A77995 D3 PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A77995 D3 PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A77990 E3 PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A77990 E3 PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A77980 V3H PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A77980 V3H PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A77970 V3M PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A77970 V3M PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A77965 M3-N PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A77965 M3-N PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A77960 M3-W and R8A77961 M3-W+ PFC tables ↵Marek Vasut
with Linux 6.1.7 Synchronize R-Car R8A77960 M3-W and R8A77961 M3-W+ PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Note that the Kconfig option name has been updated to match the Linux kernel Kconfig option name, from PINCTRL_PFC_R8A7796 to PINCTRL_PFC_R8A77960 . Also note that a new Kconfig option has been added to enable support for R8A77961 M3-W+ , the Kconfig option name is PINCTRL_PFC_R8A77961 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A7795 H3 PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A7795 H3 PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Note that the Kconfig option name has been updated to match the Linux kernel Kconfig option name, from PINCTRL_PFC_R8A7795 to PINCTRL_PFC_R8A77951 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A7794 E2 PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A7794 E2 PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A7792 V2H PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A7792 V2H PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A7791 M2-W and R8A7793 M2-N PFC tables with ↵Marek Vasut
Linux 6.1.7 Synchronize R-Car R8A7791 M2-W and R8A7793 M2-N PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize R8A7790 H2 PFC tables with Linux 6.1.7Marek Vasut
Synchronize R-Car R8A7790 H2 PFC tables with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-02-02pinctrl: renesas: Synchronize PFC core with Linux 6.1.7Marek Vasut
Synchronize R-Car PFC core with Linux 6.1.7, commit 21e996306a6afaae88295858de0ffb8955173a15 . Parts picked from pinctrl: renesas: Synchronize R-Car Gen2/Gen3 tables with Linux 5.18.3 - Add pin groups for the green and high8 subsets of the Video IN pins - Add MediaLB pins - Add bias support for various SoCs - Share more pin group data, to reduce size and ease review - Miscellaneous cleanups, fixes and improvements. This contains port of Linux kernel commit 6210905586ae ("pinctrl: renesas: Add shorthand for reserved register fields") to handle negative entries in GROUP() macros correctly. Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-01-27pinctrl: fix docstringMichael Walle
Fix the copy and paste error. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-27pinctrl: get rid of some ifdefferyMichael Walle
Don't define an empty version for pinconfig_post_bind(). Just guard the call and let the linker garbage collection do the rest. This way, we also don't have to do any guesswork. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Marek Vasut <marex@denx.de>
2023-01-27pinctrl: don't fall back to pinctrl_select_state_simple()Michael Walle
If CONFIG_PINCTRL_FULL is enabled, never fall back to the simple implementation. pinctrl_select_state() is called for each device and it is expected to fail. A fallback to the simple imeplementation doesn't make much sense. To keep the return code consistent, we need to change the -EINVAL (which was ignored before) to -ENOSYS. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
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>
2023-01-18dm: pinctrl: Revert "pinctrl: probe pinctrl drivers during post-bind"Simon Glass
This breaks chromebook_coral and it is also not how things should work. If a board needs to bind GPIOs as part of a pinctrl driver this can be done during the bind step, if needed. We cannot probe pinctrl devices when binding as a rule, since it cannot be supported on some platforms. The bind and probe steps are separate in U-Boot and they should remain separate. This reverts commit f9ec791b5e24378b71590877499f8683d5f54dac. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16pinctrl: rockchip: Add rv1126 supportJagan Teki
Add pinctrl driver for Rockchip RV1126. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Jagan Teki <jagan@edgeble.ai> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-01-16pinctrl: rockchip: Add pinctrl route typesJagan Teki
Some pins in rockchip are routed via Top GRF and PMU GRF instead of direct regmap. Add support to handle all these routing paths so that the SoC pinctrl drivers will use them accordingly. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Jagan Teki <jagan@edgeble.ai> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-01-10pinctrl: nuvoton: add NPCM7xx/NPCM8xx reset type detectJim Liu
add reset type detect and persist setting. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-01-02pinctrl: uniphier: add ethernet TX pin data for PXs3Dai Okamura
PXs3 Ref boards need to change the strength of ethernet ports for stability, like LD20's one. This adds the table data and fixes the boot issue on PXs3 Ref board. Fixes: 0852033309 ("ARM: uniphier: sync with Linux 5.8-rc4") Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
2023-01-02pinctrl: uniphier: add check if pins are validDai Okamura
The pinctrl datas of uniphier SoCs are the minimal subsets of kernel's one, and some tables has no data to save the footprint size. If the board dts tries to match a pin name on no pins defined SoC, the footprint magic code causes "Synchronous Abort". This checks if the 'pins' data is valid, and if empty, avoids the abort with the warning as follows: WARNING at drivers/pinctrl/uniphier/pinctrl-uniphier-core.c:36/uniphier_pinctrl_get_pins_count()! pinctrl_select_state_full: pinctrl_config_one: err=-38 Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
2022-12-13pinctrl: sunxi: Add P2WI and RSB pinmuxesSamuel Holland
P2WI and RSB are used to communicate with a PMIC. Most SoCs have only one possible pinmux. F1C100s has two possibilities, with different mux values, so omit it until some board needs one of them. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-11-22Revert "pinctrl: zynqmp: Add support for output-enable and bias-high-impedance"Michal Simek
This reverts commit 123462e5e534d6e17b1b7d2006734bbe54b03e0a. On systems with older PMUFW using these pinctrl properties can cause system hang because there is missing feature autodetection. When it is implemented support for these two properties should go back. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/c2900319ea80484f21692997f296269aee701c1f.1665659138.git.michal.simek@amd.com
2022-11-07pinctrl: mvebu: Add AlleyCat5 supportChris Packham
This uses the same IP block as the Armada-8K SoCs. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-11-02pinctrl: nuvoton: Add NPCM8xx pinctrl driverJim Liu
Add Nuvoton BMC NPCM845 Pinmux and Pinconf support. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Signed-off-by: Stanley Chu <yschu@nuvoton.com>
2022-10-19suniv: add UART1 supportAndre Przywara
Some boards with the Allwinner F1C100s family SoCs use UART1 for its debug UART, so define the pins for the SPL and the pinmux name and mux value for U-Boot proper. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2022-10-11pinctrl: fix buffer size for pinctrl_generic_set_state_prefix()John Keeping
This buffer has the concatenated prefix and name written into it, so it must be large enough to cover both strings plus the terminating NUL. Fixes: 92c4a95ec7 ("pinctrl: Add new function pinctrl_generic_set_state_prefix()") Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11pinctrl: nuvoton: fix set persist errorJim Liu
CA9C is cortex A9 watchdog reset control bit. if device set persist mode, it shouldn't set this bit. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2022-09-23pinctrl: mediatek: add pinctrl driver for MT7986 SoCWeijie Gao
This patch adds pinctrl and gpio support for MT7986 SoC Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23pinctrl: mediatek: add pinctrl driver for MT7981 SoCWeijie Gao
This patch adds pinctrl and gpio support for MT7981 SoC Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-19pinctrl: at91-pio4: Add support for pinctrl config subnodesSergiu Moga
Previously, in order for the `pinctrl-*` DT node properties to be properly processed, the pinctrl's subnodes were limited to only having the `pinmux` property as well as other additional properties (slew-rate, bias-disable, etc.). Now, with this patch the pinctrl driver is made to work similarly to the one from Linux. It can now distinguish between one subnode and a subnode with multiple subnodes. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
2022-09-19pinctrl: at91-pio4: Bind GPIO driver to the pinctrl DT nodeSergiu Moga
This has been done in order to align the DT of U-Boot with the DT of Linux. In Linux, a phandle from a '-gpio' DT property is linked to the pinctrl driver, a single driver that handles both pinctrl settings and offers GPIO API to callers. On the other hand, U-Boot redirects such phandle to a corresponding UCLASS_GPIO driver, because U-Boot offers two different types of drivers in this case: UCLASS_PINCTRL which handles pin functions and UCLASS_GPIO which handles gpio requests as a gpio provider. Due to this, we have two drivers in Uboot, but the Devicetree has a single node. Thus, just one of the drivers can be probed for the DT node during platform initialization, before relocation. Our previous solution in U-Boot was to have a different devicetree: the gpio node has a subnode for the pinctrl driver, which is not compliant with Linux ABI. Furthermore, our documentation for this type of nodes mentions no such gpio compatible. After this patch, we can no longer add nodes with a gpio compatible in the DT. Thus, in order to link the pinctrl driver to the gpio one, a hook to the bind method of the former in U-Boot has been added and the GPIO related compatibles have been removed to avoid conflict when compatibles are enumerated and bound to drivers during platform start before relocation. The bind method will attach the GPIO driver to the pinctrl DT node so that every phandle coming from '-gpio' DT properties will be redirected to a valid driver attached to the pinctrl DT node. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
2022-09-15pinctrl: pinctrl_stm32: Populate uc_priv->name[] with pinmux node's namePatrice Chotard
Populate uc_priv->name[] with pinmux node's name in order to indicate the pinmuxing's name in case GPIO is configured in alternate. For example, for STM32 SoC's based platform, "gpio status" command output : before Bank GPIOZ: GPIOZ0: unused : 0 [ ] GPIOZ1: unused : 0 [ ] GPIOZ2: unused : 0 [ ] GPIOZ3: unused : 0 [ ] GPIOZ4: func GPIOZ5: func GPIOZ6: unused : 0 [ ] GPIOZ7: unused : 0 [ ] GPIOZ8: unknown GPIOZ9: unknown GPIOZ10: unknown GPIOZ11: unknown GPIOZ12: unknown GPIOZ13: unknown GPIOZ14: unknown GPIOZ15: unknown After Bank GPIOZ: GPIOZ0: unused : 0 [ ] GPIOZ1: unused : 0 [ ] GPIOZ2: unused : 0 [ ] GPIOZ3: unused : 0 [ ] GPIOZ4: func i2c4-0 GPIOZ5: func i2c4-0 GPIOZ6: unused : 0 [ ] GPIOZ7: unused : 0 [ ] GPIOZ8: unknown GPIOZ9: unknown GPIOZ10: unknown GPIOZ11: unknown GPIOZ12: unknown GPIOZ13: unknown GPIOZ14: unknown GPIOZ15: unknown Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-13pinctrl: aspeed: FWSPICS1 and SPI1CS1 pin supportChin-Ting Kuo
Add FWSPICS1 and SPI1CS1 in AST2500 pinctrl group. On AST2500 EVB, FWSPICS1 can be supported by default. An extra jumper, J45, should be configured before enabling SPI1CS1. Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@kaod.org>
2022-08-09arm64: a37xx: pinctrl: Improve description for pinmux commandPali Rohár
In more cases group name consist of function name followed by function number. So if function name is just prefix of group name, show group name. So in 'pinmux status -a' command output would be visible also extended function number, which is useful for debugging. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm64: a37xx: pinctrl: Remove unused macro PIN_GRP()Pali Rohár
Macro PIN_GRP() is not used, remove it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm64: a37xx: pinctrl: Fix definitions for MPP pins 20-22Pali Rohár
All 3 MPP pins (20, 21 and 22) can be configured individually and also can be configured to GPIO functions. Fix definitions for these MPP pins in existing pin groups. After this change GPIO function can be enabled just for one of these 3 pins. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29mvebu: pinctrl: apply SDHCI PHY config for A7KKonstantin Porotchkin
Current pin control driver applies SDHCI PHY MUX selection when board DT calls for eMMC function on MPP wires. However, for CP side eMMC, only the "armada-8k-cpm-pinctrl" compatibility string is taken into account, which causes CP-SDHCI on Armada-7K boards to fail. This patch adds "armada-7k-pinctrl" compatibility string handling for the CP-SDHCI PHY configuration case. Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Igal Liberman <igall@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Implement get_pins_count, get_pin_name and ↵Pali Rohár
get_pin_muxing functions These functions are required for 'pinmux status -a' command to print current configuration of each MPP pin. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>