brcm,nsp-gpio.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. Broadcom Northstar plus (NSP) GPIO/PINCONF Controller
  2. Required properties:
  3. - compatible:
  4. Must be "brcm,nsp-gpio-a"
  5. - reg:
  6. Should contain the register physical address and length for each of
  7. GPIO base, IO control registers
  8. - #gpio-cells:
  9. Must be two. The first cell is the GPIO pin number (within the
  10. controller's pin space) and the second cell is used for the following:
  11. bit[0]: polarity (0 for active high and 1 for active low)
  12. - gpio-controller:
  13. Specifies that the node is a GPIO controller
  14. - ngpios:
  15. Number of gpios supported (58x25 supports 32 and 58x23 supports 24)
  16. Optional properties:
  17. - interrupts:
  18. Interrupt ID
  19. - interrupt-controller:
  20. Specifies that the node is an interrupt controller
  21. - gpio-ranges:
  22. Specifies the mapping between gpio controller and pin-controllers pins.
  23. This requires 4 fields in cells defined as -
  24. 1. Phandle of pin-controller.
  25. 2. GPIO base pin offset.
  26. 3 Pin-control base pin offset.
  27. 4. number of gpio pins which are linearly mapped from pin base.
  28. Supported generic PINCONF properties in child nodes:
  29. - pins:
  30. The list of pins (within the controller's own pin space) that properties
  31. in the node apply to. Pin names are "gpio-<pin>"
  32. - bias-disable:
  33. Disable pin bias
  34. - bias-pull-up:
  35. Enable internal pull up resistor
  36. - bias-pull-down:
  37. Enable internal pull down resistor
  38. - drive-strength:
  39. Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA)
  40. Example:
  41. gpioa: gpio@18000020 {
  42. compatible = "brcm,nsp-gpio-a";
  43. reg = <0x18000020 0x100>,
  44. <0x1803f1c4 0x1c>;
  45. #gpio-cells = <2>;
  46. gpio-controller;
  47. ngpios = <32>;
  48. gpio-ranges = <&pinctrl 0 0 31>;
  49. interrupt-controller;
  50. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
  51. /* Hog a few default settings */
  52. pinctrl-names = "default";
  53. pinctrl-0 = <&led>;
  54. led: led {
  55. pins = "gpio-1";
  56. bias-pull-up;
  57. };
  58. pwr: pwr {
  59. gpio-hog;
  60. gpios = <3 1>;
  61. output-high;
  62. };
  63. };