]> git.karo-electronics.de Git - karo-tx-linux.git/blob - Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
pinctrl: sunxi: Add A23 PIO controller support
[karo-tx-linux.git] / Documentation / devicetree / bindings / pinctrl / allwinner,sunxi-pinctrl.txt
1 * Allwinner A1X Pin Controller
2
3 The pins controlled by sunXi pin controller are organized in banks,
4 each bank has 32 pins.  Each pin has 7 multiplexing functions, with
5 the first two functions being GPIO in and out. The configuration on
6 the pins includes drive strength and pull-up.
7
8 Required properties:
9 - compatible: Should be one of the followings (depending on you SoC):
10   "allwinner,sun4i-a10-pinctrl"
11   "allwinner,sun5i-a10s-pinctrl"
12   "allwinner,sun5i-a13-pinctrl"
13   "allwinner,sun6i-a31-pinctrl"
14   "allwinner,sun6i-a31-r-pinctrl"
15   "allwinner,sun7i-a20-pinctrl"
16   "allwinner,sun8i-a23-pinctrl"
17 - reg: Should contain the register physical address and length for the
18   pin controller.
19
20 Please refer to pinctrl-bindings.txt in this directory for details of the
21 common pinctrl bindings used by client devices.
22
23 A pinctrl node should contain at least one subnodes representing the
24 pinctrl groups available on the machine. Each subnode will list the
25 pins it needs, and how they should be configured, with regard to muxer
26 configuration, drive strength and pullups. If one of these options is
27 not set, its actual value will be unspecified.
28
29 Required subnode-properties:
30
31 - allwinner,pins: List of strings containing the pin name.
32 - allwinner,function: Function to mux the pins listed above to.
33
34 Optional subnode-properties:
35 - allwinner,drive: Integer. Represents the current sent to the pin
36     0: 10 mA
37     1: 20 mA
38     2: 30 mA
39     3: 40 mA
40 - allwinner,pull: Integer.
41     0: No resistor
42     1: Pull-up resistor
43     2: Pull-down resistor
44
45 Examples:
46
47 pinctrl@01c20800 {
48         compatible = "allwinner,sun5i-a13-pinctrl";
49         reg = <0x01c20800 0x400>;
50         #address-cells = <1>;
51         #size-cells = <0>;
52
53         uart1_pins_a: uart1@0 {
54                 allwinner,pins = "PE10", "PE11";
55                 allwinner,function = "uart1";
56                 allwinner,drive = <0>;
57                 allwinner,pull = <0>;
58         };
59
60         uart1_pins_b: uart1@1 {
61                 allwinner,pins = "PG3", "PG4";
62                 allwinner,function = "uart1";
63                 allwinner,drive = <0>;
64                 allwinner,pull = <0>;
65         };
66 };