summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.txt
blob: d9b2100c98e892d7ec4d88a972d86737c72c3369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Ingenic XBurst pin controller

Please refer to pinctrl-bindings.txt in this directory for details of the
common pinctrl bindings used by client devices, including the meaning of the
phrase "pin configuration node".

For the XBurst SoCs, pin control is tightly bound with GPIO ports. All pins may
be used as GPIOs, multiplexed device functions are configured within the
GPIO port configuration registers and it is typical to refer to pins using the
naming scheme "PxN" where x is a character identifying the GPIO port with
which the pin is associated and N is an integer from 0 to 31 identifying the
pin within that GPIO port. For example PA0 is the first pin in GPIO port A, and
PB31 is the last pin in GPIO port B. The jz4740, the x1000 and the x1830
contains 4 GPIO ports, PA to PD, for a total of 128 pins. The jz4760, the
jz4770 and the jz4780 contains 6 GPIO ports, PA to PF, for a total of 192 pins.


Required properties:
--------------------

 - compatible: One of:
    - "ingenic,jz4740-pinctrl"
    - "ingenic,jz4725b-pinctrl"
    - "ingenic,jz4760-pinctrl"
    - "ingenic,jz4760b-pinctrl"
    - "ingenic,jz4770-pinctrl"
    - "ingenic,jz4780-pinctrl"
    - "ingenic,x1000-pinctrl"
    - "ingenic,x1000e-pinctrl"
    - "ingenic,x1500-pinctrl"
    - "ingenic,x1830-pinctrl"
 - reg: Address range of the pinctrl registers.


Required properties for sub-nodes (GPIO chips):
-----------------------------------------------

 - compatible: Must contain one of:
    - "ingenic,jz4740-gpio"
    - "ingenic,jz4760-gpio"
    - "ingenic,jz4770-gpio"
    - "ingenic,jz4780-gpio"
    - "ingenic,x1000-gpio"
    - "ingenic,x1830-gpio"
 - reg: The GPIO bank number.
 - interrupt-controller: Marks the device node as an interrupt controller.
 - interrupts: Interrupt specifier for the controllers interrupt.
 - #interrupt-cells: Should be 2. Refer to
   ../interrupt-controller/interrupts.txt for more details.
 - gpio-controller: Marks the device node as a GPIO controller.
 - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
    cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
    GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
 - gpio-ranges: Range of pins managed by the GPIO controller. Refer to
   ../gpio/gpio.txt for more details.


Example:
--------

pinctrl: pin-controller@10010000 {
	compatible = "ingenic,jz4740-pinctrl";
	reg = <0x10010000 0x400>;
	#address-cells = <1>;
	#size-cells = <0>;

	gpa: gpio@0 {
		compatible = "ingenic,jz4740-gpio";
		reg = <0>;

		gpio-controller;
		gpio-ranges = <&pinctrl 0 0 32>;
		#gpio-cells = <2>;

		interrupt-controller;
		#interrupt-cells = <2>;

		interrupt-parent = <&intc>;
		interrupts = <28>;
	};
};