Merge tag 'timers-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / gpio / gpio-axp209.txt
index a661130..fc42b2c 100644 (file)
@@ -1,10 +1,17 @@
-AXP209 GPIO controller
+AXP209 GPIO & pinctrl controller
 
 This driver follows the usual GPIO bindings found in
 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:
-- compatible: Should be "x-powers,axp209-gpio"
+- compatible: Should be one of:
+       - "x-powers,axp209-gpio"
+       - "x-powers,axp813-gpio"
 - #gpio-cells: Should be two. The first cell is the pin number and the
   second is the GPIO flags.
 - gpio-controller: Marks the device node as a GPIO controller.
@@ -28,3 +35,41 @@ axp209: pmic@34 {
                #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).
+
+axp209
+------
+GPIO   |       Functions
+------------------------
+GPIO0  |       gpio_in, gpio_out, ldo, adc
+GPIO1  |       gpio_in, gpio_out, ldo, adc
+GPIO2  |       gpio_in, gpio_out
+
+axp813
+------
+GPIO   |       Functions
+------------------------
+GPIO0  |       gpio_in, gpio_out, ldo, adc
+GPIO1  |       gpio_in, gpio_out, ldo