Commit Graph

661589 Commits

Author SHA1 Message Date
Geert Uytterhoeven 6bffa7e163 pinctrl: pinmux: Fix kerneldoc for pinmux_generic_add_function()
Correct the incorrect function name and description.

Fixes: a76edc89b1 ("pinctrl: core: Add generic pinctrl functions for managing groups")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-04-07 11:52:09 +02:00
Jesper Nilsson 00df0582ea pinctrl: Add pincontrol driver for ARTPEC-6 SoC
Add pinctrl driver support for the Axis ARTPEC-6 SoC.
There are only some pins that actually have different
functions available, but all can control bias (pull-up/-down)
and drive strength.

Code originally written by Chris Paterson.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-04-07 11:48:33 +02:00
Jesper Nilsson 9c6c149be3 pinctrl: Add bindings for ARTPEC-6 pinmux
Add the bindings for the pinmux functions in the
ARTPEC-6 SoC, including bias and drive strength.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-04-07 11:47:00 +02:00
Martin Blumenstingl 4781c22c76 pinctrl: meson: meson8b: rename the NAND DQS pin definitions
The NAND DQS pins are currently named nand_dqs_0 and nand_dqs_1.
However, they both seem to have the same function, just exposed on
different pins (unlike the ethernet TX pins for example, where there's
eth_txd0..3 - all of these can be active at the same time as they are
different data lines).
Rename the NAND DQS pins to nand_dqs_15 and nand_dqs_18 to reflect that
it's the same functionality just exposed on different pins (BOOT_15 and
BOOT_18).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-04-07 09:30:39 +02:00
Martin Blumenstingl 97ba26b8a9 pinctrl: meson: meson8b: fix the NAND DQS pins
The nand_groups table uses different names for the NAND DQS pins than
the GROUP() definition in meson8b_cbus_groups (nand_dqs_0 vs nand_dqs0).
This prevents using the NAND DQS pins in the devicetree.

Fix this by ensuring that the GROUP() definition and the
meson8b_cbus_groups use the same name for these pins.

Fixes: 0fefcb6876 ("pinctrl: Add support for Meson8b")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-04-07 09:29:02 +02:00
Linus Walleij 9891baca2c pinctrl: sh-pfc: Updates for v4.12 (take two)
- Add basic support for the Pin Function Controller on revision ES2.0
     of the R-Car H3 SoC, which differs from ES1.x in many ways.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY3h2vAAoJEEgEtLw/Ve77hCwP/0k48APKuK+OYbTqlLadouK/
 /TfPiFG2r2qaoPoZiL3Afnh8rbYxKP4fh3iemoAclE6TuqV2K/OU7T31KT+0o3T9
 enOQ0zjKgIyetyknBNSiWZ9rx/lQQ0H9ZUUlFkd3mc/BuUYach0tXt4UZL3zgQVs
 GhUrYbW8tmNv5o+UlhRB6ht26BA3DKOC/m2DEmHDzEHCAjnIWI7wIimAuDTIIFIE
 6q/E1Q/l/krJaY1GXKQQiSx+7jH6sPBR3YBupzzP4BlPpEf7evyNtQIHTiP2P2WM
 a4hcqQi+1zdfZ50XUQxv4L1q28RRKoq3wyDWa4uW+MGLPbICzR5TfFJBgaT8Rb3+
 jCL8b4ju7IR/WWc1vKLxSW2XVPyc2naeF4p4nFTCRcxbznSRbly0aHDnKh1YVGuU
 SFHCtOCNsECSmEPtuCfElPiKcrcWQg9hLHaYY6mgTh5deSVjEqjSn0wD3+DW+pen
 c1pmwFtrgQGFXJgjH3YI5gRJevAQxotzUdvCJ+mfRbz/EiuiZRD4wOvo24bs3SkH
 LQPqbFJ93GnIu11EaeJD/uE4GmMSj9oO9c0bI1t3mJTuNzzV+9lOVaxhp5KgRExr
 6YYlKuFZygtHCMUrI221+OZqAeSe7fcz/O4W3cjk2xJX898mZ+Ly1b7wqUC085GD
 gfrm2MDgu4e27DOuvkl5
 =fKYc
 -----END PGP SIGNATURE-----

Merge tag 'sh-pfc-for-v4.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

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

  - Add basic support for the Pin Function Controller on revision ES2.0
    of the R-Car H3 SoC, which differs from ES1.x in many ways.
