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

Commit 5aad0db1 authored by Christian Ruppert's avatar Christian Ruppert Committed by Linus Walleij
Browse files

pinctrl: add TB10x pin control driver



The pinmux driver of the Abilis Systems TB10x platform based on ARC700 CPUs.
Used to control the pinmux and is a prerequisite for the GPIO driver.

Signed-off-by: default avatarChristian Ruppert <christian.ruppert@abilis.com>
Signed-off-by: default avatarPierrick Hascoet <pierrick.hascoet@abilis.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 586a87e6
Loading
Loading
Loading
Loading
+80 −0
Original line number Diff line number Diff line
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";
};
+4 −0
Original line number Diff line number Diff line
@@ -321,6 +321,10 @@ config PINCTRL_XWAY
	depends on SOC_TYPE_XWAY
	depends on PINCTRL_LANTIQ

config PINCTRL_TB10X
	bool
	depends on ARC_PLAT_TB10X

endmenu

endif
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ obj-$(CONFIG_PINCTRL_S3C24XX) += pinctrl-s3c24xx.o
obj-$(CONFIG_PINCTRL_S3C64XX)	+= pinctrl-s3c64xx.o
obj-$(CONFIG_PINCTRL_XWAY)	+= pinctrl-xway.o
obj-$(CONFIG_PINCTRL_LANTIQ)	+= pinctrl-lantiq.o
obj-$(CONFIG_PINCTRL_TB10X)	+= pinctrl-tb10x.o
obj-$(CONFIG_PINCTRL_ST) 	+= pinctrl-st.o
obj-$(CONFIG_PINCTRL_VF610)	+= pinctrl-vf610.o

+886 −0

File added.

Preview size limit exceeded, changes collapsed.