Skip to content

Commit b630a23

Browse files
committed
Merge tag 'pinctrl-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v4.15 kernel cycle: Core: - The pin control Kconfig entry PINCTRL is now turned into a menuconfig option. This obviously has the implication of making the subsystem menu visible in menuconfig. This is happening because of two things: (a) Intel have started to deploy and depend on pin controllers in a way that is affecting users directly. This happens on the highly integrated laptop chipsets named after geographical places: baytrail, broxton, cannonlake, cedarfork, cherryview, denverton, geminilake, lewisburg, merrifield, sunrisepoint... It started a while back and now it is ever more evident that this is crucial infrastructure for x86 laptops and not an embedded obscurity anymore. Users need to be aware. (b) Pin control expanders on I2C and SPI that are arch-agnostic. Currently Semtech SX150X and Microchip MCP28x08 but more are expected. Users will have to be able to configure these in directly for their set-up. - Just go and select GPIOLIB now that we made sure that GPIOLIB is a very vanilla subsystem. Do not depend on it, if we need it, select it. - Exposing the pin control subsystem in menuconfig uncovered a bunch of obscure bugs that are now hopefully fixed, all more or less pertaining to Blackfin. - Unified namespace for cross-calls between pin control and GPIO. - New support for clock skew/delay generic DT bindings and generic pin config options for this. - Minor documentation improvements. Various: - The Renesas SH-PFC pin controller has evolved a lot. It seems Renesas are churning out new SoCs by the minute. - A bunch of non-critical fixes for the Rockchip driver. - Improve the use of library functions instead of open coding. - Support the MCP28018 variant in the MCP28x08 driver. - Static constifying" * tag 'pinctrl-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (91 commits) pinctrl: gemini: Fix missing pad descriptions pinctrl: Add some depends on HAS_IOMEM pinctrl: samsung/s3c24xx: add CONFIG_OF dependency pinctrl: gemini: Fix GMAC groups pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support pinctrl: ti-iodelay: remove redundant unused variable dev pinctrl: max77620: Use common error handling code in max77620_pinconf_set() pinctrl: gemini: Implement clock skew/delay config pinctrl: gemini: Use generic DT parser pinctrl: Add skew-delay pin config and bindings pinctrl: armada-37xx: Add edge both type gpio irq support pinctrl: uniphier: remove eMMC hardware reset pin-mux pinctrl: rockchip: Add iomux-route switching support for rk3288 pinctrl: intel: Add Intel Cedar Fork PCH pin controller support pinctrl: intel: Make offset to interrupt status register configurable pinctrl: sunxi: Enforce the strict mode by default pinctrl: sunxi: Disable strict mode for old pinctrl drivers pinctrl: sunxi: Introduce the strict flag pinctrl: sh-pfc: Save/restore registers for PSCI system suspend pinctrl: sh-pfc: r8a7796: Use generic IOCTRL register description ...
2 parents 9c7a867 + eeb690b commit b630a23

96 files changed

Lines changed: 6241 additions & 3161 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/devicetree/bindings/pinctrl/cortina,gemini-pinctrl.txt‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ The pin controller node must be a subnode of the system controller node.
99
Required properties:
1010
- compatible: "cortina,gemini-pinctrl"
1111

12-
Subnodes of the pin controller contain pin control multiplexing set-up.
13-
Please refer to pinctrl-bindings.txt for generic pin multiplexing nodes.
12+
Subnodes of the pin controller contain pin control multiplexing set-up
13+
and pin configuration of individual pins.
14+
15+
Please refer to pinctrl-bindings.txt for generic pin multiplexing nodes
16+
and generic pin config nodes.
17+
18+
Supported configurations:
19+
- skew-delay is supported on the Ethernet pins
1420

1521
Example:
1622

‎Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ group spi_quad
9797
- pins 15-16
9898
- functions spi, gpio
9999

100-
group uart_2
101-
- pins 9-10
100+
group uart2
101+
- pins 9-10 and 18-19
102102
- functions uart, gpio
103103

104104
Available groups and functions for the South bridge:

‎Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,10 @@ output-high - set the pin to output mode with high level
271271
sleep-hardware-state - indicate this is sleep related state which will be programmed
272272
into the registers for the sleep state.
273273
slew-rate - set the slew rate
274+
skew-delay - this affects the expected clock skew on input pins
275+
and the delay before latching a value to an output
276+
pin. Typically indicates how many double-inverters are
277+
used to delay the signal.
274278

