Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ab35662 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull pin control updates from Linus Walleij:
 "Pin control bulk changes for the v4.11 kernel cycle.

  Core changes:

   - Switch the generic pin config argument from 16 to 24 bits, only use
     8 bits for the configuration type. We might need to encode more
     information about a certain setting than we need to encode
     different generic settings.

   - Add a cross-talk API to the pin control GPIO back-end, utilizing
     pinctrl_gpio_set_config() from GPIO drivers that want to set up a
     certain pin configuration in the back-end.

     This also includes the .set_config() refactoring of the GPIO chips,
     so that they pass a generic configuration for things like
     debouncing and single ended (typically open drain). This change has
     also been merged in an immutable branch to the GPIO tree.

   - Take hogs with a delayed work, so that we finalize probing a pin
     controller before trying to get any hogs.

   - For pin controllers putting all group and function definitions into
     the device tree, we now have generic code to deal with this and it
     is used in two drivers so far.

   - Simplifications of the pin request conflict check.

   - Make dt_free_map() optional.

  Updates to drivers:

   - pinctrl-single now use the generic helpers to generate dynamic
     group and function tables from the device tree.

   - Texas Instruments IOdelay configuration driver add-on to
     pinctrl-single.

   - i.MX: use radix trees to store groups and functions, use the new
     generic group and function helpers to manage them.

   - Intel: add support for hardware debouncing and 1K pull-down. New
     subdriver for the Gemini Lake SoC.

   - Renesas SH-PFC: drive strength and bias support, CAN bus muxing,
     MSIOF, SDHI, HSCIF for r8a7796. Gyro-ADC supporton r8a7791.

   - Aspeed: use syscon cross-dependencies to set up related bits in the
     LPC host controller and display controller.

   - Aspeed: finalize G4 and G5 support. Fix mux configuration on GPIOs.
     Add banks Y, Z, AA, AB and AC.

   - AMD: support additional GPIO.

   - STM32: set this controller to strict muxing mode. STM32H743 MCU
     support.

   - Allwinner sunxi: deep simplifications on how to support subvariants
     of SoCs without adding to much SoC-specific data for each
     subvariant, especially for sun5i variants. New driver for V3s SoCs.
     New driver for the H5 SoC. Support A31/A31s variants with the new
     variant framework.

   - Mvebu: simplifications to use a MMIO and regmap abstraction. New
     subdrivers for the 98DX3236, 98DX5241 SoCs.

   - Samsung Exynos: delete Exynos4415 support. Add crosstalk to the SoC
     driver to access regmaps. Add infrastructure for pin-bank retention
     control. Clean out the pin retention control from
     arch/arm/mach-exynos and arch/arm/mach-s5p and put it properly in
     the Samsung pin control driver(s).

   - Meson: add HDMI HPD/DDC pins. Add pwm_ao_b pin.

   - Qualcomm: use raw spinlock variants: this makes the qualcomm driver
     realtime-safe"

* tag 'pinctrl-v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (111 commits)
  pinctrl: samsung: Fix return value check in samsung_pinctrl_get_soc_data()
  pinctrl: intel: unlock on error in intel_config_set_pull()
  pinctrl: berlin: make bool drivers explicitly non-modular
  pinctrl: spear: make bool drivers explicitly non-modular
  pinctrl: mvebu: make bool drivers explicitly non-modular
  pinctrl: sunxi: make sun5i explicitly non-modular
  pinctrl: sunxi: Remove stray printk call in sun5i driver's probe function
  pinctrl: samsung: mark PM functions as __maybe_unused
  pinctrl: sunxi: Remove redundant A31s pinctrl driver
  pinctrl: sunxi: Support A31/A31s with pinctrl variants
  pinctrl: Amend bindings for STM32 pinctrl
  pinctrl: Add STM32 pinctrl driver DT bindings
  pinctrl: stm32: Add STM32H743 MCU support
  include: dt-bindings: Add STM32H7 pinctrl DT defines
  gpio: aspeed: Remove dependence on GPIOF_* macros
  pinctrl: stm32: fix bad location of gpiochip_lock_as_irq
  drivers: pinctrl: add driver for Allwinner H5 SoC
  pinctrl: intel: Add Intel Gemini Lake pin controller support
  pinctrl: intel: Add support for 1k additional pull-down
  pinctrl: intel: Add support for hardware debouncer
  ...
parents 6d1c42d9 baafacab
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ Required properties:
  "allwinner,sun8i-h3-pinctrl"
  "allwinner,sun8i-h3-r-pinctrl"
  "allwinner,sun50i-a64-pinctrl"
  "allwinner,sun50i-h5-r-pinctrl"
  "nextthing,gr8-pinctrl"

- reg: Should contain the register physical address and length for the
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ iomuxc: iomuxc@30330000 {
	reg = <0x30330000 0x10000>;
};

Pheriparials using pads from iomuxc-lpsr support low state retention power
Peripherals using pads from iomuxc-lpsr support low state retention power
state, under LPSR mode GPIO's state of pads are retain.

Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
+46 −0
Original line number Diff line number Diff line
* Marvell 98dx3236 pinctrl driver for mpp

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

Required properties:
- compatible: "marvell,98dx3236-pinctrl" or "marvell,98dx4251-pinctrl"
- reg: register specifier of MPP registers

This driver supports all 98dx3236, 98dx3336 and 98dx4251 variants

name          pins     functions
================================================================================
mpp0          0        gpo, spi0(mosi), dev(ad8)
mpp1          1        gpio, spi0(miso), dev(ad9)
mpp2          2        gpo, spi0(sck), dev(ad10)
mpp3          3        gpio, spi0(cs0), dev(ad11)
mpp4          4        gpio, spi0(cs1), smi(mdc), dev(cs0)
mpp5          5        gpio, pex(rsto), sd0(cmd), dev(bootcs)
mpp6          6        gpo, sd0(clk), dev(a2)
mpp7          7        gpio, sd0(d0), dev(ale0)
mpp8          8        gpio, sd0(d1), dev(ale1)
mpp9          9        gpio, sd0(d2), dev(ready0)
mpp10         10       gpio, sd0(d3), dev(ad12)
mpp11         11       gpio, uart1(rxd), uart0(cts), dev(ad13)
mpp12         12       gpo, uart1(txd), uart0(rts), dev(ad14)
mpp13         13       gpio, intr(out), dev(ad15)
mpp14         14       gpio, i2c0(sck)
mpp15         15       gpio, i2c0(sda)
mpp16         16       gpo, dev(oe)
mpp17         17       gpo, dev(clkout)
mpp18         18       gpio, uart1(txd)
mpp19         19       gpio, uart1(rxd), dev(rb)
mpp20         20       gpo, dev(we0)
mpp21         21       gpo, dev(ad0)
mpp22         22       gpo, dev(ad1)
mpp23         23       gpo, dev(ad2)
mpp24         24       gpo, dev(ad3)
mpp25         25       gpo, dev(ad4)
mpp26         26       gpo, dev(ad5)
mpp27         27       gpo, dev(ad6)
mpp28         28       gpo, dev(ad7)
mpp29         29       gpo, dev(a0)
mpp30         30       gpo, dev(a1)
mpp31         31       gpio, slv_smi(mdc), smi(mdc), dev(we1)
mpp32         32       gpio, slv_smi(mdio), smi(mdio), dev(cs1)
+10 −10
Original line number Diff line number Diff line
@@ -44,16 +44,16 @@ mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
mpp17         17       gpio, sdio(d3)
mpp18         18       gpo, nand(io0)
mpp19         19       gpo, nand(io1)
mpp20         20       gpio, mii(rxerr)
mpp21         21       gpio, audio(spdifi)
mpp22         22       gpio, audio(spdifo)
mpp23         23       gpio, audio(rmclk)
mpp24         24       gpio, audio(bclk)
mpp25         25       gpio, audio(sdo)
mpp26         26       gpio, audio(lrclk)
mpp27         27       gpio, audio(mclk)
mpp28         28       gpio, audio(sdi)
mpp29         29       gpio, audio(extclk)
mpp35         35       gpio, mii(rxerr)
mpp36         36       gpio, audio(spdifi)
mpp37         37       gpio, audio(spdifo)
mpp38         38       gpio, audio(rmclk)
mpp39         39       gpio, audio(bclk)
mpp40         40       gpio, audio(sdo)
mpp41         41       gpio, audio(lrclk)
mpp42         42       gpio, audio(mclk)
mpp43         43       gpio, audio(sdi)
mpp44         44       gpio, audio(extclk)

