Skip to content

Commit

Permalink
Merge tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/linusw/linux-pinctrl

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
  ...
  • Loading branch information
torvalds committed May 3, 2017
2 parents be580e7 + 1aa2faf commit 68fed41
Show file tree
Hide file tree
Showing 73 changed files with 11,882 additions and 3,972 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ reading the gpio latch register.

This node must be a subnode of the node exposing the register address
of the GPIO block where the gpio latch is located.
See Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt

Required properties:
- compatible : shall be one of the following:
Expand All @@ -16,9 +17,9 @@ Optional properties:
output names ("xtal")

Example:
gpio1: gpio@13800 {
compatible = "marvell,armada-3700-gpio", "syscon", "simple-mfd";
reg = <0x13800 0x1000>;
pinctrl_nb: pinctrl-nb@13800 {
compatible = "armada3710-nb-pinctrl", "syscon", "simple-mfd";
reg = <0x13800 0x100>, <0x13C00 0x20>;

xtalclk: xtal-clk {
compatible = "marvell,armada-3700-xtal-clock";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Required properties:
"allwinner,sun8i-h3-pinctrl"
"allwinner,sun8i-h3-r-pinctrl"
"allwinner,sun50i-a64-pinctrl"
"allwinner,sun50i-h5-r-pinctrl"
"allwinner,sun50i-a64-r-pinctrl"
"allwinner,sun50i-h5-pinctrl"
"nextthing,gr8-pinctrl"

- reg: Should contain the register physical address and length for the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The AT91 Pinmux Controller, enables the IC
to share one PAD to several functional blocks. The sharing is done by
multiplexing the PAD input/output signals. For each PAD there are up to
8 muxing options (called periph modes). Since different modules require
different PAD settings (like pull up, keeper, etc) the contoller controls
different PAD settings (like pull up, keeper, etc) the controller controls
also the PAD settings parameters.

Please refer to pinctrl-bindings.txt in this directory for details of the
Expand Down
85 changes: 85 additions & 0 deletions Documentation/devicetree/bindings/pinctrl/axis,artpec6-pinctrl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Axis ARTPEC-6 Pin Controller

Required properties:
- compatible: "axis,artpec6-pinctrl".
- reg: Should contain the register physical address and length for the pin
controller.

A pinctrl node should contain at least one subnode representing the pinctrl
groups available on the machine. Each subnode will list the mux function
required and what pin group it will use. Each subnode will also configure the
drive strength and bias pullup of the pin group. If either of these options is
not set, its actual value will be unspecified.


Required subnode-properties:
- function: Function to mux.
- groups: Name of the pin group to use for the function above.

Available functions and groups (function: group0, group1...):
gpio: cpuclkoutgrp0, udlclkoutgrp0, i2c1grp0, i2c2grp0,
i2c3grp0, i2s0grp0, i2s1grp0, i2srefclkgrp0, spi0grp0,
spi1grp0, pciedebuggrp0, uart0grp0, uart0grp1, uart1grp0,
uart2grp0, uart2grp1, uart3grp0, uart4grp0, uart5grp0
cpuclkout: cpuclkoutgrp0
udlclkout: udlclkoutgrp0
i2c1: i2c1grp0
i2c2: i2c2grp0
i2c3: i2c3grp0
i2s0: i2s0grp0
i2s1: i2s1grp0
i2srefclk: i2srefclkgrp0
spi0: spi0grp0
spi1: spi1grp0
pciedebug: pciedebuggrp0
uart0: uart0grp0, uart0grp1
uart1: uart1grp0
uart2: uart2grp0, uart2grp1
uart3: uart3grp0
uart4: uart4grp0
uart5: uart5grp0
nand: nandgrp0
sdio0: sdio0grp0
sdio1: sdio1grp0
ethernet: ethernetgrp0


Optional subnode-properties (see pinctrl-bindings.txt):
- drive-strength: 4, 6, 8, 9 mA. For SD and NAND pins, this is for 3.3V VCCQ3.
- bias-pull-up
- bias-disable

Examples:
pinctrl@f801d000 {
compatible = "axis,artpec6-pinctrl";
reg = <0xf801d000 0x400>;

pinctrl_uart0: uart0grp {
function = "uart0";
groups = "uart0grp0";
drive-strength = <4>;
bias-pull-up;
};
pinctrl_uart3: uart3grp {
function = "uart3";
groups = "uart3grp0";
};
};
uart0: uart@f8036000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0xf8036000 0x1000>;
interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pll2div24>, <&apb_pclk>;
clock-names = "uart_clk", "apb_pclk";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0>;
};
uart3: uart@f8039000 {
compatible = "arm,pl011", "arm,primecell";
reg = <0xf8039000 0x1000>;
interrupts = <0 128 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&pll2div24>, <&apb_pclk>;
clock-names = "uart_clk", "apb_pclk";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
* Marvell Armada 37xx SoC pin and gpio controller

Each Armada 37xx SoC come with two pin and gpio controller one for the
south bridge and the other for the north bridge.

Inside this set of register the gpio latch allows exposing some
configuration of the SoC and especially the clock frequency of the
xtal. Hence, this node is a represent as syscon allowing sharing the
register between multiple hardware block.

GPIO and pin controller:
------------------------

Main node:

Refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning
of the phrase "pin configuration node".

Required properties for pinctrl driver:

- compatible: "marvell,armada3710-sb-pinctrl", "syscon, "simple-mfd"
for the south bridge
"marvell,armada3710-nb-pinctrl", "syscon, "simple-mfd"
for the north bridge
- reg: The first set of register are for pinctrl/gpio and the second
set for the interrupt controller
- interrupts: list of the interrupt use by the gpio

Available groups and functions for the North bridge:

group: jtag
- pins 20-24
- functions jtag, gpio

group sdio0
- pins 8-10
- functions sdio, gpio

group emmc_nb
- pins 27-35
- functions emmc, gpio

group pwm0
- pin 11 (GPIO1-11)
- functions pwm, gpio

group pwm1
- pin 12
- functions pwm, gpio

group pwm2
- pin 13
- functions pwm, gpio

group pwm3
- pin 14
- functions pwm, gpio

group pmic1
- pin 17
- functions pmic, gpio

group pmic0
- pin 16
- functions pmic, gpio

group i2c2
- pins 2-3
- functions i2c, gpio

group i2c1
- pins 0-1
- functions i2c, gpio

group spi_cs1
- pin 17
- functions spi, gpio

group spi_cs2
- pin 18
- functions spi, gpio

group spi_cs3
- pin 19
- functions spi, gpio

group onewire
- pin 4
- functions onewire, gpio

group uart1
- pins 25-26
- functions uart, gpio

group spi_quad
- pins 15-16
- functions spi, gpio

group uart_2
- pins 9-10
- functions uart, gpio

Available groups and functions for the South bridge:

group usb32_drvvbus0
- pin 36
- functions drvbus, gpio

group usb2_drvvbus1
- pin 37
- functions drvbus, gpio

group sdio_sb
- pins 60-64
- functions sdio, gpio

group rgmii
- pins 42-55
- functions mii, gpio

group pcie1
- pins 39-40
- functions pcie, gpio

group ptp
- pins 56-58
- functions ptp, gpio

group ptp_clk
- pin 57
- functions ptp, mii

group ptp_trig
- pin 58
- functions ptp, mii

group mii_col
- pin 59
- functions mii, mii_err

GPIO subnode:

Please refer to gpio.txt in this directory for details of gpio-ranges property
and the common GPIO bindings used by client devices.

Required properties for gpio driver under the gpio subnode:
- interrupts: List of interrupt specifier for the controllers interrupt.
- gpio-controller: Marks the device node as a gpio controller.
- #gpio-cells: Should be 2. The first cell is the GPIO number and the
second cell specifies GPIO flags, as defined in
<dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and
GPIO_ACTIVE_LOW flags are supported.
- gpio-ranges: Range of pins managed by the GPIO controller.

Xtal Clock bindings for Marvell Armada 37xx SoCs
------------------------------------------------

see Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt


Example:
pinctrl_sb: pinctrl-sb@18800 {
compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd";
reg = <0x18800 0x100>, <0x18C00 0x20>;
gpio {
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_sb 0 0 29>;
gpio-controller;
interrupts =
<GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
};

rgmii_pins: mii-pins {
groups = "rgmii";
function = "mii";
};

};
40 changes: 31 additions & 9 deletions Documentation/devicetree/bindings/pinctrl/pinctrl-aspeed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,28 @@ Documentation/devicetree/bindings/mfd/syscon.txt
Subnode Format
==============

The required properties of child nodes are (as defined in pinctrl-bindings):
- function
- groups
The required properties of pinmux child nodes are:
- function: the mux function to select
- groups : the list of groups to select with this function

Each function has only one associated pin group. Each group is named by its
function. The following values for the function and groups properties are
supported:
Required properties of pinconf child nodes are:
- groups: A list of groups to select (either this or "pins" must be
specified)
- pins : A list of ball names as strings, eg "D14" (either this or "groups"
must be specified)

Optional properties of pinconf child nodes are:
- bias-disable : disable any pin bias
- bias-pull-down: pull down the pin
- drive-strength: sink or source at most X mA

Definitions are as specified in
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt, with any
further limitations as described above.

For pinmux, each mux function has only one associated pin group. Each group is
named by its function. The following values for the function and groups
properties are supported:

aspeed,ast2400-pinctrl, aspeed,g4-pinctrl:

Expand Down Expand Up @@ -90,6 +105,11 @@ syscon: scu@1e6e2000 {
function = "I2C3";
groups = "I2C3";
};

pinctrl_gpioh0_unbiased_default: gpioh0 {
pins = "A8";
bias-disable;
};
};
};

Expand All @@ -110,6 +130,11 @@ ahb {
function = "I2C3";
groups = "I2C3";
};

pinctrl_gpioh0_unbiased_default: gpioh0 {
pins = "A18";
bias-disable;
};
};
};

Expand Down Expand Up @@ -143,6 +168,3 @@ ahb {
};
};
};

Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices.
Loading

0 comments on commit 68fed41

Please sign in to comment.