275279
For example:
276280

Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt renamed to Documentation/devicetree/bindings/pinctrl/pinctrl-mcp23s08.txt

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Required properties:
1313
- "microchip,mcp23s18" for 16 GPIO SPI version
1414
- "microchip,mcp23008" for 8 GPIO I2C version or
1515
- "microchip,mcp23017" for 16 GPIO I2C version of the chip
16+
- "microchip,mcp23018" for 16 GPIO I2C version
1617
NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
1718
removed.
1819
- #gpio-cells : Should be two.
@@ -81,3 +82,61 @@ gpiom1: gpio@0 {
8182
reg = <0>;
8283
spi-max-frequency = <1000000>;
8384
};
85+
86+
Pull-up configuration
87+
=====================
88+
89+
If pins are used as output, they can also be configured with pull-ups. This is
90+
done with pinctrl.
91+
92+
Please refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
93+
for details of the common pinctrl bindings used by client devices,
94+
including the meaning of the phrase "pin configuration node".
95+
96+
Optional Pinmux properties:
97+
--------------------------
98+
Following properties are required if default setting of pins are required
99+
at boot.
100+
- pinctrl-names: A pinctrl state named per <pinctrl-binding.txt>.
101+
- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
102+
<pinctrl-binding.txt>.
103+
104+
The pin configurations are defined as child of the pinctrl states node. Each
105+
sub-node have following properties:
106+
107+
Required properties:
108+
------------------
109+
- pins: List of pins. Valid values of pins properties are:
110+
gpio0 ... gpio7 for the devices with 8 GPIO pins and
111+
gpio0 ... gpio15 for the devices with 16 GPIO pins.
112+
113+
Optional properties:
114+
-------------------
115+
The following optional property is defined in the pinmux DT binding document
116+
<pinctrl-bindings.txt>. Absence of this property will leave the configuration
117+
in its default state.
118+
bias-pull-up
119+
120+
Example with pinctrl to pull-up output pins:
121+
gpio21: gpio@21 {
122+
compatible = "microchip,mcp23017";
123+
gpio-controller;
124+
#gpio-cells = <0x2>;
125+
reg = <0x21>;
126+
interrupt-parent = <&socgpio>;
127+
interrupts = <0x17 0x8>;
128+
interrupt-names = "mcp23017@21 irq";
129+
interrupt-controller;
130+
#interrupt-cells = <0x2>;
131+
microchip,irq-mirror;
132+
pinctrl-names = "default";
133+
pinctrl-0 = <&i2cgpio0irq &gpio21pullups>;
134+
135+
gpio21pullups: pinmux {
136+
pins = "gpio0", "gpio1", "gpio2", "gpio3",
137+
"gpio4", "gpio5", "gpio6", "gpio7",
138+
"gpio8", "gpio9", "gpio10", "gpio11",
139+
"gpio12", "gpio13", "gpio14", "gpio15";
140+
bias-pull-up;
141+
};
142+
};

‎Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PMIC's from Qualcomm.
1515
"qcom,pm8921-gpio"
1616
"qcom,pm8941-gpio"
1717
"qcom,pm8994-gpio"
18+
"qcom,pmi8994-gpio"
1819
"qcom,pma8084-gpio"
1920
"qcom,pmi8994-gpio"
2021

@@ -85,6 +86,7 @@ to specify in a pin configuration subnode:
8586
gpio1-gpio44 for pm8921
8687
gpio1-gpio36 for pm8941
8788
gpio1-gpio22 for pm8994
89+
gpio1-gpio10 for pmi8994
8890
gpio1-gpio22 for pma8084
8991
gpio1-gpio10 for pmi8994
9092

‎Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ Pin controller node
1212
-------------------
1313

1414
Required properties:
15-
- compatible
16-
this shall be "renesas,r7s72100-ports".
15+
- compatible: should be:
16+
- "renesas,r7s72100-ports": for RZ/A1H
17+
- "renesas,r7s72101-ports", "renesas,r7s72100-ports": for RZ/A1M
18+
- "renesas,r7s72102-ports": for RZ/A1L
1719

1820
- reg
1921
address base and length of the memory area where the pin controller

‎Documentation/driver-api/pinctl.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,8 @@ that your datasheet calls "GPIO mode", but actually is just an electrical
757757
configuration for a certain device. See the section below named
758758
"GPIO mode pitfalls" for more details on this scenario.
759759

