Path: blob/main/sys/contrib/device-tree/Bindings/gpio/gpio-axp209.txt
48378 views
AXP209 GPIO & pinctrl controller12This driver follows the usual GPIO bindings found in3Documentation/devicetree/bindings/gpio/gpio.txt45This driver follows the usual pinctrl bindings found in6Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt78This driver employs the per-pin muxing pattern.910Required properties:11- compatible: Should be one of:12- "x-powers,axp209-gpio"13- "x-powers,axp813-gpio"14- #gpio-cells: Should be two. The first cell is the pin number and the15second is the GPIO flags.16- gpio-controller: Marks the device node as a GPIO controller.1718This node must be a subnode of the axp20x PMIC, documented in19Documentation/devicetree/bindings/mfd/axp20x.txt2021Example:2223axp209: pmic@34 {24compatible = "x-powers,axp209";25reg = <0x34>;26interrupt-parent = <&nmi_intc>;27interrupts = <0 IRQ_TYPE_LEVEL_LOW>;28interrupt-controller;29#interrupt-cells = <1>;3031axp_gpio: gpio {32compatible = "x-powers,axp209-gpio";33gpio-controller;34#gpio-cells = <2>;35};36};3738The GPIOs can be muxed to other functions and therefore, must be a subnode of39axp_gpio.4041Example:4243&axp_gpio {44gpio0_adc: gpio0-adc {45pins = "GPIO0";46function = "adc";47};48};4950&example_node {51pinctrl-names = "default";52pinctrl-0 = <&gpio0_adc>;53};5455GPIOs and their functions56-------------------------5758Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does59not force GPIO1 and GPIO2 to be in gpio_in function as well).6061axp20962------63GPIO | Functions64------------------------65GPIO0 | gpio_in, gpio_out, ldo, adc66GPIO1 | gpio_in, gpio_out, ldo, adc67GPIO2 | gpio_in, gpio_out6869axp81370------71GPIO | Functions72------------------------73GPIO0 | gpio_in, gpio_out, ldo, adc74GPIO1 | gpio_in, gpio_out, ldo757677