Commit f17aea43 authored by Quentin Schulz's avatar Quentin Schulz Committed by Linus Walleij

dt-bindings: gpio: gpio-axp209: add pinctrl features

The X-Powers AXP209 has 3 GPIOs. GPIO0/1 can each act either as a GPIO,
an ADC or a LDO regulator. GPIO2 can only act as a GPIO.

This adds the pinctrl features to the driver so GPIO0/1 can be used as
ADC or LDO regulator.
Signed-off-by: default avatarQuentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 23f75d7d
AXP209 GPIO controller AXP209 GPIO & pinctrl controller
This driver follows the usual GPIO bindings found in This driver follows the usual GPIO bindings found in
Documentation/devicetree/bindings/gpio/gpio.txt Documentation/devicetree/bindings/gpio/gpio.txt
This driver follows the usual pinctrl bindings found in
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
This driver employs the per-pin muxing pattern.
Required properties: Required properties:
- compatible: Should be "x-powers,axp209-gpio" - compatible: Should be "x-powers,axp209-gpio"
- #gpio-cells: Should be two. The first cell is the pin number and the - #gpio-cells: Should be two. The first cell is the pin number and the
...@@ -28,3 +33,32 @@ axp209: pmic@34 { ...@@ -28,3 +33,32 @@ axp209: pmic@34 {
#gpio-cells = <2>; #gpio-cells = <2>;
}; };
}; };
The GPIOs can be muxed to other functions and therefore, must be a subnode of
axp_gpio.
Example:
&axp_gpio {
gpio0_adc: gpio0-adc {
pins = "GPIO0";
function = "adc";
};
};
&example_node {
pinctrl-names = "default";
pinctrl-0 = <&gpio0_adc>;
};
GPIOs and their functions
-------------------------
Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
not force GPIO1 and GPIO2 to be in gpio_in function as well).
GPIO | Functions
------------------------
GPIO0 | gpio_in, gpio_out, ldo, adc
GPIO1 | gpio_in, gpio_out, ldo, adc
GPIO2 | gpio_in, gpio_out
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment