platform/kernel/linux-starfive.git
5 years agodt-bindings: arm: fsl-scu: add imx8qm pinctrl support
Aisheng Dong [Tue, 18 Dec 2018 15:22:54 +0000 (15:22 +0000)]
dt-bindings: arm: fsl-scu: add imx8qm pinctrl support

Update binding doc to support imx8qm pinctrl.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: freescale: Break dependency on SOC_IMX8MQ for i.MX8MQ
Abel Vesa [Sun, 23 Dec 2018 07:08:31 +0000 (07:08 +0000)]
pinctrl: freescale: Break dependency on SOC_IMX8MQ for i.MX8MQ

The CONFIG_SOC_IMX8MQ will go away, so the dependency can be based on
ARCH_MXC && ARM64.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: imx-scu: Depend on IMX_SCU
Guido Günther [Wed, 26 Dec 2018 13:54:34 +0000 (14:54 +0100)]
pinctrl: imx-scu: Depend on IMX_SCU

Otherwise building fails with only PINCTRL_IMX_SCU selected:

    aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinctrl_sc_ipc_init':
    pinctrl-scu.c:(.text+0x10): undefined reference to `imx_scu_get_handle'
    aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x10): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_get_handle'
    aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinconf_get_scu':
    pinctrl-scu.c:(.text+0x64): undefined reference to `imx_scu_call_rpc'
    aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x64): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
    aarch64-linux-gnu-ld: drivers/pinctrl/freescale/pinctrl-scu.o: in function `imx_pinconf_set_scu':
    pinctrl-scu.c:(.text+0x104): undefined reference to `imx_scu_call_rpc'
    aarch64-linux-gnu-ld: pinctrl-scu.c:(.text+0x104): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `imx_scu_call_rpc'
    make: *** [Makefile:1038: vmlinux] Error 1

Signed-off-by: Guido Günther <agx@sigxcpu.or>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: ocelot: Add dependency on HAS_IOMEM
Linus Walleij [Sat, 22 Dec 2018 10:15:04 +0000 (11:15 +0100)]
pinctrl: ocelot: Add dependency on HAS_IOMEM

As usual the build fails on UM Linux because that thing does
not have IOMEM. Depend on HAS_IOMEM solves the build problem.

Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoMerge tag 'sh-pfc-for-v4.21-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Fri, 21 Dec 2018 13:24:59 +0000 (14:24 +0100)]
Merge tag 'sh-pfc-for-v4.21-tag3' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Fixes for v4.21

  - Miscellaneous fixes,
  - Build-time validation for pins/marks mismatches.

5 years agopinctrl: ocelot: add MSCC Jaguar2 support
Alexandre Belloni [Thu, 20 Dec 2018 14:44:31 +0000 (15:44 +0100)]
pinctrl: ocelot: add MSCC Jaguar2 support

Jaguar2 has the same register layout as Ocelot but it has 64 pins, meaning
that there are 2 registers instead of one.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: bcm: ns: support updated DT binding as syscon subnode
Rafał Miłecki [Tue, 18 Dec 2018 15:58:08 +0000 (16:58 +0100)]
pinctrl: bcm: ns: support updated DT binding as syscon subnode

Documentation has been recently updated specifying that pinctrl should
be subnode of the CRU "syscon". Support that by using parent node for
regmap and reading "offset" property from the DT.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon
Rafał Miłecki [Tue, 18 Dec 2018 15:57:44 +0000 (16:57 +0100)]
dt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon

As pointed by Rob, CRU is a kind of block that can't be guaranteed to
have everything exposed as subnodes. It's a set of various registers
that aren't tied to any single device. It could be described much more
accurately as MFD (Multi-Function Device).

Some hardware blocks may indeed want to access a register or two of the
CRU which requires describing it as the "syscon".

While at it replace exmple node name with the standard "pinctrl" (also
pointed out by Rob).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoMAINTAINERS: merge at91 pinctrl entries
Ludovic Desroches [Thu, 8 Nov 2018 13:14:42 +0000 (14:14 +0100)]
MAINTAINERS: merge at91 pinctrl entries

In order to be aware of all changes related to at91 pinctrl drivers,
merge the two entries. Make use of the opportunity to replace Atmel by
Microchip.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: imx8qxp: break the dependency on SOC_IMX8QXP
Aisheng Dong [Mon, 17 Dec 2018 15:38:15 +0000 (15:38 +0000)]
pinctrl: imx8qxp: break the dependency on SOC_IMX8QXP

ARM64 SoC does not encourage people to add more finegrained SoC
config options rather than a single ARCH_<family> in arch Kconfig.
So this patch aims to break the dependency on SOC_IMX8QXP.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: uniphier: constify uniphier_pinctrl_socdata
Masahiro Yamada [Fri, 14 Dec 2018 08:44:46 +0000 (17:44 +0900)]
pinctrl: uniphier: constify uniphier_pinctrl_socdata

These are constant data.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: mediatek: improve Kconfig dependencies
Ryder Lee [Thu, 13 Dec 2018 02:27:50 +0000 (10:27 +0800)]
pinctrl: mediatek: improve Kconfig dependencies

Remove prompts to make all pinctrl cores to non-visible symbols and
make sure the target SoCs would be coupled with the corresponding
cores.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com
Acked-by: Sean Wang <sean.wang@kernel.org>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: msm: mark PM functions as __maybe_unused
Arnd Bergmann [Mon, 10 Dec 2018 20:59:45 +0000 (21:59 +0100)]
pinctrl: msm: mark PM functions as __maybe_unused

Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions:

drivers/pinctrl/qcom/pinctrl-msm.c:1082:12: error: 'msm_pinctrl_resume' defined but not used [-Werror=unused-function]
 static int msm_pinctrl_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~
drivers/pinctrl/qcom/pinctrl-msm.c:1075:12: error: 'msm_pinctrl_suspend' defined but not used [-Werror=unused-function]
 static int msm_pinctrl_suspend(struct device *dev)

Mark them as __maybe_unused to shut up the warning and silently drop
the functions without having to add ugly #ifdefs.

Fixes: 977d057ad346 ("pinctrl: msm: Add sleep pinctrl state transitions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: sunxi: Add supply properties
Maxime Ripard [Mon, 17 Dec 2018 13:16:26 +0000 (14:16 +0100)]
dt-bindings: pinctrl: sunxi: Add supply properties

The pinctrl node can have multiple regulators for each of its GPIO banks.
Add the property descriptions.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson: meson8b: add the missing GPIO_GROUPs for BOOT and CARD
Martin Blumenstingl [Sun, 9 Dec 2018 19:50:55 +0000 (20:50 +0100)]
pinctrl: meson: meson8b: add the missing GPIO_GROUPs for BOOT and CARD

Add the BOOT and CARD pins as GROUP_GROUPs as well so they can be
configured in devicetree using groups = BOOTx or groups = CARDx. This
makes the behavior consistent with other pins inside the same driver as
well as with the BOOT and CARD pins of the GXBB and GXL pinctrl drivers.

Fixes: 0fefcb6876d0d6 ("pinctrl: Add support for Meson8b")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson: meson8: add the missing GPIO_GROUPs for BOOT and CARD
Martin Blumenstingl [Sun, 9 Dec 2018 19:50:54 +0000 (20:50 +0100)]
pinctrl: meson: meson8: add the missing GPIO_GROUPs for BOOT and CARD

Add the BOOT and CARD pins as GROUP_GROUPs as well so they can be
configured in devicetree using groups = BOOTx or groups = CARDx. This
makes the behavior consistent with other pins inside the same driver as
well as with the BOOT and CARD pins of the GXBB and GXL pinctrl drivers.

Fixes: 6ac730951104a4 ("pinctrl: add driver for Amlogic Meson SoCs")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs"
Martin Blumenstingl [Sun, 9 Dec 2018 19:50:52 +0000 (20:50 +0100)]
pinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs"

Rename the existing "gpio" function to "gpio_periphs". This makes it
consistent with the "gpio_aobus" function. Also GXBB and GXL are also
using the "gpio_periphs" naming, so this makes the code here consistent
with other Amlogic pinctrl drivers.

No functional changes since thee "gpio" function is currently not used.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs"
Martin Blumenstingl [Sun, 9 Dec 2018 19:50:53 +0000 (20:50 +0100)]
pinctrl: meson: meson8: rename the "gpio" function to "gpio_periphs"

Rename the existing "gpio" function to "gpio_periphs". This makes it
consistent with the "gpio_aobus" function. Also GXBB and GXL are also
using the "gpio_periphs" naming, so this makes the code here consistent
with other Amlogic pinctrl drivers.

No functional changes since thee "gpio" function is currently not used.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson: meson8b: fix the GPIO function for the GPIOAO pins
Martin Blumenstingl [Sun, 9 Dec 2018 19:50:51 +0000 (20:50 +0100)]
pinctrl: meson: meson8b: fix the GPIO function for the GPIOAO pins

The GPIOAO pins (as well as the two exotic GPIO_BSD_EN and GPIO_TEST_N)
only belong to the pin controller in the AO domain. With the current
definition these pins cannot be referred to in .dts files as group
(which is possible on GXBB and GXL for example).

Add a separate "gpio_aobus" function to fix the mapping between the pin
controller and the GPIO pins in the AO domain. This is similar to how
the GXBB and GXL drivers implement this functionality.

Fixes: 9dab1868ec0db4 ("pinctrl: amlogic: Make driver independent from two-domain configuration")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson: meson8: fix the GPIO function for the GPIOAO pins
Martin Blumenstingl [Sun, 9 Dec 2018 19:50:50 +0000 (20:50 +0100)]
pinctrl: meson: meson8: fix the GPIO function for the GPIOAO pins

The GPIOAO pins (as well as the two exotic GPIO_BSD_EN and GPIO_TEST_N)
only belong to the pin controller in the AO domain. With the current
definition these pins cannot be referred to in .dts files as group
(which is possible on GXBB and GXL for example).

Add a separate "gpio_aobus" function to fix the mapping between the pin
controller and the GPIO pins in the AO domain. This is similar to how
the GXBB and GXL drivers implement this functionality.

Fixes: 9dab1868ec0db4 ("pinctrl: amlogic: Make driver independent from two-domain configuration")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length
Geert Uytterhoeven [Wed, 12 Dec 2018 12:38:59 +0000 (13:38 +0100)]
pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length

pinmux_cfg_reg.var_field_width[] is actually a variable-length array,
terminated by a zero, and counting at most r_width entries.
Usually the number of entries is much smaller than r_width, so the
ability to catch bugs at compile time through an "excess elements in
array initializer" warning is fairly limited.

Hence make the array variable-length, decreasing kernel size slightly.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: Print actual field width for variable-width fields
Geert Uytterhoeven [Thu, 13 Dec 2018 14:20:13 +0000 (15:20 +0100)]
pinctrl: sh-pfc: Print actual field width for variable-width fields

The debug code in sh_pfc_write_config_reg() prints the width of the
field being modified.

However, registers with a variable-width field layout are identified by
pinmux_cfg_reg.field_width being zero, hence zeroes are printed instead
of the actual field widths.

Fix this by printing the Hamming weight of the field mask instead, which
is correct for both fixed-width and variable-width fields.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10
Geert Uytterhoeven [Thu, 13 Dec 2018 13:41:11 +0000 (14:41 +0100)]
pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10

Some values in the Peripheral Function Select Register 10 descriptor are
shifted by one position, which may cause a peripheral function to be
programmed incorrectly.

Fixing this makes all HSCIF0 pins use Function 4 (value 3), like was
already the case for the HSCK0 pin in field IP10[5:3].

Fixes: ac1ebc2190f575fc ("sh-pfc: Add sh7734 pinmux support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value
Geert Uytterhoeven [Thu, 13 Dec 2018 13:32:34 +0000 (14:32 +0100)]
pinctrl: sh-pfc: sh7734: Remove bogus IPSR10 value

The IP10[5:3] field in Peripheral Function Select Register 10 has a
width of 3 bits, i.e. it allows programming one out of 8 different
configurations.
However, 9 values are provided instead of 8, overflowing into the
subsequent field in the register, and thus breaking the configuration of
the latter.

Fix this by dropping a bogus zero value.

Fixes: ac1ebc2190f575fc ("sh-pfc: Add sh7734 pinmux support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: sh7269: Add missing PCIOR0 field
Geert Uytterhoeven [Thu, 13 Dec 2018 13:27:56 +0000 (14:27 +0100)]
pinctrl: sh-pfc: sh7269: Add missing PCIOR0 field

The Port C I/O Register 0 contains 7 reserved bits, but the descriptor
contains only dummy configuration values for 6 reserved bits, thus
breaking the configuration of all subsequent fields in the register.

Fix this by adding the two missing configuration values.

Fixes: f5e811f2a43117b2 ("sh-pfc: Add sh7269 pinmux support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration
Geert Uytterhoeven [Thu, 13 Dec 2018 13:09:56 +0000 (14:09 +0100)]
pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration

The Port F Control Register 3 (PFCR3) contains only a single field.
However, counting from left to right, it is the fourth field, not the
first field.
Insert the missing dummy configuration values (3 fields of 16 values) to
fix this.

The descriptor for the Port F Control Register 0 (PFCR0) lacks the
description for the 4th field (PF0 Mode, PF0MD[2:0]).
Add the missing configuration values to fix this.

Fixes: a8d42fc4217b1ea1 ("sh-pfc: Add sh7264 pinmux support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations
Geert Uytterhoeven [Thu, 13 Dec 2018 12:59:42 +0000 (13:59 +0100)]
pinctrl: sh-pfc: r8a77995: Remove bogus SEL_PWM[0-3]_3 configurations

While the SEL_PWM[0-3] fields in the Module Select Register 0 support 4
possible configurations per PWM pin, only the first 3 are valid.

Replace the invalid and unused configurations for SEL_PWM[0-3]_3 by
dummies.

Fixes: 794a6711764658a1 ("pinctrl: sh-pfc: Initial R8A77995 PFC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 SEL_I2C1 field width
Geert Uytterhoeven [Thu, 13 Dec 2018 09:53:11 +0000 (10:53 +0100)]
pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 SEL_I2C1 field width

The SEL_I2C1 (MOD_SEL0[21:20]) field in Module Select Register 0 has a
width of 2 bits, i.e. it allows programming one out of 4 different
configurations.
However, the MOD_SEL0_21_20 macro contains 8 values instead of 4,
overflowing into the subsequent fields in the register, and thus breaking
the configuration of the latter.

Fix this by dropping the bogus last 4 values, including the non-existent
SEL_I2C1_4 configuration.

Fixes: 6d4036a1e3b3ac0f ("pinctrl: sh-pfc: Initial R8A77990 PFC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: sh7734: Add missing IPSR11 field
Geert Uytterhoeven [Wed, 12 Dec 2018 13:42:16 +0000 (14:42 +0100)]
pinctrl: sh-pfc: sh7734: Add missing IPSR11 field

The Peripheral Function Select Register 11 contains 3 reserved bits and
15 variable-width fields, but the variable field descriptor does not
contain the 3-bit field IP11[25:23].

Fixes: 856cb4bb337ee504 ("sh: Add support pinmux for SH7734")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a77980: Add missing MOD_SEL0 field
Geert Uytterhoeven [Wed, 12 Dec 2018 13:36:54 +0000 (14:36 +0100)]
pinctrl: sh-pfc: r8a77980: Add missing MOD_SEL0 field

The Module Select Register 0 contains 20 (= 5 x 4) reserved bits, and 12
single-bit fields, but the variable field descriptor lacks a field of 4
reserved bits.

Fixes: f59125248a691dfe ("pinctrl: sh-pfc: Add R8A77980 PFC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a77970: Add missing MOD_SEL0 field
Geert Uytterhoeven [Wed, 12 Dec 2018 13:29:02 +0000 (14:29 +0100)]
pinctrl: sh-pfc: r8a77970: Add missing MOD_SEL0 field

The Module Select Register 0 contains 20 (= 5 x 4) reserved bits, and 12
single-bit fields, but the variable field descriptor lacks a field of 4
reserved bits.

Fixes: b92ac66a1819602b ("pinctrl: sh-pfc: Add R8A77970 PFC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field
Geert Uytterhoeven [Wed, 12 Dec 2018 13:21:16 +0000 (14:21 +0100)]
pinctrl: sh-pfc: r8a7794: Remove bogus IPSR9 field

The Peripheral Function Select Register 9 contains 12 fields, but the
variable field descriptor contains a 13th bogus field of 3 bits.

Fixes: 43c4436e2f1890a7 ("pinctrl: sh-pfc: add R8A7794 PFC support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: Validate pins/marks in pin groups at build time
Geert Uytterhoeven [Wed, 12 Dec 2018 11:01:45 +0000 (12:01 +0100)]
pinctrl: sh-pfc: Validate pins/marks in pin groups at build time

Add a build-time check, to ensure the number of pins and pin marks in a
pin group matches.  This helps catching bugs early.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
Geert Uytterhoeven [Wed, 12 Dec 2018 10:20:14 +0000 (11:20 +0100)]
pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group

The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the
tpu4_to3_pins[] array lacks the corresponding pin number.

Add the missing pin number, for non-GPIO pin F26.

Fixes: 5da4eb049de803c7 ("sh-pfc: sh73a0: Add TPU pin groups and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
Geert Uytterhoeven [Wed, 12 Dec 2018 10:12:20 +0000 (11:12 +0100)]
pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group

The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of
the color components.  The vin1_b_data18_pins[] array rightfully does
not include the corresponding pin numbers, as RGB18 is subset of RGB24,
containing only the 6 MSB bits of each component.

Fixes: 8e32c9671f84acd8 ("pinctrl: sh-pfc: r8a7791: Add VIN pins")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
Geert Uytterhoeven [Wed, 12 Dec 2018 10:05:57 +0000 (11:05 +0100)]
pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group

The qspi_data4_b_mux[] array contains pin marks for the clock and chip
select pins.  The qspi_data4_b_pins[] array rightfully does not contain
the corresponding pin numbers, as the control pins are provided by a
separate group (qspi_ctrl_b).

Fixes: 2d0c386f135e4186 ("pinctrl: sh-pfc: r8a7791: Add QSPI pin groups")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
Geert Uytterhoeven [Wed, 12 Dec 2018 10:00:27 +0000 (11:00 +0100)]
pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group

The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers,
but the lcd0_data24_1_mux[] array lacks the corresponding pin marks.

Fixes: 06c7dd866da70f6c ("sh-pfc: r8a7740: Add LCDC0 and LCDC1 pin groups and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
Geert Uytterhoeven [Wed, 12 Dec 2018 09:57:27 +0000 (10:57 +0100)]
pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group

The gether_gmii_mux[] array contains the REF125CK pin mark, but the
gether_gmii_pins[] array lacks the corresponding pin number.

Fixes: bae11d30d0cafdc5 ("sh-pfc: r8a7740: Add GETHER pin groups and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a77990: Fix IOCTRL reg state after s2ram on R-Car E3
Geert Uytterhoeven [Wed, 12 Dec 2018 10:35:35 +0000 (11:35 +0100)]
pinctrl: sh-pfc: r8a77990: Fix IOCTRL reg state after s2ram on R-Car E3

Due to an interaction with commit 9f2b76a2db3c4387 ("pinctrl: sh-pfc:
r8a77990: Add R8A774C0 PFC support"), the state of the I/O Control
Registers is saved/restored during s2ram on RZ/G2E, but not on R-Car E3.
Hence on R-Car E3, SDHI voltage state is lost after system resume.

Fix this by registering the I/O Control Registers on R-Car E3, too.

Fixes: 33847a71373cd6ae ("pinctrl: sh-pfc: r8a77990: Add voltage switch operations for SDHI")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: rza1: Handle devm_kasprintf() failure cases
Nicholas Mc Guire [Fri, 7 Dec 2018 10:34:27 +0000 (11:34 +0100)]
pinctrl: rza1: Handle devm_kasprintf() failure cases

devm_kasprintf() may return NULL on failure of internal allocation
thus the assignments are not safe if not checked. On error
rza1_pinctrl_register() respectively rza1_parse_gpiochip() return
negative values so -ENOMEM in the (unlikely) failure case of
devm_kasprintf() should be fine here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 5a49b644b307 ("pinctrl: Renesas RZ/A1 pin and gpio controller")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77990: Add support for pull-up only pins
Geert Uytterhoeven [Thu, 6 Dec 2018 16:30:39 +0000 (17:30 +0100)]
pinctrl: sh-pfc: r8a77990: Add support for pull-up only pins

The R-Car Gen3 HardWare Manual Errata for Rev. 1.00 (Jul 2, 2018) states
that the USB30_OVC pin supports pull-up only.  It has a bit assigned in
the pull-enable register (PUEN5), but not in the pull-up/down control
register (PUD5).

Add a check for this, to prevent configuring a prohibited setting.

Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fixes: 83f6941a42a5e773 ("pinctrl: sh-pfc: r8a77990: Add bias pinconf support")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: xway: fix gpio-hog related boot issues
Martin Schiller [Fri, 14 Dec 2018 07:48:25 +0000 (08:48 +0100)]
pinctrl: xway: fix gpio-hog related boot issues

This patch is based on commit a86caa9ba5d7 ("pinctrl: msm: fix gpio-hog
related boot issues").

It fixes the issue that the gpio ranges needs to be defined before
gpiochip_add().

Therefore, we also have to swap the order of registering the pinctrl
driver and registering the gpio chip.

You also have to add the "gpio-ranges" property to the pinctrl device
node to get it finally working.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: aspeed: Wrap -Woverride-init with cc-option
Nathan Chancellor [Tue, 11 Dec 2018 00:05:06 +0000 (17:05 -0700)]
pinctrl: aspeed: Wrap -Woverride-init with cc-option

Clang does not support this option:

warning: unknown warning option '-Woverride-init'; did you mean
'-Woverride-module'? [-Wunknown-warning-option]
1 warning generated.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sunxi: Deal with per-bank regulators
Maxime Ripard [Thu, 6 Dec 2018 14:02:03 +0000 (15:02 +0100)]
pinctrl: sunxi: Deal with per-bank regulators

The Allwinner SoCs have on most of their GPIO banks a regulator input.

This issue was mainly ignored so far because either the regulator was a
static regulator that would be providing power anyway, or the bank was used
for a feature unsupported so far (CSI). For the odd cases, enabling it in
the bootloader was the preferred option.

However, now that we are starting to support those features, and that we
can't really rely on the bootloader for this, we need to model those
regulators as such in the DT.

This is slightly more complicated than what it looks like, since some
regulators will be tied to the PMIC, and in order to have access to the
PMIC bus, you need to mux its pins, which will need the pinctrl driver,
that needs the regulator driver to be registered. And this is how you get a
circular dependency.

In practice however, the hardware cannot fall into this case since it would
result in a completely unusable bus. In order to avoid that circular
dependency, we can thus get and enable the regulators at pin_request time.
We'll then need to account for the references of all the pins of a
particular branch to know when to put the reference, but it works pretty
nicely once implemented.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: Use of_node_name_eq for node name comparisons
Rob Herring [Wed, 5 Dec 2018 19:50:36 +0000 (13:50 -0600)]
pinctrl: Use of_node_name_eq for node name comparisons

Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoMerge tag 'intel-pinctrl-v4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Thu, 13 Dec 2018 13:02:18 +0000 (14:02 +0100)]
Merge tag 'intel-pinctrl-v4.21-1' of git://git./linux/kernel/git/pinctrl/intel into devel

intel-pinctrl for v4.21-1

Switch to generic ->probe() callbacks.
Simplify getting .driver_data.
Code formatting fixes and headers clean up.

Special case is the driver for Intel Cherryview SoC, where GPIO enabling bit
was mistakenly cleared when pin gets freed. It's fixed now.

The below commit went to v4.20-rc3, that's why duplication.

ad774315c3765ffb27abb6db987a2121d871a942 MAINTAINERS: Add tree link for Intel pin control driver

The following is an automated git shortlog grouped by driver:

baytrail:
 -  Code formatting fixes
 -  simplify getting .driver_data

broxton:
 -  Code formatting fixes
 -  Get rid of unneeded ->probe() stub

cannonlake:
 -  Code formatting fixes
 -  Get rid of unneeded ->probe() stub

cedarfork:
 -  Replace acpi.h with mod_devicetable.h
 -  Get rid of unneeded ->probe() stub

cherryview:
 -  Stop clearing the GPIO_EN bit from chv_gpio_disable_free
 -  Add chv_gpio_clear_triggering() helper function
 -  simplify getting .driver_data

denverton:
 -  Replace acpi.h with mod_devicetable.h
 -  Get rid of unneeded ->probe() stub

geminilake:
 -  Code formatting fixes

icelake:
 -  Code formatting fixes
 -  Get rid of unneeded ->probe() stub

intel:
 -  Unexport intel_pinctrl_probe()
 -  simplify getting .driver_data

lewisburg:
 -  Replace acpi.h with mod_devicetable.h
 -  Get rid of unneeded ->probe() stub

MAINTAINERS:
 -  Add tree link for Intel pin control driver

merrifield:
 -  include bits.h instead of bitops.h

sunrisepoint:
 -  Get rid of unneeded ->probe() stub

5 years agoMerge tag 'sh-pfc-for-v4.21-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Fri, 7 Dec 2018 12:42:35 +0000 (13:42 +0100)]
Merge tag 'sh-pfc-for-v4.21-tag2' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v4.21 (take two)

  - Two small fixes for RZ/N1.

5 years agopinctrl: uniphier: convert to SPDX License Identifier
Masahiro Yamada [Wed, 5 Dec 2018 12:53:39 +0000 (21:53 +0900)]
pinctrl: uniphier: convert to SPDX License Identifier

checkpatch.pl suggests to use SPDX license tag. I am happy to
follow it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sunxi: a64: Rename function ts0 to ts
Chen-Yu Tsai [Mon, 3 Dec 2018 15:41:00 +0000 (23:41 +0800)]
pinctrl: sunxi: a64: Rename function ts0 to ts

The A64 only has one TS (transport stream) controller. The datasheet
also lists the function as TS_XXX instead of TS0_XXX.

Rename the function names now before any there are any users.

Fixes: 96851d391d02 ("drivers: pinctrl: add driver for Allwinner A64 SoC")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sunxi: a64: Rename function csi0 to csi
Chen-Yu Tsai [Mon, 3 Dec 2018 15:40:59 +0000 (23:40 +0800)]
pinctrl: sunxi: a64: Rename function csi0 to csi

The A64 only has one CSI (camera sensor interface) controller. The
datasheet also lists the function as CSI_XXX instead of CSI0_XXX.

Rename the function names now before any there are any users.

Fixes: 96851d391d02 ("drivers: pinctrl: add driver for Allwinner A64 SoC")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sx150x: handle failure case of devm_kstrdup
Nicholas Mc Guire [Sun, 2 Dec 2018 10:04:17 +0000 (11:04 +0100)]
pinctrl: sx150x: handle failure case of devm_kstrdup

devm_kstrdup() may return NULL if internal allocation failed.
Thus using  label, name  is unsafe without checking. Therefor
in the unlikely case of allocation failure, sx150x_probe() simply
returns -ENOMEM.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 9e80f9064e73 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: Change to use DEFINE_SHOW_ATTRIBUTE macro
Yangtao Li [Fri, 30 Nov 2018 16:36:17 +0000 (11:36 -0500)]
pinctrl: Change to use DEFINE_SHOW_ATTRIBUTE macro

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: nuvoton: check for devm_kasprintf() failure
Nicholas Mc Guire [Fri, 23 Nov 2018 16:12:58 +0000 (17:12 +0100)]
pinctrl: nuvoton: check for devm_kasprintf() failure

devm_kasprintf() may return NULL on failure of internal allocation thus
the assignment to  .label  is not safe if not checked. On error
npcm7xx_gpio_of() returns negative values so -ENOMEM in the
(unlikely) failure case of devm_kasprintf() should be fine here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: cherryview: Stop clearing the GPIO_EN bit from chv_gpio_disable_free
Hans de Goede [Tue, 4 Dec 2018 19:42:47 +0000 (20:42 +0100)]
pinctrl: cherryview: Stop clearing the GPIO_EN bit from chv_gpio_disable_free

Clearing the GPIO_EN bit from chv_gpio_disable_free is a bad idea and
pinctrl-cherryview.c is the only Intel pinctrl driver doing something
like this.

Clearing the GPIO_EN bit means that if the pin was an output it is now
effectively floating. The datasheet is not clear what happens to pull ups /
downs in this case, but from testing it looks like these are disabled too,
also floating input pins.

One example where this is causing issues is the soc_button_array input
driver, this parses ACPI tables to create 2 platform devices for the
gpio_keys input driver. The list of GPIOs is passed through struct
gpio_keys_platform_data which uses gpio numbers rather then gpio_desc
pointers.

The buttons handled by this drivers short the pin to ground when pressed
and the volume buttons rely on the SoC's internal pull-up to pull the
pin high when the button is not pressed.

To get the gpio number, the soc_button_array code calls gpiod_get_index
followed by a desc_to_gpio call and then gpiod_put on the gpio_desc.
This last call causes chv_gpio_disable_free to clear the GPIO_EN bit.

When the gpio_keys driver then loads next it gets the gpio_desc again
causing the GPIO_EN bit to be set again and immediately reads the GPIO
value which for the volume buttons reads 0 at this time, causing a spurious
press of the volume buttons to get reported.

Putting a small delay between the gpio_desc request and the read fixes
this, I assume that this is caused by the pull-up being temporarily
disabled while the GPIO_EN bit is cleared as the powerbutton which also
has its GPIO_EN bit cleared does not have this problem.

The soc_button_array code is not the only code temporarily requesting GPIOs
the DWC3 PCI code also does this, to set the enable and reset GPIOs for the
external phy, so that the code instantiating the ULPI phy can read the
vendor and product ID registers from the phy. These GPIOs are released
after this so that the PHY driver can claim and use them when it loads.

Another example of temporary GPIO usage would be a user-space set_gpio
utility using the userspace ioctls to set a GPIO as output value 0 or 1,
having the GPIO revert to floating as soon as this utility exits would
certainly be unexpected behavior.

One argument in favor of clearing the GPIO_EN bit is if the GPIO is going
to be muxed to another function after being released, but in that case
chv_pinmux_set_mux() already clears it.

TL;DR: Clearing the GPIO_EN bit from is a bad idea, this commit therefor
removes the clearing from chv_gpio_disable_free(), replacing it with code
to clear the interrupt-trigger condition so that the GPIO stops generating
interrupts when released, as pinctrl-baytrail.c does.

Note this commit adds a !chv_pad_locked() condition to the trigger clearing
call, which the original GPIO_EN clearing code was missing.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
5 years agopinctrl: cherryview: Add chv_gpio_clear_triggering() helper function
Hans de Goede [Tue, 4 Dec 2018 19:42:46 +0000 (20:42 +0100)]
pinctrl: cherryview: Add chv_gpio_clear_triggering() helper function

This is a preparation patch for clearing the interrupt trigger from
chv_gpio_disable_free().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
5 years agopinctrl: rzn1: Fix of_get_child_count() error check
Phil Edworthy [Fri, 23 Nov 2018 10:54:28 +0000 (10:54 +0000)]
pinctrl: rzn1: Fix of_get_child_count() error check

If we assign the result of of_get_child_count() to an unsigned int,
the code will not detect any errors. Therefore assign it to an int
instead.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: rzn1: Fix check for used MDIO bus
Phil Edworthy [Fri, 23 Nov 2018 10:54:27 +0000 (10:54 +0000)]
pinctrl: rzn1: Fix check for used MDIO bus

This fixes the check for unused mdio bus setting and the following static
checker warning:
 drivers/pinctrl/pinctrl-rzn1.c:198 rzn1_pinctrl_mdio_select()
 warn: always true condition '(ipctl->mdio_func[mdio] >= 0) => (0-u32max >= 0)'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: qcom: spmi-gpio: add compatible for pms405 GPIO
Shawn Guo [Tue, 20 Nov 2018 05:45:22 +0000 (13:45 +0800)]
pinctrl: qcom: spmi-gpio: add compatible for pms405 GPIO

Let's add "qcom,pms405-gpio" to match table, as commit ed80f6eb799a
("dt-bindings: pinctrl: qcom-pmic-gpio: Add pms405 support") already
adds the compatible.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: fix qcom-pmic-gpio for pms405
Shawn Guo [Tue, 20 Nov 2018 05:45:21 +0000 (13:45 +0800)]
dt-bindings: pinctrl: fix qcom-pmic-gpio for pms405

Rather than gpio1-gpio11 for pms405, there are 12 GPIOs for pms405.
But gpio1, gpio9 and gpio10 are not available.  Fix the bindings doc
to make it correct for pms405.

Fixes: ed80f6eb799a ("dt-bindings: pinctrl: qcom-pmic-gpio: Add pms405 support")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agoMerge tag 'sh-pfc-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Walleij [Sun, 25 Nov 2018 22:53:01 +0000 (23:53 +0100)]
Merge tag 'sh-pfc-for-v4.21-tag1' of git://git./linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v4.21

  - Fix VIN (Video IN) versioned groups on R-Car V2H, H3, and M3-W,
  - Add I2C[0-3], DU1, VIN, QSPI1, and SDHI pin groups on RZ/G1C,
  - Add audio, SDHI, VIN, HSCIF, and CAN(FD) support on R-Car E3,
  - Add QSPI pin groups on R-Car V3M and V3H,
  - Add VIN and CAN(FD) pin groups on R-Car M3-N,
  - Add I2C[035] pin groups on R-Car H3 and M3-W,
  - Add pinctrl and GPIO support for the new RZ/A2M (R7S9210) SoC,
  - Small cleanups,
  - Maintainership updates.

5 years agopinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)
Mesih Kilinc [Sun, 25 Nov 2018 07:43:14 +0000 (10:43 +0300)]
pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)

The suniv F1C100s chip (several new F-series SoCs) of Allwinner has a
pin
controller like other SoCs from Allwinner.

Add support for it.

Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: Add Allwinner suniv F1C100s pinctrl
Mesih Kilinc [Sun, 25 Nov 2018 07:43:13 +0000 (10:43 +0300)]
dt-bindings: pinctrl: Add Allwinner suniv F1C100s pinctrl

Add compatible string for Allwinner suniv F1C100s SoC's pinctrl.

Signed-off-by: Mesih Kilinc <mesihkilinc@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: Add RZ/A2 pin and gpio controller
Chris Brandt [Thu, 15 Nov 2018 16:15:27 +0000 (11:15 -0500)]
pinctrl: Add RZ/A2 pin and gpio controller

Adds support for the pin and gpio controller found in R7S9210 (RZ/A2) SoCs.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agodt-bindings: pinctrl: Add RZ/A2 pinctrl and GPIO
Chris Brandt [Thu, 15 Nov 2018 16:15:28 +0000 (11:15 -0500)]
dt-bindings: pinctrl: Add RZ/A2 pinctrl and GPIO

Add device tree binding documentation and header file for Renesas R7S9210
(RZ/A2) SoCs.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77980: Add QSPI pins, groups, and functions
Dmitry Shifrin [Mon, 19 Nov 2018 17:30:06 +0000 (20:30 +0300)]
pinctrl: sh-pfc: r8a77980: Add QSPI pins, groups, and functions

Add the QSPI{0|1} pins/groups/functions to the R8A77980 PFC driver.

[Sergei: ported to the upstream driver, fixed up the swapped QSPI0 SPCLK/
SSL pins, fixed up the comments, moved the QSPI pins/groups/functions to
be in the alphanumeric order, removed unneeded empty lines, renamed the
patch.]

Signed-off-by: Dmitry Shifrin <dmitry.shifrin@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: mediatek: Convert to using %pOFn instead of device_node.name
Rob Herring [Fri, 16 Nov 2018 22:05:40 +0000 (16:05 -0600)]
pinctrl: mediatek: Convert to using %pOFn instead of device_node.name

In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-mediatek@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: msm: Add sleep pinctrl state transitions
Evan Green [Fri, 16 Nov 2018 18:58:53 +0000 (10:58 -0800)]
pinctrl: msm: Add sleep pinctrl state transitions

Add PM suspend callbacks to the msm core driver that select the
sleep and default pinctrl states. Then wire those callbacks up
in the sdm845 driver, for those boards that may have GPIO hogs
that need to change state during suspend.

Signed-off-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: update bindings for MT7629 SoC
Ryder Lee [Mon, 12 Nov 2018 01:45:06 +0000 (09:45 +0800)]
dt-bindings: pinctrl: update bindings for MT7629 SoC

This updates bindings for MT7629 pinctrl driver.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Sean Wang <sean.wang@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: mediatek: add pinctrl support for MT7629 SoC
Ryder Lee [Mon, 12 Nov 2018 01:45:05 +0000 (09:45 +0800)]
pinctrl: mediatek: add pinctrl support for MT7629 SoC

This adds MT7629 pinctrl driver based on MediaTek pinctrl-moore core.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: imx: fix NO_PAD_CTL setting for MMIO pads
A.s. Dong [Mon, 12 Nov 2018 15:25:48 +0000 (15:25 +0000)]
pinctrl: imx: fix NO_PAD_CTL setting for MMIO pads

After patch b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support"),
NO_PAD_CTL pads map are not skipped anymore which results in
a possible memory corruption. As we actually only need to create config
maps for SCU pads and MMIO pads which are not using the default config
(a.k.a IMX_NO_PAD_CTL), so let's add a proper check before creating
the config maps. And during MMIO pads parsing, we also need update the
list_p point as SCU case to ensure the pin data next parsed is correct.

Cc: Linus Walleij <linus.walleij@linaro.org>
Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support")
Reported-by: Martin Kaiser <martin@kaiser.cx>
Suggested-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Leonard Crestez <leonard.crestez@nxp.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: actions: Add Actions Semi S700 pinctrl driver
Saravanan Sekar [Thu, 15 Nov 2018 12:47:47 +0000 (13:47 +0100)]
pinctrl: actions: Add Actions Semi S700 pinctrl driver

Add pinctrl and gpio driver for Actions Semi S700 SoC. The driver
supports pinctrl, pinmux, pinconf, gpio and interrupt functionalities
through a range of registers common to both gpio driver and pinctrl driver.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC
Saravanan Sekar [Thu, 15 Nov 2018 12:47:46 +0000 (13:47 +0100)]
dt-bindings: pinctrl: Add bindings for Actions Semi S700 SoC

Add pinctrl and pio bindings for Actions Semi S700 SoC.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: actions: define pad control configurtion to SoC specific
Saravanan Sekar [Thu, 15 Nov 2018 12:47:45 +0000 (13:47 +0100)]
pinctrl: actions: define pad control configurtion to SoC specific

pad control for s900 and s700 are differs in number of
pull control configuraions
s900 has 4 pull controls - high impedence, pull up, pull down, repeater
s700, s500 has 2 pull controls - pull up and pull down

so pad control configuration has to SoC specific, moved out from pinctrl
common to s900 specific.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: actions: define constructor generic to Actions Semi SoC's
Saravanan Sekar [Thu, 15 Nov 2018 12:47:44 +0000 (13:47 +0100)]
pinctrl: actions: define constructor generic to Actions Semi SoC's

Move generic defines common to the Owl family out of S900 driver.

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: stm32: protect configuration registers with a hwspinlock
Benjamin Gaignard [Tue, 13 Nov 2018 09:51:41 +0000 (10:51 +0100)]
pinctrl: stm32: protect configuration registers with a hwspinlock

If a hwspinlock if defined in device tree use it to protect
configuration registers.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: stm32: Document hwlocks properties
Benjamin Gaignard [Tue, 13 Nov 2018 09:51:40 +0000 (10:51 +0100)]
dt-bindings: pinctrl: stm32: Document hwlocks properties

Add hwlocks as optional property

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sh-pfc: r8a77990: Add CAN FD pins, groups and functions
Takeshi Kihara [Sun, 18 Nov 2018 17:29:03 +0000 (18:29 +0100)]
pinctrl: sh-pfc: r8a77990: Add CAN FD pins, groups and functions

This patch adds CAN FD{0,1} pins, groups and functions to the R8A77990
SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
[geert: Move canfd from common to automotive]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions
Takeshi Kihara [Sun, 18 Nov 2018 17:29:02 +0000 (18:29 +0100)]
pinctrl: sh-pfc: r8a77990: Add CAN pins, groups and functions

This patch adds CAN{0,1} pins, groups and functions to the R8A77990 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions
Takeshi Kihara [Sun, 18 Nov 2018 17:29:01 +0000 (18:29 +0100)]
pinctrl: sh-pfc: r8a77965: Add CAN FD pins, groups and functions

This patch adds CAN FD{0,1} pins, groups and functions to the R8A77965
SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77965: Add CAN pins, groups and functions
Takeshi Kihara [Sun, 18 Nov 2018 17:29:00 +0000 (18:29 +0100)]
pinctrl: sh-pfc: r8a77965: Add CAN pins, groups and functions

This patch adds CAN{0,1} pins, groups and functions to the R8A77965 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a7796: Add I2C{0,3,5} pins, groups and functions
Takeshi Kihara [Fri, 16 Nov 2018 07:20:51 +0000 (15:20 +0800)]
pinctrl: sh-pfc: r8a7796: Add I2C{0,3,5} pins, groups and functions

This patch adds I2C{0,3,5} pins, groups and functions to the R8A7796 SoC.

These pins are physically muxed with other pins. Therefore, setup of
MOD_SEL is needed for exclusive control with other pins.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a7795-es1: Add I2C{0,3,5} pins, groups and functions
Takeshi Kihara [Fri, 16 Nov 2018 07:20:50 +0000 (15:20 +0800)]
pinctrl: sh-pfc: r8a7795-es1: Add I2C{0,3,5} pins, groups and functions

This patch adds I2C{0,3,5} pins, groups and functions to
the R8A7795 ES1.x SoC.

These pins are physically muxed with other pins. Therefore, setup of
MOD_SEL is needed for exclusive control with other pins.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a7795: Add I2C{0,3,5} pins, groups and functions
Takeshi Kihara [Fri, 16 Nov 2018 07:20:49 +0000 (15:20 +0800)]
pinctrl: sh-pfc: r8a7795: Add I2C{0,3,5} pins, groups and functions

This patch adds I2C{0,3,5} pins, groups and functions to the R8A7795 SoC.

These pins are physically muxed with other pins. Therefore, setup of
MOD_SEL is needed for exclusive control with other pins.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: Add physical pin multiplexing helper macros
Ulrich Hecht [Fri, 16 Nov 2018 07:20:48 +0000 (15:20 +0800)]
pinctrl: sh-pfc: Add physical pin multiplexing helper macros

Used by I2C controllers 0, 3 and 5 in R8A7795 and R8A7796 SoCs.

Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77995: Remove unused PINMUX_IPSR_{MSEL2,PHYS}()
Geert Uytterhoeven [Mon, 19 Nov 2018 10:16:51 +0000 (11:16 +0100)]
pinctrl: sh-pfc: r8a77995: Remove unused PINMUX_IPSR_{MSEL2,PHYS}()

The PINMUX_IPSR_MSEL2() and PINMUX_IPSR_PHYS() macros are unused, and
will conflict with generic macros that are to be added.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
5 years agopinctrl: sh-pfc: r8a77990: Add HSCIF pins, groups, and functions
Takeshi Kihara [Thu, 15 Nov 2018 16:47:07 +0000 (01:47 +0900)]
pinctrl: sh-pfc: r8a77990: Add HSCIF pins, groups, and functions

This patch adds HSCIF{0,1,2,3,4} pins, groups and functions to
the R8A77990 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: rockchip: add rk3188 routes to switch between nand and emmc
Heiko Stuebner [Sun, 11 Nov 2018 21:00:47 +0000 (22:00 +0100)]
pinctrl: rockchip: add rk3188 routes to switch between nand and emmc

The rk3188 has pins that are not handled through the regular iomuxing
for handling either nand-flash or an emmc and are set through only one
specifal setting. So utilize the routing function to simply do that
setting depending on one of the core nand/emmc signals that are actually
regular pins handled through pinctrl.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: rockchip: allow specifying the regmap location for pin-routes
Heiko Stuebner [Sun, 11 Nov 2018 21:00:46 +0000 (22:00 +0100)]
pinctrl: rockchip: allow specifying the regmap location for pin-routes

Right now we expect the pin-rounting settings to be in the same area
as the iomux setting itself. And while that seems to be true for all
newer Rockchip socs, back in the wild west days of old this wasn't true.

Nowadays pin settings in the GRF normally stay in the GRF and the same
is true for pins configured from PMU registers. But old socs like the
rk3188 really sprinkle pin settings somewhat randomly through both
for its bank0.

Therefore add the option to specify a location for the route setting,
so that we can map older socs correctly. We'll keep "same" as the
default, so that we only need to specify a location in the corner-cases
described above.

Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
Brian Masney [Sun, 11 Nov 2018 01:34:11 +0000 (20:34 -0500)]
pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues

When attempting to setup up a gpio hog, device probing will repeatedly
fail with -EPROBE_DEFERED errors. It is caused by a circular dependency
between the gpio and pinctrl frameworks. If the gpio-ranges property is
present in device tree, then the gpio framework will handle the gpio pin
registration and eliminate the circular dependency.

See Christian Lamparter's commit a86caa9ba5d7 ("pinctrl: msm: fix
gpio-hog related boot issues") for a detailed commit message that
explains the issue in much more detail. The code comment in this commit
came from Christian's commit.

I did not test this change against any hardware supported by this
particular driver, however I was able to validate this same fix works
for pinctrl-spmi-gpio.c using a LG Nexus 5 (hammerhead) phone.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: bcm2835: Switch to SPDX identifier
Stefan Wahren [Sat, 10 Nov 2018 16:15:11 +0000 (17:15 +0100)]
pinctrl: bcm2835: Switch to SPDX identifier

Adopt the SPDX license identifier headers to ease license compliance
management.

Cc: Simon Arlott <simon@arlott.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: nuvoton: modify NPCM7xx pin configuration function
Tomer Maimon [Wed, 7 Nov 2018 13:44:34 +0000 (15:44 +0200)]
pinctrl: nuvoton: modify NPCM7xx pin configuration function

Modify GPIO direction setting in pin configuration function by using
generic GPIO functions to set the GPIO direction instead of direct
access to the GPIO direction register.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Tested-by: Kun Yi <kunyi@google.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC
Manivannan Sadhasivam [Wed, 7 Nov 2018 17:48:44 +0000 (23:18 +0530)]
pinctrl: mediatek: Add initial pinctrl driver for MT6797 SoC

Add initial pinctrl driver for Mediatek MT6797 SoC supporting only
GPIO and pinmux configurations.

Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agodt-bindings: pinctrl: Add devicetree bindings for MT6797 SoC Pinctrl
Manivannan Sadhasivam [Wed, 7 Nov 2018 17:48:41 +0000 (23:18 +0530)]
dt-bindings: pinctrl: Add devicetree bindings for MT6797 SoC Pinctrl

Add devicetree bindings for Mediatek MT6797 SoC Pin Controller.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: meson-gxl: remove invalid GPIOX tsin_a pins
Neil Armstrong [Wed, 7 Nov 2018 10:42:38 +0000 (11:42 +0100)]
pinctrl: meson-gxl: remove invalid GPIOX tsin_a pins

The GPIOX tsin_a pins wrongly uses the SDCard pinctrl bits, this
patch completely removes these pins entries until we find out what
are the correct bits and registers to be used instead.

Fixes: 5a6ae9b80139 ("pinctrl: meson-gxl: add tsin_a pins")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: mediatek: Fix dependencies for EINT_MTK
Olof Johansson [Fri, 2 Nov 2018 02:57:28 +0000 (19:57 -0700)]
pinctrl: mediatek: Fix dependencies for EINT_MTK

Fixes the following config-time warning:

WARNING: unmet direct dependencies detected for EINT_MTK
  Depends on [n]: PINCTRL [=y] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n]) && (PINCTRL_MTK [=n] || PINCTRL_MTK_MOORE [=n] || COMPILE_TEST [=n])
  Selected by [y]:
  - PINCTRL_MTK_PARIS [=y] && PINCTRL [=y] && OF [=y] && (ARCH_MEDIATEK [=y] || COMPILE_TEST [=n])

Fixes: 805250982bb5 ("pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings")
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 years agopinctrl: sh-pfc: r8a77990: Add VIN[4|5] groups/functions
Jacopo Mondi [Thu, 8 Nov 2018 16:07:24 +0000 (17:07 +0100)]
pinctrl: sh-pfc: r8a77990: Add VIN[4|5] groups/functions

Add pin, mux and functions definitions for VIN4 and VIN5 for R-Car E3.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions
Jacopo Mondi [Thu, 8 Nov 2018 16:07:23 +0000 (17:07 +0100)]
pinctrl: sh-pfc: r8a77965: Add VIN[4|5] groups/functions

The VIN4 and VIN5 interfaces support parallel video input.
Add pin, mux and functions definitions for VIN4 and VIN5 for R-Car M3-N.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a7796: Fix VIN versioned groups
Jacopo Mondi [Thu, 8 Nov 2018 16:07:27 +0000 (17:07 +0100)]
pinctrl: sh-pfc: r8a7796: Fix VIN versioned groups

Versioned VIN groups can appear on different sets of pins. Using the
VIN_DATA_PIN_GROUP macro now supports proper naming of said groups
through an optional 'version' argument.

Use the 'version' argument for said macro to fix naming of versioned
groups for the R-Car M3-W R8A7796 SoC.

Fixes: a5c2949ff7bd ("pinctrl: sh-pfc: r8a7796: Deduplicate VIN4 pin definitions")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a7795: Fix VIN versioned groups
Jacopo Mondi [Thu, 8 Nov 2018 16:07:26 +0000 (17:07 +0100)]
pinctrl: sh-pfc: r8a7795: Fix VIN versioned groups

Versioned VIN groups can appear on different sets of pins. Using the
VIN_DATA_PIN_GROUP macro now supports proper naming of said groups
through an optional 'version' argument.

Use the 'version' argument for said macro to fix naming of versioned
groups for the R-Car H3 R8A7795 SoC.

Fixes: 9942a5b52990 ("pinctrl: sh-pfc: r8a7795: Deduplicate VIN4 pin definitions")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
5 years agopinctrl: sh-pfc: r8a7792: Fix VIN versioned groups
Jacopo Mondi [Thu, 8 Nov 2018 16:07:25 +0000 (17:07 +0100)]
pinctrl: sh-pfc: r8a7792: Fix VIN versioned groups

Versioned VIN groups can appear on different sets of pins. Using the
VIN_DATA_PIN_GROUP macro now supports proper naming of said groups
through an optional 'version' argument.

Use the 'version' argument for said macro to fix naming of versioned
groups for the R-Car V2H R8A7792 SoC.

Fixes: 7dd74bb1f058 ("pinctrl: sh-pfc: r8a7792: Add VIN pin groups")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>