2017-04-04 13:56:08 +02:00
Geert Uytterhoeven d14a39edf7 pinctrl: sh-pfc: r8a7795: Add SCIF_CLK support
Add pins, groups, and a function for SCIF_CLK on R-Car H3 ES2.0.
SCIF_CLK is the external clock source for the Baud Rate Generator for
External Clock (BRG) on (H)SCIF serial ports.

Extracted from a big patch in the BSP by Takeshi Kihara.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Takeshi Kihara <takeshi.kihara.df@renesas.com>
2017-03-30 13:43:55 +02:00
Geert Uytterhoeven e7ad4d3c1d pinctrl: sh-pfc: r8a7795: Add SCIF support
Add pins, groups, and functions for all SCIF serial ports on R-Car H3
ES2.0.

Extracted from a big patch in the BSP by Takeshi Kihara.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Takeshi Kihara <takeshi.kihara.df@renesas.com>
2017-03-30 13:43:51 +02:00
Geert Uytterhoeven b205914c8f pinctrl: sh-pfc: r8a7795: Add support for R-Car H3 ES2.0
The Pin Function Controller module in the R-Car H3 ES2.0 differs from
ES1.x in many ways.

The goal is twofold:
  1. Support both the ES1.x and ES2.0 SoC revisions in a single binary
     for now,
  2. Make it clear which code supports ES1.x, so it can easily be
     identified and removed later, when production SoCs are deemed
     ubiquitous.

Hence this patch:
  1. Extracts the support for R-Car H3 ES1.x into a separate file, as
     the differences are quite large,
  2. Adds code for detecting the SoC revision at runtime using the new
     soc_device_match() API, and selecting pinctrl tables for the actual
     SoC revision,
  3. Replaces the core register and bitfield definitions by their
     counterparts for R-Car H3 ES2.0.

The addition of pins, groups, and functions for the various on-chip
devices is left to subsequent patches.

The R-Car H3 ES2.0 register and bitfield definitions were extracted from
a patch in the BSP by Takeshi Kihara.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Takeshi Kihara <takeshi.kihara.df@renesas.com>
2017-03-30 13:43:45 +02:00
Jerome Brunet b840d649f9 pinctrl: meson: gxl: add spdif output pins
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 15:14:12 +02:00
Jerome Brunet 2899adf042 pinctrl: meson: gxl: add i2s output pins
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 15:12:53 +02:00
Jerome Brunet bce12d66d6 pinctrl: meson: gxbb: add spdif output pins
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 15:11:34 +02:00
Jerome Brunet 0145d49053 pinctrl: meson: gxbb: add i2s output pins
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 15:10:29 +02:00
Neil Armstrong c7fc5fbafa pinctrl: meson: use gpio-ranges from DT
When trying to add a gpio-hog, we enter a weird loop where the gpio-ranges
is needed when gpiochip_add_data() is called but in the current implementation
the ranges are added from the driver afterwards.

A simple solution is to rely on the DR gpio-ranges attribute and remove the
call to gpiochip_add_pin_range().

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:40:24 +02:00
Krzysztof Kozlowski 5fb7edb38d MAINTAINERS: pinctrl: Add git tree to Samsung pinctrl entry
Add a Git tree on @kernel.org for maintaining the Samsung pinctrl
drivers.  The tree will be maintained in a shared model between current
Samsung pinctrl maintainers.  Pull requests will be going to Linus
Walleij.

Also add the patchwork for linux-samsung-soc mailing list which will be
used for handling the patches.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:33:24 +02:00
Neil Armstrong 6a0ab255ae pinctrl: meson-gxl: Fix inverted registers and add missing pins
Fix some inverted bit numbers in some pinctrl groups and add missing pins
and groups to be in pair with the GXBB pinctrl pins definition.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:25:35 +02:00
John Keeping 88bb94216f pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip
With real-time preemption, regmap functions cannot be used in the
implementation of irq_chip since they use spinlocks which may sleep.

