Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1AXP209 GPIO & pinctrl controller
2
3This driver follows the usual GPIO bindings found in
4Documentation/devicetree/bindings/gpio/gpio.txt
5
6This driver follows the usual pinctrl bindings found in
7Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
8
9This driver employs the per-pin muxing pattern.
10
11Required properties:
12- compatible: Should be one of:
13 - "x-powers,axp209-gpio"
14 - "x-powers,axp813-gpio"
15- #gpio-cells: Should be two. The first cell is the pin number and the
16 second is the GPIO flags.
17- gpio-controller: Marks the device node as a GPIO controller.
18
19This node must be a subnode of the axp20x PMIC, documented in
20Documentation/devicetree/bindings/mfd/axp20x.txt
21
22Example:
23
24axp209: pmic@34 {
25 compatible = "x-powers,axp209";
26 reg = <0x34>;
27 interrupt-parent = <&nmi_intc>;
28 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
29 interrupt-controller;
30 #interrupt-cells = <1>;
31
32 axp_gpio: gpio {
33 compatible = "x-powers,axp209-gpio";
34 gpio-controller;
35 #gpio-cells = <2>;
36 };
37};
38
39The GPIOs can be muxed to other functions and therefore, must be a subnode of
40axp_gpio.
41
42Example:
43
44&axp_gpio {
45 gpio0_adc: gpio0-adc {
46 pins = "GPIO0";
47 function = "adc";
48 };
49};
50
51&example_node {
52 pinctrl-names = "default";
53 pinctrl-0 = <&gpio0_adc>;
54};
55
56GPIOs and their functions
57-------------------------
58
59Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
60not force GPIO1 and GPIO2 to be in gpio_in function as well).
61
62axp209
63------
64GPIO | Functions
65------------------------
66GPIO0 | gpio_in, gpio_out, ldo, adc
67GPIO1 | gpio_in, gpio_out, ldo, adc
68GPIO2 | gpio_in, gpio_out
69
70axp813
71------
72GPIO | Functions
73------------------------
74GPIO0 | gpio_in, gpio_out, ldo, adc
75GPIO1 | gpio_in, gpio_out, ldo