03 May, 2017

2 commits

  • Pull trivial tree updates from Jiri Kosina.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
    tty: fix comment for __tty_alloc_driver()
    init/main: properly align the multi-line comment
    init/main: Fix double "the" in comment
    Fix dead URLs to ftp.kernel.org
    drivers: Clean up duplicated email address
    treewide: Fix typo in xml/driver-api/basics.xml
    tools/testing/selftests/powerpc: remove redundant CFLAGS in Makefile: "-Wall -O2 -Wall" -> "-O2 -Wall"
    selftests/timers: Spelling s/privledges/privileges/
    HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/
    net: phy: dp83848: Fix Typo
    UBI: Fix typos
    Documentation: ftrace.txt: Correct nice value of 120 priority
    net: fec: Fix typo in error msg and comment
    treewide: Fix typos in printk

    Linus Torvalds
     
  • Pull pin control updates from Linus Walleij:
    "This is the bulk of pin control changes for the v4.12 cycle.

    The extra week before the merge window actually resulted in some of
    the type of fixes that usually arrive after the merge window already
    starting to trickle in from eager developers using -next, I'm
    impressed.

    I have recruited a Samsung subsubsystem maintainer (Krzysztof) to deal
    with the onset of Samsung patches. It works great.

    Apart from that it is a boring round, just incremental updates and
    fixes all over the place, no serious core changes or anything exciting
    like that. The most pleasing to see is Julia Cartwrights work to audit
    the irqchip-providing drivers for realtime locking compliance. It's
    one of those "I should really get around to looking into that" things
    that have been on my TODO list since forever.

    Summary:

    Core changes:

    - add bi-directional and output-enable pin configurations to the
    generic bindings and generic pin controlling core.

    New drivers or subdrivers:

    - Armada 37xx SoC pin controller and GPIO support.

    - Axis ARTPEC-6 SoC pin controller support.

    - AllWinner A64 R_PIO controller support, and opening up the
    AllWinner sunxi driver for ARM64 use.

    - Rockchip RK3328 support.

    - Renesas R-Car H3 ES2.0 support.

    - STM32F469 support in the STM32 driver.

    - Aspeed G4 and G5 pin controller support.

    Improvements:

    - a whole slew of realtime improvements to drivers implementing
    irqchips: BCM, AMD, SiRF, sunxi, rockchip.

    - switch meson driver to get the GPIO ranges from the device tree.

    - input schmitt trigger support on the Rockchip driver.

    - enable the sunxi (AllWinner) driver to also be used on ARM64
    silicon.

    - name the Qualcomm QDF2xxx GPIO lines.

    - support GMMR GPIO regions on the Intel Cherryview. This fixes a
    serialization problem on these platforms.

    - pad retention support for the Samsung Exynos 5433.

    - handle suspend-to-ram in the AT91-pio4 driver.

    - pin configuration support in the Aspeed driver.

    Cleanups:

    - the final name of Rockchip RK1108 was RV1108 so rename the driver
    and variables to stay consistent"

    * tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (80 commits)
    pinctrl: mediatek: Add missing pinctrl bindings for mt7623
    pinctrl: artpec6: Fix return value check in artpec6_pmx_probe()
    pinctrl: artpec6: Remove .owner field for driver
    pinctrl: tegra: xusb: Silence sparse warnings
    ARM: at91/at91-pinctrl documentation: fix spelling mistake: "contoller" -> "controller"
    pinctrl: make artpec6 explicitly non-modular
    pinctrl: aspeed: g5: Add pinconf support
    pinctrl: aspeed: g4: Add pinconf support
    pinctrl: aspeed: Add core pinconf support
    pinctrl: aspeed: Document pinconf in devicetree bindings
    pinctrl: Add st,stm32f469-pinctrl compatible to stm32-pinctrl
    pinctrl: stm32: Add STM32F469 MCU support
    Documentation: dt: Remove ngpios from stm32-pinctrl binding
    pinctrl: stm32: replace device_initcall() with arch_initcall()
    pinctrl: stm32: add possibility to use gpio-ranges to declare bank range
    pinctrl: armada-37xx: Add gpio support
    pinctrl: armada-37xx: Add pin controller support for Armada 37xx
    pinctrl: dt-bindings: Add documentation for Armada 37xx pin controllers
    pinctrl: core: Make pinctrl_init_controller() static
    pinctrl: generic: Add bi-directional and output-enable
    ...

    Linus Torvalds
     

