0001 * Microchip PIC32 GPIO devices (PIO).
0002
0003 Required properties:
0004 - compatible: "microchip,pic32mzda-gpio"
0005 - reg: Base address and length for the device.
0006 - interrupts: The port interrupt shared by all pins.
0007 - gpio-controller: Marks the port as GPIO controller.
0008 - #gpio-cells: Two. The first cell is the pin number and
0009 the second cell is used to specify the gpio polarity as defined in
0010 defined in <dt-bindings/gpio/gpio.h>:
0011 0 = GPIO_ACTIVE_HIGH
0012 1 = GPIO_ACTIVE_LOW
0013 2 = GPIO_OPEN_DRAIN
0014 - interrupt-controller: Marks the device node as an interrupt controller.
0015 - #interrupt-cells: Two. The first cell is the GPIO number and second cell
0016 is used to specify the trigger type as defined in
0017 <dt-bindings/interrupt-controller/irq.h>:
0018 IRQ_TYPE_EDGE_RISING
0019 IRQ_TYPE_EDGE_FALLING
0020 IRQ_TYPE_EDGE_BOTH
0021 - clocks: Clock specifier (see clock bindings for details).
0022 - microchip,gpio-bank: Specifies which bank a controller owns.
0023 - gpio-ranges: Interaction with the PINCTRL subsystem.
0024
0025 Example:
0026
0027 /* PORTA */
0028 gpio0: gpio0@1f860000 {
0029 compatible = "microchip,pic32mzda-gpio";
0030 reg = <0x1f860000 0x100>;
0031 interrupts = <118 IRQ_TYPE_LEVEL_HIGH>;
0032 #gpio-cells = <2>;
0033 gpio-controller;
0034 interrupt-controller;
0035 #interrupt-cells = <2>;
0036 clocks = <&rootclk PB4CLK>;
0037 microchip,gpio-bank = <0>;
0038 gpio-ranges = <&pic32_pinctrl 0 0 16>;
0039 };
0040
0041 keys {
0042 ...
0043
0044 button@sw1 {
0045 label = "ESC";
0046 linux,code = <1>;
0047 gpios = <&gpio0 12 0>;
0048 };
0049 };