Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/device-tree/Bindings/gpio/gpio-axp209.txt
48378 views
1
AXP209 GPIO & pinctrl controller
2
3
This driver follows the usual GPIO bindings found in
4
Documentation/devicetree/bindings/gpio/gpio.txt
5
6
This driver follows the usual pinctrl bindings found in
7
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
8
9
This driver employs the per-pin muxing pattern.
10
11
Required 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
19
This node must be a subnode of the axp20x PMIC, documented in
20
Documentation/devicetree/bindings/mfd/axp20x.txt
21
22
Example:
23
24
axp209: 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
39
The GPIOs can be muxed to other functions and therefore, must be a subnode of
40
axp_gpio.
41
42
Example:
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
56
GPIOs and their functions
57
-------------------------
58
59
Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
60
not force GPIO1 and GPIO2 to be in gpio_in function as well).
61
62
axp209
63
------
64
GPIO | Functions
65
------------------------
66
GPIO0 | gpio_in, gpio_out, ldo, adc
67
GPIO1 | gpio_in, gpio_out, ldo, adc
68
GPIO2 | gpio_in, gpio_out
69
70
axp813
71
------
72
GPIO | Functions
73
------------------------
74
GPIO0 | gpio_in, gpio_out, ldo, adc
75
GPIO1 | gpio_in, gpio_out, ldo
76
77