gpio_oxnas.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. * Oxford Semiconductor OXNAS SoC GPIO Controller
  2. Please refer to gpio.txt for generic information regarding GPIO bindings.
  3. Required properties:
  4. - compatible: "oxsemi,ox810se-gpio" or "oxsemi,ox820-gpio"
  5. - reg: Base address and length for the device.
  6. - interrupts: The port interrupt shared by all pins.
  7. - gpio-controller: Marks the port as GPIO controller.
  8. - #gpio-cells: Two. The first cell is the pin number and
  9. the second cell is used to specify the gpio polarity as defined in
  10. defined in <dt-bindings/gpio/gpio.h>:
  11. 0 = GPIO_ACTIVE_HIGH
  12. 1 = GPIO_ACTIVE_LOW
  13. - interrupt-controller: Marks the device node as an interrupt controller.
  14. - #interrupt-cells: Two. The first cell is the GPIO number and second cell
  15. is used to specify the trigger type as defined in
  16. <dt-bindings/interrupt-controller/irq.h>:
  17. IRQ_TYPE_EDGE_RISING
  18. IRQ_TYPE_EDGE_FALLING
  19. IRQ_TYPE_EDGE_BOTH
  20. - gpio-ranges: Interaction with the PINCTRL subsystem, it also specifies the
  21. gpio base and count, should be in the format of numeric-gpio-range as
  22. specified in the gpio.txt file.
  23. Example:
  24. gpio0: gpio@0 {
  25. compatible = "oxsemi,ox810se-gpio";
  26. reg = <0x000000 0x100000>;
  27. interrupts = <21>;
  28. #gpio-cells = <2>;
  29. gpio-controller;
  30. interrupt-controller;
  31. #interrupt-cells = <2>;
  32. gpio-ranges = <&pinctrl 0 0 32>;
  33. };
  34. keys {
  35. ...
  36. button-esc {
  37. label = "ESC";
  38. linux,code = <1>;
  39. gpios = <&gpio0 12 0>;
  40. };
  41. };