28 Apr, 2017

1 commit


26 Apr, 2017

1 commit


25 Apr, 2017

2 commits

  • Commit 53d2a715c240 ("phy: Add Tegra XUSB pad controller support") added
    a new driver for the XUSB pad controller that implements a more flexible
    devicetree binding. In order to preserve backwards compatibility the old
    driver can be probed if the obsolete bindings are detected.

    In order to hide the legacy code, these prototypes were defined in a
    header private to the new driver. This has the disadvantage of making
    the sparse code checker complain about the missing declarations when
    compiling the old driver and suggesting to make the functions static.

    Avoid these sparse warnings by adding local prototype declarations into
    the compatibility driver.

    Signed-off-by: Thierry Reding
    Signed-off-by: Linus Walleij

    Thierry Reding
     
  • …it/geert/renesas-drivers into devel

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

    - Miscellaneous fixes for R-Car M2-W and R-Car E2.

    Linus Walleij
     

24 Apr, 2017

10 commits

  • The Kconfig currently controlling compilation of this code is:

    drivers/pinctrl/Kconfig:config PINCTRL_ARTPEC6
    drivers/pinctrl/Kconfig: bool "Axis ARTPEC-6 pin controller driver"

    ...meaning that it currently is not being built as a module by anyone.

    Lets remove the modular code that is essentially orphaned, so that
    when reading the driver there is no doubt it is builtin-only.

    Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

    We also delete the MODULE_LICENSE tag etc. since all that information
    is already contained at the top of the file in the comments.

    Cc: Lars Persson
    Cc: Niklas Cassel
    Cc: linux-arm-kernel@axis.com
    Cc: linux-gpio@vger.kernel.org
    Signed-off-by: Paul Gortmaker
    Acked-by: Jesper Nilsson
    Signed-off-by: Linus Walleij

    Paul Gortmaker
     
  • Testing for pinctrl-aspeed-g5 was performed on an AST2500EVB system,
    using the strategy outlined in the commit message for the change to the
    Aspeed pinctrl core.

    Signed-off-by: Andrew Jeffery
    Signed-off-by: Linus Walleij

    Andrew Jeffery
     
  • Testing for pinctrl-aspeed-g4 was performed on an OpenPOWER Palmetto
    system, using the strategy outlined in the commit message for the
    change to the Aspeed pinctrl core.

    Signed-off-by: Andrew Jeffery
    Signed-off-by: Linus Walleij

    Andrew Jeffery
     
  • Several pinconf parameters have a fairly straight-forward mapping onto
    the Aspeed pin controller. These include management of pull-down bias,
    drive-strength, and some debounce configuration.

    Pin biasing largely is managed on a per-GPIO-bank basis, aside from the
    ADC and RMII/RGMII pins. As the bias configuration for each pin in a
    bank maps onto a single per-bank bit, configuration tables will be
    introduced to describe the ranges of pins and the supported pinconf
    parameter. The use of tables also helps with the sparse support of
    pinconf properties, and the fact that not all GPIO banks support
    biasing or drive-strength configuration.

    Further, as the pin controller uses a consistent approach for bias and
    drive strength configuration at the register level, a second table is
    defined for looking up the the bit-state required to enable or query the
    provided configuration.

    Testing for pinctrl-aspeed-g4 was performed on an OpenPOWER Palmetto
    system, and pinctrl-aspeed-g5 on an AST2500EVB as well as under QEMU.
    The test method was to set the appropriate bits via devmem and verify
    the result through the controller's pinconf-pins debugfs file. This
    simultaneously validates the get() path and half of the set() path. The
    remainder of the set() path was validated by configuring a handful of
    pins via the devicetree with the supported pinconf properties and
    verifying the appropriate registers were touched.

    Signed-off-by: Andrew Jeffery
    Signed-off-by: Linus Walleij

    Andrew Jeffery
     
  • This patch which adds STM32F469 pinctrl and GPIO support, relies on the
    generic STM32 pinctrl driver.

    Signed-off-by: Alexandre TORGUE
    Signed-off-by: Linus Walleij

    Alexandre TORGUE
     
  • Pinctrl has to be registered earlier. Mainly to register bank irqdomain
    earlier as other devices could use interrupts from those irqdomain.

    Signed-off-by: Alexandre TORGUE
    Signed-off-by: Linus Walleij

    Alexandre TORGUE
     
  • Use device tree entries to declare gpio range. It will allow to use
    no contiguous gpio bank and holes inside a bank.

    Signed-off-by: Alexandre TORGUE
    Signed-off-by: Linus Walleij

    Alexandre TORGUE
     
  • GPIO management is pretty simple and is part of the same IP than the pin
    controller for the Armada 37xx SoCs. This patch adds the GPIO support to
    the pinctrl-armada-37xx.c file, it also allows sharing common functions
    between the gpiolib and the pinctrl drivers.

    Signed-off-by: Gregory CLEMENT
    Signed-off-by: Linus Walleij

    Gregory CLEMENT
     
  • The Armada 37xx SoC come with 2 pin controllers: one on the south
    bridge (managing 28 pins) and one on the north bridge (managing 36 pins).

    At the hardware level the controller configure the pins by group and not
    pin by pin. This constraint is reflected in the design of the driver:
    only the group related functions are implemented.

    Signed-off-by: Gregory CLEMENT
    Signed-off-by: Linus Walleij

    Gregory CLEMENT
     
  • pinctrl_init_controller() is not used outside core.c, thus make it
    static and prevent compiler to warn.

    drivers/pinctrl/core.c:1943:21: warning: no previous prototype for ‘pinctrl_init_controller’ [-Wmissing-prototypes]
    struct pinctrl_dev *pinctrl_init_controller(struct pinctrl_desc *pctldesc,
    ^~~~~~~~~~~~~~~~~~~~~~~

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Linus Walleij

    Andy Shevchenko
     

11 Apr, 2017

3 commits

  • Add bi-directional and output-enable pin configuration properties.

    bi-directional allows to specify when a pin shall operate in input and
    output mode at the same time. This is particularly useful in platforms
    where input and output buffers have to be manually enabled.

    output-enable is just syntactic sugar to specify that a pin shall
    operate in output mode, ignoring the provided argument.
    This pairs with input-enable pin configuration option.

    Signed-off-by: Jacopo Mondi
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij

    Jacopo Mondi
     
  • After commit 47c950d10202 ("pinctrl: cherryview: Do not add all
    southwest and north GPIOs to IRQ domain") the driver does not add all
    GPIOs to the irqdomain. The reason for that is that those GPIOs cannot
    generate IRQs at all, only GPEs (General Purpose Events). This causes
    Linux virtual IRQ numbering to change.

    However, it seems some CYAN Chromebooks, including Acer Chromebook
    hardcodes these Linux IRQ numbers in the ACPI tables of the machine.
    Since the numbering is different now, the IRQ meant for keyboard does
    not match the Linux virtual IRQ number anymore making the keyboard
    non-functional.

    Work this around by adding special quirk just for these machines where
    we add back all GPIOs to the irqdomain. Rest of the Cherryview/Braswell
    based machines will not be affected by the change.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945
    Fixes: 47c950d10202 ("pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain")
    Reported-by: Adam S Levy
    Signed-off-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • Three video input signals suffered from a search/replace failure in
    some copied code.

    Signed-off-by: Andrew Jeffery
    Signed-off-by: Linus Walleij

    Andrew Jeffery
     

10 Apr, 2017

2 commits

  • …t/pinctrl/samsung into devel

    Samsung pinctrl drivers update for v4.12:
    1. Add support for pad retention control through pinctrl drivers which
    moves us forward to better runtime PM of pinctrl, clocks, power domains
    and other devices.
    2. Fix GPIO hogs by registering pinctrl before registering gpiolib.
    3. Use devm-like interface.

    Linus Walleij
     
  • The commit 1259feddd0f8("pinctrl: samsung: Fix the width of
    PINCFG_TYPE_DRV bitfields for Exynos5433") already fixed
    the different width of PINCFG_TYPE_DRV from previous Exynos SoC.

    However wrong merge conflict resolution was chosen in commit
    7f36f5d11cda ("Merge tag 'v4.10-rc6' into devel") effectively dropping
    the changes for PINCFG_TYPE_DRV. Re-do them here.

    The macro EXYNOS_PIN_BANK_EINTW is no longer used so remove it.

    Fixes: 7f36f5d11cda ("Merge tag 'v4.10-rc6' into devel")
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Linus Walleij

    Chanwoo Choi
     

07 Apr, 2017

6 commits

  • When suspending to RAM, the power to the core is cut and the register
    values are lost. Save and restore more registers than just IMR.

    Signed-off-by: Alexandre Belloni
    Signed-off-by: Linus Walleij

    Alexandre Belloni
     
  • Correct the incorrect function name and description.

    Fixes: a76edc89b100e4fe ("pinctrl: core: Add generic pinctrl functions for managing groups")
    Signed-off-by: Geert Uytterhoeven
    Acked-by: Tony Lindgren
    Signed-off-by: Linus Walleij

    Geert Uytterhoeven
     
  • 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
    Signed-off-by: Linus Walleij

    Jesper Nilsson
     
  • 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
    Acked-by: Kevin Hilman
    Signed-off-by: Linus Walleij

    Martin Blumenstingl
     
  • 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: 0fefcb6876d0 ("pinctrl: Add support for Meson8b")
    Signed-off-by: Martin Blumenstingl
    Acked-by: Kevin Hilman
    Signed-off-by: Linus Walleij

    Martin Blumenstingl
     
  • Recent pinctrl changes to allow dynamic allocation of pins exposed one
    more issue with the pinctrl pins claimed early by the controller itself.
    This caused a regression for IMX6 pinctrl hogs.

    Before enabling the pin controller driver we need to wait until it has
    been properly initialized, then claim the hogs, and only then enable it.

    To fix the regression, split the code into pinctrl_claim_hogs() and
    pinctrl_enable(). And then let's require that pinctrl_enable() is always
    called by the pin controller driver when ready after calling
    pinctrl_register_and_init().

    Depends-on: 950b0d91dc10 ("pinctrl: core: Fix regression caused by delayed
    work for hogs")
    Fixes: df61b366af26 ("pinctrl: core: Use delayed work for hogs")
    Fixes: e566fc11ea76 ("pinctrl: imx: use generic pinctrl helpers for
    managing groups")
    Cc: Haojian Zhuang
    Cc: Masahiro Yamada
    Cc: Mika Penttilä
    Cc: Mika Westerberg
    Cc: Nishanth Menon
    Cc: Shawn Guo
    Cc: Stefan Agner
    Tested-by: Geert Uytterhoeven
    Tested-by: Gary Bisson
    Tested-by: Fabio Estevam
    Signed-off-by: Tony Lindgren
    Signed-off-by: Linus Walleij

    Tony Lindgren
     

05 Apr, 2017

1 commit

  • All R8A7794 manuals I have here (0.50 and 1.10) agree that the PFC driver
    has ATAG0# and ATAWR0# signals in IPSR12 swapped -- fix this.

    Fixes: 43c4436e2f18 ("pinctrl: sh-pfc: add R8A7794 PFC support")
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Geert Uytterhoeven

    Sergei Shtylyov
     

04 Apr, 2017

5 commits

  • …it/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.

    Linus Walleij
     
  • The IPSR field names in the comments have been fat-fingered in a couple
    places -- fix those silly typos...

    Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Geert Uytterhoeven

    Sergei Shtylyov
     
  • PINMUX_IPSR_MSEL() macro invocation for the TX2 signal has apparently wrong
    1st argument -- most probably a result of cut&paste programming...

    Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Geert Uytterhoeven

    Sergei Shtylyov
     
  • The R8A7791 PFC driver was apparently based on the preliminary revisions
    of the user's manual, which omitted the DVC_MUTE signal altogether in
    the PFC section. The modern manual has the signal described, so just add
    the necassary data to the driver...

    Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Geert Uytterhoeven

    Sergei Shtylyov
     
  • The R8A7791 PFC driver was apparently based on the preliminary revisions
    of the user's manual, which omitted the HSCIF1 group E signals in the
    IPSR4 register description. This would cause HSCIF1's probe to fail with
    the messages like below:

    sh-pfc e6060000.pfc: cannot locate data/mark enum_id for mark 1989
    sh-sci e62c8000.serial: Error applying setting, reverse things back
    sh-sci: probe of e62c8000.serial failed with error -22

    Add the neceassary PINMUX_IPSR_MSEL() invocations for the HSCK1_E,
    HCTS1#_E, and HRTS1#_E signals...

    Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Geert Uytterhoeven

    Sergei Shtylyov
     

30 Mar, 2017

3 commits

  • 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
    Cc: Takeshi Kihara

    Geert Uytterhoeven
     
  • 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
    Cc: Takeshi Kihara

    Geert Uytterhoeven
     
  • 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
    Cc: Takeshi Kihara

    Geert Uytterhoeven
     

28 Mar, 2017

4 commits