Commit cf0240a7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 4f023706 9bc8fee9
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
@@ -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.

@@ -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.

@@ -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 {
@@ -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 */
+32 −0
Original line number Diff line number Diff line
* 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 −0
Original line number Diff line number Diff line
* 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
                >;
        };
};
+18 −6
Original line number Diff line number Diff line
@@ -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
@@ -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
+5 −5
Original line number Diff line number Diff line
@@ -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

Loading