Skip to content

Commit d16605c

Browse files
committed
Merge tag 'pinctrl-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control updates from Linus Walleij: "This is the big bulk of pin control changes for the v4.14 kernel. There are just a few bigger changes (new drivers mostly) and then a lot of small patches all over the place. Core changes: - Decision to wrap the sleep mode of the Spreadtrum and in the future others into a specially tagged state. The generic DT bindings and the new Spreadtrum driver conforms to this. Others should be moved over if possible. New drivers: - Spreadtrum SoCs especially the SC9860 SoC. - Storlink/Cortina Gemini 3512 and 3516 SoCs. New subdrivers: - Intel Denverton subdriver. - Intel Cannon Lake subdriver. - Intel Lewisburg subdriver. - Allwinner sunxi: R40 subdriver for A10. - Socionext uniphier PXs3 subdriver. - Rockchip RK3128 subdriver. - Renesas SH-PFC R8A77995 subdriver. Miscellaneous: - Qualcomm APQ8064 can handle general purpose clock muxing. - Mediatek MT7623 PCIe mux data fixed up. - Intel GPIO IRQs are disabled during suspend. - Several fixes and addtions to Renesas r8a7796. - Qualcomm SPMI GPIO supports dtest route and LV/MV subtype. - Input schmitt trigger support in Rockchip RV1108. - Aspeed G4 and G5 USB host/device pin control control added. - Qualcomm IPQ4019 has matured with a few missing pin groups and control bits put in place. - Lots of constification, this is the latest in cocinelle fixes" * tag 'pinctrl-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (147 commits) Revert "pinctrl: sunxi: Don't enforce bias disable (for now)" pinctrl: uniphier: fix members of rmii group for Pro4 pinctrl: Delete an error message pinctrl: core: Delete an error message pinctrl: intel: Read back TX buffer state pinctrl: rockchip: Add rv1108 recalculated iomux support pinctrl: intel: Decrease indentation in intel_gpio_set() pinctrl: rza1: Remove suffix from gpiochip label pinctrl: qcom: spmi-gpio: Correct power_source range check pinctrl: freescale: make mxs_regs const pinctrl: aspeed: Rework strap register write logic for the AST2500 pinctrl: rza1: off by one in rza1_parse_gpiochip() pinctrl: qcom: General Purpose clocks for apq8064 pinctrl: sprd: Add Spreadtrum pin control driver dt-bindings: pinctrl: Add DT bindings for Spreadtrum SC9860 pinctrl: Add sleep related state to indicate sleep related configs pinctrl: mediatek: update PCIe mux data for MT7623 pinctrl: intel: Add Intel Lewisburg GPIO support pinctrl: intel: Add Intel Cannon Lake PCH-H pin controller support pinctrl: aspeed: Fix ast2500 strap register write logic ...
2 parents fe9e313 + ac059e2 commit d16605c

File tree

124 files changed

+13259
-3903
lines changed

Some content is hidden

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

124 files changed

