Skip to content

Commit

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

Pull pin control updates from Linus Walleij:
 "This is a calm cycle, not much happened this time around: not even
  much incremental development. Some three new drivers, that is all.

  No core changes.

  New drivers:

   - NXP (ex Freescale) i.MX 8QM driver.

   - NXP (ex Freescale) i.MX 8MM driver.

   - AT91 SAM9X60 subdriver.

  Improvements:

   - Support for external interrups (EINT) on Mediatek virtual GPIOs.

   - Make BCM2835 pin config fully generic.

   - Lots of Renesas SH-PFC incremental improvements"

* tag 'pinctrl-v5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (70 commits)
  pinctrl: imx: fix scu link errors
  dt-bindings: pinctrl: Document the i.MX50 IOMUXC binding
  pinctrl: qcom: spmi-gpio: Reorder debug print
  pinctrl: nomadik: fix possible object reference leak
  pinctrl: stm32: return error upon hwspinlock failure
  pinctrl: stm32: fix memory leak issue
  pinctrl: sh-pfc: r8a77965: Add DRIF pins, groups and functions
  pinctrl: sh-pfc: r8a77965: Add TMU pins, groups and functions
  pinctrl: sh-pfc: Validate fixed-size field widths at build time
  pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
  pinctrl: sh-pfc: r8a7792: Fix vin1_data18_b pin group
  pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
  pinctrl: sh-pfc: emev2: Add missing pinmux functions
  pinctrl: sunxi: Support I/O bias voltage setting on A80
  pinctrl: ingenic: Add LCD pins for the JZ4725B SoC
  pinctrl: samsung: Remove legacy API for handling external wakeup interrupts mask
  pinctrl: bcm2835: Direct GPIO config changes to generic pinctrl
  pinctrl: bcm2835: declare pin config as generic
  pinctrl: qcom: qcs404: Drop unused UFS_RESET macro
  dt-bindings: add documentation for slew rate
  ...
  • Loading branch information
Linus Torvalds committed Mar 11, 2019
2 parents 4f02370 + 9bc8fee commit cf0240a
Show file tree
Hide file tree
Showing 55 changed files with 3,024 additions and 828 deletions.
27 changes: 26 additions & 1 deletion Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ such as pull-up, multi drive, etc.

Required properties for iomux controller:
- compatible: "atmel,at91rm9200-pinctrl" or "atmel,at91sam9x5-pinctrl"
or "atmel,sama5d3-pinctrl"
or "atmel,sama5d3-pinctrl" or "microchip,sam9x60-pinctrl"
- atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be
configured in this periph mode. All the periph and bank need to be describe.

Expand Down Expand Up @@ -100,6 +100,7 @@ DRIVE_STRENGTH (3 << 5): indicate the drive strength of the pin using the
11 - High
OUTPUT (1 << 7): indicate this pin need to be configured as an output.
OUTPUT_VAL (1 << 8): output val (1 = high, 0 = low)
SLEWRATE (1 << 9): slew rate of the pin: 0 = disable, 1 = enable
DEBOUNCE (1 << 16): indicate this pin needs debounce.
DEBOUNCE_VAL (0x3fff << 17): debounce value.

Expand All @@ -116,6 +117,19 @@ Some requirements for using atmel,at91rm9200-pinctrl binding:
configurations by referring to the phandle of that pin configuration node.
4. The gpio controller must be describe in the pinctrl simple-bus.

For each bank the required properties are:
- compatible: "atmel,at91sam9x5-gpio" or "atmel,at91rm9200-gpio" or
"microchip,sam9x60-gpio"
- reg: physical base address and length of the controller's registers
- interrupts: interrupt outputs from the controller
- interrupt-controller: marks the device node as an interrupt controller
- #interrupt-cells: should be 2; refer to ../interrupt-controller/interrupts.txt
for more details.
- 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>.
- clocks: bank clock

Examples:

pinctrl@fffff400 {
Expand All @@ -125,6 +139,17 @@ pinctrl@fffff400 {
compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
reg = <0xfffff400 0x600>;

pioA: gpio@fffff400 {
compatible = "atmel,at91sam9x5-gpio";
reg = <0xfffff400 0x200>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
#gpio-cells = <2>;
gpio-controller;
interrupt-controller;
#interrupt-cells = <2>;
clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
};

atmel,mux-mask = <
/* A B */
0xffffffff 0xffc00c3b /* pioA */
Expand Down
32 changes: 32 additions & 0 deletions Documentation/devicetree/bindings/pinctrl/fsl,imx50-pinctrl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
* Freescale IMX50 IOMUX Controller

Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
and usage.

Required properties:
- compatible: "fsl,imx50-iomuxc"
- fsl,pins: two integers array, represents a group of pins mux and config
setting. The format is fsl,pins = <PIN_FUNC_ID CONFIG>, PIN_FUNC_ID is a
pin working on a specific function, CONFIG is the pad setting value like
pull-up for this pin. Please refer to imx50 datasheet for the valid pad
config settings.

CONFIG bits definition:
PAD_CTL_HVE (1 << 13)
PAD_CTL_HYS (1 << 8)
PAD_CTL_PKE (1 << 7)
PAD_CTL_PUE (1 << 6)
PAD_CTL_PUS_100K_DOWN (0 << 4)
PAD_CTL_PUS_47K_UP (1 << 4)
PAD_CTL_PUS_100K_UP (2 << 4)
PAD_CTL_PUS_22K_UP (3 << 4)
PAD_CTL_ODE (1 << 3)
PAD_CTL_DSE_LOW (0 << 1)
PAD_CTL_DSE_MED (1 << 1)
PAD_CTL_DSE_HIGH (2 << 1)
PAD_CTL_DSE_MAX (3 << 1)
PAD_CTL_SRE_FAST (1 << 0)
PAD_CTL_SRE_SLOW (0 << 0)

Refer to imx50-pinfunc.h in device tree source folder for all available
imx50 PIN_FUNC_ID.
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/pinctrl/fsl,imx8mm-pinctrl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
* Freescale IMX8MM IOMUX Controller

Please refer to fsl,imx-pinctrl.txt and pinctrl-bindings.txt in this directory
for common binding part and usage.

Required properties:
- compatible: "fsl,imx8mm-iomuxc"
- reg: should contain the base physical address and size of the iomuxc
registers.

Required properties in sub-nodes:
- fsl,pins: each entry consists of 6 integers and represents the mux and config
setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val
input_val> are specified using a PIN_FUNC_ID macro, which can be found in
<dt-bindings/pinctrl/imx8mm-pinfunc.h>. The last integer CONFIG is
the pad setting value like pull-up on this pin. Please refer to i.MX8M Mini
Reference Manual for detailed CONFIG settings.

Examples:

&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
};

iomuxc: pinctrl@30330000 {
compatible = "fsl,imx8mm-iomuxc";
reg = <0x0 0x30330000 0x0 0x10000>;

pinctrl_uart1: uart1grp {
fsl,pins = <
MX8MM_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ group pwm3
- functions pwm, gpio

group pmic1
- pin 17
- pin 7
- functions pmic, gpio

group pmic0
- pin 16
- pin 6
- functions pmic, gpio

group i2c2
Expand Down Expand Up @@ -112,19 +112,31 @@ group usb2_drvvbus1
- functions drvbus, gpio

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

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

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

group pcie1_clkreq
- pins 40
- functions pcie, gpio

group pcie1_wakeup
- pins 41
- functions pcie, gpio

group smi
- pins 54-55
- functions smi, gpio

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

group ptp_clk
Expand Down
10 changes: 5 additions & 5 deletions Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ The GPIO bank for the controller is represented as a sub-node and it acts as a
GPIO controller.

Required properties for sub-nodes are:
- reg: should contain address and size for mux, pull-enable, pull and
gpio register sets
- reg-names: an array of strings describing the "reg" entries. Must
contain "mux", "pull" and "gpio". "pull-enable" is optional and
when it is missing the "pull" registers are used instead
- reg: should contain a list of address and size, one tuple for each entry
in reg-names.
- reg-names: an array of strings describing the "reg" entries.
Must contain "mux" and "gpio".
May contain "pull", "pull-enable" and "ds" when appropriate.
- gpio-controller: identifies the node as a gpio controller
- #gpio-cells: must be 2

Expand Down
9 changes: 0 additions & 9 deletions Documentation/driver-api/pinctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,6 @@ configuration in the pin controller ops like this::
.confops = &foo_pconf_ops,
};

Since some controllers have special logic for handling entire groups of pins
they can exploit the special whole-group pin control function. The
pin_config_group_set() callback is allowed to return the error code -EAGAIN,
for groups it does not want to handle, or if it just wants to do some
group-level handling and then fall through to iterate over all pins, in which
case each individual pin will be treated by separate pin_config_set() calls as
well.


Interaction with the GPIO subsystem
===================================

Expand Down
Loading

0 comments on commit cf0240a

Please sign in to comment.