-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'pinctrl-for-v3.13-1' of git://git.kernel.org/pub/scm/linux…
…/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "Main pin control pull request for the v3.13 cycle. The changes hitting arch/blackfin are ACKed by the Blackfin maintainer, and the device tree bindings are ACKed to the extent possible by someone from the device tree maintainers group. - Blackfin ADI pin control driver, we move yet another architecture under this subsystem umbrella. - Incremental updates to the Renesas Super-H PFC pin control driver. New subdriver for the r8a7791 SoC. - Non-linear GPIO ranges from the gpiolib side of things, this enabled simplified device tree bindings by referring entire groups of pins on some pin controller to act as back-end for a certain GPIO-chip driver. - Add the Abilis TB10x pin control driver used on the ARC architecture. Also the corresponding GPIO driver is merged through this tree, so the ARC has full support for pins and GPIOs after this. - Subdrivers for Freescale i.MX1, i.MX27 and i.MX50 pin controller instances. The i.MX1 and i.MX27 is an entirely new family (silicon) of controllers whereas i.MX50 is a variant of the previous supported controller. - Then the usual slew of fixes, cleanups and incremental updates" The ARC DT changes are apparently still pending, that hopefully gets sorted out in a timely manner. * tag 'pinctrl-for-v3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (48 commits) pinctrl: imx50: add pinctrl support code for the IMX50 SoC pinctrl: at91: copy define to driver pinctrl: remove minor dead code pinctrl: imx: fix using pin->input_val wrongly pinctrl: imx1: fix return value check in imx1_pinctrl_core_probe() gpio: tb10x: fix return value check in tb10x_gpio_probe() gpio: tb10x: use module_platform_driver to simplify the code pinctrl: imx27: imx27 pincontrol driver pinctrl: imx1 core driver pinctrl: sh-pfc: r8a7791 PFC support sh-pfc: r8a7778: Add CAN pin groups gpio: add TB10x GPIO driver pinctrl: at91: correct a few typos pinctrl: mvebu: remove redundant of_match_ptr pinctrl: tb10x: use module_platform_driver to simplify the code pinctrl: tb10x: fix the error handling in tb10x_pinctrl_probe() pinctrl: add documentation for pinctrl_get_group_pins() pinctrl: rockchip: emulate both edge triggered interrupts pinctrl: rockchip: add rk3188 specifics pinctrl: rockchip: remove redundant check ...
- Loading branch information
Showing
70 changed files
with
11,459 additions
and
302 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Documentation/devicetree/bindings/gpio/abilis,tb10x-gpio.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
* Abilis TB10x GPIO controller | ||
|
||
Required Properties: | ||
- compatible: Should be "abilis,tb10x-gpio" | ||
- reg: Address and length of the register set for the device | ||
- gpio-controller: Marks the device node as a gpio controller. | ||
- #gpio-cells: Should be <2>. The first cell is the pin number and the | ||
second cell is used to specify optional parameters: | ||
- bit 0 specifies polarity (0 for normal, 1 for inverted). | ||
- abilis,ngpio: the number of GPIO pins this driver controls. | ||
|
||
Optional Properties: | ||
- interrupt-controller: Marks the device node as an interrupt controller. | ||
- #interrupt-cells: Should be <1>. Interrupts are triggered on both edges. | ||
- interrupts: Defines the interrupt line connecting this GPIO controller to | ||
its parent interrupt controller. | ||
- interrupt-parent: Defines the parent interrupt controller. | ||
|
||
GPIO ranges are specified as described in | ||
Documentation/devicetree/bindings/gpio/gpio.txt | ||
|
||
Example: | ||
|
||
gpioa: gpio@FF140000 { | ||
compatible = "abilis,tb10x-gpio"; | ||
interrupt-controller; | ||
#interrupt-cells = <1>; | ||
interrupt-parent = <&tb10x_ictl>; | ||
interrupts = <27 2>; | ||
reg = <0xFF140000 0x1000>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
abilis,ngpio = <3>; | ||
gpio-ranges = <&iomux 0 0 0>; | ||
gpio-ranges-group-names = "gpioa_pins"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
Documentation/devicetree/bindings/pinctrl/abilis,tb10x-iomux.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
Abilis Systems TB10x pin controller | ||
=================================== | ||
|
||
Required properties | ||
------------------- | ||
|
||
- compatible: should be "abilis,tb10x-iomux"; | ||
- reg: should contain the physical address and size of the pin controller's | ||
register range. | ||
|
||
|
||
Function definitions | ||
-------------------- | ||
|
||
Functions are defined (and referenced) by sub-nodes of the pin controller. | ||
Every sub-node defines exactly one function (implying a set of pins). | ||
Every function is associated to one named pin group inside the pin controller | ||
driver and these names are used to associate pin group predefinitions to pin | ||
controller sub-nodes. | ||
|
||
Required function definition subnode properties: | ||
- abilis,function: should be set to the name of the function's pin group. | ||
|
||
The following pin groups are available: | ||
- GPIO ports: gpioa, gpiob, gpioc, gpiod, gpioe, gpiof, gpiog, | ||
gpioh, gpioi, gpioj, gpiok, gpiol, gpiom, gpion | ||
- Serial TS input ports: mis0, mis1, mis2, mis3, mis4, mis5, mis6, mis7 | ||
- Parallel TS input ports: mip1, mip3, mip5, mip7 | ||
- Serial TS output ports: mos0, mos1, mos2, mos3 | ||
- Parallel TS output port: mop | ||
- CI+ port: ciplus | ||
- CableCard (Mcard) port: mcard | ||
- Smart card ports: stc0, stc1 | ||
- UART ports: uart0, uart1 | ||
- SPI ports: spi1, spi3 | ||
- JTAG: jtag | ||
|
||
All other ports of the chip are not multiplexed and thus not managed by this | ||
driver. | ||
|
||
|
||
GPIO ranges definition | ||
---------------------- | ||
|
||
The named pin groups of GPIO ports can be used to define GPIO ranges as | ||
explained in Documentation/devicetree/bindings/gpio/gpio.txt. | ||
|
||
|
||
Example | ||
------- | ||
|
||
iomux: iomux@FF10601c { | ||
compatible = "abilis,tb10x-iomux"; | ||
reg = <0xFF10601c 0x4>; | ||
pctl_gpio_a: pctl-gpio-a { | ||
abilis,function = "gpioa"; | ||
}; | ||
pctl_uart0: pctl-uart0 { | ||
abilis,function = "uart0"; | ||
}; | ||
}; | ||
uart@FF100000 { | ||
compatible = "snps,dw-apb-uart"; | ||
reg = <0xFF100000 0x100>; | ||
clock-frequency = <166666666>; | ||
interrupts = <25 1>; | ||
reg-shift = <2>; | ||
reg-io-width = <4>; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pctl_uart0>; | ||
}; | ||
gpioa: gpio@FF140000 { | ||
compatible = "abilis,tb10x-gpio"; | ||
reg = <0xFF140000 0x1000>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
ngpio = <3>; | ||
gpio-ranges = <&iomux 0 0>; | ||
gpio-ranges-group-names = "gpioa"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
Documentation/devicetree/bindings/pinctrl/fsl,imx27-pinctrl.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
* Freescale IMX27 IOMUX Controller | ||
|
||
Required properties: | ||
- compatible: "fsl,imx27-iomuxc" | ||
|
||
The iomuxc driver node should define subnodes containing of pinctrl configuration subnodes. | ||
|
||
Required properties for pin configuration node: | ||
- fsl,pins: three integers array, represents a group of pins mux and config | ||
setting. The format is fsl,pins = <PIN MUX_ID CONFIG>. | ||
|
||
PIN is an integer between 0 and 0xbf. imx27 has 6 ports with 32 configurable | ||
configurable pins each. PIN is PORT * 32 + PORT_PIN, PORT_PIN is the pin | ||
number on the specific port (between 0 and 31). | ||
|
||
MUX_ID is | ||
function + (direction << 2) + (gpio_oconf << 4) + (gpio_iconfa << 8) + (gpio_iconfb << 10) | ||
|
||
function value is used to select the pin function. | ||
Possible values: | ||
0 - Primary function | ||
1 - Alternate function | ||
2 - GPIO | ||
Registers: GIUS (GPIO In Use), GPR (General Purpose Register) | ||
|
||
direction defines the data direction of the pin. | ||
Possible values: | ||
0 - Input | ||
1 - Output | ||
Register: DDIR | ||
|
||
gpio_oconf configures the gpio submodule output signal. This does not | ||
have any effect unless GPIO function is selected. A/B/C_IN are output | ||
signals of function blocks A,B and C. Specific function blocks are | ||
described in the reference manual. | ||
Possible values: | ||
0 - A_IN | ||
1 - B_IN | ||
2 - C_IN | ||
3 - Data Register | ||
Registers: OCR1, OCR2 | ||
|
||
gpio_iconfa/b configures the gpio submodule input to functionblocks A and | ||
B. GPIO function should be selected if this is configured. | ||
Possible values: | ||
0 - GPIO_IN | ||
1 - Interrupt Status Register | ||
2 - Pulldown | ||
3 - Pullup | ||
Registers ICONFA1, ICONFA2, ICONFB1 and ICONFB2 | ||
|
||
CONFIG can be 0 or 1, meaning Pullup disable/enable. | ||
|
||
|
||
|
||
Example: | ||
|
||
iomuxc: iomuxc@10015000 { | ||
compatible = "fsl,imx27-iomuxc"; | ||
reg = <0x10015000 0x600>; | ||
|
||
uart { | ||
pinctrl_uart1: uart-1 { | ||
fsl,pins = < | ||
0x8c 0x004 0x0 /* UART1_TXD__UART1_TXD */ | ||
0x8d 0x000 0x0 /* UART1_RXD__UART1_RXD */ | ||
0x8e 0x004 0x0 /* UART1_CTS__UART1_CTS */ | ||
0x8f 0x000 0x0 /* UART1_RTS__UART1_RTS */ | ||
>; | ||
}; | ||
|
||
... | ||
}; | ||
}; | ||
|
||
|
||
For convenience there are macros defined in imx27-pinfunc.h which provide PIN | ||
and MUX_ID. They are structured as MX27_PAD_<Pad name>__<Signal name>. The names | ||
are defined in the i.MX27 reference manual. | ||
|
||
The above example using macros: | ||
|
||
iomuxc: iomuxc@10015000 { | ||
compatible = "fsl,imx27-iomuxc"; | ||
reg = <0x10015000 0x600>; | ||
|
||
uart { | ||
pinctrl_uart1: uart-1 { | ||
fsl,pins = < | ||
MX27_PAD_UART1_TXD__UART1_TXD 0x0 | ||
MX27_PAD_UART1_RXD__UART1_RXD 0x0 | ||
MX27_PAD_UART1_CTS__UART1_CTS 0x0 | ||
MX27_PAD_UART1_RTS__UART1_RTS 0x0 | ||
>; | ||
}; | ||
|
||
... | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.