* Marvell Kirkwood 88f6190

+106 −25
Original line number Diff line number Diff line
======================
Aspeed Pin Controllers
----------------------
======================

The Aspeed SoCs vary in functionality inside a generation but have a common mux
device register layout.

Required properties:
- compatible : Should be any one of the following:
Required properties for g4:
- compatible : 			Should be one of the following:
				"aspeed,ast2400-pinctrl"
				"aspeed,g4-pinctrl"

Required properties for g5:
- compatible : 			Should be one of the following:
				"aspeed,ast2500-pinctrl"
				"aspeed,g5-pinctrl"

The pin controller node should be a child of a syscon node with the required
- aspeed,external-nodes:	A cell of phandles to external controller nodes:
				0: compatible with "aspeed,ast2500-gfx", "syscon"
				1: compatible with "aspeed,ast2500-lhc", "syscon"

The pin controller node should be the child of a syscon node with the required
property:
- compatible: "syscon", "simple-mfd"

- compatible : 		Should be one of the following:
			"aspeed,ast2400-scu", "syscon", "simple-mfd"
			"aspeed,g4-scu", "syscon", "simple-mfd"
			"aspeed,ast2500-scu", "syscon", "simple-mfd"
			"aspeed,g5-scu", "syscon", "simple-mfd"

Refer to the the bindings described in
Documentation/devicetree/bindings/mfd/syscon.txt

Subnode Format
--------------
==============

The required properties of child nodes are (as defined in pinctrl-bindings):
- function
@@ -31,30 +44,67 @@ supported:

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

ACPI BMCINT DDCCLK DDCDAT FLACK FLBUSY FLWP GPID0 GPIE0 GPIE2 GPIE4 GPIE6 I2C10
I2C11 I2C12 I2C13 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8 I2C9 LPCPD LPCPME LPCSMI MDIO1
MDIO2 NCTS1 NCTS3 NCTS4 NDCD1 NDCD3 NDCD4 NDSR1 NDSR3 NDTR1 NDTR3 NRI1 NRI3
NRI4 NRTS1 NRTS3 PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RMII1 ROM16
ROM8 ROMCS1 ROMCS2 ROMCS3 ROMCS4 RXD1 RXD3 RXD4 SD1 SGPMI SIOPBI SIOPBO TIMER3
TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD3 TXD4 UART6 VGAHS VGAVS VPI18 VPI24 VPI30
VPO12 VPO24
ACPI ADC0 ADC1 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15 ADC2 ADC3 ADC4 ADC5 ADC6
ADC7 ADC8 ADC9 BMCINT DDCCLK DDCDAT EXTRST FLACK FLBUSY FLWP GPID GPID0 GPID2
GPID4 GPID6 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4
I2C5 I2C6 I2C7 I2C8 I2C9 LPCPD LPCPME LPCRST LPCSMI MAC1LINK MAC2LINK MDIO1
MDIO2 NCTS1 NCTS2 NCTS3 NCTS4 NDCD1 NDCD2 NDCD3 NDCD4 NDSR1 NDSR2 NDSR3 NDSR4
NDTR1 NDTR2 NDTR3 NDTR4 NDTS4 NRI1 NRI2 NRI3 NRI4 NRTS1 NRTS2 NRTS3 OSCCLK PWM0
PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 ROM16 ROM8 ROMCS1
ROMCS2 ROMCS3 ROMCS4 RXD1 RXD2 RXD3 RXD4 SALT1 SALT2 SALT3 SALT4 SD1 SD2 SGPMCK
SGPMI SGPMLD SGPMO SGPSCK SGPSI0 SGPSI1 SGPSLD SIOONCTRL SIOPBI SIOPBO SIOPWREQ
SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1DEBUG SPI1PASSTHRU SPICS1 TIMER3 TIMER4
TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2 TXD3 TXD4 UART6 USBCKI VGABIOS_ROM VGAHS
VGAVS VPI18 VPI24 VPI30 VPO12 VPO24 WDTRST1 WDTRST2

aspeed,ast2500-pinctrl, aspeed,g5-pinctrl:

