162306a36Sopenharmony_ci* Microchip PIC32 GPIO devices (PIO). 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciRequired properties: 462306a36Sopenharmony_ci - compatible: "microchip,pic32mzda-gpio" 562306a36Sopenharmony_ci - reg: Base address and length for the device. 662306a36Sopenharmony_ci - interrupts: The port interrupt shared by all pins. 762306a36Sopenharmony_ci - gpio-controller: Marks the port as GPIO controller. 862306a36Sopenharmony_ci - #gpio-cells: Two. The first cell is the pin number and 962306a36Sopenharmony_ci the second cell is used to specify the gpio polarity as defined in 1062306a36Sopenharmony_ci defined in <dt-bindings/gpio/gpio.h>: 1162306a36Sopenharmony_ci 0 = GPIO_ACTIVE_HIGH 1262306a36Sopenharmony_ci 1 = GPIO_ACTIVE_LOW 1362306a36Sopenharmony_ci 2 = GPIO_OPEN_DRAIN 1462306a36Sopenharmony_ci - interrupt-controller: Marks the device node as an interrupt controller. 1562306a36Sopenharmony_ci - #interrupt-cells: Two. The first cell is the GPIO number and second cell 1662306a36Sopenharmony_ci is used to specify the trigger type as defined in 1762306a36Sopenharmony_ci <dt-bindings/interrupt-controller/irq.h>: 1862306a36Sopenharmony_ci IRQ_TYPE_EDGE_RISING 1962306a36Sopenharmony_ci IRQ_TYPE_EDGE_FALLING 2062306a36Sopenharmony_ci IRQ_TYPE_EDGE_BOTH 2162306a36Sopenharmony_ci - clocks: Clock specifier (see clock bindings for details). 2262306a36Sopenharmony_ci - microchip,gpio-bank: Specifies which bank a controller owns. 2362306a36Sopenharmony_ci - gpio-ranges: Interaction with the PINCTRL subsystem. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciExample: 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* PORTA */ 2862306a36Sopenharmony_cigpio0: gpio0@1f860000 { 2962306a36Sopenharmony_ci compatible = "microchip,pic32mzda-gpio"; 3062306a36Sopenharmony_ci reg = <0x1f860000 0x100>; 3162306a36Sopenharmony_ci interrupts = <118 IRQ_TYPE_LEVEL_HIGH>; 3262306a36Sopenharmony_ci #gpio-cells = <2>; 3362306a36Sopenharmony_ci gpio-controller; 3462306a36Sopenharmony_ci interrupt-controller; 3562306a36Sopenharmony_ci #interrupt-cells = <2>; 3662306a36Sopenharmony_ci clocks = <&rootclk PB4CLK>; 3762306a36Sopenharmony_ci microchip,gpio-bank = <0>; 3862306a36Sopenharmony_ci gpio-ranges = <&pic32_pinctrl 0 0 16>; 3962306a36Sopenharmony_ci}; 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_cikeys { 4262306a36Sopenharmony_ci ... 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci button@sw1 { 4562306a36Sopenharmony_ci label = "ESC"; 4662306a36Sopenharmony_ci linux,code = <1>; 4762306a36Sopenharmony_ci gpios = <&gpio0 12 0>; 4862306a36Sopenharmony_ci }; 4962306a36Sopenharmony_ci}; 50