Move the setting of the mux for IRQs to an irq_bus_sync_unlock handler
where we are allowed to sleep.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:18:50 +02:00
John Keeping 05709c3e88 pinctrl: rockchip: split out verification of mux settings
We need to avoid calling regmap functions from irq handlers, so the next
commit is going to move the call to rockchip_set_mux() into an
irq_bus_sync_unlock handler.  But we can't return an error from there so
we still need to check the settings from rockchip_irq_set_type() and we
will use this new rockchip_verify_mux() function from there.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:18:03 +02:00
John Keeping 70b7aa7a87 pinctrl: rockchip: convert to raw spinlock
This lock is used from rockchip_irq_set_type() which is part of the
irq_chip implementation and thus must use raw_spinlock_t as documented
in Documentation/gpio/driver.txt.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:17:11 +02:00
John Keeping f07bedc37f pinctrl: rockchip: remove unnecessary locking
regmap_update_bits does its own locking and everything else accessed
here is a local variable so there is no need to lock around it.

Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-28 11:16:06 +02:00
Linus Walleij 350992348a pinctrl: sh-pfc: Updates for v4.12
- Fixes and cleanups.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY1OQYAAoJEEgEtLw/Ve77FkkP/RDFVCNEY4Z646SuTRdyWZKQ
 xo5GyRS77PMOg2WEcSd9VytavK0J+AnHXwKiAIbYyedS2ki0TNSpt/tpowMxG1BN
 7wdM/pdcoM/81Rof9WVlkQTgi5XZIVn24q2n+L1pj1e+t0dh6cmOQErwfPW0u45n
 02XKkBxMhZfa4skwUcwt7YxEkMHV1/e4FuQYPgzKLhS8OGW/5zluF8ViyRvmanMT
 ATsn/GWOWJuuLqtBcfH1uBz6irY4i3aMnpsdffaG2jHlDQCJ2Vz/KlcyzEzzZqRR
 LUgKeK7vkNgyMZ0GBpar6ywOGgE6AlM3zKcoV5FAqqH6Qh22iI6mfvoNYIH/gr5K
 Digrtjd1Iw3BgGjNr9A/GQxM+bASyKu31pyeptOgkn0vI6CM16w9UqVI47qk6frw
 /29NloFJwTmM+FqPl3inEcC9VqcmWecijYu2S2USYliPbZ8ZqRNMbH+gh25cfzDs
 90QgnjfGewPzQ241FJA13Ozqqrj5tOcqoMLjdJr3qD1nPCA+bbujhSYTMKoID+H5
 YeDaYfFNCA5Kj3kSPMvyOKGSG2UerVKZhb6SiBO4mso9/e/Hssi99feVINuDLAaZ
 /ObO00LTn1EEklbfEFryLgS/vgdmFsFGfVhjf1b/8P0HmJm68UaPpHMETrtX1m0/
 uDNWIpt7V5HgqsvENE28
 =DexH
 -----END PGP SIGNATURE-----

Merge tag 'sh-pfc-for-v4.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v4.12

  - Fixes and cleanups.
2017-03-24 16:17:04 +01:00
Hans de Goede a0b028597d pinctrl: cherryview: Add support for GMMR GPIO opregion
On some Cherry Trail devices the ASL uses the GMMR GPIO to access
GPIOs so as to serialize MMIO accesses to GPIO registers with the
OS, because:

"Due to a silicon issue, a shared lock must be used to prevent concurrent
accesses across the 4 GPIO controllers.

See Intel Atom Z8000 Processor Series Specification Update (Rev. 005),
errata #CHT34, for further information."

This commit adds support for this opregion, this fixes a number of
ASL errors on my Ezpad mini3 tablet and makes the otg port device/host
muxing which is controlled in firmware on this model work properly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 14:42:51 +01:00
Andy Yan b9c6dcab26 pinctrl: rockchip: rename RK1108 to RV1108
Rockchip finally named the SOC as RV1108, so change it.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
[adapted rk1108 dtsi to keep bisectability]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 10:17:38 +01:00
Andy Yan ab714cfb4e dt-bindings: rockchip,pinctrl: rename RK1108 to RV1108
Rockchip finally named the SOC as RV1108, so change it.
Also move the compatible list to one compatible per line.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 10:16:14 +01:00
Jeffy Chen d468289a02 pinctrl: rockchip: add irq_enable & irq_disable ops
Currently we are trying to enable/disable the clk of irq's gpio bank when
unmask/mask irq. But the kernel's "lazy disable approach" will skip masking
irq when the irq chip doesn't support irq_disable ops.