GPID0 GPID2 GPIE0 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 I2C5 I2C6 I2C7 I2C8
I2C9 MAC1LINK MDIO1 MDIO2 OSCCLK PEWAKE PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7
RGMII1 RGMII2 RMII1 RMII2 SD1 SPI1 SPI1DEBUG SPI1PASSTHRU TIMER4 TIMER5 TIMER6
TIMER7 TIMER8 VGABIOSROM
ACPI ADC0 ADC1 ADC10 ADC11 ADC12 ADC13 ADC14 ADC15 ADC2 ADC3 ADC4 ADC5 ADC6
ADC7 ADC8 ADC9 BMCINT DDCCLK DDCDAT ESPI FWSPICS1 FWSPICS2 GPID0 GPID2 GPID4
GPID6 GPIE0 GPIE2 GPIE4 GPIE6 I2C10 I2C11 I2C12 I2C13 I2C14 I2C3 I2C4 I2C5 I2C6
I2C7 I2C8 I2C9 LAD0 LAD1 LAD2 LAD3 LCLK LFRAME LPCHC LPCPD LPCPLUS LPCPME
LPCRST LPCSMI LSIRQ MAC1LINK MAC2LINK MDIO1 MDIO2 NCTS1 NCTS2 NCTS3 NCTS4 NDCD1
NDCD2 NDCD3 NDCD4 NDSR1 NDSR2 NDSR3 NDSR4 NDTR1 NDTR2 NDTR3 NDTR4 NRI1 NRI2
NRI3 NRI4 NRTS1 NRTS2 NRTS3 NRTS4 OSCCLK PEWAKE PNOR PWM0 PWM1 PWM2 PWM3 PWM4
PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 RXD1 RXD2 RXD3 RXD4 SALT1 SALT10
SALT11 SALT12 SALT13 SALT14 SALT2 SALT3 SALT4 SALT5 SALT6 SALT7 SALT8 SALT9
SCL1 SCL2 SD1 SD2 SDA1 SDA2 SGPS1 SGPS2 SIOONCTRL SIOPBI SIOPBO SIOPWREQ
SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1CS1 SPI1DEBUG SPI1PASSTHRU SPI2CK SPI2CS0
SPI2CS1 SPI2MISO SPI2MOSI TIMER3 TIMER4 TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2
TXD3 TXD4 UART6 USBCKI VGABIOSROM VGAHS VGAVS VPI24 VPO WDTRST1 WDTRST2

Examples
========

g4 Example
----------

syscon: scu@1e6e2000 {
	compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
	reg = <0x1e6e2000 0x1a8>;

	pinctrl: pinctrl {
		compatible = "aspeed,g4-pinctrl";

		pinctrl_i2c3_default: i2c3_default {
			function = "I2C3";
			groups = "I2C3";
		};
	};
};

Examples:
g5 Example
----------

ahb {
	apb {
		syscon: scu@1e6e2000 {
	compatible = "syscon", "simple-mfd";
			compatible = "aspeed,ast2500-scu", "syscon", "simple-mfd";
			reg = <0x1e6e2000 0x1a8>;

			pinctrl: pinctrl {
		compatible = "aspeed,g4-pinctrl";
				compatible = "aspeed,g5-pinctrl";
				aspeed,external-nodes = <&gfx &lhc>;

				pinctrl_i2c3_default: i2c3_default {
					function = "I2C3";
@@ -63,5 +113,36 @@ syscon: scu@1e6e2000 {
			};
		};

		gfx: display@1e6e6000 {
			compatible = "aspeed,ast2500-gfx", "syscon";
			reg = <0x1e6e6000 0x1000>;
		};
	};

	lpc: lpc@1e789000 {
		compatible = "aspeed,ast2500-lpc", "simple-mfd";
		reg = <0x1e789000 0x1000>;

		#address-cells = <1>;
		#size-cells = <1>;
		ranges = <0x0 0x1e789000 0x1000>;

		lpc_host: lpc-host@80 {
			compatible = "aspeed,ast2500-lpc-host", "simple-mfd", "syscon";
			reg = <0x80 0x1e0>;
			reg-io-width = <4>;

			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <0x0 0x80 0x1e0>;

			lhc: lhc@20 {
			       compatible = "aspeed,ast2500-lhc";
			       reg = <0x20 0x24 0x48 0x8>;
			};
		};
	};
};

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