+13259
-3903
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Cortina Systems Gemini pin controller
2+
3+
This pin controller is found in the Cortina Systems Gemini SoC family,
4+
see further arm/gemini.txt. It is a purely group-based multiplexing pin
5+
controller.
6+
7+
The pin controller node must be a subnode of the system controller node.
8+
9+
Required properties:
10+
- compatible: "cortina,gemini-pinctrl"
11+
12+
Subnodes of the pin controller contain pin control multiplexing set-up.
13+
Please refer to pinctrl-bindings.txt for generic pin multiplexing nodes.
14+
15+
Example:
16+
17+
18+
syscon {
19+
compatible = "cortina,gemini-syscon";
20+
...
21+
pinctrl {
22+
compatible = "cortina,gemini-pinctrl";
23+
pinctrl-names = "default";
24+
pinctrl-0 = <&dram_default_pins>, <&system_default_pins>,
25+
<&vcontrol_default_pins>;
26+
27+
dram_default_pins: pinctrl-dram {
28+
mux {
29+
function = "dram";
30+
groups = "dramgrp";
31+
};
32+
};
33+
rtc_default_pins: pinctrl-rtc {
34+
mux {
35+
function = "rtc";
36+
groups = "rtcgrp";
37+
};
38+
};
39+
power_default_pins: pinctrl-power {
40+
mux {
41+
function = "power";
42+
groups = "powergrp";
43+
};
44+
};
45+
system_default_pins: pinctrl-system {
46+
mux {
47+
function = "system";
48+
groups = "systemgrp";
49+
};
50+
};
51+
(...)
52+
uart_default_pins: pinctrl-uart {
53+
mux {
54+
function = "uart";
55+
groups = "uartrxtxgrp";
56+
};
57+
};
58+
};
59+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
* Freescale i.MX7ULP IOMUX Controller
2+
3+
i.MX 7ULP has three IOMUXC instances: IOMUXC0 for M4 ports, IOMUXC1 for A7
4+
ports and IOMUXC DDR for DDR interface.
5+
6+
Note:
7+
This binding doc is only for the IOMUXC1 support in A7 Domain and it only
8+
supports generic pin config.
9+
10+
Please also refer pinctrl-bindings.txt in this directory for generic pinctrl
11+
binding.
12+
13+
=== Pin Controller Node ===
14+
15+
Required properties:
16+
- compatible: "fsl,imx7ulp-iomuxc1"
17+
- reg: Should contain the base physical address and size of the iomuxc
18+
registers.
19+
20+
=== Pin Configuration Node ===
21+
- pinmux: One integers array, represents a group of pins mux setting.
22+
The format is pinmux = <PIN_FUNC_ID>, PIN_FUNC_ID is a pin working on
23+
a specific function.
24+
25+
NOTE: i.MX7ULP PIN_FUNC_ID consists of 4 integers as it shares one mux
26+
and config register as follows:
27+
<mux_conf_reg input_reg mux_mode input_val>
28+
29+
Refer to imx7ulp-pinfunc.h in in device tree source folder for all
30+
available imx7ulp PIN_FUNC_ID.
31+
32+
Optional Properties:
33+
- drive-strength Integer. Controls Drive Strength
34+
0: Standard
35+
1: Hi Driver
36+
- drive-push-pull Bool. Enable Pin Push-pull
37+
- drive-open-drain Bool. Enable Pin Open-drian
38+
- slew-rate: Integer. Controls Slew Rate
39+
0: Standard
40+
1: Slow
41+
- bias-disable: Bool. Pull disabled
42+
- bias-pull-down: Bool. Pull down on pin
43+
- bias-pull-up: Bool. Pull up on pin
44+
45+
Examples:
46+
#include "imx7ulp-pinfunc.h"
47+
48+
/* Pin Controller Node */
49+
iomuxc1: iomuxc@40ac0000 {
50+
compatible = "fsl,imx7ulp-iomuxc1";
51+
reg = <0x40ac0000 0x1000>;
52+
53+
/* Pin Configuration Node */
54+
pinctrl_lpuart4: lpuart4grp {
55+
pinmux = <
56+
IMX7ULP_PAD_PTC3__LPUART4_RX
57+
IMX7ULP_PAD_PTC2__LPUART4_TX
58+
>;
59+
bias-pull-up;
60+
};
61+
};

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 RGMII1 RGMII2 RMII1 RMII2 ROM16 ROM8 ROMCS1
6969
ROMCS2 ROMCS3 ROMCS4 RXD1 RXD2 RXD3 RXD4 SALT1 SALT2 SALT3 SALT4 SD1 SD2 SGPMCK
7070
SGPMI SGPMLD SGPMO SGPSCK SGPSI0 SGPSI1 SGPSLD SIOONCTRL SIOPBI SIOPBO SIOPWREQ
7171
SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1DEBUG SPI1PASSTHRU SPICS1 TIMER3 TIMER4
72-
TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2 TXD3 TXD4 UART6 USBCKI VGABIOS_ROM VGAHS
73-
VGAVS VPI18 VPI24 VPI30 VPO12 VPO24 WDTRST1 WDTRST2
72+
TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2 TXD3 TXD4 UART6 USB11D1 USB11H2 USB2D1
73+
USB2H1 USBCKI VGABIOS_ROM VGAHS VGAVS VPI18 VPI24 VPI30 VPO12 VPO24 WDTRST1
74+
WDTRST2
7475

7576
aspeed,ast2500-pinctrl, aspeed,g5-pinctrl:
7677

@@ -86,7 +87,8 @@ SALT11 SALT12 SALT13 SALT14 SALT2 SALT3 SALT4 SALT5 SALT6 SALT7 SALT8 SALT9
8687
SCL1 SCL2 SD1 SD2 SDA1 SDA2 SGPS1 SGPS2 SIOONCTRL SIOPBI SIOPBO SIOPWREQ
8788
SIOPWRGD SIOS3 SIOS5 SIOSCI SPI1 SPI1CS1 SPI1DEBUG SPI1PASSTHRU SPI2CK SPI2CS0
8889
SPI2CS1 SPI2MISO SPI2MOSI TIMER3 TIMER4 TIMER5 TIMER6 TIMER7 TIMER8 TXD1 TXD2
89-
TXD3 TXD4 UART6 USBCKI VGABIOSROM VGAHS VGAVS VPI24 VPO WDTRST1 WDTRST2
90+
TXD3 TXD4 UART6 USB11BHID USB2AD USB2AH USB2BD USB2BH USBCKI VGABIOSROM VGAHS
91+
VGAVS VPI24 VPO WDTRST1 WDTRST2
9092

9193
Examples
9294
========

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ output-enable - enable output on a pin without actively driving it
268268
(such as enabling an output buffer)
269269
output-low - set the pin to output mode with low level
270270
output-high - set the pin to output mode with high level
271+
sleep-hardware-state - indicate this is sleep related state which will be programmed
272+
into the registers for the sleep state.
271273
slew-rate - set the slew rate
272274

273275
For example:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The Mediatek's Pin controller is used to control SoC pins.
55
Required properties:
66
- compatible: value should be one of the following.
77
"mediatek,mt2701-pinctrl", compatible with mt2701 pinctrl.
8+
"mediatek,mt2712-pinctrl", compatible with mt2712 pinctrl.
89
"mediatek,mt6397-pinctrl", compatible with mt6397 pinctrl.
910
"mediatek,mt7623-pinctrl", compatible with mt7623 pinctrl.
1011
"mediatek,mt8127-pinctrl", compatible with mt8127 pinctrl.

Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Valid values for pins are:
4646
gpio0-gpio89
4747

4848
Valid values for function are:
49-
cam_mclk, codec_mic_i2s, codec_spkr_i2s, gpio, gsbi1, gsbi2, gsbi3, gsbi4,
49+
cam_mclk, codec_mic_i2s, codec_spkr_i2s, gp_clk_0a, gp_clk_0b, gp_clk_1a,
50+
gp_clk_1b, gp_clk_2a, gp_clk_2b, gpio, gsbi1, gsbi2, gsbi3, gsbi4,
5051
gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6,
5152
gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1,
5253
gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm,

Documentation/devicetree/bindings/pinctrl/qcom,ipq4019-pinctrl.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ Valid values for qcom,pins are:
5050
Supports mux, bias and drive-strength
5151

5252
Valid values for qcom,function are:
53-
gpio, blsp_uart1, blsp_i2c0, blsp_i2c1, blsp_uart0, blsp_spi1, blsp_spi0
53+
aud_pin, audio_pwm, blsp_i2c0, blsp_i2c1, blsp_spi0, blsp_spi1, blsp_uart0,
54+
blsp_uart1, chip_rst, gpio, i2s_rx, i2s_spdif_in, i2s_spdif_out, i2s_td, i2s_tx,
55+
jtag, led0, led1, led2, led3, led4, led5, led6, led7, led8, led9, led10, led11,
56+
mdc, mdio, pcie, pmu, prng_rosc, qpic, rgmii, rmii, sdio, smart0, smart1,
57+
smart2, smart3, tm, wifi0, wifi1
5458

5559
Example:
5660

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PMIC's from Qualcomm.
1616
"qcom,pm8941-gpio"
1717
"qcom,pm8994-gpio"
1818
"qcom,pma8084-gpio"
19+
"qcom,pmi8994-gpio"
1920

2021
And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio"
2122
if the device is on an spmi bus or an ssbi bus respectively
@@ -85,6 +86,7 @@ to specify in a pin configuration subnode:
8586
gpio1-gpio36 for pm8941
8687
gpio1-gpio22 for pm8994
8788
gpio1-gpio22 for pma8084
89+
gpio1-gpio10 for pmi8994
8890

8991
- function:
9092
Usage: required
@@ -98,7 +100,10 @@ to specify in a pin configuration subnode:
98100
"dtest1",
99101
"dtest2",
100102
"dtest3",
101-
"dtest4"
103+
"dtest4",
104+
And following values are supported by LV/MV GPIO subtypes:
105+
"func3",
106+
"func4"
102107

103108
- bias-disable:
104109
Usage: optional
@@ -183,6 +188,25 @@ to specify in a pin configuration subnode:
183188
Value type: <none>
184189
Definition: The specified pins are configured in open-source mode.
185190

191+
- qcom,analog-pass:
192+
Usage: optional
193+
Value type: <none>
194+
Definition: The specified pins are configured in analog-pass-through mode.
195+
196+
- qcom,atest:
197+
Usage: optional
198+
Value type: <u32>
199+
Definition: Selects ATEST rail to route to GPIO when it's configured
200+
in analog-pass-through mode.
201+
Valid values are 1-4 corresponding to ATEST1 to ATEST4.
202+
203+
- qcom,dtest-buffer:
204+
Usage: optional
205+
Value type: <u32>
206+
Definition: Selects DTEST rail to route to GPIO when it's configured
207+
as digital input.
208+
Valid values are 1-4 corresponding to DTEST1 to DTEST4.
209+
186210
Example:
187211

188212
pm8921_gpio: gpio@150 {

Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Required Properties:
2424
- "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller.
2525
- "renesas,pfc-r8a7795": for R8A7795 (R-Car H3) compatible pin-controller.
2626
- "renesas,pfc-r8a7796": for R8A7796 (R-Car M3-W) compatible pin-controller.
27+
- "renesas,pfc-r8a77995": for R8A77995 (R-Car D3) compatible pin-controller.
2728
- "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
2829

2930
- reg: Base address and length of each memory resource used by the pin

Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Required properties for iomux controller:
2424
"rockchip,rk2928-pinctrl": for Rockchip RK2928
2525
"rockchip,rk3066a-pinctrl": for Rockchip RK3066a
2626
"rockchip,rk3066b-pinctrl": for Rockchip RK3066b
27+
"rockchip,rk3128-pinctrl": for Rockchip RK3128
2728
"rockchip,rk3188-pinctrl": for Rockchip RK3188
2829
"rockchip,rk3228-pinctrl": for Rockchip RK3228
2930
"rockchip,rk3288-pinctrl": for Rockchip RK3288
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
* Spreadtrum Pin Controller
2+
3+
The Spreadtrum pin controller are organized in 3 blocks (types).
4+
5+
The first block comprises some global control registers, and each
6+
register contains several bit fields with one bit or several bits
7+
to configure for some global common configuration, such as domain
8+
pad driving level, system control select and so on ("domain pad
9+
driving level": One pin can output 3.0v or 1.8v, depending on the
10+
related domain pad driving selection, if the related domain pad
11+
slect 3.0v, then the pin can output 3.0v. "system control" is used
12+
to choose one function (like: UART0) for which system, since we
13+
have several systems (AP/CP/CM4) on one SoC.).
14+
15+
There are too much various configuration that we can not list all
16+
of them, so we can not make every Spreadtrum-special configuration
17+
as one generic configuration, and maybe it will add more strange
18+
global configuration in future. Then we add one "sprd,control" to
19+
set these various global control configuration, and we need use
20+
magic number for this property.
21+
22+
Moreover we recognise every fields comprising one bit or several
23+
bits in one global control register as one pin, thus we should
24+
record every pin's bit offset, bit width and register offset to
25+
configure this field (pin).
26+
27+
The second block comprises some common registers which have unified
28+
register definition, and each register described one pin is used
29+
to configure the pin sleep mode, function select and sleep related
30+
configuration.
31+
32+
Now we have 4 systems for sleep mode on SC9860 SoC: AP system,
33+
PUBCP system, TGLDSP system and AGDSP system. And the pin sleep
34+
related configuration are:
35+
- input-enable
36+
- input-disable
37+
- output-high
38+
- output-low
39+
- bias-pull-up
40+
- bias-pull-down
41+
42+
In some situation we need set the pin sleep mode and pin sleep related
43+
configuration, to set the pin sleep related configuration automatically
44+
by hardware when the system specified by sleep mode goes into deep
45+
sleep mode. For example, if we set the pin sleep mode as PUBCP_SLEEP
46+
and set the pin sleep related configuration as "input-enable", which
47+
means when PUBCP system goes into deep sleep mode, this pin will be set
48+
input enable automatically.
49+
50+
Moreover we can not use the "sleep" state, since some systems (like:
51+
PUBCP system) do not run linux kernel OS (only AP system run linux
52+
kernel on SC9860 platform), then we can not select "sleep" state
53+
when the PUBCP system goes into deep sleep mode. Thus we introduce
54+
"sprd,sleep-mode" property to set pin sleep mode.
55+
56+
The last block comprises some misc registers which also have unified
57+
register definition, and each register described one pin is used to
58+
configure drive strength, pull up/down and so on. Especially for pull
59+
up, we have two kind pull up resistor: 20K and 4.7K.
60+
61+
Required properties for Spreadtrum pin controller:
62+
- compatible: "sprd,<soc>-pinctrl"
63+
Please refer to each sprd,<soc>-pinctrl.txt binding doc for supported SoCs.
64+
- reg: The register address of pin controller device.
65+
- pins : An array of pin names.
66+
67+
Optional properties:
68+
- function: Specified the function name.
69+
- drive-strength: Drive strength in mA.
70+
- input-schmitt-disable: Enable schmitt-trigger mode.
71+
- input-schmitt-enable: Disable schmitt-trigger mode.
72+
- bias-disable: Disable pin bias.
73+
- bias-pull-down: Pull down on pin.
74+
- bias-pull-up: Pull up on pin.
75+
- input-enable: Enable pin input.
76+
- input-disable: Enable pin output.
77+
- output-high: Set the pin as an output level high.
78+
- output-low: Set the pin as an output level low.
79+
- sleep-hardware-state: Indicate these configs in this state are sleep related.
80+
- sprd,control: Control values referring to databook for global control pins.
81+
- sprd,sleep-mode: Sleep mode selection.
82+
83+
Please refer to each sprd,<soc>-pinctrl.txt binding doc for supported values.

0 commit comments

Comments
 (0)