So we may hit this case:
	irq_enable-> enable clk
	irq_disable-> noop
	irq_enable-> enable clk again
	irq_disable-> noop

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 10:10:01 +01:00
Masahiro Yamada 2afd450d78 pinctrl: uniphier: make drivers non-modular
At first these drivers were written as tristate, but the module
usecases are actually not tested.  Make all of them boolean.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 10:09:51 +01:00
Masahiro Yamada 8ef364b3ce pinctrl: uniphier: remove obsoleted compatibles
Since commit 3e030b0b4e ("pinctrl: uniphier: allow to have pinctrl
node under syscon node"), this driver has kept compatibility for the
old DT files.  Several releases have passed since then, so remove
the obsoleted compatibles and clean up the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 10:09:43 +01:00
Martin Blumenstingl cc97a95f95 pinctrl: meson: gxl: add the missing PWM pin definitions
This adds support for the missing PWM pins on Meson GXL SoCs, namely:
- PWM_A
- PWM_B
- PWM_C
- PWM_F (GPIOX_7 and GPIOCLK_1 can be selected as output)
- PWM_AO_A (GPIOAO_3 and GPIOAO_8 can be selected as output)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-23 09:46:04 +01:00
Geert Uytterhoeven 3091ae775f pinctrl: sh-pfc: Update info pointer after SoC-specific init
Update the sh_pfc_soc_info pointer after calling the SoC-specific
initialization function, as it may have been updated to e.g. handle
different SoC revisions.  This makes sure the correct subdriver name is
printed later.

Fixes: 0c151062f3 ("sh-pfc: Add support for SoC-specific initialization")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-03-21 11:21:55 +01:00
Geert Uytterhoeven b332da51a9 pinctrl: sh-pfc: r8a7795: Restore sort order
Somehow the QSPI and SCIF_CLK fragments were inserted at the wrong
positions.  Restore sort order (alphabetically, per group).

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-03-21 11:17:38 +01:00
Geert Uytterhoeven 4324b6084f pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl
Fix typos in hscif2_clk_b_mux[] and hscif4_ctrl_mux[].

Fixes: a56069c46c ("pinctrl: sh-pfc: r8a7795: Add HSCIF pins, groups, and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-03-21 11:17:15 +01:00
Julia Cartwright f658ed3642 pinctrl: sunxi: make use of raw_spinlock variants
The sunxi pinctrl driver currently implement an irq_chip for handling
interrupts; due to how irq_chip handling is done, it's necessary for the
irq_chip methods to be invoked from hardirq context, even on a a
real-time kernel.  Because the spinlock_t type becomes a "sleeping"
spinlock w/ RT kernels, it is not suitable to be used with irq_chips.

A quick audit of the operations under the lock reveal that they do only
minimal, bounded work, and are therefore safe to do under a raw spinlock.

Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-16 16:39:16 +01:00
Julia Cartwright 82e529c1c7 pinctrl: sirf: atlas7: make use of raw_spinlock variants
The sirf atlas7 pinctrl drivers currently implement an irq_chip for
handling interrupts; due to how irq_chip handling is done, it's
necessary for the irq_chip methods to be invoked from hardirq context,
even on a a real-time kernel.  Because the spinlock_t type becomes a
"sleeping" spinlock w/ RT kernels, it is not suitable to be used with
irq_chips.

A quick audit of the operations under the lock reveal that they do only
minimal, bounded work, and are therefore safe to do under a raw spinlock.

Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-16 16:39:15 +01:00
Julia Cartwright 229710fecd pinctrl: amd: make use of raw_spinlock variants
The amd pinctrl drivers currently implement an irq_chip for handling
interrupts; due to how irq_chip handling is done, it's necessary for the
irq_chip methods to be invoked from hardirq context, even on a a
real-time kernel.  Because the spinlock_t type becomes a "sleeping"
spinlock w/ RT kernels, it is not suitable to be used with irq_chips.

A quick audit of the operations under the lock reveal that they do only
minimal, bounded work, and are therefore safe to do under a raw spinlock.

Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-16 16:39:15 +01:00
Julia Cartwright cb96a66243 pinctrl: bcm: make use of raw_spinlock variants
The bcm pinctrl drivers currently implement an irq_chip for handling
interrupts; due to how irq_chip handling is done, it's necessary for the
irq_chip methods to be invoked from hardirq context, even on a a
real-time kernel.  Because the spinlock_t type becomes a "sleeping"
spinlock w/ RT kernels, it is not suitable to be used with irq_chips.

A quick audit of the operations under the lock reveal that they do only
minimal, bounded work, and are therefore safe to do under a raw spinlock.

Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-16 16:39:14 +01:00
Timur Tabi a9ee6bd44c pinctrl: qcom: qdf2xxx: add names to the gpios
The sysfs and debugfs entries for pin control drivers work better when
the individual pins are given real names, even if they are all just
"gpio0", "gpio1", etc.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-16 16:39:04 +01:00
david.wu 728d3f5afd pinctrl: rockchip: Add input schmitt support for rk3328
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:26 +01:00
david.wu e3b357d7df pinctrl: rockchip:Add input schmitt support
To prevent external signal crosstalk, some pins need to
enable input schmitt, like i2c pins, 32k-input pin and so on.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:25 +01:00
Icenowy Zheng 9396f44153 pinctrl: sunxi: select GPIOLIB
Allwinner pin controllers are also GPIO controllers.

Currently, if GPIOLIB is forgot to be chosen, the build of
pinctrl-sunxi.c will fail for lacking a lot of gpiochip_* functions.

Select GPIOLIB to ensure this driver can be built.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:25 +01:00
Icenowy Zheng 14c868b00f pinctrl: sunxi: Add A64 R_PIO controller support
The A64 has a R_PIO pin controller, similar to the one found on the H3 SoC.
Add support for the pins controlled by the R_PIO controller.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:24 +01:00
Icenowy Zheng 9836b1ac2d dt: bindings: add binding for Allwinner A64 R_PIO pinctrl
Allwinner A64 SoC has also a dedicated pin controller for Port L GPIOs,
which is called "Port Controller (CPUs-PORT)" in SoC User Manual.

Add a binding for this pin controller, like the ones in A23/33 and H3.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:24 +01:00
Icenowy Zheng caf9db13a7 dt-bindings: fix for Allwinner H5 pinctrl's compatible
The compatible for Allwinner H5 pin controller is wrong written as
allwinner,sun50i-h5-r-pinctrl, however, it's really a generic pinctrl
rather than a "r" one.

Fix this compatible string.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:23 +01:00
Icenowy Zheng 082bc28c02 pinctrl: sunxi: refactor pinctrl choice selecting for ARM64
ARM64 Allwinner SoCs used to have every pinctrl driver selected in
ARCH_SUNXI. Change this to make their default value to (ARM64 &&
ARCH_SUNXI).

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:23 +01:00
Andy Shevchenko 3ec440e33f pinctrl: Fix spelling typos
Just fix spelling typos in comments.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:22 +01:00
Rick Altherr c825676b08 pinctrl: aspeed: Allow disabling Port D and Port E loopback mode
Port D and port E GPIO loopback modes are commonly enabled via hardware
straps for use with front-panel buttons.  When the BMC is powered
off or fails to boot, the front-panel buttons are directly connected to
the host chipset via the loopback to allow direct power-on and reset
control. Once the BMC has booted, the loopback mode must be disabled for
the BMC to take over control of host power-on and reset.

Disabling these loopback modes requires writing to the hardware strap
register which violates the current design of assuming the system
designer chose the strap settings for a specific reason and they should
be treated as read-only. Only the two bits of the strap register related
to these loopback modes are allowed to be written and comments have been
added to explain why.

Signed-off-by: Rick Altherr <raltherr@google.com>
Acked-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:22 +01:00
david.wu 3818e4a767 pinctrl: rockchip: Add rk3328 pinctrl support
Note, the iomux of following pins are special, need to
be recalculated specially.
 - gpio2_b4
 - gpio2_b7
 - gpio2_c7

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:21 +01:00
david.wu ea262ad6e4 pinctrl: rockchip: Add mux recalculation support
Some pins are special at a bank so that add
IOMUX_RECALCED type to indicate which iomux source
of the bank need to be recalculated. If the mux
recalculateed callback and IOMUX_RECALCED type
were set, recalculate the pins' iomux by using
mux recalculated data struct.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:21 +01:00
david.wu 8b6c6f930d pinctrl: rockchip: Add 3bit width mux support
This patch supports 3bit width iomux type.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:20 +01:00
Charles Keepax 84b90e0cab pinctrl: samsung: Remove unused local variable
The local variable drvdata is not used in samsung_gpio_set_direction.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-14 14:42:19 +01:00
Charles Keepax 50842cbd34 pinctrl: Fix trivial spelling typo in a comment
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-03-06 14:36:14 +01:00