760-
The public pinmux API contains two functions named pinctrl_request_gpio()
761-
and pinctrl_free_gpio(). These two functions shall *ONLY* be called from
760+
The public pinmux API contains two functions named pinctrl_gpio_request()
761+
and pinctrl_gpio_free(). These two functions shall *ONLY* be called from
762762
gpiolib-based drivers as part of their gpio_request() and
763763
gpio_free() semantics. Likewise the pinctrl_gpio_direction_[input|output]
764764
shall only be called from within respective gpio_direction_[input|output]
@@ -790,7 +790,7 @@ gpiolib driver and the affected GPIO range, pin offset and desired direction
790790
will be passed along to this function.
791791

792792
Alternatively to using these special functions, it is fully allowed to use
793-
named functions for each GPIO pin, the pinctrl_request_gpio() will attempt to
793+
named functions for each GPIO pin, the pinctrl_gpio_request() will attempt to
794794
obtain the function "gpioN" where "N" is the global GPIO pin number if no
795795
special GPIO-handler is registered.
796796

‎Documentation/gpio/gpio-legacy.txt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ easily, gating off unused clocks.
273273

274274
For GPIOs that use pins known to the pinctrl subsystem, that subsystem should
275275
be informed of their use; a gpiolib driver's .request() operation may call
276-
pinctrl_request_gpio(), and a gpiolib driver's .free() operation may call
277-
pinctrl_free_gpio(). The pinctrl subsystem allows a pinctrl_request_gpio()
276+
pinctrl_gpio_request(), and a gpiolib driver's .free() operation may call
277+
pinctrl_gpio_free(). The pinctrl subsystem allows a pinctrl_gpio_request()
278278
to succeed concurrently with a pin or pingroup being "owned" by a device for
279279
pin multiplexing.
280280

@@ -448,8 +448,8 @@ together with an optional gpio feature. We have already covered the
448448
case where e.g. a GPIO controller need to reserve a pin or set the
449449
direction of a pin by calling any of:
450450

451-
pinctrl_request_gpio()
452-
pinctrl_free_gpio()
451+
pinctrl_gpio_request()
452+
pinctrl_gpio_free()
453453
pinctrl_gpio_direction_input()
454454
pinctrl_gpio_direction_output()
455455

@@ -466,7 +466,7 @@ gpio (under gpiolib) is still maintained by gpio drivers. It may happen
466466
that different pin ranges in a SoC is managed by different gpio drivers.
467467

468468
This makes it logical to let gpio drivers announce their pin ranges to
469-
the pin ctrl subsystem before it will call 'pinctrl_request_gpio' in order
469+
the pin ctrl subsystem before it will call 'pinctrl_gpio_request' in order
470470
to request the corresponding pin to be prepared by the pinctrl subsystem
471471
before any gpio usage.
472472

‎Documentation/translations/zh_CN/gpio.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其
257257
简单地关闭未使用时钟)。
258258

259259
对于 GPIO 使用 pinctrl 子系统已知的引脚,子系统应该被告知其使用情况;
260-
一个 gpiolib 驱动的 .request()操作应调用 pinctrl_request_gpio(),
261-
而 gpiolib 驱动的 .free()操作应调用 pinctrl_free_gpio()。pinctrl
262-
子系统允许 pinctrl_request_gpio()在某个引脚或引脚组以复用形式“属于”
260+
一个 gpiolib 驱动的 .request()操作应调用 pinctrl_gpio_request(),
261+
而 gpiolib 驱动的 .free()操作应调用 pinctrl_gpio_free()。pinctrl
262+
子系统允许 pinctrl_gpio_request()在某个引脚或引脚组以复用形式“属于”
263263
一个设备时都成功返回。
264264

265265
任何须将 GPIO 信号导向适当引脚的引脚复用硬件的编程应该发生在 GPIO

‎MAINTAINERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10713,6 +10713,7 @@ PIN CONTROLLER - RENESAS
1071310713
M: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1071410714
M: Geert Uytterhoeven <geert+renesas@glider.be>
1071510715
L: linux-renesas-soc@vger.kernel.org
10716+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git sh-pfc
1071610717
S: Maintained
1071710718
F: drivers/pinctrl/sh-pfc/
1071810719

0 commit comments

Comments
 (0)